自定义博客皮肤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)
  • 收藏
  • 关注

转载 [LeetCode]100. Same Tree &129. Sum Root to Leaf Numbers

EasyGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.0ms: public boo

2016-09-17 10:13:59 170

转载 [LeetCode]21. Merge Two Sorted Lists

EasyMerge 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.2ms: public ListNode mergeTwoLists(ListNode l1, ListNode

2016-09-16 23:20:05 168

转载 [LeetCode]24. Swap Nodes in Pairs

EasyGiven 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.Your algorithm should use only constant space. You ma

2016-09-16 23:18:57 156

转载 [LeetCode]292. Nim Game

EasyYou are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be

2016-09-16 23:06:51 147

转载 [LeetCode]349. Intersection of Two Arrays【&350. Intersection of Two Arrays II】

349. Intersection of Two Arrays350. Intersection of Two Arrays II

2016-09-16 23:03:28 173

转载 [LeetCode]258. Add Digits&202. Happy Number

258. Add Digits202. Happy Number

2016-09-16 22:52:39 208

转载 [LeetCode]165. Compare Version Numbers

EasyCompare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0.You may assume that the version strings are non-empty and c

2016-09-16 21:20:03 204

转载 [LeetCode]263. Ugly Number&264. Ugly Number II

263. Ugly Number264. Ugly Number II

2016-09-16 21:16:20 406

转载 [LeetCode]289. Game of Life

MediumAccording to the Wikipedia’s article: “The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.”Given a board with m b

2016-09-16 21:12:56 293

转载 [LeetCode]374. Guess Number Higher or Lower【&375. Guess Number Higher or Lower II】

374 . Guess Number Higher or Lower EasyWe are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I’ll tell

2016-09-16 21:09:02 322

转载 [LeetCode]371. Sum of Two Integers【&2. Add Two Numbers】

371. Sum of Two Integers2. Add Two Numbers

2016-09-16 21:01:50 181

转载 [LeetCode]299. Bulls and Cows

EasyYou are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint

2016-09-16 20:56:36 192

转载 [LeetCode]344. Reverse String&345. Reverse Vowels of a String&151. Reverse Words in a String

344. Reverse String345. Reverse Vowels of a String151. Reverse Words in a String

2016-09-16 20:33:12 288

转载 [LeetCode]242.Valid Anagram&383. Ransom Note&389. Find the Difference

242.Valid Anagram383. Ransom Note389. Find the Difference

2016-09-16 20:28:19 301

转载 [LeetCode]231. Power of Two&326. Power of Three&342. Power of Four

231. Power of Two&326. Power of Three&342. Power of Four

2016-09-16 16:12:08 246

转载 [LeetCode]191. Number of 1 Bits&338. Counting Bits

191. Number of 1 Bits338. Counting Bits

2016-09-16 16:01:48 177

转载 [LeetCode]198. House Robber&213. House Robber II&337. House Robber III

198. House Robber213. House Robber II337. House Robber III

2016-09-16 15:59:07 280

转载 [LeetCode]51. N-Queens&52. N-Queens II

51 . N-Queens HardThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-quee

2016-09-16 15:52:59 224

转载 [LeetCode]102. Binary Tree Level Order Traversal&107. Binary Tree Level Order Traversal II

EasyGiven a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).

2016-09-16 15:34:29 231

转载 [LeetCode]1. Two Sum&167. Two Sum II - Input array is sorted

1 . Two Sum EasyGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example: Given

2016-09-16 15:30:45 318

转载 [LeetCode]396. Rotate Function

396. Rotate Function

2016-09-12 11:01:54 817

转载 [LeetCode]283. Move Zeroes&26. Remove Duplicates from Sorted Array

283. Move Zeroes26. Remove Duplicates from Sorted Array

2016-09-01 16:27:03 274

转载 [LeetCode]136. Single Number&137. Single Number II&260. Single Number III

136. Single Number137. Single Number II260. Single Number III

2016-09-01 16:07:42 317

转载 [LeetCode]8. String to Integer (atoi)

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases

2016-09-01 15:56:44 317

原创 CentOS7+Hadoop2.5.2+Spark1.5.2环境搭建

本文介绍在VMware下建立3台CentOS7系统虚拟机,搭建hadoop+spark的全过程。这里三台CentOS主机分别为Mars、Phobos、Deimos。CentOS最小化安装CentOS网络设置jdk安装ssh免密登陆快捷键Markdown及扩展表格定义列表CentOS最小化安装CentOS网络设置jdk安装ssh免密登陆hadoo

2016-08-03 17:06:13 3046

原创 spring security下开启csrf,同时支持session.invalidate()调用

最近在做的一个java web项目,要求登录界面信息提交时使用https,登录成功后页面使用http,同时全站使用csrf防御。然后https和http的访问会分别创建两个session,csrf的token存在于https创建的session中,当验证用户身份通过后,跳转到http进入时,新建的session中没有csrfToken,因此被403拒绝访问。解决方法为:在身份验证成功后,跳

2015-11-28 21:19:02 4111

原创 spring security的csrf防御机制在ajax中的应用

spring security的csrf防御功能:在jsp中使用如下代码:...上述代码中,等同于: 而,之所以使用spring的替代标签,是因为spring的标签可以自动将token以hidden类型添加到提交的数据当中在js代码中,使用如下方式:var csrfParameter = $("meta[name='_csrf_para

2015-11-27 20:12:41 10180 2

原创 spring security 集成csrf与会话更新

配置完spring security的csrf功能后,用APP SCAN扫描,发现登录页面没有进行会话更新(changeSessionId),如果使用servlet3.1+,可以直接在request中调用changeSessionId()方法。如果使用的是旧版本的servlet,则可以使用如下方法:/*spring security csrf token reinvoke*/ Ob

2015-11-27 11:12:02 2334

空空如也

空空如也

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

TA关注的人

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