key2value
码龄12年
关注
提问 私信
  • 博客:252,707
    问答:2,193
    254,900
    总访问量
  • 120
    原创
  • 1,216,550
    排名
  • 17
    粉丝
  • 0
    铁粉

个人简介:爱历史 爱IT于规范下做到最好

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:广东省
  • 加入CSDN时间: 2013-05-21
博客简介:

王一兵

查看详细资料
个人成就
  • 获得17次点赞
  • 内容获得14次评论
  • 获得77次收藏
创作历程
  • 2篇
    2017年
  • 53篇
    2015年
  • 60篇
    2014年
  • 29篇
    2013年
成就勋章
TA的专栏
  • 算法
    83篇
  • 数据库
    5篇
  • 开发
    37篇
  • Redis
    5篇
  • JDK
    6篇
  • 站长
    2篇
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

353人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

聚茶吧的内容来源-Python爬虫

聚茶吧-汇聚茶的地方自己想着做一个以“茶”为主题的网站,从别的具有相同主题(茶叶)的站点上抓取文章,汇聚成一个站点,充实站点的内容, 靠内容取胜。名字就叫聚茶吧(域名是jucha8.com, 取"聚茶吧"的谐音)。准备使用爬虫抓取100万左右的文章,充实茶叶相关的内容,尽可能的引流吧……python爬虫的实现那么,聚茶吧爬虫代码是如何实现的呢?假设要抓取的站点是A,则:impo
原创
发布博客 2017.02.14 ·
619 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

内容站入门-聚茶吧

注意到推酷之后,自己也想着做个类似的主题网站,从别的具有相同主题的站点上抓取文章,汇聚成一个站点,充实站点的内容, 考内容取胜。想来想去,准备做一个以“茶叶”为核心主题的内容站, 名字就叫聚茶吧(域名是jucha8.com, 取"聚茶吧"的谐音)。准备使用爬虫抓取100万左右的文章,充实茶叶相关的内容,尽可能的引流吧…… SEO的路已经开始,慢慢摸索吧
原创
发布博客 2017.02.13 ·
610 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

使用Servlet获取用户日志

前段时间,实验室需要开发一个用户日志模块,来对实验室的Web项目监控,获取用户的行为日志。个人首先觉得应该主要使用js来实现相关功能,无奈js水平着实太低,最终采用了servlet的方式来实现。项目介绍自己先从github上查询到了一个相关项目,clickstream,我先来介绍一下该项目是怎么实现的。 Clickstream的实现它首先使用了一个Listener来监听ServletContext
原创
发布博客 2015.10.15 ·
1716 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

#1014 : Trie树

时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。这一天,他们遇到了一本词典,于是小Hi就向小Ho提出了那个经典的问题:“小Ho,你能不能对于每一个我给出的字符串,都在这个词典里面找到以这个字符串开头的所有单词呢?”身经百战的小Ho答道:“怎么
原创
发布博客 2015.09.28 ·
620 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

mysql表去除重复的记录

要求: 表a有两个字段id,name。id是主键,子增长;name有重复。除去多余的重复记录。如name有4个重复的值,删除3个,保留一个即可。delete from a where a.id in( select * from ( select distinct t.id from a, a as t where a.name=t
原创
发布博客 2015.09.06 ·
702 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

AOP的XML配置:配置了两个BeanNameAutoProxyCreator,会怎么样?

在配置Spring AOP时,可以使用org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator来完成目标服务的拦截。 比如:<bean id="serviceInteceptorProxyCreator" class="org.springframework.aop.framework.autoprox
原创
发布博客 2015.08.28 ·
4035 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

记录下log4j的两种配置方式

XML文件配置<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"><log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender nam
原创
发布博客 2015.08.24 ·
1293 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Missing Number

Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] return 2.Note: Your algorithm should run in line
原创
发布博客 2015.08.24 ·
652 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

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 with cons
原创
发布博客 2015.08.02 ·
656 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Lowest Common Ancestor of a Binary Search Tree

Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two
原创
发布博客 2015.07.11 ·
880 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Palindrome Linked List

Given a singly linked list, determine if it is a palindrome.Follow up: Could you do it in O(n) time and O(1) space?思路: 把链表一分为二,把右边的一半翻转,再逐个比对左右的链表即可。/** * Definition for singly-linked list. * struc
原创
发布博客 2015.07.10 ·
1439 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode--Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST’s total elements.Follow up: What if the BST is mod
原创
发布博客 2015.07.02 ·
4281 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

流水号的生成(日期+业务码+自增序列)

项目开发时,使用了两套数据库,开发环境和上线环境,数据库表中大多采用了自增主键, 比如:id int unsigned primary key auto_increment,但往往会碰到一些问题,比如: 开发环境中,使用爬虫抓取一些数据,建立索引,再把数据迁移到上线环境,会导致索引中的id和 上线环境数据库中id对不上,所以决定使用字符串作为主键。那么问题来了,如何生成唯一的序列号? 格式按
原创
发布博客 2015.06.29 ·
36331 阅读 ·
3 点赞 ·
2 评论 ·
38 收藏

项目自动化发布与部署

目前,部署的方式是:一个项目一台机器,使用3个tomcat部署的方式。以往,是本地(windows)开发、打包然后上传的Linux服务器上,不太方便,所以,使用SVN+Shell的方式自动化部署项目。主要思路:在Linux服务器上通过svn clone一份源码。当要新发布工程时,将本地的源码更新到svn,服务器上的源码也执行更新操作即可。先说明项目的部署文件夹:/xxx/tomcats/工程名。该文
原创
发布博客 2015.06.22 ·
1297 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Rectangle Area

Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.Rectangle Area Assume that the t
原创
发布博客 2015.06.08 ·
985 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Count Complete Tree Nodes

Given a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is completely filled, and
原创
发布博客 2015.06.06 ·
1163 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

House Robber II

Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all
原创
发布博客 2015.05.30 ·
696 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

最后一个被删除的元素

n个元素围成一圈,每次删除第m个元素,求最后一个被删除的元素。#include <iostream.h>#include "list"using namespace std;//使用list而非vector int findLast(int m,int n){ if(m<=0||n<=0){ return -1; } list<int> v;
原创
发布博客 2015.05.30 ·
816 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Kth Largest Element in an Array

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,4] and k = 2, return 5.
原创
发布博客 2015.05.23 ·
1131 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Add and Search Word - Data structure design

Design a data structure that supports the following two operations:void addWord(word) bool search(word) search(word) can search a literal word or a regular expression string containing only letters a
原创
发布博客 2015.05.16 ·
1220 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多