自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 JNA之Callback回调

1、C函数typedef int(*func)(int a, int b);int init(func c) { return (*c)(1, 2);}2、Javapublic interface JNA extends Library { JNA instance = (JNA ) Native.loadLibrary("dllName",JNA.class); public interface Func extends Callback{ int invok

2021-02-26 00:05:00 2187 1

原创 在staitc块中给static final赋值,若有异常,会有编译期异常Variable ‘UNSAFE‘ might not have been initialized。why?

在staitc块中给static final赋值,若有异常,会有编译期异常Variable ‘UNSAFE’ might not have been initialized。why? private static final sun.misc.Unsafe UNSAFE; static { try { Field field = Unsafe.class.getDeclaredField("theUnsafe"); field

2020-11-18 21:38:56 702

原创 JDK7-hashmap源码

JDK7-HashMap1、简介 public static void main(String[] args) { // jdk7 : 数组 + 单向链表 HashMap<String, String> map = new HashMap<>(); map.put("k1", "v1"); // (k1,v1) => Entry System.out.println(map.put("k1", "v2"

2020-10-06 17:38:20 537 1

原创 假设有 50 瓶饮料,喝完三个空瓶可以换一瓶饮料,依次类推,请问 总共喝了多少饮料。

/* 假设有 50 瓶饮料,喝完三个空瓶可以换一瓶饮料,依次类推,请问总共喝了多少饮料。*/public static void main(String[] args) { int n = 50; //初始饮料总数 int i=0; //兑换次数 while(true){ n -= 3; //喝 3 瓶 n++; //兑换 1 瓶 i++; //兑换次数+1 if(n<3){ System.out.println ("共喝了"

2020-08-09 21:37:16 621

原创 安装FastDFS的libfastcommon基础库时报错

安装FastDFS的libfastcommon基础库时,报如下错误。解决:执行如下。yum -y install zlib zlib-devel pcre pcre-devel gcc gcc-c++ openssl openssl-devel libevent libevent-devel perl unzip net-tools wget...

2020-01-04 20:25:27 1156

原创 Mybatis分页插件及其使用

springboot2.x集成pagehelper-spring-boot-starter.依赖:<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId&g...

2019-12-30 20:59:19 374

原创 Controller转发到Thymeleaf模板页面报错TemplateInputException异常

1、Controller@Controllerpublic class TestController { @RequestMapping("test") public String test(){ return "index"; }}2、templates/index.html<!DOCTYPE html><html lang...

2019-12-29 20:47:53 560

markdown基础使用.md

markdown基础使用

2019-10-14

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除