上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: Spring版本:3.2.7 Jackson版本: 1 <!--Jackson --> 2 <dependency> 3 <groupId>com.fasterxml.jackson.core</groupId> 4 <artifactId>jackson-databind</artifactId> 阅读全文
posted @ 2017-08-31 10:34 Gerrard_Feng 阅读(503) 评论(0) 推荐(0)
摘要: 背景: 最近项目中使用SpringMVC,需要从前端接收JSON格式的请求,在后端自动转成一个与JSON格式相同的对象。 由于是一个老项目,Spring的版本是3.2.7。 问题:POST or GET 这个请求,是一个计算类型的请求,不涉及数据的修改,从意义上来说的角度应该是一个 GET 请求。 阅读全文
posted @ 2017-08-25 01:09 Gerrard_Feng 阅读(1542) 评论(0) 推荐(0)
摘要: 1. 问题的提出 在 Java 的集合体系当中,无论是 List(列表)还是 Set(集),在设计的时候都存在一个很奇怪的现象:这两种集合的接口,Java 都为其设计了抽象类 AbstractList 和 AbstractMap,这是模板模式的一种典型实现,在抽象模板中,提供了一些这些集合各自的公共 阅读全文
posted @ 2017-03-21 17:27 Gerrard_Feng 阅读(452) 评论(0) 推荐(0)
摘要: 在 Java 的代码开发过程中,为了尽可能提高方法的复用性,明确方法的作用,同时防止一个方法内部过于臃肿的问题,往往会创建许多方法,那么不可避免地会涉及到参数传递的问题。通常来说,我们将 Java 中的参数传递分为两种:值传递和引用传递。 值传递:参数在进入方法时,将入参深度复制一个副本,在方法内部 阅读全文
posted @ 2017-01-25 16:43 Gerrard_Feng 阅读(283) 评论(0) 推荐(0)
摘要: 环境: Ubuntu12.04 问题描述: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 出现场景: 使用命令:sudo apt-get update 原因解析: 在上 阅读全文
posted @ 2016-12-17 15:24 Gerrard_Feng 阅读(4394) 评论(0) 推荐(0)
摘要: 问题: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra spac 阅读全文
posted @ 2016-12-14 15:12 Gerrard_Feng 阅读(349) 评论(0) 推荐(0)
摘要: 问题: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k th 阅读全文
posted @ 2016-12-14 14:45 Gerrard_Feng 阅读(296) 评论(0) 推荐(0)
摘要: 问题: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Y 阅读全文
posted @ 2016-12-14 11:32 Gerrard_Feng 阅读(341) 评论(0) 推荐(0)
摘要: 问题: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 官方难度: Hard 翻译: 合并k个已排序的链表,得到一个新的链表并且返回其第一个节点。分析 阅读全文
posted @ 2016-12-13 16:06 Gerrard_Feng 阅读(310) 评论(0) 推荐(0)
摘要: 1. 和直接插入排序的关系 在之前直接插入排序中提到过,希尔排序(Shell sort)是直接插入排序的变种方式之一,是一种更高效的改进版本。其基本思想如下: 记录按下标的一定增量分组,对每组进行直接插入排序。 不断地缩小增量,对每组进行直接插入排序,直至增量为1。 由此可见,希尔排序本质就是多次使 阅读全文
posted @ 2016-12-13 14:04 Gerrard_Feng 阅读(1853) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页