自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (1)
  • 收藏
  • 关注

原创 2014年百度之星程序设计大赛 - 资格赛 Energy Conversion

#include#include#includeusing 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;

2014-05-16 18:19:00 524

原创 Hadoop搭建,找不到主机问题 : Name or service not known

在搭建hadoop环境时,测试第一个例子的时候,出现了下面的问题:4/05/16 01:37:06 INFO util.NativeCodeLoader: Loaded the native-hadoop library14/05/16 01:37:06 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop

2014-05-15 17:44:51 1954

原创 HDOJ 1003 Max Sum

#include#include#include#include#includeusing 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++) {

2014-05-09 15:59:24 513

原创 HDOJ 1004 Let the Balloon Rise

很简单的题,#include#include#includeusing namespace std;string maxcolor(string a[],int length){    if(length==0)        return "";    int current=1,maxn=1;    sort(a,a+le

2014-05-08 17:55:34 465

原创 HDOJ 1002 A + B Problem II

本题#include#includeusing 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   

2014-05-08 17:06:38 363

原创 求数组两两之差绝对值最小的值

题目是这样的:有一个整数数组,请求出两两之差绝对值最小的值,记住,只要得出最小值即可,不需要求出是哪两个数。这题首先一看就很面熟,貌似此类的题很多了,数组的最大连续和,最小连续绝对值等等。O(N^2)的解法肯定是最基础的,不过面试一般这种解法都是无用的。解法一:一轮排序,然后两两相邻的依次相减,次解法也没什么难度。解法二:下面就开始找有没有O(n)的解法了,今天的重头戏就来了,

2013-10-29 21:26:46 1781

原创 leecode Decode Ways

Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, d

2013-10-22 19:47:27 662

原创 Container With Most Water

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

2013-10-22 19:45:24 616

原创 Largest Rectangle in Histogram

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

2013-10-22 19:44:35 552

原创 leecode 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 of t

2013-10-22 19:40:53 543

转载 java 对象数组内存

对象可以用数组来存放,通过下面两个步骤来实现:1 、 声明类类型的数组变量,并用new 分配内存空间给数组。2 、 用new 产生新的对象,并分配内存空间给它 例如,要创建三个Person 类类型的数组元素,可用下列的语法: Person p[] ; // 声明Person 类类型的数组变量p = new Person[3] ; // 用new 分配内存空间创建好数组元素之后,便可把数组元素指向由

2013-10-22 19:39:58 713

原创 selenium 超时机制

Selenium是一个用于Web应用程序测试的工具。Selenium直接运行在浏览器中,就像真正的用户在操作一样。Selenium2.0 java的一个简单示例如下:WebDriver driver = newFirefoxDriver();           //启动firefox浏览器driver.manage().window().maximize();

2013-10-22 19:39:21 4211

原创 leetcode Minimum Window Substring

leetcode Minimum Window SubstringGiven 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 =

2013-08-16 18:06:22 648

原创 jsoup和w3c的dom解析问题记录

1.jsoup和w3c都有纠错功能。比如ff他们在解析时候根本不会把ff解析进dom2.  ddeeee他们会把这解析成head有3个子节点 换行也算。jsoup的 children函数可以直接得到一个element节点、3.eeeew3c gettextcontext输出文本都输出eejsoup:调用text()输出都是

2013-06-04 20:53:12 935

原创 常量指针和指针常量 大端小端的记法

int a;int * const p = &a //指针常量,*p可以修改*p = 8;(OK) p不可以修改 p++(ERROR)int a,b;const int *p = &a;//常量指针 *p不可修改 *p = 8;(ERROR)

2013-06-04 20:34:57 593

原创 java synchronized理解

1.synchronized修饰方法。该方法同步,同时同一个对象的其他synchronized方法也不能调用.2.synchronized(this)该代码短同步,同时同一个(object)中的synchronized方法( 包括synchronized()代码段 )方法也不能调用.       测试代码: public class test

2013-05-14 17:15:06 622

原创 webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with

对于在使用webdriver和selenium的时候,如果使用过findelement这个函数时,机器有时会报错:org.openqa.selenium.remote.UnreachableBrowserException: Error communicatingwith the remote browser. It may have died.出现这个问题的原因一直找不到,而且,

2013-04-18 14:37:41 6109 5

原创 java byte数组与文件读写

java byte数组与文件读写  importjava.io.ByteArrayOutputStream;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileOutputStream;importjava.io.IOException;

2013-04-17 17:00:26 794

转载 java.net.SocketException: No buffer space available (maximum connections reached?)

java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind  2008-11-15 13:15:13|  分类:Web和网络通讯 |字号 订阅一个朋友让我帮忙解决他服务器上一个JAVA应用出现的问题,我利用业务时间赶赴现场两次,终于解决了

2013-04-16 20:41:50 1928

转载 Java中equals()与hashCode()方法完全解惑

1. 首先equals()和hashcode()这两个方法都是从object类中继承过来的。equals()方法在object类中定义如下:public boolean equals(Object obj) {return (this == obj);}很明显是对两个对象的地址值进行的比较(即比较引用是否相同)。但是我们必需清楚,当String 、Math、还有Integer、

2013-03-28 13:22:12 454

转载 DOM Document Node Element Attr 的联系与区别汇总

node有几个子类型:Element, Text, Attribute, RootElement, Comment,Namespace等Element是可以有属性和子节点的node。---------------------------------------------------------node和Element是两个领域的概念。NODE是相对TREE这种数据结构而言的。

2013-03-28 13:14:56 700

转载 代码审查

对代码审查研究有一段时间,觉得代码审查并不是一个一触而就的工作,对于一个适应了快速开发而缺少代码审查的团队来说,突然让他们花时间去审查别人的代码,我想很多人都会存在抵制情绪,也不知该如何下手,这样无疑会增加人力开销,同时也不会取得太理想的效果。所以在我看来,代码审查需要建立在一个书写代码规范的基础之上。  对于每一个成熟的开发团队来说,一定会有自己的代码规范,如果大家都按照规范的书写,那无疑会

2013-03-07 16:19:32 467

原创 问题记录

xpath 正则问题

2013-03-06 11:07:37 330

公司职员信息管理系统 ssh框架

公司职员信息管理系统 ssh框架 包括数据库sql文件

2011-10-26

空空如也

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

TA关注的人

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