背景 项目中有一个订单模块,需要生成唯一的订单号,因为项目的并发要求不高,所以可以采用如下方法来生成唯一的id。 解决方法 使用时间戳加上一个随机数来生成唯一的Id。代码如下: public class KeyUtil { //生成唯一的主键 //格式为:时间+随机数 public static s ...
分类:
其他好文 时间:
2020-08-28 11:45:05
阅读次数:
43
简介 https://github.com/fanqingsong/machine_learning_system_on_spark a simple machine learning system demo, for ML study. Based on machine_learning_syst ...
分类:
系统相关 时间:
2020-08-27 11:48:09
阅读次数:
63
最小生成树 最小生成树(Minimum Cost Spanning Tree),简称MST。 给定一个带权的无向连通图,如何选取一棵生成树,使树上所有边上权的总和为最小,这叫最小生成树 。 最小生成树的特征:N个顶点,一定有N-1条边;包含全部顶点;N-1条边都在图中。 求最小生成树的算法主要是普里 ...
分类:
编程语言 时间:
2020-08-26 18:50:11
阅读次数:
65
这篇文章主要来介绍下JDK内置的命令,话不多说,让我们开始吧!javap使用javap可以查看Java字节码反编译的源文件,javap的命令格式如下:javap下面来演示下用javap-c对代码进行反编译,首先写个HelloWorld类,如下:publicclassHelloWorld{publicstaticvoidmain(String[]args){System.out.println("H
分类:
其他好文 时间:
2020-08-26 18:44:17
阅读次数:
40
Java Tree 树 数据结构,二叉树、三叉树、N叉树、不规则的树结构 ...
分类:
编程语言 时间:
2020-08-25 18:42:39
阅读次数:
49
用户交互Scanner 工具包 import java.util.Scanner 基本语法 Scanner s = new Scanner(System.in) next() nextLine() 获取输入的字符串 hasNext() hasNextLine() 判断是否还有输入的数据 next() ...
分类:
编程语言 时间:
2020-08-25 18:39:20
阅读次数:
57
创建线程的几种方式: 1. 通过继承 Thread 类 public static class MyThreadOne extends Thread{ @Override public void run() { System.out.println("MyThreadOne running ... ...
分类:
编程语言 时间:
2020-08-25 15:54:12
阅读次数:
48
1 . 创建Protobuf序列化 工具类ProtobufExchang.cs, 需要添加应用protobuf-net.dll 组件 using ProtoBuf;using System;using System.Collections.Generic;using System.IO;using ...
1. XML序列化实例演示 using System;using System.Collections.Generic;using System.Diagnostics;using System.IO;using System.Linq;using System.Text;using System. ...
安装Git yum -y install git 下载Gitea,下载最新的版本可以参考https://dl.gitea.io/gitea wget -O gitea https://dl.gitea.io/gitea/1.12.3/gitea-1.12.3-linux-amd64 在下载到Gite ...
分类:
其他好文 时间:
2020-08-20 19:18:33
阅读次数:
90