自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 资源 (5)
  • 收藏
  • 关注

转载 Tomcat和servlet的关系

1、以下都是一个菜菜鸟的理解;2、我们写java代码都知道,class需要有一个main函数才能运行,但是做web开发的过程一直都没有见到过main函数,却能正常显示网页内容给访问者。3、做了一个测试,由下面图1,图2,可知,可以把tomcat理解为一个写了main函数,然后调用开发者写的servlet这些类:图14、实际上这个过程是(结合conf/server.x

2016-09-28 14:14:21 773

转载 最接近点对之6个节点问题

限制范围证明对于合并问题的第三种情况,PP中的每个节点最多只需要搜索QQ中的六个节点。本节将用于证明该推论。要证明该推论,先引入鹊巢原理:若有n个笼子和n+1只鸽子,所有的鸽子都被关在鸽笼里,那么至少有一个笼子有至少2只鸽子。鹊巢原理的另外一个表达是,若有n个盒子和n+1个球,所有的球都在这些盒子里面,那么至少有一个盒子有2个球。对PP中的其中一个点pp

2016-09-26 13:15:15 1094

原创 mysql 插入中文 ERROR 1366 (HY000): Incorrect string value: '\xE7\x8E\x9E\x97' for column

1、已建立的表无法插入中文字符串,原因是因为数据表中的内容为latin1字符集,由下图的的资料可知,latin1字符集为8bit,这说明它是不能表示中文的,故而当然会报改错:下面是具体问题,如果不修改name的字符集latin1,插入中文给name时,将会报错 Incorrect string value: '\xE7\x8E\x8B\xE6\x9E\x97',下图改了那么,没有改ed

2016-09-23 22:55:15 43067 11

原创 不增加空间的情况下,将数组的后k位整体移到前面

1、题目:不增加空间的情况下,将数组的后k位整体移到前面。例如:1,2,3,4,5,6。当k=2时,移动结果是5,6,1,2,3,4。k=3时,6,5,4,1,2,3......这是实验室师兄面试时的一道题目,要求是给定20分钟写出代码2、解法1:设数组大小为n,先保存a[n-k+i],然后将不用移动的n-k个元素后移: for(i=0;i<k2;i++){ int t=a

2016-09-23 11:10:37 1066

原创 312. Burst Balloons

1、留坑吧。。。看不懂别人的代码

2016-09-16 03:25:15 459

原创 206. Reverse Linked List

1、点击打开链接2、/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public:

2016-09-15 04:38:12 239

原创 343. Integer Break

1、点击打开链接2.Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example

2016-09-14 02:38:51 317

原创 96. Unique Binary Search Trees

1、来源:点击打开链接2、题目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3

2016-09-12 06:52:57 417

原创 108. Convert Sorted Array to Binary Search Tree c++

1、题目:点击打开链接2、给定一个数组,将其转换为一个平衡二叉查找树Given an array where elements are sorted in ascending order, convert it to a height balanced BST.3、代码16ms:/** * Definition for a binary tree node. * struc

2016-09-11 02:38:30 334

原创 389. Find the Difference

1、来源:点击打开链接2、题目:Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.F

2016-09-10 01:32:52 256

原创 319. Bulb Switcher

1、来源:点击打开链接2、There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it'

2016-09-09 02:38:11 274

原创 leetcode-242. Valid Anagram

1、题目来源:点击打开链接2、题目:Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return fa

2016-09-07 22:46:14 482

原创 215. Kth Largest Element in an Array 暴力-堆排序-快速排序

1、来源:点击打开链接2、题目:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,

2016-09-06 08:09:54 690 1

转载 转-各种排序动图

1 快速排序介绍:  快速排序是由东尼·霍尔所发展的一种排序算法。在平均状况下,排序 n 个项目要Ο(n log n)次比较。在最坏状况下则需要Ο(n2)次比较,但这种状况并不常见。事实上,快速排序通常明显比其他Ο(n log n) 算法更快,因为它的内部循环(inner loop)可以在大部分的架构上很有效率地被实现出来,且在大部分真实世界的数据,可以决定设计的选择,减少所需

2016-09-06 00:21:58 3385

原创 217. Contains Duplicate java

1、题目来源:点击打开链接2、题目:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return f

2016-09-04 20:17:56 409

原创 387. First Unique Character in a String Java

1、题目来源:点击打开链接2、题目:Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode"

2016-09-04 18:37:49 841

原创 122. Best Time to Buy and Sell Stock II Java

1、题目:点击打开链接2、题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions

2016-09-04 03:58:05 408

原创 leetcode-383. Ransom Note java

1、来源:点击打开链接2、题目:
Given
 an 
arbitrary
 ransom
 note
 string 
and 
another 
string 
containing 
letters from
 all 
the 
magazines,
 write 
a 
function 
that 
will 
return 
true 
if 
the 
ransom

2016-09-04 02:41:36 565

原创 169. Majority Element c语言

1、来源:点击打开链接2、题目:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty a

2016-09-03 20:16:23 561

原创 Leetcode-378. Kth Smallest Element in a Sorted Matrix

1、题目来源:点击打开链接2、题目:Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest elemen

2016-09-03 17:36:30 507

原创 Leetcode-167. Two Sum II - Input array is sorted c语言

1、题目:点击打开链接2、下面代码是暴力破解,超时无法通过:/** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */int* twoSum(int* numbers, int numbersSize,

2016-09-01 20:42:00 1351

gradle-4.2-all.zip

gradle4.2

2019-07-10

elasticsearch-5.6.3.zip

elasticsearch5.6.3源码。

2019-07-10

一个简单的servlet容器

[深入剖析Tomcat]一书第二章中 一个简单的servlet容器实现

2017-04-02

chorm广告插件

chorm插件

2016-07-23

LC-3 Editor和LC-3 Simulator

1.LC-3 Editor :代码编辑和编译,支持二进制机器码程序、16进制机器码程序以及汇编语言作为程序输入并编译成可执行的目标文件代码(.obj)。 2. LC-3 Simulator :程序运行的仿真环境。可仿真执行目标文件代码,支持断点、单步执行等调试手段

2015-04-23

空空如也

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

TA关注的人

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