函数
求绝对值
double getAbs( double x )
{
if(x>0)
return x;
else if(x==0)
return 0;
else
return -1*x;
}
日常学习、工作的点滴记录
double getAbs( double x )
{
if(x>0)
return x;
else if(x==0)
return 0;
else
return -1*x;
}
今日升级jupyterlab后,原运行正常的flask出现错误,提示cannot import name 'Markup' from 'jinja2'
后将jinja2版本降低到3.0.3后,问题解决。
pip install jinja2==3.0.3
按下快捷键:Ctrl + Shift + X,选择Markdown PDF“管理”-“扩展配置”
将“Markdown-pdf:Breaks”中的Enable line breaks选中
import openpyxl
filename = 'data/excel.xlsx'
wb = openpyxl.load_workbook(filename)
sheet = wb.active
data1 =list(sheet.values)
del data1[0]
print(data1)
from openpyxl import Workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
wb = Workbook()
ws = wb.active
data = [
['Apples', 10000, 5000, 8000, 6000],
['Pears', 2000, 3000, 4000, 5000],
['Bananas', 6000, 6000, 6500, 6000],
['Oranges', 500, 300, 200, 700],
]
#add column headings. NB. these must be strings
ws.append(["Fruit", "2011", "2012", "2013", "2014"])
for row in data:
ws.append(row)
wb.save("table.xlsx") 更换IPv6地址后,Nginx服务器需要进行设置:
listen [::]:80;
如果使用了ssl证书还需要设置:
listen [::]:443 ssl;