参考下面的代码即可。 package main import ( "time" "fmt" ) func main() { //获取当前时间 t := time.Now() //2018-07-11 15:07:51.8858085 +0800 CST m=+0.004000001 fmt.Prin ...
分类:
其他好文 时间:
2021-04-15 12:17:48
阅读次数:
0
func isPalindrome(x int) bool { if x<0{ return false } var result int for i:=x; i!=0; i=i/10{ tmp := i%10 result = result*10 + tmp } return result==x ...
分类:
其他好文 时间:
2021-04-15 12:05:10
阅读次数:
0
flyway是一个数据库版本管理工具,集成进springboot后,每次系统升级启动时自动执行sql语句升级数据库,避免手动操作数据库。 1.maven引入依赖 <dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-core< ...
分类:
数据库 时间:
2021-04-15 12:02:41
阅读次数:
0
mybatis对数据库的增删改查用<insert>字段来对数据库进行增加操作 <insert id="save" parameterType="mybatis.domain.user" keyColumn="id" keyProperty="id" useGeneratedKeys="true">I ...
分类:
数据库 时间:
2021-04-14 12:29:41
阅读次数:
0
前言 做一个地图下钻的echarts,发现点击某几个县市的时候,报错Invalid geoJson format Cannot read property 'length' of undefined, 对比数据发现出现报错原因是因为数据类型中有GeometryCollection存在,但是echar ...
分类:
Web程序 时间:
2021-04-14 12:15:56
阅读次数:
0
获取网页链接中的参数 function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); i ...
分类:
Web程序 时间:
2021-04-13 12:43:17
阅读次数:
0
type Location = { //这是一个location pathname: Pathname; search: QueryString; query: Query; state: LocationState; action: Action; key: LocationKey;};class ...
分类:
其他好文 时间:
2021-04-13 12:11:38
阅读次数:
0
using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions; namespace ConsoleApplication1{ class Class1 { pr ...
分类:
其他好文 时间:
2021-04-13 11:44:10
阅读次数:
0
Delphi function 函数的返回值,也就是Result,建议直接在函数开始就做一些初始化 例如下面的代码 procedure TForm1.FormCreate(Sender: TObject); var i:Integer; str:string; begin Memo1.Lines.C ...
#include<iostream> #include<algorithm>//sort头文件 using namespace std; struct student{ int theta;//阈值 int result;//结果 }; bool compare(student a,student ...
分类:
编程语言 时间:
2021-04-12 11:39:49
阅读次数:
0