'Programming > javascript & HTML' 카테고리의 다른 글
| jquery n번째 요소 선택하기, select 선택하기 (0) | 2018.09.27 |
|---|---|
| css 배경 이미지 회전, 크기 등 (0) | 2018.09.27 |
| ajax (0) | 2018.09.20 |
| polar clock (0) | 2018.09.20 |
| visjs (0) | 2018.09.18 |
| jquery n번째 요소 선택하기, select 선택하기 (0) | 2018.09.27 |
|---|---|
| css 배경 이미지 회전, 크기 등 (0) | 2018.09.27 |
| ajax (0) | 2018.09.20 |
| polar clock (0) | 2018.09.20 |
| visjs (0) | 2018.09.18 |
이번에도 또 물티슈 대장균 이런거 검출된거 있다고 난리네
근데.. 반대로 생각하면 관리가 무진장 안된녀석이 아니라면
방부제가 조금들어 있는 녀석으로 보면 안되는건가?
아무튼 물인데 문제가 없다면 방부제가 들은거고
문제가 있으면 방부제가 없는거고
방부제 vs 유해균 중에 저울질을 해야 하는건가...
[링크 : https://news.v.daum.net/v/20180920120329297]
개인적으로는 웬지 찜찜해서 야외 아니면 되도록이면 물로 싰기는 편이긴 한데
(키친 타월에 물 뭍혀서 딱는다거나)
좀 더 간편하게 주변에서 물티슈 처럼 질긴 휴지가 있음 좋겠다는 생각이 든다.
error / success / complete 세가지에 대해서 처리해주는 것이 좋다.
(귀찮아서 success만 했는데..)
| css 배경 이미지 회전, 크기 등 (0) | 2018.09.27 |
|---|---|
| svg.js (0) | 2018.09.21 |
| polar clock (0) | 2018.09.20 |
| visjs (0) | 2018.09.18 |
| 자바스크립트 ES6 와 화살표 펑션 (=>) (2) | 2018.09.18 |
가끔(?) status 하면 새로 추가되거나 수정된 파일이 안뜰때가 있는데
이거 해주면 새로 읽어서 status에 뜨게 해준다.
$ git update-index --again |
[링크 : https://stackoverflow.com/questions/10006462/refresh-staged-files]
| git 리비전 이동 후 pull 안되는 문제 (0) | 2018.10.22 |
|---|---|
| git 리비전 돌아 다니기 (0) | 2018.10.18 |
| git 원격지 주소 변경하기 (0) | 2018.09.06 |
| git archive (svn export) (0) | 2018.09.05 |
| git rm 복구하기 (0) | 2018.08.22 |
그래프 만져보는데 나쁘지 않은 듯?
[링크 : http://bl.ocks.org/mbostock/1096355]
원래 공개된 소스에서는 d3.js가 경로가 잘못되었고
하나만 띄울수 있어서 함수로 변형하니 div 여러개에 각각 띄울수 있게 된다.
<script src="https://d3js.org/d3.v3.min.js"></script> <script> function clock_instance(element_id) { var width = 300, height = 300, radius = Math.min(width, height) / 1.9, spacing = .09; var formatSecond = d3.time.format("%-S seconds"), formatMinute = d3.time.format("%-M minutes"), formatHour = d3.time.format("%-H hours"), formatDay = d3.time.format("%A"), formatDate = function(d) { d = d.getDate(); switch (10 <= d && d <= 19 ? 10 : d % 10) { case 1: d += "st"; break; case 2: d += "nd"; break; case 3: d += "rd"; break; default: d += "th"; break; } return d; }, formatMonth = d3.time.format("%B"); var color = d3.scale.linear() .range(["hsl(-180,60%,50%)", "hsl(180,60%,50%)"]) .interpolate(function(a, b) { var i = d3.interpolateString(a, b); return function(t) { return d3.hsl(i(t)); }; }); var arcBody = d3.svg.arc() .startAngle(0) .endAngle(function(d) { return d.value * 2 * Math.PI; }) .innerRadius(function(d) { return d.index * radius; }) .outerRadius(function(d) { return (d.index + spacing) * radius; }) .cornerRadius(6); var arcCenter = d3.svg.arc() .startAngle(0) .endAngle(function(d) { return d.value * 2 * Math.PI; }) .innerRadius(function(d) { return (d.index + spacing / 2) * radius; }) .outerRadius(function(d) { return (d.index + spacing / 2) * radius; }); var svg = d3.select(element_id).append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); var field = svg.selectAll("g") .data(fields) .enter().append("g"); field.append("path") .attr("class", "arc-body"); field.append("path") .attr("id", function(d, i) { return "arc-center-" + i; }) .attr("class", "arc-center"); field.append("text") .attr("dy", ".35em") .attr("dx", ".75em") .style("text-anchor", "start") .append("textPath") .attr("startOffset", "50%") .attr("class", "arc-text") .attr("xlink:href", function(d, i) { return "#arc-center-" + i; }); tick(); d3.select(self.frameElement).style("height", height + "px"); function tick() { if (!document.hidden) field .each(function(d) { this._value = d.value; }) .data(fields) .each(function(d) { d.previousValue = this._value; }) .transition() .ease("elastic") .duration(500) .each(fieldTransition); setTimeout(tick, 1000 - Date.now() % 1000); } function fieldTransition() { var field = d3.select(this).transition(); field.select(".arc-body") .attrTween("d", arcTween(arcBody)) .style("fill", function(d) { return color(d.value); }); field.select(".arc-center") .attrTween("d", arcTween(arcCenter)); field.select(".arc-text") .text(function(d) { return d.text; }); } function arcTween(arc) { return function(d) { var i = d3.interpolateNumber(d.previousValue, d.value); return function(t) { d.value = i(t); return arc(d); }; }; } function fields() { var now = new Date; return [ {index: .7, text: formatSecond(now), value: now.getSeconds() / 60}, {index: .6, text: formatMinute(now), value: now.getMinutes() / 60}, {index: .5, text: formatHour(now), value: now.getHours() / 24}, {index: .3, text: formatDay(now), value: now.getDay() / 7}, {index: .2, text: formatDate(now), value: (now.getDate() - 1) / (32 - new Date(now.getYear(), now.getMonth(), 32).getDate())}, {index: .1, text: formatMonth(now), value: now.getMonth() / 12} ]; } } </script> <body> <div id="credit">Inspired by <a href="http://blog.pixelbreaker.com/polarclock/">pixelbreaker</a>.</div> <div> <div id='id-1' style="float:left"/> <div id='id-2' style="float:left"/> <div> </body> <script> clock_instance("#id-1"); clock_instance("#id-2"); </script> |
[링크 : https://stackoverflow.com/.../d3-selectelement-not-working-when-code-above-the-html-element]
1. 색상은 hsl 색상으로 칠해짐.
2. 값의 범위와 값이 같으면 동일한 색
3. 가장 적은 값은 앞의 범위로 부터 시작함, 아래와 같이 설정되면 빨간색에서 cyan 까지 칠해짐
.range(["hsl(0,60%,50%)", "hsl(180,60%,50%)"]) |
4. 값의 범위는 소수로 한정됨(즉, 0~1 사이의 실수로 정규화 됨)
function fields() { var now = new Date; return [ {index: .6, text: formatSecond(now), value: now.getSeconds() / 60}, {index: .5, text: formatMinute(now), value: now.getMinutes() / 60}, {index: .4, text: formatHour(now), value: now.getHours() / 24}, {index: .3, text: formatDay(now), value: now.getDay() / 7}, {index: .2, text: formatDate(now), value: (now.getDate() - 1) / (32 - new Date(now.getYear(), now.getMonth(), 32).getDate())}, {index: .1, text: formatMonth(now), value: now.getMonth() / 12} ]; } |
| svg.js (0) | 2018.09.21 |
|---|---|
| ajax (0) | 2018.09.20 |
| visjs (0) | 2018.09.18 |
| 자바스크립트 ES6 와 화살표 펑션 (=>) (2) | 2018.09.18 |
| 그래프 (0) | 2018.09.18 |
기사보다 발견
[링크 : https://news.v.daum.net/v/20180918173000976]
9월 5일 발표했고, 캐논의 첫 풀 프레임 미러리스
2300달러 바디, 3400달러 킷
찾아보니 오두막4랑 같은 가격대 ㄷ ㄷ
회사에서 설치할때는 별 소리 없더니
집에와서 설치하려고 하니 먼가 경고가 뿜뿜한다 -_-
결론만 말하자면, 저거 경고일뿐 일단 설치는 된거니 무시해도 된다 정도?
$ npm install added 150 packages from 251 contributors and audited 305 packages in 12.634s found 2 vulnerabilities (1 low, 1 moderate) run `npm audit fix` to fix them, or `npm audit` for details $ npm audit fix + mysql@2.16.0 added 4 packages from 8 contributors, removed 1 package and updated 5 packages i fixed 1 of 2 vulnerabilities in 305 scanned packages 1 vulnerability required manual review and could not be updated $ npm audit === npm audit security report === Manual Review Some vulnerabilities require your attention to resolve Visit https://go.npm.me/audit-guide for additional guidance Low Regular Expression Denial of Service Package debug Patched in >= 2.6.9 < 3.0.0 || >= 3.1.0 Dependency of node-rest-client Path node-rest-client > debug More info https://nodesecurity.io/advisories/534 found 1 low severity vulnerability in 310 scanned packages 1 vulnerability requires manual review. See the full report for details. $ npm install --no-audit up to date in 0.912s |
| npm install이 윈도우에서 안될때 (2) | 2018.09.27 |
|---|---|
| node.js 를 이용한 HTML 데이터 추출(크롤링) (4) | 2018.09.27 |
| promise-mysql (0) | 2018.09.18 |
| node.js 동기와 비동기 그리고 promise (0) | 2018.09.18 |
| node.js readline 자동완성(autocompletion) (0) | 2018.09.14 |
자꾸 하드에는 문제가 없는것 같은데 영상이 끊어져서 로그를 보니
이상증상이 발생.. 랜이 문제인가.. 아니면 하드가 문제인가.. ㄷㄷ
[1021784.635712] :eth0: link up, full duplex, speed 1 Gbps [1028414.663257] :eth0: link down [1028414.666737] :eth0: link up, full duplex, speed 1 Gbps [1028461.461712] :eth0: link down [1028463.965768] :eth0: link up, full duplex, speed 1 Gbps [1028900.171094] ata1: wake up from deepsleep, reset link now [1028900.402572] ata1: device plugged sstatus 0x123 [1028907.171043] ata2: wake up from deepsleep, reset link now [1028907.402658] ata2: device plugged sstatus 0x123 [1028910.181567] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300) [1028910.301227] ata1.00: configured for UDMA/133 [1028910.305714] ata1: wake up successful, the reset fail can be ignored [1028941.012559] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300) [1028941.092583] ata2.00: configured for UDMA/133 [1028941.097066] ata2: wake up successful, the reset fail can be ignored ... [1120631.009260] :eth0: link down [1120638.963169] :eth0: link up, full duplex, speed 1 Gbps [1120644.395001] init: nmbd main process (5071) killed by TERM signal |
일단은 오랫만에 리부팅..
| 2.5인치 SAS/SATA 트레이 (0) | 2019.02.28 |
|---|---|
| 시게이트 SSHD 스펙 (0) | 2019.01.16 |
| synology 기분 탓인가.. 늦게 켜지네 (0) | 2018.07.27 |
| microSD 소비전류 (0) | 2018.06.22 |
| SD 메모리 성능관련 (2) | 2018.05.17 |
config.txt
dtoverlay=gpio-ir |
콘솔에서 테스트
# systemctl stop kodi # systemctl stop eventlircd # ir-keytable -t # irw |
[링크 : https://wiki.libreelec.tv/infrared_remotes]
dmesg 내용 lircd 이런 문구는 빠지고 단지 RC라던가 gpio_ir 이런식으로 문구가 바뀌어있다.
[ 4.189143] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000 [ 4.204139] Registered IR keymap rc-rc6-mce [ 4.204602] input: gpio_ir_recv as /devices/platform/ir-receiver/rc/rc0/input0 [ 4.205457] rc rc0: gpio_ir_recv as /devices/platform/ir-receiver/rc/rc0 [ 4.249361] IR RC6 protocol handler initialized [ 4.275615] Console: switching to colour dummy device 80x30 [ 4.340170] IR NEC protocol handler initialized [ 4.626084] usbcore: registered new interface driver brcmfmac [ 4.790759] uart-pl011 3f201000.serial: no DMA platform data [ 4.818228] brcmfmac: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab [ 4.863885] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup |
특이하게도(?) 하라는대로 안되서 일단 삐딱선을 타는중
irw로는 eventlircd 에서 잡고 있어서 읽히지 않고 서비스를 죽이면 irw로 읽지 못한다 -_-
그래서 ir-keytable로 읽히는걸 확인
OpenELEC:~ # irw ^C OpenELEC:~ # systemctl stop eventlircd OpenELEC:~ # systemctl stop kodi OpenELEC:~ # irw connect: No such file or directory OpenELEC:~ # ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event0) with: Driver gpio-rc-recv, table rc-rc6-mce Supported protocols: unknown other rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp Enabled protocols: nec rc-6 Name: gpio_ir_recv bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms OpenELEC:~ # ir-keytable -t Testing events. Please, press CTRL-C to abort. 1537273010.205799: event type EV_MSC(0x04): scancode = 0x5e 1537273010.205799: event type EV_SYN(0x00). 1537273010.671725: event type EV_MSC(0x04): scancode = 0x5e 1537273010.671725: event type EV_SYN(0x00). 1537273011.578027: event type EV_MSC(0x04): scancode = 0x58 1537273011.578027: event type EV_SYN(0x00). 1537273012.054831: event type EV_MSC(0x04): scancode = 0x04 1537273012.054831: event type EV_SYN(0x00). 1537273012.423875: event type EV_MSC(0x04): scancode = 0x06 1537273012.423875: event type EV_SYN(0x00). 1537273012.979334: event type EV_MSC(0x04): scancode = 0x59 1537273012.979334: event type EV_SYN(0x00). 1537273014.182888: event type EV_MSC(0x04): scancode = 0x44 1537273014.182888: event type EV_SYN(0x00). 1537273014.540484: event type EV_MSC(0x04): scancode = 0x45 1537273014.540484: event type EV_SYN(0x00). 1537273014.865167: event type EV_MSC(0x04): scancode = 0x48 1537273014.865167: event type EV_SYN(0x00). |
음.. 이 변화가 커널 영향인가 아니면.. 라즈베리 배포판 시기 문제인가..
# uname -a Linux OpenELEC 4.9.25 #1 SMP Sat Apr 29 05:11:28 CEST 2017 armv7l GNU/Linux |
| rpi face detection & recognition (4) | 2018.11.16 |
|---|---|
| openELEC(kodi) 미스테리.. (0) | 2018.09.22 |
| 라즈베리 파이 3 + openELEC (0) | 2018.09.16 |
| 라즈베리 파이 3B 소비전류 (0) | 2018.09.16 |
| 라즈베리 파이 3 - 블루투스 / wifi (2) | 2018.09.15 |
| ajax (0) | 2018.09.20 |
|---|---|
| polar clock (0) | 2018.09.20 |
| 자바스크립트 ES6 와 화살표 펑션 (=>) (2) | 2018.09.18 |
| 그래프 (0) | 2018.09.18 |
| jquery datatables (0) | 2018.09.17 |