ITeye博客

you can make it

hefeijack · 共 48 篇文章

my java learning

1,首先是html页面(imgTest.jsp) <span class="htgl_addpro_content_high_content" style="margin-left: 10px;"> <p> <img id="imgsrc" src="&lt;%=basePath%&gt;images/nopic.gif" width="131" height="180"></p> <p> <input type="text" id="imageUrlTmp" name="htglBookInfo.imageName" disabled value="" style="width: 220p…

2015-01-12 09:59 · java · 评论(0)

postgreSql 安装与配置

说明: 我是用root用户在终端登陆的,如果是非root用户,那在命令前需要加上"sudo",你懂的... 第一步:在Ubuntu下安装Postgresql 1.使用 apt-get install 安装 root@server2-virtual-machine:~# apt-get install -y postgresql-9.1 postgresql-client-9.1 postgresql-contrib-9.1 postgresql-server-dev-9.1 [代码说明] 安装服务端和命令行客户端psql。等待一段时间,系统会自动从网上下载下安装文件并完成安装 第二步:修改P…

2013-10-15 12:06 · Linux · 评论(0)

Eclipse快捷键与使用技巧总结(转)

此文档主要介绍个人认为比较实用的技巧,常用技巧不做介绍。资料来源于网络,自己再集中整理的。 一、实用类快捷键 1 常用熟悉的快捷键 CTRL+C(复制)、CTRL+X(剪切)、CTRL+Z(撤销)、CTRL+F(查找)、CTRL+H(搜索文件或字符串)、CTRL+Y(重做)、CTRL+/(双斜杠注释)、ALT+/(提示)、CTRL+SHIFT+F(格式化代码) 2 编码辅助类 1)CTRL+D 删除当前行。 2)CTRL+ALT+Down(Up) 复制当前行到下(上)一行中。比CTRL+C单纯的复制功能要方便好用(省掉了粘贴步骤),主要是用在编写代码时,需要移动代码的地方。 3)ALT+Do…

2013-10-14 09:08 · Linux · 评论(0)

dpkg的用法(转)

dpkg是一个Debian的一个命令行工具,它可以用来安装、删除、构建和管理Debian的软件包。 下面是它的一些命令解释: 1)安装软件 命令行:dpkg -i <.deb file name> 示例:dpkg -i avg71flm_r28-1_i386.deb 2)安装一个目录下面所有的软件包 命令行:dpkg -R 示例:dpkg -R /usr/local/src 3)释放软件包,但是不进行配置 命令行:dpkg –unpack package_file 如果和-R一起使用,参数可以是一个目录 示例:dpkg –unpack avg71flm_r28-1_i386.deb 4)重新…

2013-10-14 08:52 · Linux · 评论(0)

2163:大合照

题目描述 ACM俱乐部要照大合照了! "顺序怎么排?" "按会员编号吗?" "我们可是学计算机考研的人唉!" "那么还是以会员编号为依据吧。但是不是单纯按编号大小排列,而是让这些编号连在一起之后组成的那个整数最小。" 输入格式 输入有多组数据。 每组数据两行。 第一行包含一个正整数n(小于等于10000),代表会员人数。 第二行包含n个正整数(小于等于10000000),代表各会员的编号,编号可能有相同。 输出 对应每组数据,输出一个正整数,这些会员编号连接成的最小的整数。 样例输入 7 14 36 154 58 36 3 8 9 5534 5226 5636 99956 30 135 35…

2013-10-02 22:52 · 剑指offer · 评论(0)

2155:发奖金

题目描述 ACM俱乐部最近赚大钱了,要把n元奖金分给若干个员工(至少两个)。员工的数目可以随意指定,但是这些员工领得的奖金数额必须构成一个连续的序列。比如5个人,分别取得3,4,5,6,7元。 输入格式 输入有多组数据。 每组数据一行,包含一个正整数n(小于等于2^20)。 输出 对应每组数据,输出若干行。每种分配方法输出一行(按员工数目由多到少排序),一行内输出各员工的奖金(由少到多排序,以空格分隔),行尾也请输出一个空格。 样例输入 15 28 样例输出 1 2 3 4 5 4 5 6 7 8 1 2 3 4 5 6 7 #include<iostream> #include<cstdi…

2013-10-02 15:49 · 剑指offer · 评论(0)

2154:数数

题目描述 ACM俱乐部里的那些无聊家伙经常举行数数比赛- -。 比赛规则就是对于一个给出的正整数n,把1到n的正整数写在纸上,然后数里面数字1被写出来的次数。 输入格式 输入有多组数据。 每组数据一行,包含一个正整数n(小于等于2^26)。 输出 对应每组数据,输出所求的1的出现次数。 样例输入 11 20 样例输出 4 12 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> using namespace std; char str[40]; int Pow(int…

2013-10-02 15:33 · 剑指offer · 评论(0)

HDU 4750 Count The Pairs (并查集+二分)

Count The Pairs Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 302 Accepted Submission(s): 159 Problem Description With the 60th anniversary celebration of Nanjing University of Science and Technology coming soon, the university sets n touris…

2013-09-22 15:39 · ACM · 评论(0)

HDU 4753 Fishhead’s Little Game (记忆化搜索)

Fishhead’s Little Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 377 Accepted Submission(s): 89 Problem Description There is a 3 by 3 grid and each vertex is assigned a number. It looks like JiuGongGe, but they are different, for we are no…

2013-09-22 15:28 · ACM · 评论(0)

HDU 4628 Pieces (状压DP)

Pieces Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 311 Accepted Submission(s): 172 Problem Description You heart broke into pieces.My string broke into pieces.But you will recover one day,and my string will never go back. Given a string s.…

2013-07-30 22:49 · ACM · 评论(0)

2150:神奇的工号 (剑指offer)

2150:神奇的工号分数: 2 **时间限制:**1 秒 **内存限制:**128 兆 特殊判题: 否 **提交:**4 解决: 4 题目描述 ACM俱乐部里员工的都有一个工号,这个工号的二进制表达中1的个数越多,这个员工的级别就越高。 输入一个工号,求这个工号的二进制表达中1的个数。 例如输入10,由于其二进制表示为1010,有两个1,因此输出2。 输入格式 每组测试数据输入一行,每行输入一个整数(绝对值<=1000000)。 输出 每组测试数据输出一行,这个工号的二进制表达中1的个数。 样例输入 10 0 -32768 样例输出 2 0 17 #include<iostream> #in…

2013-07-13 16:43 · 面试题 · 评论(0)

POJ 1966 Cable TV Network (EK 最小割)

Cable TV Network Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 3442 Accepted: 1602 Description The interconnection of the relays in a cable TV network is bi-directional. The network is connected if there is at least one interconnection path between each pair of relays present in the ne…

2013-07-10 12:24 · acm图论 · 评论(0)

POJ 2723 Get Luffy Out (二分 + 2-SAT判定)

Get Luffy Out Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6609 Accepted: 2531 Description Ratish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Arlong's island. When he got there, he found the secret p…

2013-07-09 11:33 · acm图论 · 评论(0)

POJ 2942 Knights of the Round Table (点双联通分量+奇环判定)

Knights of the Round Table Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 7840 Accepted: 2450 Description Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not …

2013-07-09 10:33 · acm图论 · 评论(0)

POJ 3522 Slim Span (Kruskal最小生成树)

Slim Span Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5412 Accepted: 2842 Description Given an undirected weighted graph G , you should find one of spanning trees specified as follows. The graph G is an ordered pair ( V , E ), where V is a set of vertices { v 1, v 2, …, vn } and E is…

2013-07-09 10:20 · acm图论 · 评论(0)