自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(125)
  • 资源 (15)
  • 问答 (1)
  • 收藏
  • 关注

原创 写paper的点滴

第一次写paper,遇到很多不会的问题,先暂时把解决方案记录下来,日后整理。Q:如何使用visio保存矢量图? A:先ctrl+A,选择另存为,保存类型选择Tag图像文件格式,接着在输出里设置页面,压缩格式选择LZW,颜色格式选择256色,分辨率选择打印机,大小选择源,最后点击确定即可。

2016-05-07 17:31:26 579

原创 在Windows平台上搭建Apache Storm环境

整理自:Running Apache Storm on Windows1. 安装java下载和安装JDK,我安装的版本是jdk1.8.0_60,安装目录为:C:\Java\jdk1.8.0_60注意:这里的安装路径上最好不要有空格,比如我一开始安装在C:\Program Files\Java\jdk1.8.0_60,导致后面启动storm的时候提示“JAVA_HOME is incorrect

2016-03-01 16:43:09 3983 1

原创 Storm处理Stream Join的简单实例

源码是分析的storm-starter中的SingleJoinExample,对两个简单的流进行聚合:[id,gender]和[id,age]经过join后[id,gender,age]分析过程直接写在注释里面,所以就不再分离出来。SingleJoinBolt.javapackage com.wxt.storm.SingleJoinExample.bolt;import j

2015-12-22 16:57:46 3644

原创 Android Studio 项目结构解析

大体将文件分成三大块:编译系统gradle:谷歌推荐使用的基于Groovy的编译系统脚本 https://developer.android.com/tools/building/plugin-for-gradle.html应用模块app配置文件properties文件(夹)名用途.grad

2015-10-16 09:05:53 748

原创 安装TortoiseSVN出错

The installer has encountered an unexpected error installing this package.this may indicate a problem with package.the error code is 2502.百度了一下,发现是Win8因权限问题导致软件安装失败。解决方案: 在电脑的任意位置新建一个文件name.cmd(name

2015-10-14 21:05:32 2016

原创 Error:Connection timed out: connect

安装完Android Studio后,导入项目,出现一下问题:Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle网上各种解决方案,比如在settings -> gradle 中设置

2015-10-14 16:53:37 1354 1

转载 查看MySQL默认字符集

MySQL的字符集支持(Character Set Support)有两个方面: 字符集(Character set)和排序方式(Collation)。 对于字符集的支持细化到四个层次: 服务器(server),数据库(database),数据表(table)和连接(connection)。 1.MySQL对于字符集的指定可以细化到一个数据库,一张表,一列,应该用什么字符集。 但是

2015-06-11 16:30:16 1260

原创 安装MySQL-5.6失败

安装MySQL-5.6报这个错误: The installer has encountered an unexpected error installing this package.This may indicate a problem with this package. The error code is 2503/2502.解决方案: 该错误主要是由于权限不足导致的。  1

2015-06-10 13:52:06 795

原创 [LeetCode]Count Primes

Count the number of prime numbers less than a non-negative number, n一个合数总是可以分解成若干质数的乘积。所以,如果把质数的倍数全都去掉,剩下的就是质数了。 要查找n以内的质数,首先2是质数,把2的倍数:4,6,8…去掉;此时3没有被去掉,可以认为是质数,再被3的倍数去掉;然后再到5,再到7,一直到sqrt(n)。设一个布尔类型

2015-05-04 18:58:52 659

原创 [LeetCode]Isomorphic Strings

Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with a

2015-05-03 21:07:27 645

原创 [LeetCode]Sort Colors

Given 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 the order red, white and blue. Here, we will use the integers

2015-04-26 09:58:18 598

原创 [LeetCode]Pow(x, n)

Implement pow(x, n).这道题要求完成pow(),即求出x的n次方的结果。二分法,注意n<0的情况。 1. 若n < 0,则返回 1.0 / pow(x , - n )的结果。 2. 若n >= 0,二分递归求解。例如,求2^5,可以先算2^2=4,2^2=4,然后4*4 = 16,最后16*2=32.double power(double x, int n){

2015-04-26 09:44:52 597

原创 [LeetCode]Single Number

Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using

2015-04-26 09:04:24 588

原创 [LeetCode]Happy Number

Write an algorithm to determine if a number is “happy”. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the square

2015-04-24 22:44:42 685

原创 [LeetCode]Remove Linked List Elements

Remove all elements from a linked list of integers that have value val. Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5这道题很简单,要求删除单链表中与指定值相等的结点。在遍历单链表的

2015-04-24 22:13:52 587

原创 [LeetCode]Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative.给定两个字符串表示的数,要求求这两个数的乘积,乘积用字符串表示。其中,字符串表

2015-04-24 22:01:45 572

原创 [LeetCode]Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.这道题要求根据一个有序的数组建立一棵二叉排序树。利用折半的思想,构造根节点,再递归构造左右子树。递归出口是数组中只含一个元素。TreeNode *sortedArrayToBST(vector<int> &

2015-04-14 20:55:51 577

原创 [LeetCode]Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the

2015-04-09 22:04:05 450

原创 [LeetCode]Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3

2015-04-09 20:47:07 560

原创 [LeetCode]Binary Tree Right Side View

Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tre

2015-04-09 19:52:51 522

原创 [LeetCode]Find Minimum in Rotated Sorted Array II

Follow up for “Find Minimum in Rotated Sorted Array”: What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a sorted array is rotated at some pivot

2015-04-09 19:34:58 546

原创 Lowest Common Ancestor of The Two Nodes in a Binary Tree

root指向一棵二叉树的头结点,p和q分别指向该二叉树中任意两个结点的指针,编写算法,找到p和q的最近公共祖先结点r。为了不失一般性,设p在q的左边。同时,为了编写方便,将以p和q所指结点的值代替p和q本身。根据【后续遍历最后访问根节点,在递归算法中,根是压在栈底的】,很容易想到,采用后序遍历非递归算法:栈中存放二叉树结点的指针。当访问到某结点时,栈中所有的元素都是该结点的祖先。设一个辅助栈,当没

2015-04-04 20:08:10 647

原创 有关二叉树的部分操作

struct TreeNode{ ElemtType val; TreeNode *left,*right;}; 1.判定一棵二叉树是否是完全二叉树借助于层次遍历的算法,将所有结点入队列,包括空结点。出队遇到空结点时,查看其后是否有非空结点,若有,则不是完全二叉树。bool isComplete(TreeNode* root){ TreeNode* Q[Max

2015-03-28 22:13:12 667

原创 [LeetCode]Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.这道题是要求归并k个有序单链表。采用分治法,将任务分成两个子任务,然后递归求子任务,最后回溯:将k个list分成两半,然后继续划分,剩余连个list就合并。/** * Definition for si

2015-03-22 21:45:42 403

原创 [LeetCode]Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray [4,

2015-03-22 20:24:12 449

原创 [LeetCode]Linked List Cycle

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?这道题是要求在不额外使用存储空间的基础上判断一个单链表中是否存在一个环。环的存在,就是在无环的基础上,将最后一个结点的next不设为NULL,而是指向该结点前的任意

2015-03-22 18:55:49 568

原创 [LeetCode]Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这道题是给定一个有序的单链表,将它转换成一棵平衡的二叉搜索树。首先要知道平衡的二叉搜索树的特点: 1. 左子树上的所有结点的值小于根节点的值,右子树上所有结点的值大于根节点的值。即

2015-03-22 18:47:29 673

原创 [LeetCode]Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note:

2015-03-22 18:38:47 550

原创 [LeetCode]Partition List

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each o

2015-03-22 18:30:20 571

原创 [LeetCode]Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5.

2015-03-22 18:06:44 637

原创 [LeetCode]Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 这道题是要求将单链表循环右移k次,每次

2015-03-20 22:23:50 529

原创 [LeetCode]Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 这道题是要求删除有

2015-03-20 22:10:05 551

原创 [LeetCode]Insertion Sort

Sort a linked list using insertion sort.这道题是要求用插入排序的方式对单链表进行排序。先不考虑边界情况: 1. 将第一个结点看做有序区,之后的所有结点看做无序区。 2. 从第二个结点p开始,遍历有序区,知道遇到比结点p值大的结点q,将结点p插入到结点q之前。 3. 重复上述步骤直到链表遍历结束。需要注意的是: 1. 遍历无序区时,需要保存当前结点的后

2015-03-20 22:04:28 550

原创 [LeetCode]Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes’ values. For example, Given {1,2,3,4},

2015-03-17 21:49:06 496

原创 [LeetCode]Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: [“2

2015-03-17 20:59:51 646

原创 [LeetCode]Remove Duplicates from Sorted Array

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 space for another array, you must do this in place wit

2015-03-17 15:36:54 567

原创 [LeetCode]Same Tree

Given 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.这道题是要判断两棵树是不

2015-03-17 15:26:45 542

原创 [LeetCode]Sort List

Sort a linked list in O(n log n) time using constant space complexity.这道题是要求对单链表进行排序,有个O(nlogn)的时间复杂度的要求。我的想法是采取类似头插法的方式,遍历链表结点,设3个指针,min指向当前链表中的最小值,max指向当前链表中的最大值,cur指向前一插入的值。min , max , cur 初始时都指向第

2015-03-17 14:42:14 438

原创 MySQL修改密码与更改默认编码

修改密码管理员身份进入cmd,关闭Mysql服务 net stop mysql切换到mysql的bin目录,运行命令 mysqld –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.6\my.ini” –console –skip-grant-tables打开新cmd窗口,启动Mysql服务 net start mysql

2015-03-17 14:26:14 569

原创 [LeetCode]Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has th

2015-03-13 23:06:46 585

数据库系统实现 课后答案 英文

Database System Implementation 数据库系统实现 斯坦福课程主页上整理下来的课后答案

2018-04-18

zookeeper-3.4.6

zookeeper-3.4.6

2016-03-20

commons-collections.jar

2016-03-19

jedis-2.6.0.jar

jedis jar 包,用于java编程

2016-03-19

程序员面试攻略(第2版)高清PDF

程序员面试攻略(第2版)高清PDF

2016-03-16

新手入门:Spring的一些学习方法及意见

新手入门:Spring的一些学习方法及意见

2016-03-08

SPRING技术内幕:深入解析SPRING架构与设计原理第2版

SPRING技术内幕:深入解析SPRING架构与设计原理(第2版).pdf

2016-03-08

C++编程规范-101条规则准则与最佳实现

C++编程规范-101条规则准则与最佳实现

2016-03-03

深度探索C++对象模型

深度探索C++对象模型PDF中文清晰版,资源共享。

2016-03-03

不同排序算法动态生成效果JQuery实现

用JQuery实现不同排序算法(冒泡、堆、快速、插入等)的动态生成效果,可以在同一个界面对比不同排序的效率。

2016-03-02

汉诺塔问题

转载的别人对于汉诺塔理解的一份PPT,讲解的很好,可以下载看看。

2015-10-12

Head First Servlets and JSP 2nd Edition.Mar.2008

Head First Servlets and JSP 2nd Edition.Mar.2008 英文原版

2014-07-21

《Servlet和JSP学习指南》源码

《Servlet和JSP学习指南》源码

2014-07-21

自定义FilterChain的编写

不使用Servlet Filter接口,自定义FilterChain处理多个Filter执行顺序问题

2014-07-16

Objective-C Programming- The Big Nerd Ranch Guide, 2 edition

Want to write applications for iOS or the Mac? This is the guide for you. Based on Big Nerd Ranch's legendary Objective-C Bootcamp, this book covers C, Objective-C, and the common programming idioms that will help you make the most of Apple technologies

2014-04-20

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

TA关注的人

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