- 博客(113)
- 资源 (8)
- 收藏
- 关注
转载 Myeclipse出现the jar file xxx.jar has no source attachment. 问题
1.点 “window“-> “Preferences”-> “Java” -> “Installed JRES”;2.此时"Installed JRES"右边是列表窗格,列出了系统中的JRE 环境,选择你的JRE,然后点边上的“Edit...“, 会出现一个窗口(Edit JRE) ;3.选中rt.jar文件的这一项:“C:\Java\jdk1.5.0_04\jre\lib\rt.j
2016-12-30 10:29:09 10285
原创 Spring三种实例化bean的方式
1.使用构造器实例化2.使用静态工厂方法实例化public class OrderFactory{ public static OrderServiceBean createOrder(){ return new OrderServiceBean(); }}3.使用实例工厂方法实例化public class OrderFactory{
2016-12-27 20:31:56 409
原创 利用dom4j.jar自制实例化Spring容器
首先在项目中导入dom4j,jar包一、对于已有的配置文件xml和需实现类PersonServiceBean.javapackage cn.itcast.service.impl;import cn.itcast.service.PersonService;public class PersonServiceBean implements PersonService { public
2016-12-27 18:29:08 719
原创 实例化Spring容器
实例化Spring容器的两种方法:方法一:在类路径下寻找配置文件来实例化容器(常用) ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"beans.xml"});方法二:在文件系统路径下寻找配置文件来实例化容器ApplicationContext ctx =
2016-12-26 21:58:19 356
原创 PAT A1007
1007. Maximum Subsequence Sum (25)Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 <= i <= j <= K. The Maximum ...
2016-12-21 20:23:41 272
原创 PAT A1096
1096. Consecutive Factors (20)Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the th...
2016-12-21 18:51:12 368
原创 PAT A1088
1088. Rational Arithmetic (20)For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:
2016-12-21 18:48:43 335
原创 PAT A1085
1085. Perfect Sequence (25)Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M Now given a sequence and a parameter p, yo
2016-12-21 18:47:33 337
原创 PAT A1083
1083. List Grades (25)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student
2016-12-21 18:46:37 414
原创 PAT A1082
1082. Read Number in Chinese (25)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -12345
2016-12-21 18:45:39 525
原创 PAT A1081
1081. Rational Sum (20)Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each
2016-12-21 18:44:15 328
原创 PAT A1077
1077. Kuchiguse (20)The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Su
2016-12-21 18:42:56 571
原创 PAT A1075
1075. PAT Judge (25)The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist for PAT.Input Specific
2016-12-21 18:41:22 399
原创 分数运算
分数的四则运算一、分数的表示和化简:1.分数的表示struct Fraction{ int up, down;};2.分数的化简Fraction reduction(Fraction result){ if(result.down < 0){ result.up = -result.up; result.down = - res
2016-12-21 16:47:44 366
原创 最大公约数和最小公倍数实现
最大公约数:int gcd(int a, int b){ return !b ? a : gcd(b, a % b);}最小公倍数:a * b / gcd(a, b);建议写:a / gcd(a, b) * b;
2016-12-21 16:31:04 336
原创 PAT A1040
1040. Longest Symmetric String (25)Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest symmetric su
2016-12-20 21:54:26 312
原创 PAT A1051
1051. Pop Sequence (25)Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is
2016-12-20 20:16:23 276
原创 PAT A1073
1073. Scientific Notation (20)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9]
2016-12-20 19:06:58 433
原创 PAT A1063
1063. Set Similarity (25)Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is
2016-12-19 20:09:50 266
原创 PAT A1070
1070. Mooncake (25)Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to t
2016-12-19 19:21:17 221
原创 PAT A1067
1067. Sort with Swap(0,*) (25)Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed t
2016-12-19 19:19:15 256
原创 PAT A1065
1065. A+B and C (64bit) (20)Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number
2016-12-19 19:18:03 537
原创 PAT A1059
1059. Prime Factors (25)Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km.Input Specification:Each inpu
2016-12-19 19:15:04 308
原创 PAT A1058
1058. A+B in Hogwarts (20)If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galle
2016-12-19 19:13:41 442
原创 PAT A1055
1055. The World's Richest (25)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this jo
2016-12-19 19:12:39 326
原创 PAT A1050
1050. String Subtraction (20)Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 -
2016-12-19 19:10:22 208
原创 PAT A1047
1047. Student List for Course (25)Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student n
2016-12-19 19:05:58 256
原创 PAT A1039
1039. Course List for Student (25)Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered
2016-12-17 20:54:09 254
原创 PAT A1044
1044. Shopping in Mars (25)Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the
2016-12-17 19:39:45 352
原创 PAT A1042
1042. Shuffling Machine (20)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where
2016-12-17 19:37:31 310
原创 PAT A1041
1041. Be Unique (20)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104].
2016-12-17 19:35:23 266
原创 PAT A1038
1038. Recover the Smallest Number (30)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recov
2016-12-17 19:34:19 314
原创 PAT A1037
1037. Magic Coupon (25)The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N time
2016-12-17 19:32:04 302
原创 编写算法交换二叉树中所有节点的左右子树
实现代码如下://root是根节点void swap(){ BiNode queue[100], temp; int first = 0, last = 0; queue[first++] = root; while(first != last){ root = queue[last++]; temp = root->lchild; root->lchild = root
2016-12-16 10:04:07 25635 3
原创 PAT A1036
1036. Boys vs Girls (25)This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:
2016-12-15 20:56:16 292
原创 PAT A1035
1035. Password (20)To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to disti
2016-12-15 20:55:01 264
原创 PAT A1031
1031. Hello World for U (20)Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:h de ll rlowo
2016-12-15 20:53:31 190
原创 PAT A1029
1029. Median (25)Given an increasing sequence S of N integers, themedian is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10
2016-12-15 20:51:54 253
TortoiseSVN-1.9.5.27581-x64-svn-1.9.5.msi
2017-06-09
Junit 4.11
2016-12-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人