https://www.gravatar.com/avatar/ecd1e184bdf4016f24c818bde9e65b3d?s=240&d=mp
记录点滴、留住时光

d3学习笔记

Let’s Make a Bar Chart

  • Part 1

    • Chaining Methods

    • d3.scaleLinear

    • canvas or SVG中,y坐标是向下的

    • 1
      2
      3
      
      y = d3.scaleLinear()
          .domain(d3.extent(data, d => d.value)).nice()
          .range([height - margin.bottom, margin.top])
      

      nice()做最小最大边界取整的数

    • Piecewise scales 分段比例尺

    • d3.ticks(-1, 1, 10)

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      
      Array(11) [
        0: -1
        1: -0.8
        2: -0.6
        3: -0.4
        4: -0.2
        5: 0
        6: 0.2
        7: 0.4
        8: 0.6
        9: 0.8
        10: 1
      ]
      
  • Part 2

windows10下端口映射

显示当前映射的端口

1
netsh interface portproxy show all

添加一个映射端口

1
netsh interface portproxy add v4tov4 listenport=10022 listenaddress=* connectport=22 connectaddress=192.168.100.1 protocol=tcp

删除一个映射端口

1
netsh interface portproxy del v4tov4 listenport=10022 listenaddress=*

常见问题

  • 查端口指令
1
NETSTAT.EXE -antp tcp|findstr LISTENING|findstr 22

如果没有监听映射的端口,请检查是否开户了IP Help服务

windows10下安装pandas

  • 直接用pip安装可能会失败,这时需要使用代理安装
  • cmd下的代理配置方法
1
2
set http_proxy=http://127.0.0.1:10809
set https_proxy=http://127.0.0.1:10809
  • 再用pip install pandas即可安装成功

https://note.youdao.com/yws/public/resource/40e7acccfd342428f39d3dc7cca9ce31/xmlnote/WEBRESOURCE95a211f93a1047f0bc26160ef4c6690a/123