- 博客(21)
- 收藏
- 关注
原创 修改eclipse的默认jdk版本
1. 在eclipse.ini中设置-vm 在eclipse.ini中添加两行 -vm “C:\Program Files\Java\jdk1.6.0_02\bin\javaw.exe” 注意: 1.要写在两行,写在一行不能生效 2.路径中有空格的话,要加双引号,没有就不用加 3.如果写成C
2017-05-26 10:15:15 2791 1
原创 ofbiz错误处理治四
好像因为版本的问题,所以在我使用的时候, field="parameters.show" operator="not-equals" value="widgets" />if-compare中是不允许使用field-name的,只能用field,要记得看日志或者控制台哦~
2016-12-16 15:36:00 284
原创 ofbiz错误解析之三
在编辑菜单的时候,因为是自己新建的应用,所以需要将菜单的名称和位置加入到CommonScreens.xml中,<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd ">
2016-12-16 15:31:46 471
原创 ofbiz错误处理之二
screen widgets是通过OFBiz中一个screen widgets处理器处理的。在目录${webapp:learning}\WEB-INF中,新建controller.xml文件,并输入如下内容:---------------------------------------------------xmlversion="1.0"encoding="UTF-8"?>
2016-12-09 18:07:02 386
原创 ofbiz错误处理之一
在目录 ${OFBizInstallFolder}\applications\party\webapp\partymgr\WEB-INF目录中,编辑extended.xml文件。在第3行:view-mapname="PostalAddressAdvisory"type="screen"page="component://party/widget/partymgr/OurPartyS
2016-11-27 14:44:51 651
原创 虚拟机上的命令
1.文件与目录的操作 :ls 以长格式显示当前目录中所有文件的详细信息: #ls –l2.cp(拷贝文件) 将当前目录下的文件file1.txt复制成file2.txt: #cp file1.txt file2.txt 3.mv(文件或目录更名或将文件由一个目录移到另一个目录) 将当前目录下的文件file1更名为file2:
2016-07-06 18:46:02 1160
原创 String类
上课学了一些字符串类的用法:String str="helloworld";1.字符串长度:str.length();2.比较两个字符串的内容是否一致: str.equals("hello");1)不考虑大小写问题: str.equalsIgnoreCase();2)全用小写表示: str.toLowerCase();3)全用大写表示: str.t
2016-06-30 08:54:38 250
转载 离线+并查集 Portal
做这题学到了什么是“离线算法”的概念。所谓“离线”,就是把所有的数据都输入之后再计算,“在线”就是边输入边计算。用在这题中,是因为输入中的“询问部分”,有Q 个问,每个L可以有多少种不同路径。由于大的L必定会包含到小的L, 所以把所有问题都输入,再从大到小排序,再计算,可以减少很多计算量。DescriptionZLGG found a magic theory
2015-03-12 20:54:38 637
原创 More is better
这道题也非常的经典,大意就是,是朋友的都分在一起(朋友的朋友也是朋友);会有很多的团体,输出人数最多的团体的人数;DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the bette
2015-03-12 20:28:33 391
原创 Is It A Tree?
题意:与小希的迷宫相似,也是不能成环DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfy
2015-03-12 20:18:04 340
原创 小希的迷宫
Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她
2015-03-12 20:12:30 335
原创 经典并查集之畅通工程
这道题也是非常经典的并查集,类似于n个点,(n-1)条边的问题,以下是代码#include using namespace std;int pre[20010];void init (int n){ int i; for(i=0;i<=n;i++) pre[i]=i;}int find(int x){ int root=x; while(
2015-03-12 20:07:29 395
原创 经典的并查集之How Many Tables
DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends kno
2015-03-12 20:00:10 359
原创 poj2006
题意:计算酸的ph值设每L溶解了x摩尔的该酸(c为原来的浓度)Ka = mx*nx / c-x Ka*( c-x ) = mn*x*x mnx^2 + Ka*x - Ka*c = 0 =>一个一元二次方程解方程得x = [sqrt(Ka*Ka+4*m*n*Ka*c)-Ka] / 2mn,而 [H+] =x*m;#include#includ
2015-03-07 20:28:35 303
原创 poj1017
就是有1*1,2*2,3*3,4*4,5*5,6*6的正方体,h都一样,去填充满6*6的正方体箱子,箱子的数量尽可能少3*3是个分水岭,从这个下手开始讨论:#include #include #include using namespace std;int main(){ int N,a,b,c,d,e,f,x,y; int u[4]={0,5,3,
2015-03-06 19:59:30 297
原创 poj1458
题意:求两个字符串的最长子序列#include #include#include#include#includeusing namespace std;int dp[1000][1000];char s1[1000],s2[1000];int len1,len2;//int LCS(int ,int);int max(int a,int b, int c
2015-03-06 14:10:00 299
原创 poj1045
题意:V2=iR, V2=Vr * cos(wt + q), V1=Vs * cos(wt), i = C * d(v1 - v2)/dt;已知Vs,R,C,w,求Vr。求解得:Vr=C*R*w*Vs/sqrt(1+(C*R*w)^2)#include #include #include #include using
2015-03-06 12:46:30 362
原创 poj2244
题目大意:给你一个数据n,组成一个环,从1开始取,后移m个再取一个,要保证最后取得数是2;(约瑟夫环问题) #include #include int ans[150];void f(){ int i,j,m; for(i=3;i<150;i++) { m=1; while(1) {
2015-03-05 17:31:01 619
原创 如何合并两个有序数组
int a[10] = {1,2,6,8,9,11,53,58,64,100}, b[10] = {0,1,5,7,9,10,12,13,25,99}, c[20]; int i = 0,j = 0,k = 0; while(i < 10 && j < 10) { if(a[i] > b[j]) { c[k++] = b[j++]; } else if(a[i]==b[
2014-12-26 16:02:03 466
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人