public class test{ public static void main(String[] arg){ //Date转为LocalDateTime DateTimeFormatter sdf1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm ...
分类:
其他好文 时间:
2021-06-04 18:44:19
阅读次数:
0
注:该方法只能进行数值左侧补0,不能补充其他符号。 第一种: int youNumber = 1; // 0 代表前面补充0 // 3 代表长度为3 // d 代表参数为正数型 String str = String.format("%03d", youNumber); System.out.pri ...
分类:
编程语言 时间:
2021-06-03 18:16:15
阅读次数:
0
linux下python3.6.7安装yum -y install gcc yum -y install wget openssl openssl-develtar xvf Python-3.6.7.tgzcd Python-3.6.7/ ./configure --prefix=/usr/loca ...
分类:
编程语言 时间:
2021-06-03 18:13:34
阅读次数:
0
### 层级与属性结合定位 如果被定为的元素,无法通过自身属性来唯一标识自己,此时可以考虑借助上级元素来定位自己。举生活中的例子,一个婴儿刚出生,还没有姓名与身份证号,此时给婴儿进行检查时往往会标注为“某某之女”。因为婴儿的母亲是确定的,找到母亲也就找到了婴儿。XPath的层级与属性结合定位就是如此 ...
分类:
其他好文 时间:
2021-06-03 18:06:41
阅读次数:
0
//取当前时间 Date nowdate=new Date(); //转换时间格式 SimpleDateFormat simpleDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); order.setCreateTime(Timestamp.val ...
分类:
其他好文 时间:
2021-06-03 18:06:12
阅读次数:
0
* Official English Documentation: http://nginx.org/en/docs/ * Official Russian Documentation: http://nginx.org/ru/docs/ #==基础配置==# user nginx; #设置运行用户 ...
分类:
其他好文 时间:
2021-06-03 18:04:40
阅读次数:
0
views.py视图导入 from django.shortcuts import HttpResponse, render, redirect 1.HttpResponse 它是作用是内部传入一个字符串参数,然后发给浏览器。 例如: def index(request):# 业务逻辑代码 retu ...
分类:
Web程序 时间:
2021-06-03 18:03:57
阅读次数:
0
#-*-coding:utf-8-*- # @Time :2021/4/22 7:08 # @Author:shuaichao # @File :.py # @Software: PyCharm from bs4 import BeautifulSoup #网页解析,获悉数据.231 import ...
分类:
其他好文 时间:
2021-06-03 17:56:50
阅读次数:
0
情景: 用户发起request,并等待response返回。在本些views中,可能需要执行一段耗时的程序,那么用户就会等待很长时间,造成不好的用户体验,比如发送邮件、手机验证码等。 使用celery后,情况就不一样了。 解决: 将耗时的程序放到celery中执行。 Celery 是一个包含一系列的 ...
分类:
其他好文 时间:
2021-06-03 17:55:31
阅读次数:
0
1、用偶判断,不用奇判断 System.out.println(-1%2==1?"奇数":"偶数"); 偶数 原因:java计算余数:a/b -> a-a/b*b 所以-1/2余数为-1,不等于1. 2、不要只替换一个类 常量类中的属性final修饰。其他类引用时,final常量会被直接将值写到类中 ...
分类:
编程语言 时间:
2021-06-02 20:57:55
阅读次数:
0