自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (8)
  • 收藏
  • 关注

原创 Git入门及其使用

1.git init初始化,在当前目录生成 .git 文件2.创建 .gitignore 和 README.md 文件.gitignore:忽略提交的文件# Compiled class file*.class# temp file*.log*.cache*.diff*.patch*.tmp# BlueJ files*.ctxt# Mobile Tools fo...

2018-09-27 19:40:27 271

原创 MySQL基础语法

选择要操作的数据库:USE 数据库名;列出数据库管理系统的数据库列表:SHOW DATABASES;显示数据库的所有表:SHOW TABLES;显示数据表的信息:SHOW COLUMNS FROM 数据表;创建数据库:CREATE DATABASE 数据库名;删除数据库:DROP DATABASE 数据库名;创建数据表:CREATE TABLE table_name (co...

2018-08-12 10:31:47 232

原创 Java算法实践之排序(一)

1.冒泡排序时间复杂度(平均):O(n²)稳定private static void bubbleSort(int[] arr) { int temp; for (int i = 0; i < arr.length-1; i++) { for (int j = 0; j < arr.length-i-1; j++) { ...

2018-07-23 19:52:47 182

转载 RabbitMQ使用及其高级特征

使用docker run -d --name rabbitmq -p 5671:5671 -p 5672:5672 -p 4369:4369 -p 25672:25672 -p 15672:15672 rabbitmq:management端口(https://www.rabbitmq.com/networking.html ):5671、5672:AMQP端口15672:web管理后台端口4369,25672:Erlang发现&集群端口架构Broker:接收和分发消息的应用

2021-07-11 21:38:22 136

原创 Redis学习总结

1.1 关系型数据库和非关系型数据库1.1.1 关系型数据库代表:MySQL、Oracle特点:数据和数据之间、表和字段之间、表和表之间存在关系优点:数据间有关系,增删改查非常方便事务操作,保证数据完整性缺点:关系由底层大量算法保证,拉低系统运行速度、消耗系统资源海量数据增删改查/维护/扩展显得无能为力1.1.2 非关系型数据库代表:键值(Key-Value)存储...

2018-11-16 21:29:10 270

原创 Ubuntu18.04.1安装mysql

下载mysql的deb:wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb安装软件包sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb(此处可设置版本8.0或者5.7)检查更新sudo apt update安装mysqlsudo apt install mysql-ser...

2018-09-02 23:43:51 296

原创 浅谈设计模式

Java_designUML类图关系 name relationship example 泛化 Generalization 继承关系 ————————▷ 实现 Realization 类与接口 ---------▷ 关联 Association 双向 & 单向 老师————学生 & 学生————>...

2018-08-11 16:41:11 191

原创 Java之IO流使用

输入输出流四个抽象类 字节流 字符流 输入流 InputStream Reader 输出流 OutputStream Writer一个字符两个字节(byte),一个字节八位(bit)Reader:用于读取字符流的抽象类。 子类必须实现的唯一方法是read(char [],int,int)和close()Writer:用于写入...

2018-08-05 17:29:21 212

原创 Java算法实践之哥德巴赫猜想(三)

哥德巴赫猜想:任一大于2的偶数都可写成两个质数之和验证哥德巴赫猜想在一百万以内成立public class Goldbach { public static void main(String[] args) { int number = 1000000; boolean b; //计算耗时 long beg...

2018-07-23 20:32:01 531 1

原创 Java算法实践之斐波那契数列(二)

在数学上,斐波纳契数列以如下被以递归的方法定义:F(1)=1,F(2)=1, F(n)=F(n-1)+F(n-2)(n>=2,n∈N*)实现算法如下:public class Fibonacci { public static void main(String[] args) { //求斐波那契数列第50项的值// System.o...

2018-07-23 20:13:11 456

原创 前端学习之HTML+CSS应用(三)

一、菜单<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>菜单</title&amp

2018-07-11 15:40:08 224

原创 前端学习之CSS(二)

一、CSS语法 1.外部样式 <style type="text/css"></style> 2.内部样式 <link rel="stylesh

2018-07-07 15:20:22 287

原创 前端学习之HTML(一)

一、块级元素块级元素默认占一行,一行内添加一个块元素后一般无法添加其他的元素,其宽度自动填满其父元素宽度常见的块元素:address - 地址blockquote - 块引用dir - 目录列表div - 常用块级元素dl - 定义列表fieldset - form控制组form - 交互表单h1-h6 - 标题hr - 水平分隔线ol - 排序列表p - 段落p...

2018-07-07 13:55:52 535

原创 Servlet+JSP+JavaBean开发模式(MVC)介绍

Servlet+JSP+JavaBean(MVC)模式适合开发复杂的web应用,在这种模式下,servlet负责处理用户请求,jsp负责数据显示,javabean负责封装数据。Servlet+JSP+JavaBean模式程序各个模块之间层次清晰,web开发推荐采用此种模式。项目所需要的包序号包名描述所属层次1com.login.domain存放系统的JavaBean...

2018-06-08 19:09:15 1683

原创 jsp学习总结

jsp基础语法jsp表达式 <%=变量 %>相当于 <% out.println(变量) %&

2018-06-01 22:11:24 559

原创 javax.imageio.IIOException: Can't create output stream!

在写一个生成验证码图片程序时,Tomcat报错 javax.imageio.IIOException: Can't create output stream! 参考了https://blog.csdn.net/cwfreebird/article/details/51820993的说明 主要原因如下: 在使用ImageIO进行图片写操作时,默认会使用缓存目录:${tomcat}/tem...

2018-05-27 20:00:33 1084 1

原创 互联网上的加密原理

加密原理一、对称加密  采用单钥密码系统的加密方法,同一个密钥可以同时用作信息的加密和解密,这种加密方法称为对称加密,也称为单密钥加密。   需要对加密和解密使用相同密钥的加密算法。由于其速度快,对称性加密通常在消息发送方需要加密大量数据时使用。对称性加密也称为密钥加密。   所谓对称,就是采用这种加密方法的双方使用方式用同样的密钥进行加密和解密。密钥是控制加密及解密过程的指令。算法是...

2018-05-18 12:57:34 434

原创 Java数据库开发(三)之——补充

一、SQL注入与防范使用PreparedStatement替代Statement对象,它提供了参数化SQL的方式二、事务定义事务是并发控制的基本单位,满足ACID特征 - 原子性:atomicity - 一致性:consistency - 隔离性:isolation - 持久性:durability事务控制 Connection .s...

2018-05-09 21:29:18 470

原创 Java数据库开发(二)之——DBCP连接数据库

1.载入jar包DBCP需要以下几个jar包,可到apache及mysql的官网下载 2.程序编写public static BasicDataSource ds = null;static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";static final String DB_URL = "jdbc:m...

2018-05-09 21:28:12 227

原创 Java数据库开发(一)之——JDBC连接数据库

一、MySQL数据库1.创建数据库CREATE DATABASE jdbc CHARACTER SET 'utf8';2.建表CREATE TABLE user ( id int(10) NOT NULL AUTO_INCREMENT, userName varchar(20) NOT NULL, PRIMARY KEY (id));3.添加...

2018-05-09 21:25:31 291

原创 java求素数

 按定义 即除了1和它本身以外不再被其他的除数整数public static void main(String[] args) { for (int i = 2; i < 100; i++) { for (int j = 2; j <= i; j++) { if (i==j) { System.out.println(i); }else if (...

2018-04-13 12:57:42 417

原创 java 控制台输入

使用Scanner类在控制台进行输入public static void main(String [] args) { Scanner sc = new Scanner(System.in); System.out.println("请输入你的年龄:"); int age = sc.nextInt(); System.o...

2018-04-13 12:55:15 181

原创 WAMP多站点搭建

wamp的多站点搭建非常的简单1. 添加端口(可以省略)首先你可以在 wamp 的 Tools 下的 Add a Listen port for Apache 处添加监听端口这里添加一个8089端口2.配置站点在浏览器中进入 localhost 页面,点击下方 Tools 中的 Add a Virtual Host进入如下页面,配置输入相应的信息

2017-11-30 14:50:19 358

Effective Java 3rd edition(Effective Java第三版英文原版)附第二版

目录如下: 1 Introduction 2 Creating and Destroying Objects Item 1: Consider static factory methods instead of constructors Item 2: Consider a builder when faced with many constructor parameters Item 3: Enforce the singleton property with a private constructor or an enum type Item 4: Enforce noninstantiability with a private constructor Item 5: Prefer dependency injection to hardwiring resources Item 6: Avoid creating unnecessary objects Item 7: Eliminate obsolete object references Item 8: Avoid finalizers and cleaners Item 9: Prefer try-with-resources to try-finally 3 Methods Common to All Objects Item 10: Obey the general contract when overriding equals Item 11: Always override hashCode when you override equals Item 12: Always override toString Item 13: Override clone judiciously Item 14: Consider implementing Comparable 4 Classes and Interfaces Item 15: Minimize the accessibility of classes and members Item 16: In public classes, use accessor methods, not public fields Item 17: Minimize mutability Item 18: Favor composition over inheritance Item 19: Design and document for inheritance or else prohibit it Item 20: Prefer interfaces to abstract classes Item 21: Design interfaces for posterity Item 22: Use interfaces only to define types Item 23: Prefer class hierarchies to tagged classes Item 24: Favor static member classes over nonstatic Item 25: Limit source files to a single top-level class 5 Generics Item 26: Don’t use raw types Item 27: Eliminate unchecked warnings Item 28: Prefer lists to arrays Item 29: Favor generic types Item 30: Favor generic methods Item 31: Use bounded wildcards to increase API flexibility Item 32: Combine generics and varargs judiciously Item 33: Consider typesafe heterogeneous containers 6 Enums and Annotations Item 34: Use enums instead of int constants Item 35: Use instance fields instead of ordinals Item 36: Use EnumSet instead of bit fields Item 37: Use EnumMap instead of ordinal indexing Item 38: Emulate extensible enums with interfaces Item 39: Prefer annotations to naming patterns Item 40: Consistently use the Override annotation Item 41: Use marker interfaces to define types 7 Lambdas and Streams Item 42: Prefer lambdas to anonymous classes Item 43: Prefer method references to lambdas Item 44: Favor the use of standard functional interfaces Item 45: Use streams judiciously Item 46: Prefer side-effect-free functions in streams Item 47: Prefer Collection to Stream as a return type Item 48: Use caution when making streams parallel 8 Methods Item 49: Check parameters for validity Item 50: Make defensive copies when needed Item 51: Design method signatures carefully Item 52: Use overloading judiciously Item 53: Use varargs judiciously Item 54: Return empty collections or arrays, not nulls Item 55: Return optionals judiciously Item 56: Write doc comments for all exposed API elements 9 General Programming Item 57: Minimize the scope of local variables Item 58: Prefer for-each loops to traditional for loops Item 59: Know and use the libraries Item 60: Avoid float and double if exact answers are required Item 61: Prefer primitive types to boxed primitives Item 62: Avoid strings where other types are more appropriate Item 63: Beware the performance of string concatenation Item 64: Refer to objects by their interfaces Item 65: Prefer interfaces to reflection Item 66: Use native methods judiciously Item 67: Optimize judiciously Item 68: Adhere to generally accepted naming conventions 10 Exceptions Item 69: Use exceptions only for exceptional conditions Item 70: Use checked exceptions for recoverable conditions and runtime exceptions for programming errors Item 71: Avoid unnecessary use of checked exceptions Item 72: Favor the use of standard exceptions Item 73: Throw exceptions appropriate to the abstraction Item 74: Document all exceptions thrown by each method Item 75: Include failure-capture information in detail messages Item 76: Strive for failure atomicity Item 77: Don’t ignore exceptions 11 Concurrency Item 78: Synchronize access to shared mutable data Item 79: Avoid excessive synchronization Item 80: Prefer executors, tasks, and streams to threads Item 81: Prefer concurrency utilities to wait and notify Item 82: Document thread safety Item 83: Use lazy initialization judiciously Item 84: Don’t depend on the thread scheduler 12 Serialization Item 85: Prefer alternatives to Java serialization Item 86: Implement Serializable with great caution Item 87: Consider using a custom serialized form Item 88: Write readObject methods defensively Item 89: For instance control, prefer enum types to readResolve Item 90: Consider serialization proxies instead of serialized instances

2019-03-24

Java 多线程编程核心技术

完整覆盖多线程的相关知识点,用案例讲解技术点的实现

2018-08-07

看透SpringMVC源代码分析与实践

看透SpringMVC源代码分析与实践 深入理解SpringMVC 学习网站的各种架构及相应问题的解决方法

2018-08-01

Java JDK API 1.8_中文文档

Java™ Platform, Standard Edition 8 API Specification 本文档是Java平台,标准版的API规范

2018-08-01

SpringBoot实战第4版清晰版

《Spring Boot实战》全书分为8章。  第1章会对Spring Boot进行概述,内容涵盖最基本的自动配置、起步依赖、命令行界面和 Actuator。  第2章会进一步深入Spring Boot,重点介绍自动配置和起步依赖。在这一章里,你将用很 少的显式配置来构建一个完整的Spring应用程序。  第3章是对第2章的补充,演示了如何通过设置应用程序属性来改变自动配置,或者在自 动配置无法满足需要时彻底覆盖它。  在第4章里我们会看到如何为Spring Boot应用程序编写自动化集成测试。  在第5章里你将看到一种有别于传统Java开发方式的做法,Spring Boot CLI能让你通过命 令行来运行应用程序,这个应用程序完全是由Groovy脚本构成的。  讲到Groovy,第6章会介绍Grails 3,这是Grails框架的最新版本,它基于Spring Boot。  在第7章里你将看到如何通过Spring Boot的Actuator了解运行中的应用程序,以及它是如何 工作的。你还会看到如何使用Actuator的Web端点、远程shell和JMX MBean对应用程序一 窥究竟。  第8章讨论了各种部署Spring Boot应用程序的方法,包括传统的应用程序服务器部署和云 部署。

2018-07-27

排序算法(Java)

基于Java实现6种排序算法 1.冒泡排序 2.选择排序 3.插入排序 4.希尔排序 5.归并排序 6.快速排序

2018-07-23

Servlet+JSP+JavaBean开发模式(MVC)开发用户登录注册程序

Servlet+JSP+JavaBean开发模式(MVC)开发用户登录注册程序

2018-06-08

空空如也

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

TA关注的人

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