摘要: I am trying to do this [see below], and it is throwing error. Exception: Solution: It's not valid JSON, but you can tell Jackson to allow it. Here's h 阅读全文
posted @ 2018-03-11 17:29 WegYcx 阅读(732) 评论(0) 推荐(0) 编辑
摘要: 这几天在写一个内部的小需求,需求很简单。但是在搭建工程的时候遇到了不少问题,本来一天半能搞定所有的东西上线,但是不符合公司上线的规范要求重构。特此记录一下 项目结构 大部分项目应该使用CRUD模式,只有在绝对必要的时候使用更为负载CQRS模式。 Java服务的结构如下(假设项目名为demo): de 阅读全文
posted @ 2017-12-13 16:11 WegYcx 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/li0803/archive/2008/11/03/1324746.html 引言 HTTP是一个属于应用层的面向对象的协议,由于其简捷、快速的方式,适用于分布式超媒体信息系统。它于1990年提出,经过几年的使用与发展,得到不断地完善和扩展。目前 阅读全文
posted @ 2017-12-06 14:21 WegYcx 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 记录一下自己在平时写代码中没有注意到的规范 命名规约 1 【强制】 POJO 类中布尔类型的变量,都不要加 is ,否则部分框架解析会引起序列化错误。 反例:定义为基本数据类型 boolean isSuccess ; 的属性,它的方法也是 isSuccess() , RPC框架在反向解析的时候,“以 阅读全文
posted @ 2017-11-28 15:30 WegYcx 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 一、关于卡特兰数 卡特兰数是一种经典的组合数,经常出现在各种计算中,其前几项为 : 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 阅读全文
posted @ 2017-11-21 17:20 WegYcx 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 合并两个排好序的 阅读全文
posted @ 2017-11-21 14:58 WegYcx 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, 阅读全文
posted @ 2017-11-14 13:35 WegYcx 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2017-11-06 16:44 WegYcx 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 给定n个整数的数组S,在S中找到三个整数,使得和最接近一个给定的数目target。 返回三个整数的总和。 你可以假设每个输入都只有一个解决方案。 例如,给定阵列S = {-1 -2 1 -4},目标= 1。 最接近目标的总和为2.(-1 + 2 + 1 = 2)。 阅读全文
posted @ 2017-10-20 17:39 WegYcx 阅读(74) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2017-10-20 17:30 WegYcx 阅读(90) 评论(0) 推荐(0) 编辑