接受两个参数: (_date,_format) _date: 日期对象或日期格式字符串 _format: 返回的格式: y:年 M:月 d:日 h:时 m:分 s:秒 S:季度 示例:dateFormat(new Date(),"yyyy-MM-dd") function dateFormat(_d ...
分类:
Web程序 时间:
2020-07-07 09:43:36
阅读次数:
96
函数基础 那么,到底什么是函数,如何在Python程序中定义函数呢? 说白了,函数就是为了实现某一功能的代码段,只要写好以后,就可以重复利用。我们先来看下面一个简单的例子: def my_func(message): print('Got a message: {}'.format(message) ...
分类:
其他好文 时间:
2020-07-07 09:41:59
阅读次数:
51
自己对时间操作的时候一些方法 public static final SimpleDateFormat DATETIME_FORMAT_DATE = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static final SimpleDate ...
分类:
其他好文 时间:
2020-07-06 17:59:00
阅读次数:
50
Purpose 根据 [SimpleDateFormat]格式化 java.util.Date 实例。 Examples Description date (必选) - 需要格式化的实例。 format (可选) - 格式。 formatName (可选) - 根据 i18n 文件配置的 defau... ...
分类:
其他好文 时间:
2020-07-06 16:37:44
阅读次数:
70
方法一: 使用 % 运算符 进行字符串格式化输出 %s %d 方法二: 除了之前说的使用 % 运算符 进行字符串格式化输出,我们还可以使用字符串的 format() 方法达到同样的效果。 '我叫{},今年 {} 岁,来自{}'.format('小贝', 18, '南京') # 我叫小贝,今年 18 ...
分类:
其他好文 时间:
2020-07-06 13:04:07
阅读次数:
54
emmm 在这家公司的话,比较好的就是每次写完的代码都有三个人review,对代码优化有一定的提升还有一些小的知识点,就此记录下来,这篇博客会持续更新 知识点: 1 element ui 的 DatePicker组件,如果后台需要时间戳的话,可以直接用时间value-format设置timestam ...
分类:
其他好文 时间:
2020-07-06 11:09:47
阅读次数:
75
The session protocol describes the basic structure of an OBEX conversation. It consists of a format for the “conversation” between devices and a set o ...
分类:
其他好文 时间:
2020-07-05 22:44:14
阅读次数:
61
reflect函数可以支持在sql中调用java中的自带函数,秒杀一切udf函数。 使用java.lang.Math当中的Max求两列中最大值 创建hive表 create table test_udf(col1 int,col2 int) row format delimited fields t ...
分类:
其他好文 时间:
2020-07-05 21:00:30
阅读次数:
253
1、UNIX时间戳转日期函数: from_unixtime *** 语法: from_unixtime(bigint unixtime[, string format]) 返回值: string 说明: 转化UNIX时间戳(从1970-01-01 00:00:00 UTC到指定时间的秒数)到当前时区 ...
分类:
其他好文 时间:
2020-07-05 19:29:26
阅读次数:
65
package LeetCode_480 import java.util.* /** * 480. Sliding Window Median * https://leetcode.com/problems/sliding-window-median/description/ * * Median ...