首先要有个公网服务器,我的是阿里云的。在搭建之前先把要暴露的端口范围给暴露出来,也就是把防火墙打开。随后去到 GitHub 上下载服务器端和客户端。
项目地址:https://github.com/fatedier/frp
下载地址:https://github.com/fatedier/frp/releases
中文文档:https://github.com/fatedier/frp/blob/master/README_zh.md
建议先粗略看完文档后再继续阅读
首先要有个公网服务器,我的是阿里云的。在搭建之前先把要暴露的端口范围给暴露出来,也就是把防火墙打开。随后去到 GitHub 上下载服务器端和客户端。
项目地址:https://github.com/fatedier/frp
下载地址:https://github.com/fatedier/frp/releases
中文文档:https://github.com/fatedier/frp/blob/master/README_zh.md
建议先粗略看完文档后再继续阅读
想要让路由器下的设备获得 IPv6 地址通常有三种方式:relay(中继)、NAT(地址转换)、Passthrough(穿透)这里主要讲穿透方式
k2 没刷入 OpenWrt-19.07.1 的,可点击以下链接下载并刷入:
https://downloads.openwrt.org/releases/19.07.1/targets/ramips/mt7620/openwrt-19.07.1-ramips-mt7620-psg1218a-squashfs-sysupgrade.bin
移动端适配大致两种,一种是百分比还有一种就是rem,这里就说说rem适配要怎么做,原理是什么。先说说为什么要做适配吧。
众所周知,手机屏幕的尺寸是五花八门的,像素密度也是不一样的。同样是宽度5cm的屏幕,有的手机是720px,有的手机是1080px。
那么假设设计师有个设计稿,宽度是720px的,设计稿里有张图,这张图的宽度也是720px。如果我们直接在代码里写这张图的宽度为720px,那我们在720px的手机上看则是正常的,这里我们用一个div做演示
首先是一些说明
herf="#contentx"
这样的方式来跳转了,这里用 js 来滚动到指定元素位置文章整体思路是先布局,然后把内容和导航联动起来,最后来实现点击导航滚动到指定内容
看了https://www.jianshu.com/p/d08a4aa0008e这篇文章后对pipenv跃跃欲试,结果在执行 pipenv install
的时候就报错了.
-> pipenv install
Creating a virtualenv for this project...
Pipfile: F:\Code\AuotSystraceAnalysis\Pipfile
Using c:\python27\python.exe (None) to create virtualenv...
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\vendor\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\vendor\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\cli\command.py", line 254, in install
editable_packages=state.installstate.editables,
File "c:\python27\lib\site-packages\pipenv\core.py", line 1741, in do_install
pypi_mirror=pypi_mirror,
File "c:\python27\lib\site-packages\pipenv\core.py", line 574, in ensure_project
pypi_mirror=pypi_mirror,
File "c:\python27\lib\site-packages\pipenv\core.py", line 506, in ensure_virtualenv
python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
File "c:\python27\lib\site-packages\pipenv\core.py", line 929, in do_create_virtualenv
combine_stderr=False, block=True, nospin=True, env=pip_config,
File "c:\python27\lib\site-packages\pipenv\vendor\vistir\misc.py", line 285, in run
_env = {fs_encode(k): fs_encode(v) for k, v in os.environ.items()}
File "c:\python27\lib\site-packages\pipenv\vendor\vistir\misc.py", line 285, in <dictcomp>
_env = {fs_encode(k): fs_encode(v) for k, v in os.environ.items()}
File "c:\python27\lib\site-packages\pipenv\vendor\vistir\misc.py", line 397, in to_bytes
return string.decode("utf-8").encode(encoding, errors)
File "c:\python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 671: invalid start byte
---------------------
作者:YunShell
来源:CSDN
原文:https://blog.csdn.net/lynnbest/article/details/86356533
版权声明:本文为博主原创文章,转载请附上博文链接!
错误是从其他博客复制过来的,报错内容是一样的,解决方案却不一样,原博主是修改源码,我这里是想起之前自定义过pip.ini
文件来设置国内源,问题就出在这里,我是用win10的记事本来创建的pip.ini
文件,总所周知,记事本保存的默认编码就是GBK,这里用VSCODE把这个文件保存为utf-8
编码,保存后关闭VSCODE再次执行pipenv install
命令即可.(注意pip.ini文件里不要写#注释,否则报错)
不要问我为什么要复制别人的错误,因为我无法复现,我尝试过把pip.ini
的编码再改成GBK,结果保存后再打开又会变成utf-8。所以只好复制别人的错误了