You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
3.3 KiB
102 lines
3.3 KiB
--- |
|
title: 踩坑日记 |
|
date: 2021-12-15 19:48:22 |
|
updated: 2022-05-22 11:15:31 |
|
tags: |
|
categories: 踩坑日记 |
|
keywords: |
|
description: |
|
top_img: |
|
comments: |
|
cover: |
|
toc: |
|
toc_number: |
|
toc_style_simple: |
|
copyright: |
|
copyright_author: |
|
copyright_author_href: |
|
copyright_url: |
|
copyright_info: |
|
katex: true |
|
highlight_shrink: |
|
aside: |
|
--- |
|
|
|
### 1. VS Code的markdown图片路径问题 |
|
|
|
路径开头是 |
|
`/`,表示从打开的可视文件夹的根目录开始计算。 |
|
`../`,**导航到的路径一定是在可视范围之内,不能跑到根目录之上,vs code会识别不到。例外情况是:jetbrains全家桶都可以正常识别。其它软件未测。** |
|
|
|
### 2. import cvxopt --> import cvxopt.base 的时候 ImportError: DLL load failed: 找不到指定的模块 |
|
|
|
原因: 这是因为numpy版本不对。 |
|
cvxopt使用了MKL,所以应该使用链接到英特尔数学库的版本:Numpy+MKL 其在Numpy中包含所需的dll。 |
|
|
|
### 3, python的list.append(anotherList)中, anotherList会被连续更新的问题 |
|
|
|
这是一个深浅拷贝问题 |
|
|
|
```python |
|
print("============浅拷贝========") |
|
a = [1] |
|
b = ['b'] |
|
b.append(a) |
|
print('a: ', a) |
|
print('b: ', b) |
|
|
|
a.append(2) |
|
print('a.append(2)后的a: ', a) |
|
print('a.append(2)后的b: ', b) |
|
print() |
|
|
|
print("===========深拷贝========") |
|
c = ['c'] |
|
c.append(a.copy()) |
|
print('a: ', a) |
|
print('c: ', c) |
|
|
|
a.append(3) |
|
print('a.append(3)后的a: ', a) |
|
print('a.append(3)后的c: ', c) |
|
|
|
``` |
|
|
|
### 4, Parsing java… [web-demo] java: 错误: 不支持发行版本 5 |
|
|
|
使用maven构建web项目时候。出现的错误 |
|
|
|
原因:从Java 9开始,编译器无法再生成Java 5二进制文件。 如果现在使用目标版本的Java 5直接或通过构建工具间接运行编译器,它将显示错误消息发行版本5不支持。Maven已经很老了,一些默认设置也是如此。 其中之一是语言级别,无论您使用什么JDK,它默认为Java 1.5。 |
|
|
|
正确的做法是: 您应该创建与生产环境中的Java运行时环境版本匹配的二进制文件,而不是交叉编译为Java 5二进制文件。 在2023年之前,至少应使用Java 8才能获得安全补丁。 另请参阅Wikipedia上的Java版本历史记录。 但是,我建议使用Java 11来利用介于LTS和LTS版本之间的各种新功能。 |
|
|
|
普通maven项目: |
|
|
|
```xml |
|
<properties> |
|
<maven.compiler.source>1.11</maven.compiler.source> |
|
<maven.compiler.target>1.11</maven.compiler.target> |
|
</properties> |
|
``` |
|
|
|
spring boot项目: |
|
|
|
```xml |
|
<properties> |
|
<java.version>1.11</java.version> |
|
</properties> |
|
``` |
|
|
|
### 5, error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 send-pack: unexpected disconnect while reading sideband packet |
|
|
|
If you get error 413, then the issue doesn't lie with git but with your web server. It's your web server that is blocking big upload files. |
|
|
|
Solution for nginx |
|
Just load your `nginx.conf` and add `client_max_body_size 50m;` ( changing the value to your needs ) in the http block. |
|
|
|
Reload nginx to accept the new config by executing `sudo service nginx reload` and try again to push your commit over http. |
|
|
|
Solution for Apache |
|
In your `httpd.conf` add `LimitRequestBody 52428800` ( changing the value to your needs ) inside a `<Directory />` block. Doing this you can limit the request of the whole server filesystem, just a single Virtual Host or a directory. |
|
|
|
>未完待续
|
|
|