你要如何衡量你的人生

坚持,努力,让好事发生

java学习

J2SE的架构

阅读全文 »

  对决策树的学习 以及 决策树在文本分类中的应用。

(1) 生活实例

  通俗来说,决策树分类的思想类似于找对象。现想象一个女孩的母亲要给这个女孩介绍男朋友,于是有了下面的对话:

  女儿:多大年纪了?
  母亲:26。
  女儿:长的帅不帅?
  母亲:挺帅的。
  女儿:收入高不?
  母亲:不算很高,中等情况。
  女儿:是公务员不?
  母亲:是,在税务局上班呢。
  女儿:那好,我去见见。

  这个女孩的决策过程就是典型的分类树决策。相当于通过年龄、长相、收入和是否公务员
对将男人分为两个类别:见和不见。

生活实例1

阅读全文 »

本文主要介绍有关MySQL的内容,包括一些常用配置,常见问题。根据个人使用经验总结,希望可以帮到大家。

MySQL配置

下面是我的配置

[client]

port=3306

# utf8mb4 is a superset of utf8
default-character-set = utf8mb4


[mysql]

# utf8mb4 is a superset of utf8
default-character-set = utf8mb4


# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this 
# file.
#
[mysqld]

# utf8mb4 is a superset of utf8
character-set-server=utf8mb4


#collation-server=utf8mb4_unicode_ci 
#collation-server=utf8_general_ci

#character-set-client-handshake = FALSE

#init_connect='SET NAMES utf8mb4'

# mkdir for every database
innodb_file_per_table=1

# ignore lowercase
lower_case_table_names=1

# all import biggest 1024M file to mysql
max_allowed_packet=1024M

# The TCP/IP Port the MySQL Server will listen on
port=3306

#log

# Binary Log
log-bin=mysql-bin
binlog-format=ROW 
server_id=1

# if query_time > 1s sql will log
long_query_time=1
# if query is slow, query will log   version 5.6
slow-query-log=1
slow-query-log-file = /usr/local/mysql/log/slow_query.log
# slow-query-log-file=c:/professionsofware/mysql/log/slow_query.log
# version5.0  log-slow-queries=c:/professionsofware/mysql/log/slow_query.log

# log all query  version5.6
general_log=ON
general_log_file = /usr/local/mysql/log/all_query.log
#general_log_file=c:/ProfessionSofware/MySQL/log/all_query.log
#version5.0 log=c:/ProfessionSofware/MySQL/log/all_query.log
# log error 
#log-error=c:/professionsofware/mysql/log/mysql_error.log

#Path to installation directory. All paths are usually resolved relative to this.
#basedir="C:/ProfessionSofware/MySQL/MySQLServer5.6/"
basedir=/usr/local/mysql 

#Path to the database root
#datadir="C:/ProgramData/MySQL/MySQL Server 5.6/Data/"
datadir=/usr/local/mysql/data

# The default character set that will be used when a new schema or table is
# created and no character set is defined
#character-set-server=gbk

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

# The default storage engine that will be used for temporary tables
default-tmp-storage-engine=INNODB
阅读全文 »

用github + hexo来搭建自己的免费博客

GitHub Pages 快速入门 https://docs.github.com/zh/pages/quickstart

(1) 安装软件

(1.1) 安装git

Git官网下载安装。

通过 git --version 验证是否安装正确以及查看版本。

(1.2) 安装Node.js

 在Node.js官网下载。推荐使用zip包,解压完配置一下就能用。

下载完解压到一个目录,解压文件到 D:\ProfessionalSoftWare\Node , 并在解压后的目录下建立 node_global和node_cache (node_global: npm全局安装路径 node_cache: npm全局缓存路径)

新建环境变量 NODE_PATH = D:\ProfessionalSoftWare\Node\node-v10.16.0-win-x64
修改环境变量 PATH 增加 %NODE_PATH%;%NODE_PATH%\node_global;

通过 node -v 验证是否安装正确以及查看版本。

注意:npm其实是Node.js的包管理工具(package manager),刚开始一直不知道nmp和Node.js是什么关系,晕了半天

阅读全文 »

(1) SpringBoot以JSON格式返回对象

<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-core</artifactId>
	<version>${jackson.version}</version>
</dependency>
 
<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-databind</artifactId>
	<version>${jackson.version</version>
</dependency>
 
<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-annotations</artifactId>
	<version>${jackson.version</version>
</dependency>

(2) springboot hot deploy

  1. 添加对应jar包

  2. 添加插件

  3. 配置idea

  4. mvn dependencies 添加以下依赖

    <!-- add hot deployment -->
    <dependency>
    	<groupId>org.springframework.boot</groupId>
    	<artifactId>spring-boot-devtools</artifactId>
    	<optional>true</optional>
    	<scope>runtime</scope>
    </dependency>
  5. build的时候添加以下plug

    <plugin>
    	<!-- hot deployment config -->
    	<groupId>org.springframework.boot</groupId>
    	<artifactId>spring-boot-maven-plugin</artifactId>
    	<configuration>
    		<fork>true</fork>
    	</configuration>
    </plugin>
  6. 配置idea

  7. 1 File -> Settings -> Compiler 勾选 Build Project automatically

  8. 2 双击 Shift,输入 registry , 点击 Registry.. ,勾上 compiler.automake.allow.when.app.running

Allow auto-make to start even if developed application is currently running. Note that automatically started make may eventually delete some classes that are required by the application.

References

[1] Spring Boot Reference Documentation
[2] using-spring-boot
[3] spring-boot
[4] spring.io
[5] Spring Boot 学习笔记:以JSON格式返回对象
[6] springboot+idea热部署(自动刷新)
[7] spring-boot 速成(2) devtools之热部署及LiveReload

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

$ hexo new "My New Post"

More info: Writing

Run server

$ hexo server

More info: Server

Generate static files

$ hexo generate

More info: Generating

Deploy to remote sites

$ hexo deploy

More info: Deployment

测试
$x^{y^z}=(1+{\rm e}^x)^{-2xy^w}$

0%