自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(68)
  • 资源 (12)
  • 问答 (1)
  • 收藏
  • 关注

原创 how to configure mybatis plus?

​ <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId&am

2018-08-09 23:12:30 276

原创 angular6 ------ build multiple environments

At the first place, before version 6, ng build --env=dev its ok. but in angular6, –env is not supported . –env got changed into –configuration or -c ( and now is more powerful). Before pack the pr...

2018-07-29 21:13:10 846

原创 mysql查漏补缺2

游标 CREATE PROCEDURE curdemo()BEGIN DECLARE done INT DEFAULT FALSE; DECLARE a CHAR(16); DECLARE b, c INT; DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1; DECLARE cur2 CURSOR FOR SE...

2018-07-29 20:48:32 213

原创 Session && Cookie

Session && CookieBefore, i only knew session is used to store data in the server and cookie is used to store data in the Client. However, it is far from enough at work.For example: I...

2018-07-21 00:41:28 476

原创 configure a spring boot application to integrate swagger2

intergate Spring boot and Swagger2make a file named SwaggerConfig use annotation @Configuration and @EnableSwagger2 above the SwaggerConfig filecreate Docket beanSwagger2 is enabled through...

2018-07-12 23:46:46 199

原创 IE browser and WeChat video tag

because of the font

2018-07-08 10:57:37 307

原创 java8 实战书笔记

java8 笔记1.filter the files and get hidden files;​ File[] hiddenFiles = new File(".").listFiles(new FileFilter(){public boolean accept(File file){ ​ return file.isHidden()​ }})u...

2018-06-07 19:27:17 226

原创 协同过滤算法代码

此算法主要用来推荐的. //找出ui,uj两个用户同时打过分的课程集合 function getPSet($uid, $ujd) { //"select 课程编号 from 评分 where 用户编号=@ui and 课程编号 in (select 课程编号 from 评分 where 用户编号=@uj)"; $db=M('videoscore');...

2018-05-22 22:40:39 1651

原创 HTTP协议 学习

HTTP协议 学习首先 附上 官方解释 和 别人的总结官方解释 打开后 第14 Header Field Definitions 将header说的很清楚http协议总结–厉害 http protocol (超文本传输协议) 主要用于浏览器和web服务器之间的通信. 而且一般明文传输 如果需要加密传输 可以使用 httpshttp协...

2018-04-22 21:37:00 208

原创 ArrayList Source Code

ArrayList Source Code说明承了RanddomAccess —->遍历的话用for最好elementData是数组 所以在顺序插入和随机访问的情况下使用这个最好list可以放入重复的值构造方法​ 先将继承集合接口Collection的C(如hashset)转化为数组 如果数组长度不是0 而且对象不是Object[] (elementD...

2018-03-31 15:38:48 191

原创 java回调机制

异步调用:类A的一个方法methodA()开启了一个新的线程调用了类B的方法methodB(),程序继续执行。无论methodB()执行多久都不会阻塞methodA()。如果想要methodB()方法的执行结果 则可以用Future+Callable方式做到这一点。 还有一种方法也可以就是回调回调:思想:methodA()里调用methodB()。 methodB()执行结束后 调用A的calla...

2018-02-27 21:26:48 195

原创 IO

IO体系抽象基类节点流(文件流)   缓存流InputStreamFileInputStreamBufferedInputStreamOutputStreamFileOutputStreamBufferedOutputStreamReaderFileReaderBufferedReaderWriterFileWriterBufferedWriter在IO里有一个很重要的类:File类(涉及创建 删...

2018-02-25 23:41:30 140

原创 网络编程TCP

TCP特点:1.面向连接的传输服务        程序在用TCP协议传输数据时 需在源进程端口与目的进程端口之间建立一条TCP传输连接2. 支持字节流的传输    TCP在传输过程中将程序提交的数据看成一连串 无结构的字节流,因此接收端程序数据字节的起始与终结位置必须有程序自己确定3.支持双全工通信    TCP运行通信双方的程序在任何时候都可以发送数据4.支持同事建立多个并发的TCP连接5.支持...

2018-02-25 18:43:51 161

原创 网络编程UDP

UDP协议特点:1.面向无连接的传输层协议       (1)UDP协议在传输报文之前不需要在通信双方建立连接 因此减少了协议开销与传输延迟         (2)UDP对报文除了提供校验和之外几乎没有提供其他的保证数据传输可靠性的措施        (3)如果UDP协议检查出收到的分分组出错 它就丢弃这个分组 即不确认也不通知发送端和要求重发2. 面向报文的传输层协议        (1)UDP...

2018-02-25 12:19:21 1082

原创 集合之java.lang.UnsupportedOperationException

List<Integer>toList=Arrays.asList(1,2,52); toList.add(5);报错:java.lang.UnsupportedOperationException好奇怪,add为什么会报错呢????看Arrays.asList的API /** * Returns a fixed-size list backed by the sp...

2018-02-24 21:25:55 724

原创 集合中的对象比较

法1:类继承Compare<T>接口import lombok.Data;@Datapublic class UserTest implements Comparable<UserTest> { private int age; public int compareTo(UserTest o) { // TODO Auto-generated method ...

2018-02-22 22:20:34 2367

原创 tomcat

运行项目 说tomcat服务器端口被占用:kill $(ps -aef | grep java | grep apache | awk '{print $2}')参考:https://stackoverflow.com/questions/5064733/several-ports-8005-8080-8009-required-by-tomcat-server-at-localhost-are-...

2018-02-22 20:52:08 118

原创 排序

1.交换排序: 冒泡排序和快速排序2.插入排序:直接插入 和折半插入 和希尔排序3.选择排序:简单选择排序和堆排序4.归并排序冒泡排序:时间复杂度为O(n2),而空间复杂度为O(1)。public static void bubbleSort(int[] nu){ for(int i=0;i<nu.length;i++){//元素的个数 for(int j=0;j&lt...

2018-02-22 20:42:52 159

原创 线程和锁

线程创建的两种方式:继承runnable接口或Thread类有了Thread类为什么还要runnable接口?因为java是单继承的,不能同时继承多个类,所以为了让一个类能继承其他类的特性,所以需要利用接口。线程可以有6种状态新建(new一个线程类)---线程还没开始运行线程中的代码,运行之前有一些基础工作要做可运行(Runnable)--start()方法之后被阻塞(Blocked)等待(Wai...

2018-02-22 20:31:36 187

转载 集合

集合关系:Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口主要方法:boolean add(Object o) 添加对象到集合;boolean remove(Object o) 删除指定的对象;int size() 返...

2018-02-11 20:29:50 114

原创 反射

reflect机制:在运行状态时 对任一类(通过class对象)都可以知道里面的类的属性和方法.获取class对象的三种方式:1.通过new实例化对象然后调Object的getClass()方法User a=new User();Class c1=a.getClass();2.通过类的Qualified Name 然后调用Class.forName();---->一般都用这种方法Strin...

2018-02-07 13:35:38 119

原创 二叉树

概念:节点的度:点到拥有的子树数树的度:树内各个节点度的最大值满二叉树:深度为k 且有(2^k)-1个节点的二叉树. 特点:每一层上的节点数都是最大节点数即每一层i的节点数都具有最大值2^(i-1)完全二叉树:深度为k的,有n个节点的二叉树,当且仅当其每一个节点都与深度为k的满二叉树中编号从1至n的节点一一对应时,则为二叉树.遍历二叉树:1. 先序遍历 (访问根->左->右)2. 中序...

2018-02-07 09:31:04 354

转载 栈和队列

栈:LIFO(后进先出)队列:FIFO(先进先出)栈的顺序存储结构实现:/** * 基于数组实现的顺序栈 * @param */public class Stack { private Object[] data = null; private int maxSize=0; //栈容量 private int top =-1; //栈顶指针

2018-02-06 19:39:06 109

原创 链表

链表:1. 插入节点2.删除第n个节点3.链表的长度4.判断是否有环5.链表反转6.查找链表倒数第k个节点7.查询单链表的中间节点8.输出链表节点类:public class LNode { int data; LNode next; public LNode(int n){ this.data=n; this.next=null; } p

2018-02-06 19:30:29 114

原创 spring 之事务

事务的属性:原子性 一致性 隔离性 持久性原子性是指事务是一个不可再分割的工作单位,事务中的操作要么都发生,要么都不发生一致性是指在事务开始之前和事务结束以后,数据库的完整性约束没有被破坏。这是说数据库事务不能破坏关系数据的完整性以及业务逻辑上的一致性。隔离性:多个事务并发访问时,事务之间是隔离的,一个事务不应该影响其它事务运行效果。声明式事务 <!-- 事务管理器 --> <...

2018-01-27 19:48:28 94

原创 spring之AOP

接口calculator public interface calculator { public int add(int a,int b); public int sub(int a,int b); public int mut(int a,int b); public int div(int a,int b);}类calculatorImp  public...

2018-01-27 01:11:17 183

原创 Ubuntu16.04安装之后2

1.gedit乱码终端:gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['GB18030', 'UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"参考:http://blog.csdn.net/kang99827765/article/details/51426...

2018-01-21 00:48:51 403

原创 mysql查漏补缺

日期类型    Datetime:时间日期 格式:YYYY-mm-dd HH:ii:ss 范围1000到9999 Date:日期 datetime的date部分 Time:时间段 某个区间之间 Timestamp:时间戳 但格式与datetime完全一样。从1970年开始的 Year:年份  varchar 和 nvarchar 和char     nvarchar(n): 包含n个字符的...

2018-01-21 00:34:07 336

原创 ubuntu安装之后

1.换源system-->Software&Updates-->Download from ...choose other and select china-->mirrors.aliyun.com  at last close -->reload或者sudo cp /etc/apt/sources.list /etc/apt/sources.lis...

2018-01-08 21:16:20 830

原创 Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension,

这个问题,我网上搜索了一下,有人说是在chrome快捷图标的属性那里添加一段代码; 大部分都是这样说的。。可是为什么有就不成功。。虽然不报这个错误,但是报404。 里面的search和nid是什么鬼 。。我的请求里没有这个啊。后来在stackoverflow有人说要有服务器。 可是我就是想简单的弄一个静态页面。但是最终没有办法,只好弄一个服务器。。不想弄一个复杂的服务器。听了推荐,谷歌插件里有w

2017-09-26 17:07:01 374

原创 Decode Ways --lintcode

DescriptionA message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1 ‘B’ -> 2 … ‘Z’ -> 26 Given an encoded message containing digits, determine the tota

2017-09-22 17:10:22 146

原创 jPush后台推送工具类

package com.nis.common.util;import java.util.List;import java.util.Map;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import cn.jiguang.common.resp.APIConnectionException;import cn.jiguang.

2017-09-22 15:00:55 698

原创 日志---slf4j和log4j2

log4j2是什么?Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent...

2017-09-22 11:30:54 314

转载 Perfect Squares--lintcode

DescriptionGiven a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.ExampleGiven n = 12, return 3 because 12 = 4 + 4 + 4 Given n = 13, r

2017-09-22 09:56:27 181

原创 springMVC 执行流程

分析: dispatcherServlet配置在web.xml中,一般都是分发所有请求。发送一个请求进入到dispatcherServlet的doDispatcher函数中// Determine handler for the current request.mappedHandler = getHandler(processedRequest);进入到getHandler,/**

2017-09-21 16:06:59 280

转载 Unique Binary Search Trees II --lintcode

DescriptionGiven n, generate all structurally unique BST’s (binary search trees) that store values 1…n.Example Given n = 3, your program should return all 5 unique BST’s shown below.这道题比1难的就是不是返回个数,

2017-09-21 14:07:43 168

原创 Unique Binary Search Trees--lintcode

DescriptionGiven n, how many structurally unique BSTs (binary search trees) that store values 1…n?ExampleGiven n = 3, there are a total of 5 unique BST’s.我的思路: 先列举 n=1 num=1,n=2,num=2,n=3,num=2+2+1

2017-09-21 13:08:04 175

原创 Jump Game--lintcode

DescriptionGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine

2017-09-19 17:32:23 267

原创 Maximum Product Subarray--lintcode

DescriptionFind the contiguous subarray within an array (containing at least one number) which has the largest product.ExampleFor example, given the array [2,3,-2,4], the contiguous subarray [2,3] has

2017-09-19 15:46:55 294

原创 Word Break--lintcode

DescriptionGiven a string s and a dictionary of words dict, determine if s can be break into a space-separated sequence of one or more dictionary words.给出一个字符串s和一个词典,判断字符串s是否可以被空格切分成一个或多个出现在字典中的单词Examp

2017-09-15 11:05:33 183

aria2.conf配置

参考网址 http://aria2c.com/usage.html 运行命令aria2c --conf-path=/home/fitch/Documents/aria2/aria2.conf -D

2018-01-05

阿里云对象存储服务

阿里云对象存储服务和mst视频截图转码 ,工具类和说明文档.

2017-12-22

星星评分.zip

星星评分。利用js。鼠标移动 对事物进行评分。例如 五心

2017-10-16

lombok.jar

lombok 提供了简单的注解的形式来帮助我们简化消除一些必须有但显得很臃肿的 java 代码

2017-10-16

源码toPDF.zip

兼容windows和金山 ,只在我电脑测试 没其他电脑没有。里面说明文档,一定要看,不然可能会运行不成功。切记

2017-09-14

springMVCLearn

springMVC学习 笔记

2017-08-10

springLearn

spring 4 的学习总结以及 学习时练习代码

2017-08-03

CommonController.class

thinkphp的CommonController 其他控制机继承这个控制器。这个控制器封装了增删改查以及 查询条件

2017-07-07

windows下Node.js开发环境 搭建

windows下Node.js开发环境 搭建

2017-07-07

北京地铁乘车路线asp.net

有最少时间查询和最少换乘查询

2017-07-06

建站流程文档

利用源码编译安装lnmp环境,绑定域名,完成项目部署上线

2017-06-22

c#的新特性

c#的新特性

2016-10-15

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

TA关注的人

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