自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(111)
  • 收藏
  • 关注

原创 [BUG记录]javacv连接1080p摄像头图像扭曲、视频卡顿问题解决记录

[BUG记录]javacv连接1080p摄像头图像扭曲问题解决记录环境问题描述问题代码解决方法解决代码环境win10 64位系统java version “1.8.0_172”摄像头:罗技C920javacv版本:1.4.2<dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.4.

2021-08-04 20:06:01 13127 1

原创 [学习笔记]JavaScript[1]

JavaScript

2017-04-20 19:04:19 270

原创 [学习笔记]设计模式[b]-{与设计模式相处}

-

2017-04-16 21:30:16 406

原创 [学习笔记]设计模式[a]-{状态模式}

状态模式允许对象在内部状态改变时改变它的行为,对象看起来好像修改了它的类。

2017-04-06 20:12:48 275

原创 [学习笔记]设计模式[9]-{组合模式}

组合模式

2017-03-30 19:49:10 273

原创 [学习笔记]JavaScript[0]-入门

JavaScript

2017-03-26 18:56:52 270

原创 [学习笔记]设计模式[8]-{迭代器模式}

设计原则一个类应该只有一个引起变化的原因根据前面的设计原则我们知道,要避免类内的改变,因为修改原有的代码就很容易造成潜在的bug,如果一个类有多个会导致他变化的原因,那这个类以后被修改的可能性就会提高,而且这个类的修改会影响到多个方面。 那么我们的设计就需要只将一个责任指派给一个类。 下面的迭代器模式,将一个类的遍历的责任从这个类中提取出来,从而保证一个类只有管理自己的聚合这一责任。设计模式迭代

2017-03-18 10:06:41 243

原创 [学习笔记]设计模式[7]-{模板方法模式}

设计原则好莱坞原则:别调用(打电话给)我们,我们会调用(打电话给)你这个原则利用很形象的比喻,介绍了一种防止“依赖腐败”的方法。“依赖腐败”简单的说,就是当高层组件依赖低层组件,而同时低层组件又依赖高层组件。在这同时,还有另外的一个边侧组件依赖底层组件同时高层组件也依赖边侧组件。这样的情况,就是“依赖腐败”。这种设计十分差的设计,没有人能轻易搞懂你的系统是怎么设计的。设计模式这一章讲述的设计模式可以

2017-03-08 18:58:17 226

原创 [学习笔记]设计模式[6]-{适配器模式&外观模式}

设计原则最少知识原则:只和你的密友谈话这个原则的意思是,在系统设计的过程中,不要让太多的类耦合在一起,免得对系统一部分的修改会影响到其他部分。在设计系统之前,应该首先注意对象与对象之间的交互关系,尽量减少一个类说依赖的类的数量。设计模式这一章有两个设计模式,适配器模式可以将一个接口转为另一个接口,外观模式的意图是让接口更加简单适配器模式适配器的定义如下: 适配器模式将一个类的接口,转换成客户期望的

2017-03-03 11:09:32 275

原创 利用JEXL实现动态表达式编译

JEXL

2017-02-23 20:30:50 22022 1

原创 [学习笔记]设计模式[5]-{命令模式}

命令模式

2017-02-17 09:19:47 257

原创 [学习笔记]设计模式[4]-{单件模式}

单件模式

2017-02-17 09:19:14 201

原创 [学习笔记]设计模式[2]-{装饰者模式}

装饰者模式

2017-02-17 09:18:03 195

原创 系统保护-如何保护好自己的系统

系统保护

2017-02-17 09:17:12 401

原创 利用Mockito进行单元测试[1]-{各种笔记}

利用Mockito进行单元测试

2017-02-17 09:16:02 1613

原创 利用Mockito进行单元测试[0]

Mockito

2017-02-17 09:14:03 961

原创 [学习笔记]设计模式[3]-{工厂模式}

设计原则要依赖抽象,不要依赖具体类这条原则有一个正式的名字:“依赖倒置原则”。这个原则的含义是:不要让高层的组件去依赖低层的组件,而且,这些组件,都应该是依赖于某一个抽象。设计模式工厂模式工厂方法模式定义了一个创建对象的接口,但由子类决定要实例化的类是哪一个。工厂方法让类把实例化推迟到了子类。 这句话要加粗:工厂方法让类把实例化推迟到了子类 通常,我们在实例化一个对象的时候,都是直接的进行new

2017-01-29 20:23:30 217

原创 [学习笔记]设计模式[1]-{观察者模式}

设计原则为了交互对象之间的松耦合设计而努力松耦合是让对象之间互相依赖的程度降低。松耦合的设计可以让我们的系统更有弹性,能够应对未来的需求变化。设计模式观察者模式观察者模式定义了对象之间的一种一对多的依赖关系。使用这种设计模式,可以当一个对象的状态有改变时,对应所有的依赖者都会收到通知并自动的更新。 还是看一下书上的例子: 气象站有两个布告板,如果获取的气象数据有变化,就需要同步到这两个布告板上。

2017-01-09 17:20:03 265

原创 [学习笔记]设计模式[0]-{策略模式}

设计原则找出应用中可能需要变化的地方,把它们独立出来,不要和不需要变化的代码混在一起感觉这个就是整个设计模式的最主要的目标。不用在下个版本的开发的时候去修改上个版本的代码,以增量的形式去增加功能或模块,而不需要去对已有的代码进行修改。这样做的好处首先是在不会因为新版本的bug导致旧版本的功能出问题,而且在写代码的时候思路会更清晰,不用一行一行的去找代码。 实现这个原则需要对项目有很清楚的意识,并且

2017-01-09 17:18:39 245

原创 利用桌面背景进行任务管理

背景作为一个轻微强迫症患者,我一直以来的桌面都是这样的: (如何隐藏桌面图标、开始菜单、托盘图片不在本文讨论范围。。。) 但是记性一直不是很好的我很希望有个可以作为提醒的东西可以放到桌面上。一开始我投靠了Windows自带的便签,当然这个功能还是很好用的,但是我不能容忍出现这种情况: 如果用这个便签 就会在任务栏多一个项目 而且在alt+tab的时候会多一个选项(smart link一

2016-11-16 15:40:57 6657

原创 [Spring学习笔记]@Autowired

Spring中@Autowired的用法

2016-08-30 09:54:41 338

原创 [LeetCode]54. Spiral Matrix

Problem Description[https://leetcode.com/problems/spiral-matrix/] Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example, Given the follow

2016-04-17 21:25:12 271

原创 [LeetCode]130. Surrounded Regions

Problem Description[https://leetcode.com/problems/surrounded-regions/] Given a 2D board containing ‘X’ and ‘O’, capture all regions surrounded by ‘X’.A region is captured by flipping all ‘O’s into ‘X’

2016-04-13 15:00:48 713

原创 [LeetCode]304. Range Sum Query 2D - Immutable

Problem Description[https://leetcode.com/problems/range-sum-query-2d-immutable/] Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col

2016-04-13 13:53:32 251

原创 [LeetCode]80. Remove Duplicates from Sorted Array II

Problem Description[https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/] Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted a

2016-04-13 13:30:21 221

原创 [LeetCode]31. Next Permutation

Problem Description[https://leetcode.com/problems/next-permutation/] Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrange

2016-04-12 14:53:35 219

原创 [LeetCode]230. Kth Smallest Element in a BST

Problem Description[https://leetcode.com/problems/kth-smallest-element-in-a-bst/] Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.思路既然可能找很多遍,不如直接做一个有序的数

2016-04-12 14:26:19 239

原创 [LeetCode]63. Unique Paths II

Problem Description[https://leetcode.com/problems/unique-paths-ii/] Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle

2016-04-09 15:17:48 462

原创 [LeetCode]109. Convert Sorted List to Binary Search Tree

Problem Description[https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/] Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced B

2016-04-08 20:01:24 229

原创 [LeetCode]120. Triangle

Problem Description[https://leetcode.com/problems/triangle/] Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.思路DP hahaha,我的

2016-04-07 16:01:41 249

原创 [LeetCode]22. Generate Parentheses

Problem Description[https://leetcode.com/problems/generate-parentheses/] Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3

2016-04-07 15:48:17 215

原创 [LeetCode]208. Implement Trie (Prefix Tree)

Problem Description[https://leetcode.com/problems/implement-trie-prefix-tree/] Implement a trie with insert, search, and startsWith methods.思路没啥好说的,看代码就好惹。。Codepackage q208;import java.util.LinkedList

2016-04-06 15:52:46 356

原创 [LeetCode]50. Pow(x, n)

Problem Description[https://leetcode.com/problems/powx-n/] Implement pow(x, n).思路不明白这种题为什么会是mid的。。。Codepackage q050;public class Solution { public double myPow(double x, int n) { if (n ==

2016-04-06 14:33:52 531

原创 [LeetCode]334. Increasing Triplet Subsequence

Problem Description[https://leetcode.com/problems/increasing-triplet-subsequence/] Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.Formally the

2016-04-05 18:21:31 295

原创 [LeetCode]29. Divide Two Integers

Problem Description[https://leetcode.com/problems/divide-two-integers/] Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.思路没啥好说的,最讨厌做有关int范

2016-04-05 18:00:28 254

原创 [LeetCode]309. Best Time to Buy and Sell Stock with Cooldown

Problem Description[https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/] Say you have an array for which the ith element is the price of a given stock on day i.Design an algor

2016-04-04 17:39:42 645

原创 [LeetCode]114. Flatten Binary Tree to Linked List

Problem DescriptionGiven a binary tree, flatten it to a linked list in-place. [https://leetcode.com/problems/flatten-binary-tree-to-linked-list/]思路先序遍历,然后按个保存就行了。。。 左右不分真的不利于手写代码。。。要不是调试一下就是反的了。。。Cod

2016-04-03 14:26:27 234

原创 [LeetCode]338. Counting Bits

Problem DescriptionGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array. [https:

2016-04-03 11:28:06 214

原创 KMP的思路与实现

KMP

2016-03-26 09:23:32 352

原创 生产者消费者模式

生产者消费者模式

2016-03-16 14:37:03 379

空空如也

空空如也

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

TA关注的人

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