- 博客(51)
- 资源 (13)
- 收藏
- 关注
原创 使用ThreadLocal来存储Session(Hibernate中),SqlSession(Mybatis中)
早在JDK 1.2的版本中就提供java.lang.ThreadLocal,ThreadLocal为解决多线程程序的并发问题提供了一种新的思路。使用这个工具类可以很简洁地编写出优美的多线程程序。ThreadLocal很容易让人望文生义,想当然地认为是一个“本地线程”。其实,ThreadLocal并不是一个Thread,而是Thread的局部变量,也许把它命名为ThreadLocalVari
2017-06-30 20:14:53 722
转载 JSP中的EL表达式详细介绍
本文转载自:http://blog.csdn.net/zdwzzu2006/article/details/4672383一、JSP EL语言定义 EL 提供了在 JSP 脚本编制元素范围外使用运行时表达式的功能。脚本编制元素是指页面中能够用于在 JSP 文件中嵌入 Java 代码的元素。它们通常用于对象操作以及执行那些影响所生成内容的计算。JSP
2017-06-30 14:30:41 698
原创 [leetcode]79. Word Search(Java)
https://leetcode.com/problems/word-search/#/descriptionGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacen
2017-06-30 12:27:53 825
原创 POJO和JavaBean的区别
1.什么是POJO?按照Martin Fowler的解释是“Plain Old JavaObject”,从字面上翻译为“纯洁老式的Java对象”,但大家都使用“简单java对象”来称呼它。POJO的内在含义是指那些没有从任何类继承、也没有实现任何接口,更没有被其它框架侵入的java对象。POJO不应该是:1.扩展预定的类,如 public class Foo
2017-06-29 15:16:40 327
原创 [leetcode]78. Subsets(Java)
https://leetcode.com/problems/subsets/#/descriptionGiven a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For exa
2017-06-29 11:50:45 1069
原创 [leetcode]75. Sort Colors(Java)
https://leetcode.com/problems/sort-colors/#/descriptionGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in
2017-06-29 10:55:52 535
原创 [leetcode]74. Search a 2D Matrix(Java)
https://leetcode.com/problems/search-a-2d-matrix/#/descriptionWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Inte
2017-06-29 10:44:59 484
原创 [leetcode]73. Set Matrix Zeroes(Java)
https://leetcode.com/problems/set-matrix-zeroes/#/descriptionGiven a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.pack
2017-06-28 12:06:41 330
原创 [leetcode]64. Minimum Path Sum(Java)
https://leetcode.com/problems/minimum-path-sum/#/descriptionGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numb
2017-06-28 10:49:49 281
原创 [leetcode]63. Unique Paths II(Java)
https://leetcode.com/problems/unique-paths-ii/#/descriptionFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?
2017-06-28 10:27:40 400
原创 [leetcode]62. Unique Paths(Java)
https://leetcode.com/problems/unique-paths/#/descriptionA robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either dow
2017-06-27 12:00:29 609
原创 [leetcode]59. Spiral Matrix II(Java)
https://leetcode.com/problems/spiral-matrix-ii/#/descriptionGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You s
2017-06-27 10:58:47 403
原创 [leetcode]57. Insert Interval(Java)
https://leetcode.com/problems/insert-interval/#/descriptionGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the
2017-06-27 10:43:35 663
转载 Dbutils和C3P0介绍及使用
本文转载自:http://www.cnblogs.com/CQY1183344265/p/5854418.html一:Dbutils是什么?(当我们很难理解一个东西的官方解释的时候,就让我们记住它的作用)Dbutils:主要是封装了JDBC的代码,简化dao层的操作。作用:帮助java程序员,开发Dao层代码的简单框架。框架的作用:帮助程序员,提高程序的开发
2017-06-26 14:47:22 3947
原创 [leetcode]56. Merge Intervals(Java)
https://leetcode.com/problems/merge-intervals/#/descriptionGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],
2017-06-26 12:42:25 780
原创 [leetcode]55. Jump Game(Java)
https://leetcode.com/problems/jump-game/#/descriptionGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array repre
2017-06-26 10:55:30 757
原创 [leetcode]54. Spiral Matrix(Java)
https://leetcode.com/problems/spiral-matrix/#/descriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the
2017-06-26 10:26:08 445
原创 [leetcode]48. Rotate Image(Java)
https://leetcode.com/problems/rotate-image/#/descriptionYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-p
2017-06-25 11:31:16 399
原创 [leetcode]45. Jump Game II(Java)
https://leetcode.com/problems/jump-game-ii/#/descriptionGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array
2017-06-25 10:54:32 600
原创 [leetcode]66. Plus One(Java)
https://leetcode.com/problems/plus-one/#/descriptionGiven a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not c
2017-06-23 12:35:44 525
原创 [leetcode]42. Trapping Rain Water(Java)
https://leetcode.com/problems/trapping-rain-water/#/descriptionGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is ab
2017-06-23 10:53:59 678
原创 [leetcode]53. Maximum Subarray(Java)
leetcode:https://leetcode.com/problems/maximum-subarray/#/descriptionFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, give
2017-06-22 12:45:02 707
原创 [leetcode]41. First Missing Positive(Java)
leetcode:https://leetcode.com/problems/first-missing-positive/#/descriptionGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,
2017-06-22 12:22:06 589
原创 在Java中使用JSON需要的jar包
在Java中使用json需要引入以下六个jar包,分别为:commons-lang-2.5.jar commons-collections-3.1.jar commons-beanutils-1.7.0.jar json-lib-2.1-jdk15.jar ezmorph-1.0.3.jar commons-logging-1.1.1.jar
2017-06-21 16:07:50 5654
原创 [leetcode]40. Combination Sum II(Java)
leetcode:https://leetcode.com/problems/combination-sum-ii/#/descriptionGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidat
2017-06-21 11:06:36 648
原创 [leetcode]39. Combination Sum(Java)
leetcode:https://leetcode.com/problems/combination-sum/#/descriptionGiven a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where t
2017-06-21 10:37:33 1556
原创 [leetcode]35. Search Insert Position(Java)
leetcode:https://leetcode.com/problems/search-insert-position/#/descriptionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it
2017-06-21 09:55:56 441
原创 [leetcode]34. Search for a Range(Java实现)
leetcode测试地址:https://leetcode.com/problems/search-for-a-range/#/descriptionGiven an array of integers sorted in ascending order, find the starting and ending position of a given target value
2017-06-21 09:30:28 745
原创 [leetcode]33. Search in Rotated Sorted Array(Java实现)
测试地址:https://leetcode.com/problems/search-in-rotated-sorted-array/#/descriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2
2017-06-20 10:51:14 538
原创 [leetcode]31.Next Permutation(Java实现)
测试地址:https://leetcode.com/problems/next-permutation/#/descriptionImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such a
2017-06-20 09:49:29 474
原创 [leetcode]27.Remove Element(Java)
测试地址:https://leetcode.com/problems/remove-element/#/descriptionGiven an array and a value, remove all instances of that value in place and return the new length.Do not allocate ext
2017-06-19 10:08:08 512
原创 [leetcode]18.4Sum(Java实现)
leetcode地址:https://leetcode.com/problems/4sum/#/descriptionGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadrupl
2017-06-19 09:37:42 347
原创 [leetcode]16.3Sum Closest(Java实现)
https://leetcode.com/problems/3sum-closest/#/descriptionGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of
2017-06-18 14:58:16 418
原创 [leetcode]15. 3Sum(Java实现)
https://leetcode.com/problems/3sum/#/descriptionGiven 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
2017-06-18 11:12:49 587
原创 [leetcode]11. Container With Most Water(Java实现)
leetcode:https://leetcode.com/problems/container-with-most-water/#/solutionsGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lin
2017-06-18 10:34:23 425
原创 leetcode:4. Median of Two Sorted Arrays(Java实现)
leetcode测试地址:https://leetcode.com/problems/median-of-two-sorted-arrays/#/descriptionThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted
2017-06-17 11:48:06 479
原创 leetcode:1. Two Sum(Java实现)
leetcode测试地址:https://leetcode.com/problems/two-sum/#/description1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may
2017-06-17 10:23:23 645
原创 机器人的运动范围(Java实现)
本题为剑指offer面试题67测试链接:https://www.nowcoder.com/questionTerminal/6e5207314b5241fb83f2329e89fdecc8来源:牛客网[编程题]机器人的运动范围热度指数:28092 时间限制:1秒 空间限制:32768K地上有一个m行和n列的方格。一个机器人从坐标0,0的格子开始移动,
2017-06-16 11:12:50 1999
原创 矩阵中的路径(Java实现)
本题为剑指offer面试题66测试地址:https://www.nowcoder.com/questionTerminal/c61c6999eecb4b8f88a98f66b273a3cc来源:牛客网[编程题]矩阵中的路径热度指数:28891 时间限制:1秒 空间限制:32768K请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字符的
2017-06-16 10:37:22 2112
原创 滑动窗口的最大值(Java实现)
本题为剑指offer面试题65:牛客网测试地址:https://www.nowcoder.com/questionTerminal/1624bc35a45c42c0bc17d17fa0cba788来源:牛客网[编程题]滑动窗口的最大值热度指数:34520 时间限制:1秒 空间限制:32768K给定一个数组和滑动窗口的大小,找出所有滑动窗口里数值的最大
2017-06-15 20:44:28 1598
jna-4.2.1.jar
2017-12-06
SpringAPI文档中文版
2017-10-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人