<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[pehaps的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/pehaps</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; pehaps]]></copyright><item><title><![CDATA[2014年百度之星程序设计大赛 - 资格赛 Energy Conversion]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/26001261</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/26001261</guid><author>pehaps</author><pubDate>Fri, 16 May 2014 18:19:00 +0800</pubDate><description><![CDATA[#include
#include
#include
using namespace std;

int enCon( long long n,long long m,long long v,long long k)
{
     int times=0;
     if(m>=n)
        return 0;
     if((m-v)*k<=m)
        return -1;
]]></description><category></category></item><item><title><![CDATA[Hadoop搭建，找不到主机问题 : Name or service not known]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/25904193</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/25904193</guid><author>pehaps</author><pubDate>Thu, 15 May 2014 17:44:51 +0800</pubDate><description><![CDATA[在搭建hadoop环境时，测试第一个例子的时候，出现了下面的问题：
4/05/16 01:37:06 INFO util.NativeCodeLoader: Loaded the native-hadoop library
14/05/16 01:37:06 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop]]></description><category></category></item><item><title><![CDATA[HDOJ 1003 Max Sum]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/25402951</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/25402951</guid><author>pehaps</author><pubDate>Fri, 09 May 2014 15:59:24 +0800</pubDate><description><![CDATA[#include
#include
#include
#include
#include
using namespace std;


int main()
{
 int cn;
 cin>>cn;
 for(int i=0;i<cn;i++)
 {
     int n;
     cin>>n;
     vector se;
     for(int i=0;i<n;i++)
     {
]]></description><category></category></item><item><title><![CDATA[HDOJ 1004 Let the Balloon Rise]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/25328707</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/25328707</guid><author>pehaps</author><pubDate>Thu, 08 May 2014 17:55:34 +0800</pubDate><description><![CDATA[很简单的题，







#include
#include
#include
using namespace std;

string maxcolor(string a[],int length)
{
    if(length==0)
        return "";
    int current=1,maxn=1;
    sort(a,a+le]]></description><category></category></item><item><title><![CDATA[HDOJ 1002 A + B Problem II]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/25322271</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/25322271</guid><author>pehaps</author><pubDate>Thu, 08 May 2014 17:06:38 +0800</pubDate><description><![CDATA[本题





#include
#include
using namespace std;

string strPlus(string s1,string s2);
int main(){
int n=0;
cin>>n;
string a,b;

for(int i=1;i
{
    cin>>a>>b;
    cout
    cout
   ]]></description><category></category></item><item><title><![CDATA[求数组两两之差绝对值最小的值]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/13607865</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/13607865</guid><author>pehaps</author><pubDate>Tue, 29 Oct 2013 21:26:46 +0800</pubDate><description><![CDATA[题目是这样的：有一个整数数组，请求出两两之差绝对值最小的值,记住，只要得出最小值即可，不需要求出是哪两个数。
这题首先一看就很面熟，貌似此类的题很多了，数组的最大连续和，最小连续绝对值等等。O（N^2）的解法肯定是最基础的，不过面试一般这种解法都是无用的。
解法一：
一轮排序，然后两两相邻的依次相减，次解法也没什么难度。
解法二：
下面就开始找有没有O（n）的解法了，今天的重头戏就来了，]]></description><category></category></item><item><title><![CDATA[leecode Decode Ways]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/12952543</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/12952543</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:47:27 +0800</pubDate><description><![CDATA[Decode Ways



A message containing letters from A-Z is being encoded to numbers using the following mapping:

'A' -> 1
'B' -> 2
...
'Z' -> 26

Given an encoded message containing digits, d]]></description><category></category></item><item><title><![CDATA[Container With Most Water]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/12952525</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/12952525</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:45:24 +0800</pubDate><description><![CDATA[Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical
 lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find tw]]></description><category></category></item><item><title><![CDATA[Largest Rectangle in Histogram]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/12952511</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/12952511</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:44:35 +0800</pubDate><description><![CDATA[Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.


Above is a histogram where width of ea]]></description><category></category></item><item><title><![CDATA[leecode  Partition List]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/12952401</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/12952401</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:40:53 +0800</pubDate><description><![CDATA[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 of t]]></description><category></category></item><item><title><![CDATA[java 对象数组内存]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8930474</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8930474</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:39:58 +0800</pubDate><description><![CDATA[对象可以用数组来存放，通过下面两个步骤来实现：1 、 声明类类型的数组变量，并用new 分配内存空间给数组。2 、 用new 产生新的对象，并分配内存空间给它 例如，要创建三个Person 类类型的数组元素，可用下列的语法： Person p[] ; // 声明Person 类类型的数组变量p = new Person[3] ; // 用new 分配内存空间创建好数组元素之后，便可把数组元素指向由]]></description><category></category></item><item><title><![CDATA[selenium 超时机制]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8929391</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8929391</guid><author>pehaps</author><pubDate>Tue, 22 Oct 2013 19:39:21 +0800</pubDate><description><![CDATA[Selenium是一个用于Web应用程序测试的工具。Selenium直接运行在浏览器中，就像真正的用户在操作一样。
Selenium2.0 java的一个简单示例如下：
WebDriver driver = newFirefoxDriver();           //启动firefox浏览器
driver.manage().window().maximize();]]></description><category></category></item><item><title><![CDATA[leetcode Minimum Window Substring]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/10007761</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/10007761</guid><author>pehaps</author><pubDate>Fri, 16 Aug 2013 18:06:22 +0800</pubDate><description><![CDATA[leetcode Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = ]]></description><category></category></item><item><title><![CDATA[jsoup和w3c的dom解析问题记录]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/9025435</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/9025435</guid><author>pehaps</author><pubDate>Tue, 04 Jun 2013 20:53:12 +0800</pubDate><description><![CDATA[1.jsoup和w3c都有纠错功能。
比如ff
他们在解析时候根本不会把ff解析进dom
2.
  

ddeeee



他们会把这解析成head有3个子节点 换行也算。
jsoup的 children函数可以直接得到一个element节点、


3.
ee
ee

w3c gettextcontext输出文本都输出ee
jsoup：调用text()输出都是]]></description><category></category></item><item><title><![CDATA[常量指针和指针常量 大端小端的记法]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/9025407</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/9025407</guid><author>pehaps</author><pubDate>Tue, 04 Jun 2013 20:34:57 +0800</pubDate><description><![CDATA[int a；
int * const p = &a    //指针常量，*p可以修改*p = 8；（OK）
                                                   p不可以修改 p++（ERROR）

int a，b；
const int *p = &a；//常量指针    *p不可修改 *p = 8；（ERROR）]]></description><category></category></item><item><title><![CDATA[java synchronized理解]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8926671</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8926671</guid><author>pehaps</author><pubDate>Tue, 14 May 2013 17:15:06 +0800</pubDate><description><![CDATA[1.synchronized修饰方法。
该方法同步，同时同一个对象的其他synchronized方法也不能调用.
2.synchronized(this)
该代码短同步，同时同一个（object）中的synchronized方法（ 包括synchronized()代码段 ）方法也不能调用.   
    

测试代码：

        
    public class test]]></description><category></category></item><item><title><![CDATA[webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8818890</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8818890</guid><author>pehaps</author><pubDate>Thu, 18 Apr 2013 14:37:41 +0800</pubDate><description><![CDATA[对于在使用webdriver和selenium的时候，如果使用过findelement这个函数时，机器有时会报错：
org.openqa.selenium.remote.UnreachableBrowserException: Error communicatingwith the remote browser. It may have died.


出现这个问题的原因一直找不到，而且，]]></description><category></category></item><item><title><![CDATA[java byte数组与文件读写]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8814866</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8814866</guid><author>pehaps</author><pubDate>Wed, 17 Apr 2013 17:00:26 +0800</pubDate><description><![CDATA[java byte数组与文件读写








 
 




importjava.io.ByteArrayOutputStream;
importjava.io.File;
importjava.io.FileInputStream;
importjava.io.FileOutputStream;
importjava.io.IOException;]]></description><category></category></item><item><title><![CDATA[java.net.SocketException: No buffer space available (maximum connections reached?)]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8810980</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8810980</guid><author>pehaps</author><pubDate>Tue, 16 Apr 2013 20:41:50 +0800</pubDate><description><![CDATA[java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind  
2008-11-15 13:15:13|  分类：

Web和网络通讯 |字号 订阅





一个朋友让我帮忙解决他服务器上一个JAVA应用出现的问题，我利用业务时间赶赴现场两次，终于解决了]]></description><category></category></item><item><title><![CDATA[Java中equals()与hashCode()方法完全解惑]]></title><link>https://blog.youkuaiyun.com/pehaps/article/details/8730954</link><guid>https://blog.youkuaiyun.com/pehaps/article/details/8730954</guid><author>pehaps</author><pubDate>Thu, 28 Mar 2013 13:22:12 +0800</pubDate><description><![CDATA[1. 首先equals()和hashcode()这两个方法都是从object类中继承过来的。
equals()方法在object类中定义如下：
public boolean equals(Object obj) {
return (this == obj);
}
很明显是对两个对象的地址值进行的比较（即比较引用是否相同）。但是我们必需清楚，当String 、Math、还有Integer、]]></description><category></category></item></channel></rss>