From 6bf56f4658b8a6532fc98f328349e28bc8dd15e4 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Sun, 26 Feb 2017 16:44:05 +0800 Subject: [PATCH 001/646] Amend local --- .../src/TestCollection/StackTest.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/group12/382266293/src/TestCollection/StackTest.java b/group12/382266293/src/TestCollection/StackTest.java index 3784a9b972..8d2f85e1bf 100644 --- a/group12/382266293/src/TestCollection/StackTest.java +++ b/group12/382266293/src/TestCollection/StackTest.java @@ -104,13 +104,22 @@ public void testSize() { @Test public void testAdd() { - myStack.push(5); - myStack.push(10); - myStack.push(15); - println(myStack.get(0)); - println(myStack.get(1)); - println(myStack.get(2)); + + int size = getRandomNumber(); + int[] expected = new int[size]; + int actual; + for (int i = 0; i < size; i++) { + actual = getRandomNumber(); + expected[i] = actual; + myStack.add(actual); + } + int expectedInt; + for (int i = 0; i < size; i++) { + expectedInt = expected[size - i - 1]; + actual = myStack.pop(); + assertEquals(expectedInt, actual); + } } @Test From 5f23dd85c1bc6049c99ff076ce2cc03ab1bb0411 Mon Sep 17 00:00:00 2001 From: bate999999999 <282742732@qq.com> Date: Sun, 26 Feb 2017 22:48:52 +0800 Subject: [PATCH 002/646] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.settings/org.eclipse.jdt.core.prefs | 11 + .../src/com/coding/basic/ArrayList.java | 124 +++++++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++ .../src/com/coding/basic/Iterator.java | 7 + .../com/coding/basic/IteratorArrayList.java | 40 +++ .../com/coding/basic/IteratorLinkedList.java | 30 +++ .../src/com/coding/basic/LinkedList.java | 239 ++++++++++++++++++ .../learning_1/src/com/coding/basic/List.java | 9 + .../src/com/coding/basic/Queue.java | 22 ++ .../src/com/coding/basic/Stack.java | 42 +++ 10 files changed, 556 insertions(+) create mode 100644 group12/282742732/learning_1/.settings/org.eclipse.jdt.core.prefs create mode 100644 group12/282742732/learning_1/src/com/coding/basic/ArrayList.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/Iterator.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/IteratorArrayList.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/IteratorLinkedList.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/LinkedList.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/List.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/Queue.java create mode 100644 group12/282742732/learning_1/src/com/coding/basic/Stack.java diff --git a/group12/282742732/learning_1/.settings/org.eclipse.jdt.core.prefs b/group12/282742732/learning_1/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..3a21537071 --- /dev/null +++ b/group12/282742732/learning_1/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group12/282742732/learning_1/src/com/coding/basic/ArrayList.java b/group12/282742732/learning_1/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..ec3f7399e7 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/ArrayList.java @@ -0,0 +1,124 @@ +package com.coding.basic; + + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + if (size+1>=elementData.length) { + this.groupLength(); + }else if (size==0){ + elementData[0]=o; + }else{ + elementData[size] = o; + } + size = size + 1; + } + public void add(int index, Object o){ + if (size+1>=elementData.length) { + this.groupLength(); + }else if (index == size ) { + elementData[size] = o; + }else if(index>=0 && index<=size ){ + Object[] elementDataNew = new Object[this.elementData.length]; + + System.arraycopy(elementData, 0, elementDataNew, 0, index); + elementDataNew[index]=o; + System.arraycopy(elementData, index, elementDataNew, index+1, size-index); + + this.elementData = elementDataNew; + }else{ + System.out.println("指针越界"); + return; + } + + size = size + 1; + } + + public Object get(int index){ + + if (index>=0||index<=size) { + return elementData[index]; + }else{ + System.out.println("指针越界"); + return null; + } + + } + + public Object remove(int index){ + + Object obj =this.elementData[index]; + Object[] elementDataNew = new Object[this.elementData.length]; + if (index<0 || index > size-1) { + System.out.println("指针越界"); + return null; + }else if(index==0){ + System.arraycopy(elementData, 1, elementDataNew, 0, size-1); + }else if(index==size){ + System.arraycopy(elementData, 0, elementDataNew, 0, size-1); + }else if(index>0 && index <=size){ + System.arraycopy(elementData, 0, elementDataNew, 0, index); + System.arraycopy(elementData, index+1, elementDataNew, index, size-index-1); + } + + this.elementData = elementDataNew; + size=size-1; + return obj; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + + return new IteratorArrayList(elementData,size); + } + + private void groupLength(){ + this.elementData = new Object[this.elementData.length + 10]; + size=size+10; + } + + public static void main(String[] args) { + + + + ArrayList list = new ArrayList(); + System.out.println(list.size()); + + list.add("aaa"); +// System.out.println(list.remove(1)); + + list.add("bbb"); + + + list.add(1, "ccc"); + list.add(2, "ddd"); + +// System.out.println(list.size()); +// +// System.out.println( list.remove(0) ); +// +// list.add(0,"111"); +// list.add("xxxx"); + + System.out.println(list.size()); + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i)+","); + } + Iterator it = list.iterator(); + + int idex=0; + while (it.hasNext()) { + String str = (String) it.next(); + idex++; + System.out.println("str"+idex+"=="+str+";"); + + } + } +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/BinaryTreeNode.java b/group12/282742732/learning_1/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/Iterator.java b/group12/282742732/learning_1/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/IteratorArrayList.java b/group12/282742732/learning_1/src/com/coding/basic/IteratorArrayList.java new file mode 100644 index 0000000000..faefc0de06 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/IteratorArrayList.java @@ -0,0 +1,40 @@ +package com.coding.basic; + +public class IteratorArrayList implements Iterator { + + + private Object[] elementData; + private int length; + + private int index = 0; + + public IteratorArrayList(Object[] elementData,int length){ + this.elementData = elementData; + this.length = length; + } + + @Override + public boolean hasNext() { + + if ((index+1)<=length) { + return true; + } + + return false; + } + + @Override + public Object next() { + if ((index+1)<=length) { + index = index + 1; + return elementData[index-1]; + }else{ + System.out.println("指针超过范围"); + return null; + } + + } + + + +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/IteratorLinkedList.java b/group12/282742732/learning_1/src/com/coding/basic/IteratorLinkedList.java new file mode 100644 index 0000000000..558b90f05a --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/IteratorLinkedList.java @@ -0,0 +1,30 @@ +package com.coding.basic; + +import com.coding.basic.LinkedList.Node; + +public class IteratorLinkedList implements Iterator{ + + Node node ; + public IteratorLinkedList(Node node){ + this.node = node; + } + + @Override + public boolean hasNext() { + + if (node == null) { + return false; + } + return true; + + } + + @Override + public Object next() { + Object obj = this.node.data; + node = node.next; + return obj; + } + + +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/LinkedList.java b/group12/282742732/learning_1/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..c5a28a35f8 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/LinkedList.java @@ -0,0 +1,239 @@ +package com.coding.basic; + + +public class LinkedList implements List { + + private Node head; + private Node last; + private int size = 0; + + public void add(Object o){ + if (head==null) { + head=new Node(o); + last=head; + }else{ + Node node = new Node(o); + last.setNext(node); + last = node; + } + size = size + 1; + } + public void add(int index , Object o){ + + if (index >=0 && index<=this.size && size>0) { + + if (index == 0) { + this.addFirst(o); + }else if(index == size){ + this.addLast(o); + }else{ + int num = 0; + Node node = head; + Node node1 = null; + Node nodenew = new Node(o); + Node node3 = null; + while (num <= index){ + + if(index - 1 == num){ + node1 = node; + }else if(index == num){ + node3 = node; + } + node = node.next; + num = num +1; + }; + nodenew.setNext(node3); + node1.setNext(nodenew); + + + size = size + 1; + } + + }else{ + System.out.println("指针越界"); + } + + } + public Object get(int index){ + + + if (index >=0 && index<=this.size && size>0) { + int num = 0; + Node node = head; + while (num < size){ + if(index == num){ + return node.getData(); + }else{ + node = node.next; + num = num +1; + } + }; + }else{ + System.out.println("指针越界"); + return null; + } + return null; + } + public Object remove(int index){ + + if (index >=0 && index<=this.size && size>0) { + + if (index == 0) { + return this.removeFirst(); + }else if(index+1==size){ + return this.removeLast(); + }else{ + int num = 0; + Node node = head; + Node node1 = null; + Node node2 = null; + Node node3 = null; + while (num <= index+1){ + if(index - 1 == num){ + node1 = node; + }else if(index+1 == num){ + node3 = node; + }else if(index == num){ + node2 = node; + } + node = node.next; + num = num +1; + }; + node1.setNext(node3); + size = size - 1; + return node2.data; + } + + }else{ + System.out.println("指针越界"); + return null; + } + + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + Node node = new Node(o); + node.setNext(head); + head = node; + size = size + 1; + } + public void addLast(Object o){ + Node node = new Node(o); + last.setNext(node); + last = node; + size = size + 1; + } + public Object removeFirst(){ + Object obj = null; + if(size > 0){ + obj = head.data; + head = head.next; + }else{ + System.out.println("指针越界"); + return null; + } + + size = size - 1; + return obj; + } + public Object removeLast(){ + Object obj = null; + if(this.size() > 0){ + if(this.size()==1){ + obj = head.data; + this.head = null; + }else if (this.size()==2) { + obj = head.next.data; + this.head.setNext(null); + }else{ + int num = 0; + Node node = head; + Node node1 = null; + Node node2 = null; + Node node3 = null; + while (num <= size-2){ + if(size - 2 == num){ + obj = node.next.data; + node.setNext(null); + last = node; + }else{ + node = node.next; + } + + num = num +1; + }; + } + }else{ + System.out.println("指针越界"); + return null; + } + + + + size = size - 1; + return obj; + } + public Iterator iterator(){ + return new IteratorLinkedList(this.head); + } + + + static class Node{ + Object data; + Node next; + + public Node(Object object) { + data = object; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + } + + + public static void main(String[] args) { + LinkedList list = new LinkedList(); + list.add("aaa"); + list.add("bbb"); + list.add("ccc"); +// System.out.println(list.removeLast()); +// System.out.println(list.removeFirst()); +// list.add(3,"xxxxxx"); +// System.out.println("======="+list.removeFirst()); +// System.out.println(list.size()); +// +// System.out.println("list.get0========"+list.get(0)); +// System.out.println("list.get1========"+list.get(1)); +// System.out.println("============="); + System.out.println(list.size()); + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i)); + } + + Iterator it = list.iterator(); + + while(it.hasNext()){ + String str = (String) it.next(); + System.out.println("str====="+str); + } + + } +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/List.java b/group12/282742732/learning_1/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/Queue.java b/group12/282742732/learning_1/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..d16a441644 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/Queue.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Queue { + + LinkedList elementData = new LinkedList(); + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group12/282742732/learning_1/src/com/coding/basic/Stack.java b/group12/282742732/learning_1/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..31b24fd136 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coding/basic/Stack.java @@ -0,0 +1,42 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + if (elementData.size()>0) { + return false; + } + return true; + } + public int size(){ + return elementData.size(); + } + + public static void main(String[] args) { + + Stack st = new Stack(); + st.push("aaa"); + st.push("bbb"); + st.push("ccc"); + System.out.println(st.isEmpty()); + int length = st.size(); + + for (int i = 0; i < length; i++) { + System.out.println(st.peek()); + } + + System.out.println(st.isEmpty()); + } +} From 9c41d7429b2984fb25efd950c1eabd01811bdf01 Mon Sep 17 00:00:00 2001 From: ls00002 <2686360536@qq.com> Date: Sun, 26 Feb 2017 22:57:11 +0800 Subject: [PATCH 003/646] homework --- group12/2686360536/ArrayList.java | 34 +++++++++++++ group12/2686360536/LinkedList.java | 80 ++++++++++++++++++++++++++++++ group12/2686360536/List.java | 9 ++++ group12/2686360536/Node.java | 43 ++++++++++++++++ group12/2686360536/Queue.java | 28 +++++++++++ group12/2686360536/Stack.java | 38 ++++++++++++++ 6 files changed, 232 insertions(+) create mode 100644 group12/2686360536/ArrayList.java create mode 100644 group12/2686360536/LinkedList.java create mode 100644 group12/2686360536/List.java create mode 100644 group12/2686360536/Node.java create mode 100644 group12/2686360536/Queue.java create mode 100644 group12/2686360536/Stack.java diff --git a/group12/2686360536/ArrayList.java b/group12/2686360536/ArrayList.java new file mode 100644 index 0000000000..cf7eb423b0 --- /dev/null +++ b/group12/2686360536/ArrayList.java @@ -0,0 +1,34 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] data = new Object[100]; + + public void add(Object object) { + data[size] = object; + size++; + } + + public void add(int index, Object object) { + + } + + public Object get(int index) { + return data[index]; + } + + public Object remove(int index) { + return null; + } + + public int size() { + return size; + } + + public Iterator iterator() { + return null; + } + +} diff --git a/group12/2686360536/LinkedList.java b/group12/2686360536/LinkedList.java new file mode 100644 index 0000000000..6a8d0b237f --- /dev/null +++ b/group12/2686360536/LinkedList.java @@ -0,0 +1,80 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public class LinkedList implements List { + + private Node start; + private Node end; + private int size; + + public void add(Object object) { + if (start == null) { + start = new Node(object); + end = start; + } else { + Node node = new Node(object); + start.setNext(node); + end = node; + } + size++; + } + + public void add(int index, Object object) { + } + + + public Object get(int index) { + if(index > size -1) + return null; + + Node current = start; + for (int i = 0; i < index; i++) { + current = current.getNext(); + } + return current.getData(); + } + + public Object remove(int index) { + return null; + } + + public int size() { + return size; + } + + public void addFirst(Object object) { + Node node = new Node(object, start); + start = node; + } + + public void addEnd(Object object) { + Node node = new Node(object); + end.setNext(node); + end = node; + } + + public Object removeFirst() { + Object data = start.getData(); + start = start.getNext(); + return data; + + } + + public Object removeEnd() { + Object data = end.getData(); + Node current = start; + while(true){ + if (current.getNext() == end){ + end = current; + current.setNext(null); + break; + }else { + current = current.getNext(); + } + } + return data; + } + + public Iterator iterator() { + return null; + } +} diff --git a/group12/2686360536/List.java b/group12/2686360536/List.java new file mode 100644 index 0000000000..7822b0e26c --- /dev/null +++ b/group12/2686360536/List.java @@ -0,0 +1,9 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group12/2686360536/Node.java b/group12/2686360536/Node.java new file mode 100644 index 0000000000..999e3ee828 --- /dev/null +++ b/group12/2686360536/Node.java @@ -0,0 +1,43 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public class Node { + private Object data; + private Node next; + private Node previous; + + public Node() { + } + + public Node(Object data){ + this.data = data; + } + + public Node(Object data, Node next) { + this.data = data; + this.next = next; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + public Node getPrevious() { + return previous; + } + + public void setPrevious(Node previous) { + this.previous = previous; + } +} \ No newline at end of file diff --git a/group12/2686360536/Queue.java b/group12/2686360536/Queue.java new file mode 100644 index 0000000000..10adea7fc4 --- /dev/null +++ b/group12/2686360536/Queue.java @@ -0,0 +1,28 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public class Queue { + private ArrayList elements = new ArrayList(); + + public void enQueue(Object object) { + elements.add(object); + } + + public Object deQueue() { + if (isEmpty()) + return null; + else { + return elements.remove(elements.size() - 1); + } + } + + public boolean isEmpty() { + if (elements.size() == 0) + return true; + else + return false; + } + + public int size() { + return elements.size(); + } +} diff --git a/group12/2686360536/Stack.java b/group12/2686360536/Stack.java new file mode 100644 index 0000000000..e2908b0fa5 --- /dev/null +++ b/group12/2686360536/Stack.java @@ -0,0 +1,38 @@ +package org.dul.CodingTask.homework_2017_2_25; + +public class Stack { + private ArrayList elements = new ArrayList(); + + public void push(Object object) { + elements.add(object); + } + + public Object pop() { + if (isEmpty()) + return null; + else { + return elements.remove(elements.size() - 1); + } + + } + + public Object peek() { + if (isEmpty()) + return null; + else { + return elements.get(elements.size() - 1); + } + } + + public boolean isEmpty() { + if (elements.size() == 0) + return true; + else + return false; + } + + public int size() { + return elements.size(); + } + +} From 377324333b1bb1ff1706b5a3fe6033987e846335 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Sun, 26 Feb 2017 23:41:02 +0800 Subject: [PATCH 004/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/1144989424/firstPractice/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/group08/1144989424/firstPractice/readme.md b/group08/1144989424/firstPractice/readme.md index ac4feb57b8..d1bf002802 100644 --- a/group08/1144989424/firstPractice/readme.md +++ b/group08/1144989424/firstPractice/readme.md @@ -1,4 +1,5 @@ ### 绗竴娆′綔涓氾細 1. 瀹炵幇ArrayList, LinkedList, Queue, Stack 2. 鏈変綑鍔涚殑鍚屽鍙互瀹炵幇 BinaryTree 鍜孖terator -3. 鍐欎竴绡囨枃绔狅紝寤鸿: 鎻忚堪CPU锛屽唴瀛橈紝 纭洏锛屾寚浠や箣闂寸殑鍏崇郴銆 \ No newline at end of file +3. 鍐欎竴绡囨枃绔狅紝寤鸿: 鎻忚堪CPU锛屽唴瀛橈紝 纭洏锛屾寚浠や箣闂寸殑鍏崇郴銆 +* 鎴戠殑鏂囩珷鍦板潃锛歔娴呰皥CPU锛屽唴瀛橈紝 纭洏锛屾寚浠や箣闂寸殑鍏崇郴](http://blog.csdn.net/qq1332479771/article/details/57597710) \ No newline at end of file From 4b5c14c8af1e85501ecb72b78648767e9ad1439e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Mon, 27 Feb 2017 16:49:31 +0800 Subject: [PATCH 005/646] =?UTF-8?q?=E9=9B=86=E5=90=88=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E4=B8=AA=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xuyangyang/util_1/MyArrayList.java | 179 +++++++++++ .../xuyangyang/util_1/MyArrayListTest.java | 65 ++++ .../com/xuyangyang/util_1/MyIterator.java | 10 + .../com/xuyangyang/util_1/MyLinkedList.java | 285 ++++++++++++++++++ .../xuyangyang/util_1/MyLinkedListTest.java | 71 +++++ .../02-26/com/xuyangyang/util_1/MyList.java | 19 ++ 6 files changed, 629 insertions(+) create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayList.java create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayListTest.java create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyIterator.java create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedList.java create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedListTest.java create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/MyList.java diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayList.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayList.java new file mode 100644 index 0000000000..3213e5f2d3 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayList.java @@ -0,0 +1,179 @@ +package com.util_1; + +import java.util.Arrays; +import java.util.NoSuchElementException; + +/** + * Created by 14258 on 2017/2/27. + */ +public class MyArrayList implements MyList { + + private int size; + private Object[] elementData; + + private static final int DEFAULTCAPACITY = 10; + private static final Object[] EMPTY_ELEMENTDATA = {}; + private static final Object[] DEFAULTCAPACITY_EMPTY_ELEMENTDATA = {}; + + + public MyArrayList() { + this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA; + } + + public MyArrayList(int initCapacity) { + if (initCapacity == 0) { + elementData = EMPTY_ELEMENTDATA; + } else if (initCapacity > 0) { + this.elementData = new Object[initCapacity]; + + } else { + throw new IllegalArgumentException("闈炴硶鍙傛暟" + initCapacity); + } + } + + + @Override + public boolean add(Object o) { + ensureInternalCapacity(size + 1); + elementData[size++] = o; + return true; + } + + /** + * @param index + * @param o + */ + @Override + public void add(int index, Object o) { + rangeAddCheck(index); + ensureInternalCapacity(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = o; + size++; + } + + /** + * 鍒ゆ柇鏄惁绗竴娆℃彃鍏ワ紝濡傛灉鏄紝璁剧疆涓洪粯璁ら暱搴︿负10鐨勬暟缁勶紝 + * + * @param miniCapacity + */ + private void ensureInternalCapacity(int miniCapacity) { + if (elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA) { + miniCapacity = Math.max(DEFAULTCAPACITY, miniCapacity); + } + ensureExplicitCapacity(miniCapacity); + } + + /** + * 鍒ゆ柇鏄惁鎵╁锛屽鏋滃緟鎻掑叆鐨勫ぇ浜庣幇鍦ㄦ暟缁勭殑闀垮害锛屽垯鎵╁锛 + * + * @param miniCapacity + */ + private void ensureExplicitCapacity(int miniCapacity) { + if (miniCapacity - elementData.length > 0) { + grow(miniCapacity); + } + } + + /** + * 鎵╁ + * + * @param miniCapacity + */ + private void grow(int miniCapacity) { + int oldLength = elementData.length; + int newLength = oldLength + (oldLength >> 1); + if (newLength - miniCapacity < 0) { + newLength = miniCapacity; + } + elementData = Arrays.copyOf(elementData, newLength); + } + + /** + * 妫鏌dd涓嬫爣鑼冨洿 + * + * @param index + */ + private void rangeAddCheck(int index) { + if (index > size || index < 0) { + throw new ArrayIndexOutOfBoundsException(); + } + } + + /** + * 鏍规嵁涓嬫爣绉婚櫎 + * + * @param index + * @return + */ + @Override + public Object remove(int index) { + rangeCheck(index); + Object oldValue = elementData[index]; + int movNum = size - index - 1; + if (movNum > 0) {//濡傛灉鍙湁涓涓厓绱狅紝灏变笉璧 + System.arraycopy(elementData, index + 1, elementData, index, movNum); + } + elementData[--size] = null; + return oldValue; + } + + /** + * 鑾峰彇鍜屽垹闄や笅鏍囨鏌 + * + * @param index + */ + private void rangeCheck(int index) { + if (index >= size || index < 0) { + throw new ArrayIndexOutOfBoundsException(); + } + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇锛 + * + * @param index + * @return + */ + @Override + public Object get(int index) { + rangeCheck(index); + + return elementData[index]; + } + + @Override + public int size() { + return size; + } + + public MyIterator iterator() { + return new ArrayListIterator(); + } + + private class ArrayListIterator implements MyIterator { + + private int cursor;//涓嬩竴涓寚閽 + private MyArrayList myArrayList; + @Override + public boolean hasNext() { + return cursor != size; + } + + @Override + public Object next() { + + int i = cursor; + if (i>size()){ + throw new NoSuchElementException(); + } + Object[] elementData = MyArrayList.this.elementData; + if (i>=elementData.length){ + throw new NoSuchElementException(); + } + cursor = i +1; + + return elementData[i]; + } + } +} diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayListTest.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayListTest.java new file mode 100644 index 0000000000..496a67ed31 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyArrayListTest.java @@ -0,0 +1,65 @@ +package com.util_1; + + +import org.junit.Assert; + +/** + * Created by 14258 on 2017/2/27. + */ +public class MyArrayListTest { + + @org.junit.Before + public void setUp() throws Exception { + + } + + @org.junit.After + public void tearDown() throws Exception { + + } + + @org.junit.Test + public void testAdd() throws Exception { + + MyArrayList myArrayList = new MyArrayList(); + + myArrayList.add("1"); + myArrayList.add("1"); + myArrayList.add("1"); + myArrayList.add("1"); + + System.out.println(myArrayList.size()); + System.out.println(myArrayList.get(0)); + MyIterator iterator = myArrayList.iterator(); + while (iterator.hasNext()){ + System.out.println(iterator.next()); + } + } + + @org.junit.Test + public void testAdd1() throws Exception { + + } + + @org.junit.Test + public void testRemove() throws Exception { + + } + + @org.junit.Test + public void testGet() throws Exception { + MyArrayList myArrayList = new MyArrayList(); + myArrayList.add("00"); + Object o = myArrayList.get(0); + myArrayList.remove(0); + System.out.println(o); + } + + @org.junit.Test + public void testSize() throws Exception { + MyArrayList testArrayList = new MyArrayList(); + testArrayList.add("11"); + int size = testArrayList.size(); + Assert.assertEquals(size,1); + } +} \ No newline at end of file diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyIterator.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyIterator.java new file mode 100644 index 0000000000..f94157e789 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyIterator.java @@ -0,0 +1,10 @@ +package com.util_1; + +/** + * Created by 14258 on 2017/2/27. + */ +public interface MyIterator { + + public boolean hasNext(); + public Object next(); +} diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedList.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedList.java new file mode 100644 index 0000000000..2c17776139 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedList.java @@ -0,0 +1,285 @@ +package com.util_1; + + +import java.util.NoSuchElementException; + +/** + * LinkedList闆嗗悎-閾 + * Created by 14258 on 2017/2/27. + */ +public class MyLinkedList implements MyList { + //閾惧ご + private Node first; + //閾惧熬 + private Node last; + //闆嗗悎澶у皬 + private int size; + + + /** + * 杩藉姞鍏冪礌鍒伴摼琛ㄧ殑鏈熬 + * + * @param o + * @return + */ + @Override + public boolean add(Object o) { + linkedLast(o); + return true; + } + + /** + * 鎻掑叆鍏冪礌鍒伴摼琛ㄧ壒瀹氱殑浣嶇疆锛 + * + * @param index + * @param o + */ + @Override + public void add(int index, Object o) { + checkRange(index);//妫鏌ndex鏄惁瓒婄晫 + if (index == size) { + linkedLast(o); + } else { + linkedBefore(o, node(index)); + } + } + + /** + * add鍏冪礌鏃舵鏌ndex鑼冨洿 + * + * @param index + */ + private void checkRange(int index) { + if (index < 0 && index > size) { + throw new IndexOutOfBoundsException(); + } + } + + /** + * 绉婚櫎閾捐〃鐗瑰畾浣嶇疆鐨勫厓绱 + * + * @param index + * @return + */ + @Override + public Object remove(int index) { + checkRange(index); + return unLinked(node(index)); + } + + /** + * 绉婚櫎鍏冪礌 + * + * @param e + * @return + */ + private Object unLinked(Node e) { + + final Object element = e.elementData; + final Node next = e.next; + final Node prev = e.prev; + + if (prev == null) { + first = next; + } else { + prev.next = next; + e.prev = null; + } + if (next == null) { + last = prev; + } else { + next.prev = prev; + e.next = null; + } + e.elementData = null;//鎶婂甫绉婚櫎鍏冪礌缃畁ull + size--; + return element; + } + + /** + * 杩斿洖閾捐〃涓壒瀹氫綅缃殑鍏冪礌 + * + * @param index + * @return + */ + @Override + public Object get(int index) { + checkRange(index); + return node(index); + } + + /** + * 杩斿洖閾捐〃涓厓绱犵殑鏁伴噺 + * + * @return + */ + @Override + public int size() { + return size; + } + + /** + * 鍏冪礌浣滀负閾捐〃绗竴涓厓绱 + * + * @param o + */ + public void addFirst(Object o) { + linkedFirst(o); + } + + /** + * 鍏冪礌浣滀负閾捐〃绗竴涓厓绱 + * + * @param o + */ + private void linkedFirst(Object o) { + final Node f = first; + final Node newNode = new Node(null, o, f); + first = newNode; + if (f == null) {//褰撻摼琛ㄤ负绌烘椂锛屾妸鏂板厓绱犺缃负last + last = newNode; + } else { + f.prev = newNode; + } + size++; + } + + /** + * 鍏冪礌浣滀负閾捐〃鏈鍚庝竴涓厓绱 + * + * @param + */ + public void addLast(Object O) { + linkedLast(O); + } + + public Object removeFirst() { + final Node f = first; + if (f == null) { + throw new NoSuchElementException(); + } + final Object element = f.elementData; + final Node next = f.next; + f.elementData = null; + f.next = null; + first = next; + if (next == null) { + last = null; + } else { + next.prev = null; + } + size--; + return element; + } + + public Object removeLast() { + final Node l = last; + if (l == null) { + throw new NoSuchElementException(); + } + final Object element = l.elementData; + final Node prev = l.prev; + l.elementData = null; + l.prev = null; + last = prev; + if (prev == null){ + first = null; + }else { + prev.next = null; + } + size--; + return element; + } + + + /** + * 鎶婂厓绱犳彃鍏ucc鑺傜偣锛 + * + * @param o + * @param succ + */ + private void linkedBefore(Object o, Node succ) { + final Node pred = succ.prev;//鎵惧嚭succ鐨勫墠涓涓狽ode; + final Node newNode = new Node(pred, o, succ);//寤虹珛涓涓柊鑺傜偣銆 + succ.prev = newNode;//鎶婃彃鍏ヤ綅缃殑鍘熻妭鐐圭殑鍓嶄竴涓猵rev鎸囧悜鏂拌妭鐐 + if (pred == null) { + first = newNode;//璇存槑鍘熻妭鐐规椂澶磋妭鐐 + } else { + pred.next = newNode; + } + size++;//闆嗗悎鏁伴噺+1锛 + } + + /** + * 鎶婂厓绱犳坊鍔犺嚦閾捐〃鏈鍚庯紱 + * + * @param o + */ + private void linkedLast(Object o) { + final Node l = last; + final Node newNode = new Node(l, o, null); + last = newNode; + if (l == null) {//娣诲姞绗竴涓厓绱犳椂锛宭涓虹┖ + first = newNode; + } else { + l.next = newNode; + } + size++; + } + + /** + * 鏍规嵁index杩斿洖鑺傜偣淇℃伅 + * + * @param index + * @return + */ + private Node node(int index) { + if (index < (size >> 1)) {//濡傛灉鑺傜偣鍦ㄩ泦鍚堢殑鍓嶅崐閮ㄥ垎; + Node x = first;//鎶婂ご鎸囬拡缁檟; + //閬嶅巻鍓嶅崐閮ㄥ垎鑺傜偣 + for (int i = 0; i < index; i++) { + //浠庡ご鎸囬拡寮濮嬪鎵句粬鐨勪笅涓涓 + x = x.next; + } + return x;// + } else { + Node x = last; + for (int i = size - 1; i > index; i--) { + x = x.prev; + } + return x; + } + } + + /** + * 閾捐〃鑺傜偣绫 + */ + private static class Node { + private Object elementData; + private Node prev; + private Node next; + + public Node(Node prev, Object elementData, Node next) { + this.prev = prev; + this.next = next; + this.elementData = elementData; + } + } + + + public MyIterator iterator() { + return new LinkedListIterator(); + } + + private class LinkedListIterator implements com.util_1.MyIterator { + @Override + public boolean hasNext() { + return false; + } + + @Override + public Object next() { + return null; + } + } +} diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedListTest.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedListTest.java new file mode 100644 index 0000000000..049a5ad87a --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyLinkedListTest.java @@ -0,0 +1,71 @@ +package com.util_1; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Created by 14258 on 2017/2/27. + */ +public class MyLinkedListTest { + + @Before + public void setUp() throws Exception { + + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void testAdd() throws Exception { + + } + + @Test + public void testAdd1() throws Exception { + + } + + @Test + public void testRemove() throws Exception { + + } + + @Test + public void testGet() throws Exception { + + } + + @Test + public void testSize() throws Exception { + + } + + @Test + public void testAddFirst() throws Exception { + + } + + @Test + public void testAddLast() throws Exception { + + } + + @Test + public void testRemoveFirst() throws Exception { + + } + + @Test + public void testRemoveLast() throws Exception { + + } + + @Test + public void testIterator() throws Exception { + + } +} \ No newline at end of file diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/MyList.java b/group08/1425809544/02-26/com/xuyangyang/util_1/MyList.java new file mode 100644 index 0000000000..9f58daa3d8 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/MyList.java @@ -0,0 +1,19 @@ +package com.util_1; + + +/** + * Created by 14258 on 2017/2/27. + */ +public interface MyList { + + public boolean add(Object o); + + public void add(int index, Object o); + + public Object remove(int index); + + public Object get(int index); + + public int size(); + +} From 2ef160ab17cb1d8d787417c77b1f90b77f10444a Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 27 Feb 2017 17:29:39 +0800 Subject: [PATCH 006/646] =?UTF-8?q?2-26=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/array/ArrayUtil.java | 219 ++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 ++++ .../src/com/coderising/litestruts/Struts.java | 32 +++ .../src/com/coderising/litestruts/View.java | 23 ++ .../src/com/coderising/litestruts/struts.xml | 11 + .../src/com/coding/basic/ArrayList.java | 6 +- .../src/test/com/coderising/StrutsTest.java | 46 ++++ 7 files changed, 375 insertions(+), 1 deletion(-) create mode 100644 group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/LoginAction.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml create mode 100644 group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java diff --git a/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java b/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..fe8f130afb --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,219 @@ +package com.coderising.array; + +import com.coding.basic.ArrayList; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + int length = origin.length; + int[] temp = new int[length]; + for (int i = 0; i < length; i++) { + temp[i] = origin[length-1-i]; + } + System.arraycopy(temp, 0, origin, 0, length); + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + + int length = oldArray.length; + int[] tempArr = new int[length]; + int j = 0; + int zeroNum = 0;//鍌ㄥ瓨0鐨勪釜鏁 + for (int i = 0; i < length; i++) { + if(oldArray[i]!=0){ + tempArr[j] = oldArray[i]; + j ++; + }else{ + zeroNum ++; + } + } + //鍒犻櫎鏁扮粍灏剧鐨0 + int[] newArray = new int[length-zeroNum]; + System.arraycopy(tempArr, 0, newArray, 0, length-zeroNum); + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + + int length1 = array1.length; + int length2 = array2.length; + int[] array3 = new int[length1 + length2]; + //灏哸rray1銆乤rray2鐨勫煎姞鍏rray3涓 + System.arraycopy(array1, 0, array3, 0, length1); + System.arraycopy(array2, 0, array3, length1, length2); + int length = array3.length; + int temp; + //灏哸rray3鍐掓场鎺掑簭 + for (int i = 0; i < length; i++) { + for (int j = 0; j < length - i; j++) { + if(array3[i]>array3[j+i]){ + temp = array3[i]; + array3[i] = array3[j+i]; + array3[j+i] = temp; + } + } + } + return duplicate(array3); + } + + /** + *鍘婚噸 + */ + private int[] duplicate(int[] array){ + + for (int i = 1; i < array.length; i++) { + if(array[i-1]==array[i]){ + array[i] = 0; + } + } + return removeZero(array); + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + + int[] newArray = new int[oldArray.length+size]; + System.arraycopy(oldArray, 0,newArray , 0, oldArray.length); + return newArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + + int[] array = {}; + if(max <= 1)return array; + //鐢熸垚 鏂愭尝閭e鏁板垪鐨凙rrayList闆嗗悎 + ArrayList ls = new ArrayList(); + ls.add(1);ls.add(1); + int next;int i = 1; + while(true){ + next = (int)ls.get(i) +(int)ls.get(i-1); + if(next >= max){ + break; + } + ls.add(next); + i ++; + } + return objList2int(ls); + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + + ArrayList primesList = new ArrayList(); + boolean flag; + for (int i = 2; i < max; i++) { + flag = false; + for (int j = 2; j <= Math.sqrt(i); j++) { + if (i % j == 0) { + flag =true; + break; + } + } + if(!flag){ + primesList.add(i); + } + } + return objList2int(primesList); + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + + int temp; + ArrayList perfectList = new ArrayList(); + for (int i = 6; i <= max; i++) { + temp = 0; + for (int j = 1; j <= (i/2); j++) { + if(i%j == 0){ + temp += j; + } + } + if(temp == i){ + perfectList.add(i); + } + } + return objList2int(perfectList); + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + + StringBuilder str = new StringBuilder(); + for (int i = 0; i < array.length; i++) { + str.append(array[i]+seperator); + } + return str.substring(0, str.lastIndexOf(seperator)); + } + + /** + * 灏嗗瓨鍌╥nt鏁版嵁鐨凙rrayList杞崲涓篿nt鏁扮粍 + * @param ls + * @return + */ + public int[] objList2int(ArrayList ls){ + + Object[] objArr = ls.toArray(); + int[] array = new int[ls.size()]; + for (int i = 0; i < ls.size(); i++) { + array[i] = (int) objArr[i]; + } + return array; + } + +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/LoginAction.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..a3ce652047 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..2d52453f26 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,32 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..9024d72158 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml b/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..99063bcb0c --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java index 5de89da950..c15e99848b 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java @@ -52,7 +52,11 @@ public Object remove(int index){ public int size(){ return size; } - + + public Object[] toArray(){ + return elementData.clone(); + } + /** * 鎵╁锛屾墿瀹瑰洜瀛愪负10 */ diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java new file mode 100644 index 0000000000..2cb51e3967 --- /dev/null +++ b/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java @@ -0,0 +1,46 @@ +package test.com.coderising; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +import com.coderising.litestruts.Struts; +import com.coderising.litestruts.View; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file From 7e60614cb4bba9183a4014530db517460638832a Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 27 Feb 2017 18:00:03 +0800 Subject: [PATCH 007/646] =?UTF-8?q?=E8=AF=BB=E5=8F=96xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/litestruts/Struts.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index 2d52453f26..baa67f6aae 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -1,7 +1,18 @@ package com.coderising.litestruts; +import java.io.File; +import java.io.IOException; import java.util.Map; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + public class Struts { public static View runAction(String actionName, Map parameters) { @@ -29,4 +40,27 @@ public static View runAction(String actionName, Map parameters) { return null; } + private void readStrutsXml(String filePath){ + + File xmlFile = new File("struts.xml"); + try { + DocumentBuilder documentBuilder = DocumentBuilderFactory + .newInstance().newDocumentBuilder(); + Document document = documentBuilder.parse(xmlFile); + //鑾峰彇鏍硅妭鐐 + Element element = document.getDocumentElement(); + //http://www.jb51.net/article/44338.htm + NodeList childNodes = element.getChildNodes(); + + } catch (ParserConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SAXException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } } \ No newline at end of file From 0a2e978d7547d6c207ded2044fe4deda2617b204 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Mon, 27 Feb 2017 20:18:28 +0800 Subject: [PATCH 008/646] new Exs --- group12/382266293/.classpath | 16 +-- .../basic}/Collection/AbstractList.java | 0 .../basic}/Collection/Concrete/ArrayList.java | 0 .../Collection/Concrete/BinaryTreeNode.java | 0 .../Collection/Concrete/LinkedList.java | 0 .../basic}/Collection/Concrete/Queue.java | 0 .../basic}/Collection/Concrete/Stack.java | 0 .../basic}/Collection/Iterator.java | 0 .../basic}/Collection/List.java | 0 .../basic}/TestCollection/AllTests.java | 0 .../basic}/TestCollection/ArrayListTest.java | 0 .../TestCollection/BinaryTreeNodeTest.java | 0 .../basic}/TestCollection/LinkedListTest.java | 0 .../basic}/TestCollection/QueueTest.java | 0 .../basic}/TestCollection/StackTest.java | 0 .../{src => coding/basic}/util/Print.java | 0 .../{src => coding/basic}/util/TestUtil.java | 8 ++ group12/382266293/lib/.gitignore | 1 + group12/382266293/src/TestDom4J.java | 59 +++++++++ group12/382266293/src/array/ArrayUtil.java | 115 ++++++++++++++++++ .../382266293/src/array/ArrayUtilTest.java | 83 +++++++++++++ .../382266293/src/litestruts/LoginAction.java | 39 ++++++ group12/382266293/src/litestruts/Struts.java | 34 ++++++ .../382266293/src/litestruts/StrutsTest.java | 43 +++++++ group12/382266293/src/litestruts/View.java | 23 ++++ group12/382266293/src/litestruts/struts.xml | 11 ++ 26 files changed, 425 insertions(+), 7 deletions(-) rename group12/382266293/{src => coding/basic}/Collection/AbstractList.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Concrete/ArrayList.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Concrete/BinaryTreeNode.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Concrete/LinkedList.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Concrete/Queue.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Concrete/Stack.java (100%) rename group12/382266293/{src => coding/basic}/Collection/Iterator.java (100%) rename group12/382266293/{src => coding/basic}/Collection/List.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/AllTests.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/ArrayListTest.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/BinaryTreeNodeTest.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/LinkedListTest.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/QueueTest.java (100%) rename group12/382266293/{src => coding/basic}/TestCollection/StackTest.java (100%) rename group12/382266293/{src => coding/basic}/util/Print.java (100%) rename group12/382266293/{src => coding/basic}/util/TestUtil.java (90%) create mode 100644 group12/382266293/lib/.gitignore create mode 100644 group12/382266293/src/TestDom4J.java create mode 100644 group12/382266293/src/array/ArrayUtil.java create mode 100644 group12/382266293/src/array/ArrayUtilTest.java create mode 100644 group12/382266293/src/litestruts/LoginAction.java create mode 100644 group12/382266293/src/litestruts/Struts.java create mode 100644 group12/382266293/src/litestruts/StrutsTest.java create mode 100644 group12/382266293/src/litestruts/View.java create mode 100644 group12/382266293/src/litestruts/struts.xml diff --git a/group12/382266293/.classpath b/group12/382266293/.classpath index 3e0fb272a8..97b7b051d0 100644 --- a/group12/382266293/.classpath +++ b/group12/382266293/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/group12/382266293/src/Collection/AbstractList.java b/group12/382266293/coding/basic/Collection/AbstractList.java similarity index 100% rename from group12/382266293/src/Collection/AbstractList.java rename to group12/382266293/coding/basic/Collection/AbstractList.java diff --git a/group12/382266293/src/Collection/Concrete/ArrayList.java b/group12/382266293/coding/basic/Collection/Concrete/ArrayList.java similarity index 100% rename from group12/382266293/src/Collection/Concrete/ArrayList.java rename to group12/382266293/coding/basic/Collection/Concrete/ArrayList.java diff --git a/group12/382266293/src/Collection/Concrete/BinaryTreeNode.java b/group12/382266293/coding/basic/Collection/Concrete/BinaryTreeNode.java similarity index 100% rename from group12/382266293/src/Collection/Concrete/BinaryTreeNode.java rename to group12/382266293/coding/basic/Collection/Concrete/BinaryTreeNode.java diff --git a/group12/382266293/src/Collection/Concrete/LinkedList.java b/group12/382266293/coding/basic/Collection/Concrete/LinkedList.java similarity index 100% rename from group12/382266293/src/Collection/Concrete/LinkedList.java rename to group12/382266293/coding/basic/Collection/Concrete/LinkedList.java diff --git a/group12/382266293/src/Collection/Concrete/Queue.java b/group12/382266293/coding/basic/Collection/Concrete/Queue.java similarity index 100% rename from group12/382266293/src/Collection/Concrete/Queue.java rename to group12/382266293/coding/basic/Collection/Concrete/Queue.java diff --git a/group12/382266293/src/Collection/Concrete/Stack.java b/group12/382266293/coding/basic/Collection/Concrete/Stack.java similarity index 100% rename from group12/382266293/src/Collection/Concrete/Stack.java rename to group12/382266293/coding/basic/Collection/Concrete/Stack.java diff --git a/group12/382266293/src/Collection/Iterator.java b/group12/382266293/coding/basic/Collection/Iterator.java similarity index 100% rename from group12/382266293/src/Collection/Iterator.java rename to group12/382266293/coding/basic/Collection/Iterator.java diff --git a/group12/382266293/src/Collection/List.java b/group12/382266293/coding/basic/Collection/List.java similarity index 100% rename from group12/382266293/src/Collection/List.java rename to group12/382266293/coding/basic/Collection/List.java diff --git a/group12/382266293/src/TestCollection/AllTests.java b/group12/382266293/coding/basic/TestCollection/AllTests.java similarity index 100% rename from group12/382266293/src/TestCollection/AllTests.java rename to group12/382266293/coding/basic/TestCollection/AllTests.java diff --git a/group12/382266293/src/TestCollection/ArrayListTest.java b/group12/382266293/coding/basic/TestCollection/ArrayListTest.java similarity index 100% rename from group12/382266293/src/TestCollection/ArrayListTest.java rename to group12/382266293/coding/basic/TestCollection/ArrayListTest.java diff --git a/group12/382266293/src/TestCollection/BinaryTreeNodeTest.java b/group12/382266293/coding/basic/TestCollection/BinaryTreeNodeTest.java similarity index 100% rename from group12/382266293/src/TestCollection/BinaryTreeNodeTest.java rename to group12/382266293/coding/basic/TestCollection/BinaryTreeNodeTest.java diff --git a/group12/382266293/src/TestCollection/LinkedListTest.java b/group12/382266293/coding/basic/TestCollection/LinkedListTest.java similarity index 100% rename from group12/382266293/src/TestCollection/LinkedListTest.java rename to group12/382266293/coding/basic/TestCollection/LinkedListTest.java diff --git a/group12/382266293/src/TestCollection/QueueTest.java b/group12/382266293/coding/basic/TestCollection/QueueTest.java similarity index 100% rename from group12/382266293/src/TestCollection/QueueTest.java rename to group12/382266293/coding/basic/TestCollection/QueueTest.java diff --git a/group12/382266293/src/TestCollection/StackTest.java b/group12/382266293/coding/basic/TestCollection/StackTest.java similarity index 100% rename from group12/382266293/src/TestCollection/StackTest.java rename to group12/382266293/coding/basic/TestCollection/StackTest.java diff --git a/group12/382266293/src/util/Print.java b/group12/382266293/coding/basic/util/Print.java similarity index 100% rename from group12/382266293/src/util/Print.java rename to group12/382266293/coding/basic/util/Print.java diff --git a/group12/382266293/src/util/TestUtil.java b/group12/382266293/coding/basic/util/TestUtil.java similarity index 90% rename from group12/382266293/src/util/TestUtil.java rename to group12/382266293/coding/basic/util/TestUtil.java index 2dfeeade7f..b9f996bc56 100644 --- a/group12/382266293/src/util/TestUtil.java +++ b/group12/382266293/coding/basic/util/TestUtil.java @@ -16,6 +16,14 @@ public class TestUtil extends TestCase { private static final int RANDOM_SIZE = 500; + public static int[] getRandomIntArray(int number) { + int[] arr = new int[number]; + for (int i = 0; i < arr.length; i++) { + arr[i] = getRandomNumber(); + } + return arr; + } + public static int getRandomNumber() { return random.nextInt(RANDOM_SIZE); } diff --git a/group12/382266293/lib/.gitignore b/group12/382266293/lib/.gitignore new file mode 100644 index 0000000000..3d08860a86 --- /dev/null +++ b/group12/382266293/lib/.gitignore @@ -0,0 +1 @@ +/dom4j-1.6.1.zip diff --git a/group12/382266293/src/TestDom4J.java b/group12/382266293/src/TestDom4J.java new file mode 100644 index 0000000000..b5dabfcc0c --- /dev/null +++ b/group12/382266293/src/TestDom4J.java @@ -0,0 +1,59 @@ +import java.net.URL; +import java.util.Iterator; +import java.util.List; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; + +import static util.Print.*; + +public class TestDom4J { + + public Document parse(String add) throws DocumentException { + SAXReader reader = new SAXReader(); + Document document = reader.read(add); + return document; + } + + + + public void bar(Document document) { + List list = document.selectNodes( "/struts-config/action-mappings/action" ); + Node node = document.selectSingleNode( "/struts-config/action-mappings/action/forward" ); + + String name = node.valueOf( "@name" ); + println(name); + } + + public void listNodes(Element node){ + System.out.println("褰撳墠鑺傜偣鐨勫悕绉帮細" + node.getName()); + //棣栧厛鑾峰彇褰撳墠鑺傜偣鐨勬墍鏈夊睘鎬ц妭鐐 + List list = node.attributes(); + //閬嶅巻灞炴ц妭鐐 + for(Attribute attribute : list){ + System.out.println("灞炴"+attribute.getName() +":" + attribute.getValue()); + } + //濡傛灉褰撳墠鑺傜偣鍐呭涓嶄负绌猴紝鍒欒緭鍑 + if(!(node.getTextTrim().equals(""))){ + System.out.println( node.getName() + "锛" + node.getText()); + } + //鍚屾椂杩唬褰撳墠鑺傜偣涓嬮潰鐨勬墍鏈夊瓙鑺傜偣 + //浣跨敤閫掑綊 + Iterator iterator = node.elementIterator(); + while(iterator.hasNext()){ + Element e = iterator.next(); + listNodes(e); + } + } + + public static void main(String args[]) throws DocumentException { + + + + } + +} diff --git a/group12/382266293/src/array/ArrayUtil.java b/group12/382266293/src/array/ArrayUtil.java new file mode 100644 index 0000000000..a9a4a66491 --- /dev/null +++ b/group12/382266293/src/array/ArrayUtil.java @@ -0,0 +1,115 @@ +package array; + +import static util.Print.*; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + int len = origin.length; + int temp; + for (int i = 0; i < len/2; i++) { + temp = origin[i]; + origin[i] = origin[len-1-i]; + origin[len-1-i] = temp; + } + + } + + public static void main(String args[]) { + + ArrayUtil arrayUtil = new ArrayUtil(); + int[] my = new int[] {1,2,3,4,5}; + arrayUtil.reverseArray(my); + println(my); + } + + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} \ No newline at end of file diff --git a/group12/382266293/src/array/ArrayUtilTest.java b/group12/382266293/src/array/ArrayUtilTest.java new file mode 100644 index 0000000000..4e8df6912c --- /dev/null +++ b/group12/382266293/src/array/ArrayUtilTest.java @@ -0,0 +1,83 @@ +package array; + +import static org.junit.Assert.*; +import static util.TestUtil.*; + +import java.util.Arrays; + +import static util.Print.*; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +public class ArrayUtilTest { + + private int[] myArr; + ArrayUtil au = new ArrayUtil(); + + @Before + public void setUp() throws Exception { + + } + + @After + public void tearDown() throws Exception { + myArr = null; + } + + + @Test + public void testReverseArray() { + + int size = getRandomNumber(); + int[] expected = getRandomIntArray(size); + int[] myArr = Arrays.copyOf(expected, size); + + au.reverseArray(myArr); + + for (int i = 0; i < size; i++) { + assertEquals(expected[i], myArr[size-1-i]); + } + + } + + + + + @Test + public void testRemoveZero() { + + } + + @Test + public void testMerge() { + + } + + @Test + public void testGrow() { + + } + + @Test + public void testFibonacci() { + + } + + @Test + public void testGetPrimes() { + + } + + @Test + public void testGetPerfectNumbers() { + + } + + @Test + public void testJoin() { + + } + +} diff --git a/group12/382266293/src/litestruts/LoginAction.java b/group12/382266293/src/litestruts/LoginAction.java new file mode 100644 index 0000000000..c37c250014 --- /dev/null +++ b/group12/382266293/src/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java new file mode 100644 index 0000000000..f26fa8d8b7 --- /dev/null +++ b/group12/382266293/src/litestruts/Struts.java @@ -0,0 +1,34 @@ +package litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} \ No newline at end of file diff --git a/group12/382266293/src/litestruts/StrutsTest.java b/group12/382266293/src/litestruts/StrutsTest.java new file mode 100644 index 0000000000..e08fab55c9 --- /dev/null +++ b/group12/382266293/src/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group12/382266293/src/litestruts/View.java b/group12/382266293/src/litestruts/View.java new file mode 100644 index 0000000000..5a7d948765 --- /dev/null +++ b/group12/382266293/src/litestruts/View.java @@ -0,0 +1,23 @@ +package litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git a/group12/382266293/src/litestruts/struts.xml b/group12/382266293/src/litestruts/struts.xml new file mode 100644 index 0000000000..99063bcb0c --- /dev/null +++ b/group12/382266293/src/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 785d5e80a057da7994875102b11c55b32b0497d2 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Mon, 27 Feb 2017 21:17:39 +0800 Subject: [PATCH 009/646] 2.27 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鎻愪氦绗竴娆′綔涓 --- group08/1509102580/.classpath | 7 + group08/1509102580/.gitignore | 1 + group08/1509102580/.project | 17 ++ .../com/zzk/coding2017/zuoye_1/ArrayList.java | 103 +++++++++ .../coding2017/zuoye_1/BinaryTreeNode.java | 32 +++ .../com/zzk/coding2017/zuoye_1/Iterator.java | 7 + .../zzk/coding2017/zuoye_1/LinkedList.java | 196 ++++++++++++++++++ .../src/com/zzk/coding2017/zuoye_1/List.java | 9 + .../src/com/zzk/coding2017/zuoye_1/Queue.java | 33 +++ .../src/com/zzk/coding2017/zuoye_1/Stack.java | 38 ++++ .../src/com/zzk/tests/TestDataStructure.java | 51 +++++ 11 files changed, 494 insertions(+) create mode 100644 group08/1509102580/.classpath create mode 100644 group08/1509102580/.gitignore create mode 100644 group08/1509102580/.project create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/Iterator.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/LinkedList.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/List.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/Queue.java create mode 100644 group08/1509102580/src/com/zzk/coding2017/zuoye_1/Stack.java create mode 100644 group08/1509102580/src/com/zzk/tests/TestDataStructure.java diff --git a/group08/1509102580/.classpath b/group08/1509102580/.classpath new file mode 100644 index 0000000000..54003f1bc9 --- /dev/null +++ b/group08/1509102580/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group08/1509102580/.gitignore b/group08/1509102580/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/group08/1509102580/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/group08/1509102580/.project b/group08/1509102580/.project new file mode 100644 index 0000000000..67d76428fd --- /dev/null +++ b/group08/1509102580/.project @@ -0,0 +1,17 @@ + + + MyCoding2017 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java b/group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java new file mode 100644 index 0000000000..33f344e24e --- /dev/null +++ b/group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java @@ -0,0 +1,103 @@ +package com.zzk.coding2017.zuoye_1; + + +public class ArrayList implements List { + + private int size = 0; + private int length = 100; + private Object[] elementData = new Object[length]; + + public void add(Object o){ + if(sizesize-1){ + return ; + }else{ + if(sizesize-1){ + return null; + }else{ + return elementData[index]; + } + } + + public Object remove(int index){ + if(index<0||index>size-1){ + return null; + }else{ + Object result = elementData[index]; + if(index+1==size){//鍗砳ndex鏄渶鍚庝竴涓厓绱 + elementData[index] = null; + size--; + return result; + }else{ + System.arraycopy(elementData, index+1, elementData, index, size-1-index); + size--; + return result; + } + } + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new Iterator() { + int current = 0; + @Override + public Object next() { + // TODO Auto-generated method stub + if(current Date: Mon, 27 Feb 2017 21:19:38 +0800 Subject: [PATCH 010/646] homework1 --- .../homework1/com/code/basic/ArrayList.java | 106 ++++++++++++++++++ .../com/code/basic/BinaryTreeNode.java | 53 +++++++++ .../homework1/com/code/basic/Iterator.java | 6 + .../homework1/com/code/basic/LinkList.java | 86 ++++++++++++++ .../homework1/com/code/basic/LinkNode.java | 46 ++++++++ .../homework1/com/code/basic/List.java | 14 +++ .../homework1/com/code/basic/Queue.java | 70 ++++++++++++ .../homework1/com/code/basic/Stack.java | 45 ++++++++ 8 files changed, 426 insertions(+) create mode 100644 group12/2319021847/homework1/com/code/basic/ArrayList.java create mode 100644 group12/2319021847/homework1/com/code/basic/BinaryTreeNode.java create mode 100644 group12/2319021847/homework1/com/code/basic/Iterator.java create mode 100644 group12/2319021847/homework1/com/code/basic/LinkList.java create mode 100644 group12/2319021847/homework1/com/code/basic/LinkNode.java create mode 100644 group12/2319021847/homework1/com/code/basic/List.java create mode 100644 group12/2319021847/homework1/com/code/basic/Queue.java create mode 100644 group12/2319021847/homework1/com/code/basic/Stack.java diff --git a/group12/2319021847/homework1/com/code/basic/ArrayList.java b/group12/2319021847/homework1/com/code/basic/ArrayList.java new file mode 100644 index 0000000000..942bce6c2a --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/ArrayList.java @@ -0,0 +1,106 @@ +package com.coding.basic; + +public class ArrayList implements List{ + + private int size = 0; + private Object[] elements; + + public ArrayList() { + this.elements = new Object[5]; + } + + public ArrayList(int size) { + this.elements = new Object[size]; + } + public void add(Object o) { + // TODO Auto-generated method stub + if(isFull()) + { + resize(); + } + this.elements[this.size] = o; + this.size++; + } + public boolean isFull () + { + if(this.size == this.elements.length) + { + return true; + } + + return false; + } + + public void resize() + { + Object[] newElements = new Object[this.elements.length*2]; + System.arraycopy(elements, 0, newElements, 0, elements.length); + this.elements = newElements; + newElements = null; + } + public void add(int index, Object o) { + // TODO Auto-generated method stub + rangeCheck(index); + if(isFull()) + { + resize(); + } + System.arraycopy(elements, index, elements, index+1,size-index); + this.elements[index] = o; + size++; + } + void rangeCheck(int index) + { + if(index > size || index < 0) + { + throw new IndexOutOfBoundsException("下标越界"); + } + } + public Object get(int index) { + // TODO Auto-generated method stub + rangeCheck(index); + return elements[index]; + } + + public Object remove(int index) { + // TODO Auto-generated method stub + rangeCheck(index); + Object elem = elements[index]; + System.arraycopy(elements, index+1, elements, index, size-index-1); + size--; + elements[size] = null; + return elem; + } + + public int size() { + // TODO Auto-generated method stub + return this.size; + } + public com.coding.basic.Iterator Iterator () + { + return new Itr(); + } + public class Itr implements com.coding.basic.Iterator{ + int cur = 0; + public boolean hasNext() { + // TODO Auto-generated method stub + if(size==cur) + { + return false; + } + return true; + } + + public Object next() { + // TODO Auto-generated method stub + int i = cur; + if(i < elements.length) + { + cur = i+1; + return elements[i]; + } + return null; + } + + } +} diff --git a/group12/2319021847/homework1/com/code/basic/BinaryTreeNode.java b/group12/2319021847/homework1/com/code/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..2e026b47b6 --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/BinaryTreeNode.java @@ -0,0 +1,53 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + private BinaryTreeNode root; + + public BinaryTreeNode(Object o){ + this.data = o; + this.left = null; + this.right = null; + } + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(BinaryTreeNode root, Object o){ + BinaryTreeNode current = root; + BinaryTreeNode node = new BinaryTreeNode(o); + if(current == null) + { + current = node; + } + else if(((Integer)current.getData()).intValue() < ((Integer)o).intValue()) + { + insert(current.getLeft(),o); + } + else if(((Integer)current.getData()).intValue() >= ((Integer)o).intValue()) + { + insert(current.getRight(),o); + } + + return node; + } + +} diff --git a/group12/2319021847/homework1/com/code/basic/Iterator.java b/group12/2319021847/homework1/com/code/basic/Iterator.java new file mode 100644 index 0000000000..f6ecde73bf --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/Iterator.java @@ -0,0 +1,6 @@ +package com.coding.basic; + +public interface Iterator { + boolean hasNext(); + Object next(); +} diff --git a/group12/2319021847/homework1/com/code/basic/LinkList.java b/group12/2319021847/homework1/com/code/basic/LinkList.java new file mode 100644 index 0000000000..9f759f9088 --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/LinkList.java @@ -0,0 +1,86 @@ +package com.coding.basic; + +public class LinkList implements List{ + + private LinkNode head; + // TODO Auto-generated method stub + private int size; + + public LinkList() + { + this.head = null; + this.size = 0; + } + public void add(Object o) { + // TODO Auto-generated method stub + LinkNode currPtr = this.head; + if(this.head == null) + { + this.head = new LinkNode(o, this.head ,null); + } + while(currPtr != null) + { + currPtr = currPtr.getNext(); + } + currPtr.setNext(new LinkNode(o, currPtr, null)); + size++; + } + + public void add(int index, Object o) { + // TODO Auto-generated method stub + LinkNode currPtr = this.head; + if(index < 0 || index > size) + throw new IndexOutOfBoundsException("下标越界"); + int i = 0; + if(index == 0) + { + LinkNode node = new LinkNode(o,currPtr,currPtr.getPrv()); + currPtr.getNext().setPrv(node); + currPtr = node; + } + while(i < index) + { + currPtr = currPtr.getNext(); + i++; + } + LinkNode node = new LinkNode(o,currPtr.getPrv(),currPtr); + currPtr.getPrv().setNext(node); + currPtr.setPrv(node); + size++; + } + + public Object get(int index) { + if(index < 0 || index > size) + throw new IndexOutOfBoundsException("下标越界"); + int i = 0; + LinkNode currPtr = this.head; + while(i < index) + { + currPtr = currPtr.getNext(); + i++; + } + + return currPtr.getData(); + } + + public Object remove(int index) { + // TODO Auto-generated method stub + int i = 0; + LinkNode currPtr = this.head; + while(i < index) + { + currPtr = currPtr.getNext(); + i++; + } + currPtr.getNext().setPrv(currPtr.getPrv()); + currPtr.getPrv().setNext( currPtr.getNext()); + size--; + return currPtr.getData(); + } + + public int size() { + // TODO Auto-generated method stub + return size; + } + +} diff --git a/group12/2319021847/homework1/com/code/basic/LinkNode.java b/group12/2319021847/homework1/com/code/basic/LinkNode.java new file mode 100644 index 0000000000..1452dcc42b --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/LinkNode.java @@ -0,0 +1,46 @@ +package com.coding.basic; + +public class LinkNode { + private LinkNode pNextPtr; + private LinkNode pPrvPtr; + private Object ndata; + + public LinkNode () + { + this.pNextPtr=null; + this.pPrvPtr=null; + this.ndata=null; + } + + public LinkNode (Object o, LinkNode pPrvPtr, LinkNode pNextPtr) + { + this.pNextPtr=null; + this.pPrvPtr=null; + this.ndata=null; + } + + public void setNext(LinkNode node) + { + this.pNextPtr = node; + } + + public void setPrv(LinkNode node) + { + this.pPrvPtr = node; + } + + public LinkNode getNext() + { + return this.pNextPtr; + } + + public LinkNode getPrv() + { + return this.pPrvPtr; + } + public Object getData() + { + return this.ndata; + } + +} diff --git a/group12/2319021847/homework1/com/code/basic/List.java b/group12/2319021847/homework1/com/code/basic/List.java new file mode 100644 index 0000000000..8360496919 --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/List.java @@ -0,0 +1,14 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + + public void add(int index, Object o); + + public Object get(int index); + + public Object remove(int index); + + public int size(); + +} diff --git a/group12/2319021847/homework1/com/code/basic/Queue.java b/group12/2319021847/homework1/com/code/basic/Queue.java new file mode 100644 index 0000000000..4dac2bfc22 --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/Queue.java @@ -0,0 +1,70 @@ +package com.coding.basic; + +public class Queue { + private int size; + + private int head; + + private int tail; + + private Object[] queue; + + public Queue() + { + this.size = 0; + this.head = 0; + this.tail = 0; + } + + public void enQueue(Object o) { + if(isFull()) + { + resize(); + } + int newtail = (head+size)%queue.length; + queue[newtail] = o; + size++; + } + + public Object deQueue() { + if(isEmpty()) + { + return null; + } + Object oldHead = queue[head]; + head = (head-1)%queue.length; + size--; + return oldHead; + } + + public int getHead(){ + return head; + } + + public int getTail(){ + return tail; + } + + + public boolean isEmpty() { + return size == 0; + } + + public int size() { + int diff = tail - head; + return diff; + } + + // + public boolean isFull(){ + return size == queue.length; + } + + + public void resize(){ + Object[] newQueue = new Object[2*(queue.length)]; + System.arraycopy(queue, 0, newQueue, 0, size); + this.queue = newQueue; + newQueue = null; + } +} diff --git a/group12/2319021847/homework1/com/code/basic/Stack.java b/group12/2319021847/homework1/com/code/basic/Stack.java new file mode 100644 index 0000000000..370197cb32 --- /dev/null +++ b/group12/2319021847/homework1/com/code/basic/Stack.java @@ -0,0 +1,45 @@ +package com.coding.basic; + + + +public class Stack { + private Object[] elements; + private int size; + + + public Stack() + { + this.size = 0; + this.elements = new Object[10]; + } + public void push(Object o){ + if(o == null) + return; + size++; + elements[size-1] = o; + } + + public Object pop(){ + if(isEmpty()) + { + return null; + } + Object pop = elements[size-1]; + size--; + return pop; + } + + public Object peek(){ + if(isEmpty()) + { + return null; + } + return elements[size-1]; + } + public boolean isEmpty(){ + return size < 1; + } + public int size(){ + return size; + } +} \ No newline at end of file From 84e382274ea9cce7771a00abd36a8dd566274d92 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 27 Feb 2017 22:53:58 +0800 Subject: [PATCH 011/646] struts --- .../src/com/coderising/litestruts/Struts.java | 150 +++++++++++++----- .../src/com/coderising/litestruts/struts.xml | 8 +- 2 files changed, 115 insertions(+), 43 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index baa67f6aae..e75250f7a8 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -2,6 +2,9 @@ import java.io.File; import java.io.IOException; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; @@ -10,57 +13,126 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; public class Struts { - public static View runAction(String actionName, Map parameters) { + private final static String ACTION = "action"; + private final static String RESULT = "result"; + private final static String NAME = "name"; + private final static String CLASS = "class"; + private final static String EXECUTE = "execute"; - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters + public static View runAction(String actionName, + Map parameters) { + + + View view = new View(); + Map viewMap = new HashMap(); - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - */ - - return null; - } - - private void readStrutsXml(String filePath){ - - File xmlFile = new File("struts.xml"); - try { - DocumentBuilder documentBuilder = DocumentBuilderFactory - .newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(xmlFile); - //鑾峰彇鏍硅妭鐐 - Element element = document.getDocumentElement(); - //http://www.jb51.net/article/44338.htm - NodeList childNodes = element.getChildNodes(); - + String path = "src/com/coderising/litestruts/struts.xml"; + Map xmlMap = readStrutsXml(path, actionName); + + try { + String calssPath = xmlMap.get(CLASS); + Class clazz = Class.forName(calssPath); + Object action = clazz.newInstance(); + Field[] fields = clazz.getDeclaredFields(); + String fieldName; + String methodName; + for (int i = 0; i < fields.length; i++) { + fieldName = fields[i].getName(); + if(parameters.containsKey(fieldName)){ + methodName = "set" + fieldName.substring(0, 1).toUpperCase() + + fieldName.substring(1); + Method method = clazz.getMethod(methodName, fields[i].getType()); + method.invoke(action, parameters.get(fieldName)); + } + } + + Method successMethos = clazz.getMethod(EXECUTE); + Object result = successMethos.invoke(action); + + for (int i = 0; i < fields.length; i++) { + fieldName = fields[i].getName(); + methodName = "get" + fieldName.substring(0, 1).toUpperCase() + + fieldName.substring(1); + Method method = clazz.getMethod(methodName); + Object value = method.invoke(action); + viewMap.put(fieldName, value); + + } + view.setParameters(viewMap); + + String jsp = xmlMap.get(result.toString()); + view.setJsp(jsp); + + } catch (Exception e) { + e.printStackTrace(); + } + + return view; + } + + /** + * 璇诲彇struts.xml鏂囦欢 + * + * @param filePath + * 锛歴truts.xml璺姴 + * @param actionName + * @return + */ + private static Map readStrutsXml(String filePath, + String actionName) { + + File xmlFile = new File(filePath); + Map xmlMap = new HashMap(); + try { + DocumentBuilder documentBuilder = DocumentBuilderFactory + .newInstance().newDocumentBuilder(); + Document document = documentBuilder.parse(xmlFile); + // 鑾峰彇鏍硅妭鐐 + Element element = document.getDocumentElement(); + // http://www.jb51.net/article/44338.htm + NodeList actionNodes = element.getChildNodes(); + for (int i = 0; i < actionNodes.getLength(); i++) { + Node actionNode = actionNodes.item(i); + if (ACTION.equals(actionNode.getNodeName())) { + NamedNodeMap actionNodeMap = actionNode.getAttributes(); + String atName = actionNodeMap.getNamedItem(NAME) + .getNodeValue(); + if (atName.equals(actionName)) { + String classPath = actionNodeMap.getNamedItem(CLASS) + .getNodeValue(); + xmlMap.put(CLASS, classPath); + NodeList resultNodes = actionNode.getChildNodes(); + for (int j = 0; j < resultNodes.getLength(); j++) { + Node resultNode = resultNodes.item(j); + if (RESULT.equals(resultNode.getNodeName())) { + NamedNodeMap resultNodeMap = resultNode + .getAttributes(); + String jspName = resultNodeMap.getNamedItem( + NAME).getNodeValue(); + String jspPath = resultNode.getTextContent(); + xmlMap.put(jspName, jspPath); + } + } + + } + } + + } + } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } - } + return xmlMap; + } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml b/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml index 99063bcb0c..4c6eeabbd4 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/struts.xml @@ -1,11 +1,11 @@ - + /jsp/homepage.jsp /jsp/showLogin.jsp - - /jsp/welcome.jsp - /jsp/error.jsp + + /jsp/welcome.jsp + /jsp/error.jsp \ No newline at end of file From 8eaa97a2f43fecb04b33462cbb09bc2f42199b43 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 27 Feb 2017 22:55:21 +0800 Subject: [PATCH 012/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9View=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zj-2017/src/com/coderising/litestruts/View.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java index 9024d72158..0c0b9d3b26 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/View.java @@ -4,7 +4,7 @@ public class View { private String jsp; - private Map parameters; + private Map parameters; public String getJsp() { return jsp; @@ -13,10 +13,10 @@ public View setJsp(String jsp) { this.jsp = jsp; return this; } - public Map getParameters() { + public Map getParameters() { return parameters; } - public View setParameters(Map parameters) { + public View setParameters(Map parameters) { this.parameters = parameters; return this; } From 29dd739262cc76dd9d5a20b889266938e9535479 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Tue, 28 Feb 2017 00:10:26 +0800 Subject: [PATCH 013/646] =?UTF-8?q?=E5=AE=9E=E7=8E=B0arraylist=E5=92=8Clin?= =?UTF-8?q?kedlist=E7=9A=84=E8=BF=AD=E4=BB=A3=E5=99=A8iterator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../firstPractice/src/basic/MyArrayList.java | 25 ++++++++++++++++++- .../firstPractice/src/basic/MyLinkedList.java | 24 +++++++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/group08/1144989424/firstPractice/src/basic/MyArrayList.java b/group08/1144989424/firstPractice/src/basic/MyArrayList.java index f9cf5b1b80..71efd76681 100644 --- a/group08/1144989424/firstPractice/src/basic/MyArrayList.java +++ b/group08/1144989424/firstPractice/src/basic/MyArrayList.java @@ -83,7 +83,30 @@ public int size(){ } public MyIterator iterator(){ - return null; + return new MyArrayListIterator(this); + } + + private class MyArrayListIterator implements MyIterator{ + private MyArrayList list = null; + private int index = 0; + + private MyArrayListIterator(MyArrayList list){ + this.list = list; + } + + @Override + public boolean hasNext(){ + if(index < size){ + return true; + } + return false; + } + + @Override + public Object next(){ + return list.get(index++); + } + } private void expandArray(){ diff --git a/group08/1144989424/firstPractice/src/basic/MyLinkedList.java b/group08/1144989424/firstPractice/src/basic/MyLinkedList.java index 3894884373..cf3a41c3af 100644 --- a/group08/1144989424/firstPractice/src/basic/MyLinkedList.java +++ b/group08/1144989424/firstPractice/src/basic/MyLinkedList.java @@ -98,10 +98,32 @@ public Object removeLast(){ size--; return deleteNode; } + public MyIterator iterator(){ - return null; + return new MyLinkedListIterator(this); } + private class MyLinkedListIterator implements MyIterator{ + private MyLinkedList list = null; + private int index = 0; + + private MyLinkedListIterator(MyLinkedList list){ + this.list = list; + } + + @Override + public boolean hasNext(){ + if(index < size){ + return true; + } + return false; + } + + @Override + public Object next(){ + return list.get(index++); + } + } private static class Node{ Object data; From cbf8ec80b4be4a2874627c503b94534c471c782b Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Tue, 28 Feb 2017 07:21:02 +0800 Subject: [PATCH 014/646] Array Ex & Test --- .../382266293/coding/basic/util/Print.java | 6 ++ .../382266293/coding/basic/util/TestUtil.java | 9 +- group12/382266293/src/array/ArrayUtil.java | 101 +++++++++++++++--- .../382266293/src/array/ArrayUtilTest.java | 82 ++++++++++++-- 4 files changed, 173 insertions(+), 25 deletions(-) diff --git a/group12/382266293/coding/basic/util/Print.java b/group12/382266293/coding/basic/util/Print.java index b2ae48552b..81b5cf539e 100644 --- a/group12/382266293/coding/basic/util/Print.java +++ b/group12/382266293/coding/basic/util/Print.java @@ -1,5 +1,6 @@ package util; +import java.util.Arrays; public class Print { @@ -10,5 +11,10 @@ public static void print(Object o){ public static void println(Object o){ System.out.println(o); } + + public static void printArr(int[] arr) { + println(Arrays.toString(arr)); + } + } diff --git a/group12/382266293/coding/basic/util/TestUtil.java b/group12/382266293/coding/basic/util/TestUtil.java index b9f996bc56..0820e0e684 100644 --- a/group12/382266293/coding/basic/util/TestUtil.java +++ b/group12/382266293/coding/basic/util/TestUtil.java @@ -1,5 +1,6 @@ package util; +import java.util.Arrays; import java.util.Random; import Collection.List; @@ -16,10 +17,12 @@ public class TestUtil extends TestCase { private static final int RANDOM_SIZE = 500; + + public static int[] getRandomIntArray(int number) { int[] arr = new int[number]; for (int i = 0; i < arr.length; i++) { - arr[i] = getRandomNumber(); + arr[i] = getRandomNumber() + 1; } return arr; } @@ -28,6 +31,10 @@ public static int getRandomNumber() { return random.nextInt(RANDOM_SIZE); } + public static int getRandomNumber(int bound) { + return random.nextInt(bound); + } + public static void addIntWithNatureOrder(List myList, int numbers) { for (int acutal = 0; acutal < numbers ; acutal++) { diff --git a/group12/382266293/src/array/ArrayUtil.java b/group12/382266293/src/array/ArrayUtil.java index a9a4a66491..aafa3c410c 100644 --- a/group12/382266293/src/array/ArrayUtil.java +++ b/group12/382266293/src/array/ArrayUtil.java @@ -2,6 +2,10 @@ import static util.Print.*; +import java.util.Arrays; +import java.util.BitSet; + + public class ArrayUtil { /** @@ -13,25 +17,18 @@ public class ArrayUtil { */ public void reverseArray(int[] origin){ - int len = origin.length; int temp; - for (int i = 0; i < len/2; i++) { + int index = origin.length - 1; + int numbersToReverse = origin.length/2; + for (int i = 0; i < numbersToReverse ; i++) { temp = origin[i]; - origin[i] = origin[len-1-i]; - origin[len-1-i] = temp; + origin[i] = origin[index - i]; + origin[index - i] = temp; } } - public static void main(String args[]) { - - ArrayUtil arrayUtil = new ArrayUtil(); - int[] my = new int[] {1,2,3,4,5}; - arrayUtil.reverseArray(my); - println(my); - } - /** * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 @@ -39,10 +36,29 @@ public static void main(String args[]) { * @param oldArray * @return */ - + public int[] removeZero(int[] oldArray){ - return null; + + BitSet check = new BitSet(oldArray.length); + boolean isZero; + for (int i = 0; i < oldArray.length; i++) { + isZero = (oldArray[i] == 0) ? true : false; + check.set(i, isZero); + } + + int newSize = oldArray.length-check.cardinality(); + int[] newArr = new int[newSize]; + + int nextIndex = check.nextClearBit(0); + for(int i = 0 ; i < newSize ; i++) { + newArr[i] = oldArray[nextIndex]; + nextIndex = check.nextClearBit(nextIndex+1); + } + + return newArr; } + + /** * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 @@ -53,8 +69,34 @@ public int[] removeZero(int[] oldArray){ */ public int[] merge(int[] array1, int[] array2){ - return null; + + int len1 = array1.length; + int len2 = array2.length; + int len3 = array1[len1-1] < array2[len2-1] ? array2[len2-1] + 1: array1[len1-1] + 1; + int[] newArr = new int[len3]; + initialArray(newArr, -1); + for (int i = 0; i < len1; i++) { + newArr[array1[i]] = 0; + } + for (int i = 0; i < len2; i++) { + newArr[array2[i]] = 0; + } + int mergedLength = 0; + for (int i = 0; i < len3; i++) { + if (newArr[i] != -1) + newArr[mergedLength++] = i; + } + return Arrays.copyOf(newArr, mergedLength); } + + public static void initialArray(int[] arr, int j) { + for (int i = 0; i < arr.length; i++) { + arr[i] = j; + } + } + + + /** * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 @@ -65,9 +107,19 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ - return null; + + int[] newArr = new int[oldArray.length + size]; + for (int i = 0; i < oldArray.length; i++) { + newArr[i] = oldArray[i]; + } + + return newArr; } + + + + /** * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] @@ -79,6 +131,15 @@ public int[] fibonacci(int max){ return null; } + + public static void main(String args[]) { + + ArrayUtil aUtil = new ArrayUtil(); + + + + } + /** * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] @@ -108,7 +169,13 @@ public int[] getPerfectNumbers(int max){ * @return */ public String join(int[] array, String seperator){ - return null; + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < array.length; i++) { + sb.append(array[i]); + if (i < array.length-1) + sb.append(seperator); + } + return sb.toString(); } diff --git a/group12/382266293/src/array/ArrayUtilTest.java b/group12/382266293/src/array/ArrayUtilTest.java index 4e8df6912c..b242e4b73b 100644 --- a/group12/382266293/src/array/ArrayUtilTest.java +++ b/group12/382266293/src/array/ArrayUtilTest.java @@ -2,18 +2,20 @@ import static org.junit.Assert.*; import static util.TestUtil.*; - import java.util.Arrays; - +import java.util.Iterator; +import java.util.TreeSet; import static util.Print.*; import org.junit.After; import org.junit.Before; import org.junit.Test; + + public class ArrayUtilTest { - private int[] myArr; + private int[] actual; ArrayUtil au = new ArrayUtil(); @Before @@ -23,7 +25,7 @@ public void setUp() throws Exception { @After public void tearDown() throws Exception { - myArr = null; + actual = null; } @@ -32,12 +34,12 @@ public void testReverseArray() { int size = getRandomNumber(); int[] expected = getRandomIntArray(size); - int[] myArr = Arrays.copyOf(expected, size); + actual = Arrays.copyOf(expected, size); - au.reverseArray(myArr); + au.reverseArray(actual); for (int i = 0; i < size; i++) { - assertEquals(expected[i], myArr[size-1-i]); + assertEquals(expected[i], actual[size-1-i]); } } @@ -47,16 +49,71 @@ public void testReverseArray() { @Test public void testRemoveZero() { + + int size = getRandomNumber(10000); + int[] expected = getRandomIntArray(size); + int zeros = getRandomNumber(size-1); + TreeSet t = new TreeSet(); + while (t.size() != zeros) { + t.add(getRandomNumber(size)); + } + + for (Integer i : t) { + expected[i] = 0; + } + + int expectedSize = size - zeros; + actual = au.removeZero(expected); + assertEquals(expectedSize, actual.length); + + for (int i = 0, j = 0; i < size; i++) { + if (expected[i] != 0) + assertEquals(expected[i], actual[j++]); + } + } @Test public void testMerge() { + int[] arr1 = getRandomIntArray(getRandomNumber()); + int[] arr2 = getRandomIntArray(getRandomNumber()); + Arrays.sort(arr1); + Arrays.sort(arr2); + TreeSet t = new TreeSet(); + for (int i = 0; i < arr1.length; i++) { + t.add(arr1[i]); + } + for (int i = 0; i < arr2.length; i++) { + t.add(arr2[i]); + } + int[] actual = new int[arr1.length + arr2.length]; + actual = au.merge(arr1, arr2); + + assertEquals(t.size(), actual.length); + + Iterator it = t.iterator(); + for(int i = 0; it.hasNext(); i++) { + assertEquals((int)it.next(), actual[i]); + } } @Test public void testGrow() { + int[] expected = getRandomIntArray(getRandomNumber()); + int growSize = getRandomNumber(); + int[] actual = au.grow(expected, growSize); + + assertEquals(expected.length + growSize, actual.length); + + for (int i = 0; i < actual.length; i++) { + if (i < expected.length) { + assertEquals(expected[i], actual[i]); + } else { + assertEquals(0, actual[i]); + } + } } @@ -78,6 +135,17 @@ public void testGetPerfectNumbers() { @Test public void testJoin() { + int[] expected = getRandomIntArray(getRandomNumber()); + String seperator = "-"; + String joinedString = au.join(expected, seperator); + + String[] actual = joinedString.split(seperator); + + assertEquals(expected.length, actual.length); + for (int i = 0; i < expected.length; i++) { + assertEquals(expected[i], Integer.parseInt(actual[i])); + } + } } From e043badb8ae24a1ffa664433fadc3f71eb850b56 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 28 Feb 2017 10:05:02 +0800 Subject: [PATCH 015/646] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zj-2017/src/test/com/coderising/StrutsTest.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java index 2cb51e3967..e11d532f7f 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java @@ -8,11 +8,6 @@ import com.coderising.litestruts.Struts; import com.coderising.litestruts.View; - - - - - public class StrutsTest { @Test From 04142847ca20fe8c23397888abfb670cbb44abd9 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 28 Feb 2017 11:20:01 +0800 Subject: [PATCH 016/646] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=8D=95=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/coderising/array/ArrayUtilTest.java | 119 ++++++++++++++++++ .../{ => litestruts}/StrutsTest.java | 2 +- 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java rename group12/2258659044/zj-2017/src/test/com/coderising/{ => litestruts}/StrutsTest.java (93%) diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java new file mode 100644 index 0000000000..7eae6540bf --- /dev/null +++ b/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java @@ -0,0 +1,119 @@ +package test.com.coderising.array; + +import org.junit.Assert; +import org.junit.Test; + +import com.coderising.array.ArrayUtil; +import com.coding.basic.ArrayList; + +public class ArrayUtilTest { + + ArrayUtil au = new ArrayUtil(); + + @Test + public void testReverseArray() { + + int[] a = {7, 9, 30, 3, 4}; + int[] assertArray = {4,3,30,9,7}; + au.reverseArray(a); + assertResult(assertArray,a); + } + + @Test + public void testRemoveZero() { + + int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int[] assertArray = {1,3,4,5,6,6,5,4,7,6,7,5}; + int[] newArr = au.removeZero(oldArr); + assertResult(assertArray,newArr); + + } + + @Test + public void testMerge() { + + int[] a1 = {3, 5, 7,8}; + int[] a2 = {4, 5, 6,7}; + int[] assertArray = {3,4,5,6,7,8}; + int[] a3 = au.merge(a1, a2); + assertResult(assertArray,a3); + } + + @Test + public void testGrow() { + + int[] oldArray = {2,3,6}; + int size = 3; + int[] assertArray = {2,3,6,0,0,0}; + int[] resultArr = au.grow(oldArray, size); + assertResult(assertArray,resultArr); + } + + @Test + public void testFibonacci() { + + int[] assertArray = {1,1,2,3,5,8,13}; + int max = 15; + int[] resultArr = au.fibonacci(max); + assertResult(assertArray,resultArr); + max = 0; + int[] assertArray1 ={}; + int[] resultArr1 = au.fibonacci(max); + assertResult(assertArray1,resultArr1); + } + + @Test + public void testGetPrimes() { + + int[] assertArray = {2,3,5,7,11,13,17,19}; + int max = 23; + int[] resultArr = au.getPrimes(max); + assertResult(assertArray,resultArr); + } + + @Test + public void testGetPerfectNumbers() { + + int[] assertArray = {6,28,496}; + int max = 496; + int[] resultArr = au.getPerfectNumbers(max); + assertResult(assertArray,resultArr); + } + + @Test + public void testJoin() { + + int[] array = {6,5,8,9}; + String seperator = "*"; + String resulStr = au.join(array, seperator); + String assertStr = "6*5*8*9"; + Assert.assertEquals(assertStr, resulStr); + } + + @Test + public void testObjList2int() { + + ArrayList ls = new ArrayList(); + for (int i = 0; i < 10; i++) { + ls.add(i); + } + int[] resulArr = au.objList2int(ls); + Assert.assertEquals(ls.size(), resulArr.length); + for (int i = 0; i < resulArr.length; i++) { + Assert.assertEquals(i, resulArr[i]); + } + } + + /** + * 鏂█鏂规硶 + * @param assertArr 鏂█闆嗗悎 + * @param resultArr 瀹為檯闆嗗悎 + */ + private void assertResult(int[] assertArr,int[] resultArr){ + + Assert.assertEquals(assertArr.length,resultArr.length); + for (int i = 0; i < resultArr.length; i++) { + Assert.assertEquals(assertArr[i],resultArr[i]); + } + } +} diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/litestruts/StrutsTest.java similarity index 93% rename from group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java rename to group12/2258659044/zj-2017/src/test/com/coderising/litestruts/StrutsTest.java index e11d532f7f..74d04878cc 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/StrutsTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/litestruts/StrutsTest.java @@ -1,4 +1,4 @@ -package test.com.coderising; +package test.com.coderising.litestruts; import java.util.HashMap; import java.util.Map; From 653558d4986731ea50f2f4c83436c8d2ff5801ba Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 28 Feb 2017 11:21:41 +0800 Subject: [PATCH 017/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2258659044/zj-2017/src/com/coderising/litestruts/Struts.java | 1 - 1 file changed, 1 deletion(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index e75250f7a8..82e61dbcf2 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -96,7 +96,6 @@ private static Map readStrutsXml(String filePath, Document document = documentBuilder.parse(xmlFile); // 鑾峰彇鏍硅妭鐐 Element element = document.getDocumentElement(); - // http://www.jb51.net/article/44338.htm NodeList actionNodes = element.getChildNodes(); for (int i = 0; i < actionNodes.getLength(); i++) { Node actionNode = actionNodes.item(i); From 819d5e60dc5c27c6bc0749a74d4ea967b65d8de7 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Tue, 28 Feb 2017 13:37:54 +0800 Subject: [PATCH 018/646] 2.28 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鏁寸悊浠庡畾2017浠撳簱锛屽彧浣滀负浣滀笟杩涜鎻愪氦 --- group08/1509102580/.classpath | 7 - group08/1509102580/.project | 17 --- .../com/zzk/coding2017/zuoye_1/ArrayList.java | 0 .../coding2017/zuoye_1/BinaryTreeNode.java | 0 .../com/zzk/coding2017/zuoye_1/Iterator.java | 0 .../zzk/coding2017/zuoye_1/LinkedList.java | 0 .../src/com/zzk/coding2017/zuoye_1/List.java | 0 .../src/com/zzk/coding2017/zuoye_1/Queue.java | 0 .../src/com/zzk/coding2017/zuoye_1/Stack.java | 0 .../coding2017/zuoye_2/array/ArrayUtil.java | 127 ++++++++++++++++++ .../zuoye_2/test/ArrayUtilTest.java | 114 ++++++++++++++++ .../coding2017/zuoye_2/test/package-info.java | 8 ++ .../src/com/zzk/tests/TestDataStructure.java | 0 13 files changed, 249 insertions(+), 24 deletions(-) delete mode 100644 group08/1509102580/.classpath delete mode 100644 group08/1509102580/.project rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/ArrayList.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/Iterator.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/LinkedList.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/List.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/Queue.java (100%) rename group08/1509102580/{ => 2.26}/src/com/zzk/coding2017/zuoye_1/Stack.java (100%) create mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java create mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java create mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java rename group08/1509102580/{ => 2.26}/src/com/zzk/tests/TestDataStructure.java (100%) diff --git a/group08/1509102580/.classpath b/group08/1509102580/.classpath deleted file mode 100644 index 54003f1bc9..0000000000 --- a/group08/1509102580/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/group08/1509102580/.project b/group08/1509102580/.project deleted file mode 100644 index 67d76428fd..0000000000 --- a/group08/1509102580/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - MyCoding2017 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/ArrayList.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/ArrayList.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/ArrayList.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/BinaryTreeNode.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/Iterator.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Iterator.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/Iterator.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Iterator.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/LinkedList.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/LinkedList.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/LinkedList.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/LinkedList.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/List.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/List.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/List.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/List.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/Queue.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Queue.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/Queue.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Queue.java diff --git a/group08/1509102580/src/com/zzk/coding2017/zuoye_1/Stack.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Stack.java similarity index 100% rename from group08/1509102580/src/com/zzk/coding2017/zuoye_1/Stack.java rename to group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_1/Stack.java diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java new file mode 100644 index 0000000000..82a0ff094c --- /dev/null +++ b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java @@ -0,0 +1,127 @@ +package com.zzk.coding2017.zuoye_2.array; + +import com.zzk.coding2017.zuoye_1.ArrayList; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int head = 0;int end = origin.length-1;//瀹氫箟鏀跺熬涓や釜鎸囩ず閲 + if(end<=head){ + return ; + }else{ + int temp; + while(end>head){ + temp = origin[head]; + origin[head] =origin[end]; + origin[end] = temp; + head++; + end--; + } + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int length = oldArray.length; + if(length<=0){ + return null; + }else{ + ArrayList al = new ArrayList(); + for (int i = 0; i < oldArray.length; i++) { + if(oldArray[i]!=0){ + al.add(oldArray[i]); + }else{ + continue; + } + } + int[] result = new int[al.size()]; + for (int i = 0; i < result.length; i++) { + result[i]=(int)al.get(i); + } + return result; + } + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java new file mode 100644 index 0000000000..8bf636dacc --- /dev/null +++ b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java @@ -0,0 +1,114 @@ +package com.zzk.coding2017.zuoye_2.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.zzk.coding2017.zuoye_2.array.ArrayUtil; + +public class ArrayUtilTest { + ArrayUtil au; + @Before + public void setUp() throws Exception { + au = new ArrayUtil(); + } + + @Test + public void testReverseArray() { + + int[] a = {1,2,3,4,5}; + int[] b = {1,2,3,4}; + int[] c = {}; + int[] d = {1}; + + au.reverseArray(a); + au.reverseArray(b); + au.reverseArray(c); + au.reverseArray(d); + + for (int i = 0; i < a.length; i++) { + System.out.print(a[i]); + } + System.out.println(); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i]); + } + System.out.println(); + for (int i = 0; i < c.length; i++) { + System.out.print(c[i]); + } + System.out.println(); + for (int i = 0; i < d.length; i++) { + System.out.print(d[i]); + } + fail("Not yet implemented"); + } + + @Before + public void setUp2() throws Exception { + au = new ArrayUtil(); + System.out.println("testRemoveZero "); + } + + @Test + public void testRemoveZero() { + int[] a = {1,2,3,0,0,3}; + int[] b = {}; + int[] c = {0,0,0,0}; + int[] d = {1,2,3,3}; + a = au.removeZero(a); + b = au.removeZero(b); + c = au.removeZero(c); + d = au.removeZero(d); + System.out.println("a"); + for (int i = 0; i < a.length; i++) { + System.out.print(a[i]); + } + + System.out.println("c"); + for (int i = 0; i < c.length; i++) { + System.out.print(c[i]); + } + System.out.println("d"); + for (int i = 0; i < d.length; i++) { + System.out.print(d[i]); + } + System.out.println("b"); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i]); + } + fail("Not yet implemented"); + } + + @Test + public void testMerge() { + fail("Not yet implemented"); + } + + @Test + public void testGrow() { + fail("Not yet implemented"); + } + + @Test + public void testFibonacci() { + fail("Not yet implemented"); + } + + @Test + public void testGetPrimes() { + fail("Not yet implemented"); + } + + @Test + public void testGetPerfectNumbers() { + fail("Not yet implemented"); + } + + @Test + public void testJoin() { + fail("Not yet implemented"); + } + +} diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java new file mode 100644 index 0000000000..197779b51d --- /dev/null +++ b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author User + * + */ +package com.zzk.coding2017.zuoye_2.test; \ No newline at end of file diff --git a/group08/1509102580/src/com/zzk/tests/TestDataStructure.java b/group08/1509102580/2.26/src/com/zzk/tests/TestDataStructure.java similarity index 100% rename from group08/1509102580/src/com/zzk/tests/TestDataStructure.java rename to group08/1509102580/2.26/src/com/zzk/tests/TestDataStructure.java From 4341e6365c5cb87bda1741447128f22e04f054ca Mon Sep 17 00:00:00 2001 From: TonyHui Date: Tue, 28 Feb 2017 16:32:32 +0800 Subject: [PATCH 019/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0pom=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group01/954958168/class02/LiteStruts/pom.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/group01/954958168/class02/LiteStruts/pom.xml b/group01/954958168/class02/LiteStruts/pom.xml index 9a962fe54c..40ba7c66b6 100644 --- a/group01/954958168/class02/LiteStruts/pom.xml +++ b/group01/954958168/class02/LiteStruts/pom.xml @@ -8,11 +8,6 @@ lite-struts 1.0.0-SNAPSHOT - - UTF-8 - 1.8 - - junit @@ -29,6 +24,19 @@ commons-lang3 3.5 - + + + + liteStruts + + true + + + UTF-8 + 1.8 + 1.8 + + + \ No newline at end of file From 48f6a42c9d6d3d41cacda9c98c3cecf98538f472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Tue, 28 Feb 2017 16:38:38 +0800 Subject: [PATCH 020/646] =?UTF-8?q?=E6=95=B0=E7=BB=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xuyangyang/util_1/ArrayUtil.java | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java new file mode 100644 index 0000000000..c4cd46f75c --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java @@ -0,0 +1,168 @@ +package com.util_1; + +import java.util.*; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int[] oldArr = origin; + int newLength = oldArr.length; + int[] newArr = new int[newLength]; + for (int i = 0; i < newLength; i++) { + newArr[newLength - i - 1] = oldArr[i]; + } + for (int s : newArr) { + System.out.println(s); + } + + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int[] oldArr = oldArray; + int oldLength = oldArr.length; + int[] newArr = new int[oldLength]; + int index = 0; + int zeroCount = 0; + for (int i = 0; i < oldLength; i++) { + if (oldArr[i] == 0) { + zeroCount++; + } else { + newArr[index++] = oldArr[i]; + } + } + int[] newArrs = Arrays.copyOf(newArr, index); + return newArrs; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2) { + int newLength = array1.length + array2.length; + int[] newArr = new int[newLength]; + int index = 0; + for (int i = 0; i < array1.length; i++) { + newArr[index++] = array1[i]; + } + for (int i = 0; i < array2.length; i++) { + newArr[index++] = array2[i]; + } + //鍐掓场鎺掑簭 + for (int i = 0; i < newArr.length; i++) { + for (int j = i + 1; j < newArr.length; j++) { + if (newArr[i] > newArr[j]) { + int temp = newArr[i]; + newArr[i] = newArr[j]; + newArr[j] = temp; + } + } + } + //鏁扮粍鍘婚噸 + boolean[] b=new boolean[newArr.length]; + int counts = newArr.length; + for (int i=0;i Date: Tue, 28 Feb 2017 17:39:24 +0800 Subject: [PATCH 021/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9ArrayList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2258659044/zj-2017/src/com/coding/basic/ArrayList.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java index c15e99848b..017763d17e 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java @@ -54,7 +54,9 @@ public int size(){ } public Object[] toArray(){ - return elementData.clone(); + Object[] objArr = new Object[size]; + System.arraycopy(elementData, 0, objArr, 0, size); + return objArr; } /** From 1e25f0a3ccfc798b5e2825a74948143d9c654332 Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Tue, 28 Feb 2017 17:44:40 +0800 Subject: [PATCH 022/646] ArrayUtil answer and it's Junit Test example --- group12/247565311/week1/ArrayList.java | 10 +- group12/247565311/week2/ArrayUtil.java | 219 +++++++++++++++++++++ group12/247565311/week2/ArrayUtilTest.java | 141 +++++++++++++ 3 files changed, 365 insertions(+), 5 deletions(-) create mode 100644 group12/247565311/week2/ArrayUtil.java create mode 100644 group12/247565311/week2/ArrayUtilTest.java diff --git a/group12/247565311/week1/ArrayList.java b/group12/247565311/week1/ArrayList.java index c2643af683..f15c04e289 100644 --- a/group12/247565311/week1/ArrayList.java +++ b/group12/247565311/week1/ArrayList.java @@ -30,7 +30,7 @@ public boolean add(E arg0) { } data = newdata; } - data[leng] = arg0; + data[size-1] = arg0; return true; } @@ -233,17 +233,17 @@ public Object[] toArray() { if(this.size == 0) return null; Object[] res = new Object[this.size]; for(int i=0;i T[] toArray(T[] arg0) { T[] res = (T[])(new Object[this.size]); for(int i=0;i data = new ArrayList(); + int leno = oldArray.length; + for(int i=0;i data = new ArrayList(); + int p1=0,p2=0,len1=array1.length,len2=array2.length; + int val1=0,val2=0; + if(len1 == 0) return array2; + if(len2 == 0) return array1; + while(p1=len1){ + data.add(array2[p2]); + p2 += 1; + continue; + } + if(p2>=len2){ + data.add(array1[p1]); + p1 += 1; + continue; + } + if(p1val2){ + data.add(val2); + p2 += 1; + }else if(val1 data = new ArrayList(); + data.add(llast); + data.add(last); + while(last+llast li = new ArrayList(); + int cur = 2; + while(cur li = null,resli = new ArrayList(); + for(int i=6;i getAllElem(int arg0){ + ArrayList res = new ArrayList(); + for(int i=1;i Date: Tue, 28 Feb 2017 19:56:50 +0800 Subject: [PATCH 023/646] copyFromliuxin --- .../495473393/coderising/array/ArrayUtil.java | 96 +++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 ++++++++ .../coderising/litestruts/Struts.java | 34 +++++++ .../coderising/litestruts/StrutsTest.java | 43 +++++++++ .../495473393/coderising/litestruts/View.java | 23 +++++ .../coderising/litestruts/struts.xml | 11 +++ 6 files changed, 246 insertions(+) create mode 100644 group12/495473393/coderising/array/ArrayUtil.java create mode 100644 group12/495473393/coderising/litestruts/LoginAction.java create mode 100644 group12/495473393/coderising/litestruts/Struts.java create mode 100644 group12/495473393/coderising/litestruts/StrutsTest.java create mode 100644 group12/495473393/coderising/litestruts/View.java create mode 100644 group12/495473393/coderising/litestruts/struts.xml diff --git a/group12/495473393/coderising/array/ArrayUtil.java b/group12/495473393/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..e5ddb476a6 --- /dev/null +++ b/group12/495473393/coderising/array/ArrayUtil.java @@ -0,0 +1,96 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group12/495473393/coderising/litestruts/LoginAction.java b/group12/495473393/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group12/495473393/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group12/495473393/coderising/litestruts/Struts.java b/group12/495473393/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..85e2e22de3 --- /dev/null +++ b/group12/495473393/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group12/495473393/coderising/litestruts/StrutsTest.java b/group12/495473393/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group12/495473393/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/495473393/coderising/litestruts/View.java b/group12/495473393/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group12/495473393/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/495473393/coderising/litestruts/struts.xml b/group12/495473393/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..a6cfe43e6c --- /dev/null +++ b/group12/495473393/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From eb8351a74c2c2a2a4316b64f549ca1e94f6d7038 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Tue, 28 Feb 2017 20:15:18 +0800 Subject: [PATCH 024/646] Array Exs --- group12/382266293/src/array/ArrayUtil.java | 97 ++++++++++++++----- .../382266293/src/array/ArrayUtilTest.java | 20 ++-- 2 files changed, 89 insertions(+), 28 deletions(-) diff --git a/group12/382266293/src/array/ArrayUtil.java b/group12/382266293/src/array/ArrayUtil.java index aafa3c410c..f33f64150b 100644 --- a/group12/382266293/src/array/ArrayUtil.java +++ b/group12/382266293/src/array/ArrayUtil.java @@ -1,9 +1,11 @@ package array; import static util.Print.*; - import java.util.Arrays; import java.util.BitSet; +import Collection.Iterator; +import Collection.Concrete.ArrayList; + public class ArrayUtil { @@ -25,7 +27,6 @@ public void reverseArray(int[] origin){ origin[i] = origin[index - i]; origin[index - i] = temp; } - } @@ -59,7 +60,6 @@ public int[] removeZero(int[] oldArray){ } - /** * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 @@ -95,8 +95,6 @@ public static void initialArray(int[] arr, int j) { } } - - /** * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 @@ -112,13 +110,9 @@ public int[] grow(int [] oldArray, int size){ for (int i = 0; i < oldArray.length; i++) { newArr[i] = oldArray[i]; } - return newArr; } - - - - + /** * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 @@ -128,16 +122,17 @@ public int[] grow(int [] oldArray, int size){ * @return */ public int[] fibonacci(int max){ - return null; - } - - - public static void main(String args[]) { - - ArrayUtil aUtil = new ArrayUtil(); - - - + if (max == 1) + return new int[0]; + int[] result = new int[max]; + result[0] = result[1] = 1; + int count = 0; + for (int i = 2, j = 0; j < max ; i++) { + result[i] = result[i-1] + result[i-2]; + j = result[i]; + count++; + } + return Arrays.copyOf(result, ++count); } /** @@ -147,9 +142,39 @@ public static void main(String args[]) { * @return */ public int[] getPrimes(int max){ - return null; + + String temp = ""; + for(int i = 0; i < max; i++) { + if(isPrime(i)) { + temp += i + " "; + } + } + String[] tempArr = temp.split(" "); + int[] result = new int[tempArr.length]; + for (int i = 0; i < result.length; i++) { + result[i] = Integer.parseInt(tempArr[i]); + } + + return result; } + public static boolean isPrime(int num) { + + if (num <= 1) + return false; + + if (num == 2) + return true; + + for(int i = 2; i <= Math.sqrt(num) + 1; i++) { + if (num % i == 0) + return false; + } + + return true; + } + + /** * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 @@ -157,8 +182,36 @@ public int[] getPrimes(int max){ * @return */ public int[] getPerfectNumbers(int max){ - return null; + + int count = 0; + ArrayList myList = new ArrayList(); + for(int i = 1; i < max; i++) { + if(isPerfectNum(i)) { + count++; + myList.add(i); + } + } + int[] result = new int[count]; + Iterator iterator = myList.iterator(); + for (int i = 0; i < count; i++) { + result[i] = iterator.next(); + } + return result; + } + + + public static boolean isPerfectNum(int num) { + + int sum = 0; + for (int i = 1; i <= num/2; i++) { + if (num % i == 0) + sum += i; + } + + return (num == sum) ? true : false; + } + /** * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 diff --git a/group12/382266293/src/array/ArrayUtilTest.java b/group12/382266293/src/array/ArrayUtilTest.java index b242e4b73b..22a3250613 100644 --- a/group12/382266293/src/array/ArrayUtilTest.java +++ b/group12/382266293/src/array/ArrayUtilTest.java @@ -43,9 +43,6 @@ public void testReverseArray() { } } - - - @Test public void testRemoveZero() { @@ -119,17 +116,28 @@ public void testGrow() { @Test public void testFibonacci() { - + int[] expected = new int[] {1, 1, 2, 3, 5, 8, 13}; + int[] acutal = new int[expected.length]; + actual = au.fibonacci(15); + assertArrayEquals(expected,actual); } @Test public void testGetPrimes() { - + + int[] expected = new int[] {2,3,5,7,11,13,17,19}; + int[] acutal = new int[expected.length]; + actual = au.getPrimes(23); + assertArrayEquals(expected,actual); } @Test public void testGetPerfectNumbers() { - + + int[] expected = new int[] {6, 28, 496, 8128}; + int[] acutal = new int[expected.length]; + actual = au.getPerfectNumbers(10000); + assertArrayEquals(expected,actual); } @Test From 02e6e6edc46ba679499f7ccd556927cc7d76db8a Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Tue, 28 Feb 2017 22:34:35 +0900 Subject: [PATCH 025/646] edit class path --- .../20170226-eulerlcs-collection/collection-lib/.classpath | 1 - 1 file changed, 1 deletion(-) diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath b/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath index 5131f04311..fae1a2b37d 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath +++ b/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath @@ -32,6 +32,5 @@ - From 518245aada91188166d2257dd0172fa476fae8d2 Mon Sep 17 00:00:00 2001 From: maishihang <446031103@qq.com> Date: Tue, 28 Feb 2017 22:01:22 +0800 Subject: [PATCH 026/646] Only commit Only commit --- .../src/com/coderising/array/ArrayUtil.java | 135 ++++++++++++++++++ .../com/coderising/array/ArrayUtilTest.java | 73 ++++++++++ 2 files changed, 208 insertions(+) create mode 100644 group12/446031103/src/com/coderising/array/ArrayUtil.java create mode 100644 group12/446031103/src/com/coderising/array/ArrayUtilTest.java diff --git a/group12/446031103/src/com/coderising/array/ArrayUtil.java b/group12/446031103/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..fbbe3c1c89 --- /dev/null +++ b/group12/446031103/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,135 @@ +package com.coderising.array; + +import java.util.Arrays; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int end = origin.length-1; + int temp ; + for (int i = 0; i < end; i++,end--) { + temp=origin[i]; + origin[i]=origin[end]; + origin[end] = temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int zeroCnt = 0; + for (int i : oldArray) { + if(0==i){ + zeroCnt++; + } + + } + int size = 0; + int [] result = new int[oldArray.length-zeroCnt]; + for (int i : oldArray) { + if(0!=i){ + result[size]=i; + size++; + } + + } + return result; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int repetition = 0; + for (int i : array2) { + if(Arrays.asList(array1).contains(i)) + repetition++; + } + int [] result =Arrays.copyOf(array1, array1.length+array2.length-repetition); + int size = 0; + for (int i = 0; i < array2.length; i++) { + int temp=array2[i]; + if(!Arrays.asList(array1).contains(temp)){ + result[array1.length+size]=temp; + size++; + } + + } + return result; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group12/446031103/src/com/coderising/array/ArrayUtilTest.java b/group12/446031103/src/com/coderising/array/ArrayUtilTest.java new file mode 100644 index 0000000000..7cfdce4313 --- /dev/null +++ b/group12/446031103/src/com/coderising/array/ArrayUtilTest.java @@ -0,0 +1,73 @@ +package com.coderising.array; + +import static org.junit.Assert.*; + +import java.util.Arrays; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import junit.framework.Assert; + +public class ArrayUtilTest { + ArrayUtil au = new ArrayUtil(); + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @SuppressWarnings("deprecation") + @Test + public void testReverseArray() { + int [] origin = {4,7, 9 , 30, 3}; + au.reverseArray(origin); + Assert.assertEquals(3, origin[0]); + Assert.assertEquals(30, origin[1]); + Assert.assertEquals(9, origin[2]); + Assert.assertEquals(7, origin[3]); + Assert.assertEquals(4, origin[4]); + } + + @SuppressWarnings("deprecation") + @Test + public void testRemoveZero() { + int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int [] result=au.removeZero(oldArr); + Assert.assertEquals(false, Arrays.asList(result).contains(0)); + } + + @Test + public void testMerge() { + fail("Not yet implemented"); + } + + @Test + public void testGrow() { + fail("Not yet implemented"); + } + + @Test + public void testFibonacci() { + fail("Not yet implemented"); + } + + @Test + public void testGetPrimes() { + fail("Not yet implemented"); + } + + @Test + public void testGetPerfectNumbers() { + fail("Not yet implemented"); + } + + @Test + public void testJoin() { + fail("Not yet implemented"); + } + +} From 3551ad724267882a4bb7f395e7a752641303aedd Mon Sep 17 00:00:00 2001 From: wayss000 Date: Tue, 28 Feb 2017 23:02:58 +0800 Subject: [PATCH 027/646] =?UTF-8?q?=E5=88=86=E6=94=AF=E6=8F=90=E4=BA=A4Ite?= =?UTF-8?q?rator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../firstPractice/src/basic/MyArrayList.java | 25 ++++++++++++++++++- .../firstPractice/src/basic/MyLinkedList.java | 24 +++++++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/group08/1144989424/firstPractice/src/basic/MyArrayList.java b/group08/1144989424/firstPractice/src/basic/MyArrayList.java index f9cf5b1b80..71efd76681 100644 --- a/group08/1144989424/firstPractice/src/basic/MyArrayList.java +++ b/group08/1144989424/firstPractice/src/basic/MyArrayList.java @@ -83,7 +83,30 @@ public int size(){ } public MyIterator iterator(){ - return null; + return new MyArrayListIterator(this); + } + + private class MyArrayListIterator implements MyIterator{ + private MyArrayList list = null; + private int index = 0; + + private MyArrayListIterator(MyArrayList list){ + this.list = list; + } + + @Override + public boolean hasNext(){ + if(index < size){ + return true; + } + return false; + } + + @Override + public Object next(){ + return list.get(index++); + } + } private void expandArray(){ diff --git a/group08/1144989424/firstPractice/src/basic/MyLinkedList.java b/group08/1144989424/firstPractice/src/basic/MyLinkedList.java index 3894884373..cf3a41c3af 100644 --- a/group08/1144989424/firstPractice/src/basic/MyLinkedList.java +++ b/group08/1144989424/firstPractice/src/basic/MyLinkedList.java @@ -98,10 +98,32 @@ public Object removeLast(){ size--; return deleteNode; } + public MyIterator iterator(){ - return null; + return new MyLinkedListIterator(this); } + private class MyLinkedListIterator implements MyIterator{ + private MyLinkedList list = null; + private int index = 0; + + private MyLinkedListIterator(MyLinkedList list){ + this.list = list; + } + + @Override + public boolean hasNext(){ + if(index < size){ + return true; + } + return false; + } + + @Override + public Object next(){ + return list.get(index++); + } + } private static class Node{ Object data; From 64cc020cc19d695e309b38d8958a3f8ba9223572 Mon Sep 17 00:00:00 2001 From: tanghaojie Date: Tue, 28 Feb 2017 23:15:00 +0800 Subject: [PATCH 028/646] SomeChange --- group12/{495473393/Coding => }/.gitignore | 0 group12/495473393/Code/.gitignore | 4 + .../org.eclipse.core.resources.prefs | 3 + .../495473393/Code/src/Week1/ArrayList.java | 34 ++++ .../src/Week1}/BinaryTreeNode.java | 17 +- .../src/Base => Code/src/Week1}/Iterator.java | 4 +- .../495473393/Code/src/Week1/LinkedList.java | 37 +++++ .../src/Base => Code/src/Week1}/List.java | 6 +- group12/495473393/Code/src/Week1/Queue.java | 19 +++ .../src/Base => Code/src/Week1}/Stack.java | 20 +-- .../Code/src/Week2/array/ArrayUtil.java | 145 ++++++++++++++++++ .../495473393/Code/src/Week2/array/Main.java | 15 ++ .../src/Week2}/litestruts/LoginAction.java | 2 +- .../src/Week2}/litestruts/Struts.java | 2 +- .../src/Week2}/litestruts/StrutsTest.java | 2 +- .../src/Week2}/litestruts/View.java | 2 +- .../src/Week2}/litestruts/struts.xml | 0 .../495473393/Coding/src/Base/ArrayList.java | 32 ---- .../495473393/Coding/src/Base/LinkedList.java | 46 ------ group12/495473393/Coding/src/Base/Queue.java | 19 --- .../495473393/coderising/array/ArrayUtil.java | 96 ------------ 21 files changed, 289 insertions(+), 216 deletions(-) rename group12/{495473393/Coding => }/.gitignore (100%) create mode 100644 group12/495473393/Code/.gitignore create mode 100644 group12/495473393/Code/.settings/org.eclipse.core.resources.prefs create mode 100644 group12/495473393/Code/src/Week1/ArrayList.java rename group12/495473393/{Coding/src/Base => Code/src/Week1}/BinaryTreeNode.java (85%) rename group12/495473393/{Coding/src/Base => Code/src/Week1}/Iterator.java (84%) create mode 100644 group12/495473393/Code/src/Week1/LinkedList.java rename group12/495473393/{Coding/src/Base => Code/src/Week1}/List.java (90%) create mode 100644 group12/495473393/Code/src/Week1/Queue.java rename group12/495473393/{Coding/src/Base => Code/src/Week1}/Stack.java (50%) create mode 100644 group12/495473393/Code/src/Week2/array/ArrayUtil.java create mode 100644 group12/495473393/Code/src/Week2/array/Main.java rename group12/495473393/{coderising => Code/src/Week2}/litestruts/LoginAction.java (96%) rename group12/495473393/{coderising => Code/src/Week2}/litestruts/Struts.java (96%) rename group12/495473393/{coderising => Code/src/Week2}/litestruts/StrutsTest.java (96%) rename group12/495473393/{coderising => Code/src/Week2}/litestruts/View.java (91%) rename group12/495473393/{coderising => Code/src/Week2}/litestruts/struts.xml (100%) delete mode 100644 group12/495473393/Coding/src/Base/ArrayList.java delete mode 100644 group12/495473393/Coding/src/Base/LinkedList.java delete mode 100644 group12/495473393/Coding/src/Base/Queue.java delete mode 100644 group12/495473393/coderising/array/ArrayUtil.java diff --git a/group12/495473393/Coding/.gitignore b/group12/.gitignore similarity index 100% rename from group12/495473393/Coding/.gitignore rename to group12/.gitignore diff --git a/group12/495473393/Code/.gitignore b/group12/495473393/Code/.gitignore new file mode 100644 index 0000000000..ff3a56dc08 --- /dev/null +++ b/group12/495473393/Code/.gitignore @@ -0,0 +1,4 @@ +/bin/ + +*.classpath +*.project \ No newline at end of file diff --git a/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs b/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..3a0682eb48 --- /dev/null +++ b/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//src/Week2/array/ArrayUtil.java=UTF-8 +encoding/src=UTF-8 diff --git a/group12/495473393/Code/src/Week1/ArrayList.java b/group12/495473393/Code/src/Week1/ArrayList.java new file mode 100644 index 0000000000..3614ed930a --- /dev/null +++ b/group12/495473393/Code/src/Week1/ArrayList.java @@ -0,0 +1,34 @@ +package Week1; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + @Override + public void add(Object o) { + + } + + @Override + public void add(int index, Object o) { + + } + + @Override + public Object get(int index) { + return null; + } + + @Override + public Object remove(int index) { + return null; + } + + @Override + public int size() { + return 0; + } + +} diff --git a/group12/495473393/Coding/src/Base/BinaryTreeNode.java b/group12/495473393/Code/src/Week1/BinaryTreeNode.java similarity index 85% rename from group12/495473393/Coding/src/Base/BinaryTreeNode.java rename to group12/495473393/Code/src/Week1/BinaryTreeNode.java index 875abe8c80..d5518b7b96 100644 --- a/group12/495473393/Coding/src/Base/BinaryTreeNode.java +++ b/group12/495473393/Code/src/Week1/BinaryTreeNode.java @@ -1,32 +1,35 @@ -package Base; +package Week1; public class BinaryTreeNode { - private Object data; private BinaryTreeNode left; private BinaryTreeNode right; - + public Object getData() { return data; } + public void setData(Object data) { this.data = data; } + public BinaryTreeNode getLeft() { return left; } + public void setLeft(BinaryTreeNode left) { this.left = left; } + public BinaryTreeNode getRight() { return right; } + public void setRight(BinaryTreeNode right) { this.right = right; } - - public BinaryTreeNode insert(Object o){ - return null; + + public BinaryTreeNode insert(Object o) { + return null; } - } diff --git a/group12/495473393/Coding/src/Base/Iterator.java b/group12/495473393/Code/src/Week1/Iterator.java similarity index 84% rename from group12/495473393/Coding/src/Base/Iterator.java rename to group12/495473393/Code/src/Week1/Iterator.java index 19b65c3637..b6075594ac 100644 --- a/group12/495473393/Coding/src/Base/Iterator.java +++ b/group12/495473393/Code/src/Week1/Iterator.java @@ -1,7 +1,7 @@ -package Base; +package Week1; public interface Iterator { public boolean hasNext(); - public Object next(); + public Object next(); } diff --git a/group12/495473393/Code/src/Week1/LinkedList.java b/group12/495473393/Code/src/Week1/LinkedList.java new file mode 100644 index 0000000000..9a77242c40 --- /dev/null +++ b/group12/495473393/Code/src/Week1/LinkedList.java @@ -0,0 +1,37 @@ +package Week1; + +public class LinkedList implements List { + + private Node head; + + @Override + public void add(Object o) { + + } + + @Override + public void add(int index, Object o) { + + } + + @Override + public Object get(int index) { + return null; + } + + @Override + public Object remove(int index) { + return null; + } + + @Override + public int size() { + return 0; + } + + private static class Node { + Object data; + Node next; + } + +} diff --git a/group12/495473393/Coding/src/Base/List.java b/group12/495473393/Code/src/Week1/List.java similarity index 90% rename from group12/495473393/Coding/src/Base/List.java rename to group12/495473393/Code/src/Week1/List.java index 6c910af600..6785ebabbf 100644 --- a/group12/495473393/Coding/src/Base/List.java +++ b/group12/495473393/Code/src/Week1/List.java @@ -1,9 +1,13 @@ -package Base; +package Week1; public interface List { public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); } diff --git a/group12/495473393/Code/src/Week1/Queue.java b/group12/495473393/Code/src/Week1/Queue.java new file mode 100644 index 0000000000..a03fd44b6b --- /dev/null +++ b/group12/495473393/Code/src/Week1/Queue.java @@ -0,0 +1,19 @@ +package Week1; + +public class Queue { + + public void enQueue(Object o) { + } + + public Object deQueue() { + return null; + } + + public boolean isEmpty() { + return false; + } + + public int size() { + return -1; + } +} diff --git a/group12/495473393/Coding/src/Base/Stack.java b/group12/495473393/Code/src/Week1/Stack.java similarity index 50% rename from group12/495473393/Coding/src/Base/Stack.java rename to group12/495473393/Code/src/Week1/Stack.java index 8f59343d4b..074f310add 100644 --- a/group12/495473393/Coding/src/Base/Stack.java +++ b/group12/495473393/Code/src/Week1/Stack.java @@ -1,22 +1,24 @@ -package Base; +package Week1; public class Stack { private ArrayList elementData = new ArrayList(); - - public void push(Object o){ + + public void push(Object o) { } - - public Object pop(){ + + public Object pop() { return null; } - - public Object peek(){ + + public Object peek() { return null; } - public boolean isEmpty(){ + + public boolean isEmpty() { return false; } - public int size(){ + + public int size() { return -1; } } diff --git a/group12/495473393/Code/src/Week2/array/ArrayUtil.java b/group12/495473393/Code/src/Week2/array/ArrayUtil.java new file mode 100644 index 0000000000..a280dd49c9 --- /dev/null +++ b/group12/495473393/Code/src/Week2/array/ArrayUtil.java @@ -0,0 +1,145 @@ +package Week2.array; + +import java.util.Arrays; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = + * [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int len = origin.length; + int forLen = len / 2; + int temp; + for (int i = 0; i < forLen; i++) { + temp = origin[i]; + origin[i] = origin[len - 1 - i]; + origin[len - 1 - i] = temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int[] newArray = new int[oldArray.length]; + int index = 0; + for (int x : oldArray) { + if (x != 0) { + newArray[index] = x; + index++; + } + } + return Arrays.copyOf(newArray, index); + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = + * [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2) { + int[] newArray = new int[array1.length + array2.length]; + int newIndex = 0; + int index1 = 0; + int index2 = 0; + int len1 = array1.length; + int len2 = array2.length; + int x; + int y; + while (index1 < len1 && index2 < len2) { + x = array1[index1]; + y = array2[index2]; + if (x < y) { + newArray[newIndex] = x; + index1++; + } else if (x == y) { + newArray[newIndex] = x; + index1++; + index2++; + } else { + newArray[newIndex] = y; + index2++; + } + newIndex++; + } + for (int i = index1; i < len1; i++) { + newArray[newIndex] = array1[i]; + newIndex++; + } + for (int i = index2; i < len2; i++) { + newArray[newIndex] = array2[i]; + newIndex++; + } + return Arrays.copyOf(newArray, newIndex); + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 渚嬪锛 max = 15 , + * 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public int[] fibonacci(int max) { + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public int[] getPerfectNumbers(int max) { + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], seperator = "-" 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator) { + return null; + } + +} diff --git a/group12/495473393/Code/src/Week2/array/Main.java b/group12/495473393/Code/src/Week2/array/Main.java new file mode 100644 index 0000000000..ad4388fe87 --- /dev/null +++ b/group12/495473393/Code/src/Week2/array/Main.java @@ -0,0 +1,15 @@ +package Week2.array; + +public class Main { + + public static void main(String[] args) { + ArrayUtil arrayUtil = new ArrayUtil(); + int[] a = { 1,3,5,7}; + int[] b={ 2,4,6,8,}; + int[] x = arrayUtil.merge(a,b); + for (int i : x) { + System.out.println(i); + } + } + +} diff --git a/group12/495473393/coderising/litestruts/LoginAction.java b/group12/495473393/Code/src/Week2/litestruts/LoginAction.java similarity index 96% rename from group12/495473393/coderising/litestruts/LoginAction.java rename to group12/495473393/Code/src/Week2/litestruts/LoginAction.java index dcdbe226ed..de7a05b462 100644 --- a/group12/495473393/coderising/litestruts/LoginAction.java +++ b/group12/495473393/Code/src/Week2/litestruts/LoginAction.java @@ -1,4 +1,4 @@ -package com.coderising.litestruts; +package Week2.litestruts; /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 diff --git a/group12/495473393/coderising/litestruts/Struts.java b/group12/495473393/Code/src/Week2/litestruts/Struts.java similarity index 96% rename from group12/495473393/coderising/litestruts/Struts.java rename to group12/495473393/Code/src/Week2/litestruts/Struts.java index 85e2e22de3..db818b0924 100644 --- a/group12/495473393/coderising/litestruts/Struts.java +++ b/group12/495473393/Code/src/Week2/litestruts/Struts.java @@ -1,4 +1,4 @@ -package com.coderising.litestruts; +package Week2.litestruts; import java.util.Map; diff --git a/group12/495473393/coderising/litestruts/StrutsTest.java b/group12/495473393/Code/src/Week2/litestruts/StrutsTest.java similarity index 96% rename from group12/495473393/coderising/litestruts/StrutsTest.java rename to group12/495473393/Code/src/Week2/litestruts/StrutsTest.java index b8c81faf3c..326e33daee 100644 --- a/group12/495473393/coderising/litestruts/StrutsTest.java +++ b/group12/495473393/Code/src/Week2/litestruts/StrutsTest.java @@ -1,4 +1,4 @@ -package com.coderising.litestruts; +package Week2.litestruts; import java.util.HashMap; import java.util.Map; diff --git a/group12/495473393/coderising/litestruts/View.java b/group12/495473393/Code/src/Week2/litestruts/View.java similarity index 91% rename from group12/495473393/coderising/litestruts/View.java rename to group12/495473393/Code/src/Week2/litestruts/View.java index 07df2a5dab..5abed5f20d 100644 --- a/group12/495473393/coderising/litestruts/View.java +++ b/group12/495473393/Code/src/Week2/litestruts/View.java @@ -1,4 +1,4 @@ -package com.coderising.litestruts; +package Week2.litestruts; import java.util.Map; diff --git a/group12/495473393/coderising/litestruts/struts.xml b/group12/495473393/Code/src/Week2/litestruts/struts.xml similarity index 100% rename from group12/495473393/coderising/litestruts/struts.xml rename to group12/495473393/Code/src/Week2/litestruts/struts.xml diff --git a/group12/495473393/Coding/src/Base/ArrayList.java b/group12/495473393/Coding/src/Base/ArrayList.java deleted file mode 100644 index 0b99f87873..0000000000 --- a/group12/495473393/Coding/src/Base/ArrayList.java +++ /dev/null @@ -1,32 +0,0 @@ -package Base; - -public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData = new Object[100]; - - public void add(Object o){ - - } - public void add(int index, Object o){ - - } - - public Object get(int index){ - return null; - } - - public Object remove(int index){ - return null; - } - - public int size(){ - return -1; - } - - public Iterator iterator(){ - return null; - } - -} diff --git a/group12/495473393/Coding/src/Base/LinkedList.java b/group12/495473393/Coding/src/Base/LinkedList.java deleted file mode 100644 index 0d4ce20167..0000000000 --- a/group12/495473393/Coding/src/Base/LinkedList.java +++ /dev/null @@ -1,46 +0,0 @@ -package Base; - -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - - } - public void add(int index , Object o){ - - } - public Object get(int index){ - return null; - } - public Object remove(int index){ - return null; - } - - public int size(){ - return -1; - } - - public void addFirst(Object o){ - - } - public void addLast(Object o){ - - } - public Object removeFirst(){ - return null; - } - public Object removeLast(){ - return null; - } - public Iterator iterator(){ - return null; - } - - - private static class Node{ - Object data; - Node next; - - } -} diff --git a/group12/495473393/Coding/src/Base/Queue.java b/group12/495473393/Coding/src/Base/Queue.java deleted file mode 100644 index 9c2948d7e3..0000000000 --- a/group12/495473393/Coding/src/Base/Queue.java +++ /dev/null @@ -1,19 +0,0 @@ -package Base; - -public class Queue { - - public void enQueue(Object o){ - } - - public Object deQueue(){ - return null; - } - - public boolean isEmpty(){ - return false; - } - - public int size(){ - return -1; - } -} diff --git a/group12/495473393/coderising/array/ArrayUtil.java b/group12/495473393/coderising/array/ArrayUtil.java deleted file mode 100644 index e5ddb476a6..0000000000 --- a/group12/495473393/coderising/array/ArrayUtil.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.coderising.array; - -public class ArrayUtil { - - /** - * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 - 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] - 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] - * @param origin - * @return - */ - public void reverseArray(int[] origin){ - - } - - /** - * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} - * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 - * {1,3,4,5,6,6,5,4,7,6,7,5} - * @param oldArray - * @return - */ - - public int[] removeZero(int[] oldArray){ - return null; - } - - /** - * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 - * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 - * @param array1 - * @param array2 - * @return - */ - - public int[] merge(int[] array1, int[] array2){ - return null; - } - /** - * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size - * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 - * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 - * [2,3,6,0,0,0] - * @param oldArray - * @param size - * @return - */ - public int[] grow(int [] oldArray, int size){ - return null; - } - - /** - * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 - * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] - * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] - * @param max - * @return - */ - public int[] fibonacci(int max){ - return null; - } - - /** - * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 - * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] - * @param max - * @return - */ - public int[] getPrimes(int max){ - return null; - } - - /** - * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 - * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 - * @param max - * @return - */ - public int[] getPerfectNumbers(int max){ - return null; - } - - /** - * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 - * 渚嬪array= [3,8,9], seperator = "-" - * 鍒欒繑鍥炲间负"3-8-9" - * @param array - * @param s - * @return - */ - public String join(int[] array, String seperator){ - return null; - } - - -} From 371b0746dfa690a8f18f4a174f957605326100f2 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Wed, 1 Mar 2017 00:42:04 +0800 Subject: [PATCH 029/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/coderising/array/ArrayUtil.java | 139 ++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 +++++ .../src/coderising/litestruts/Struts.java | 34 +++++ .../src/coderising/litestruts/StrutsTest.java | 43 ++++++ .../src/coderising/litestruts/View.java | 23 +++ .../src/coderising/litestruts/struts.xml | 11 ++ 6 files changed, 289 insertions(+) create mode 100644 group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java create mode 100644 group08/1144989424/secondPractice/src/coderising/litestruts/LoginAction.java create mode 100644 group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java create mode 100644 group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java create mode 100644 group08/1144989424/secondPractice/src/coderising/litestruts/View.java create mode 100644 group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml diff --git a/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java b/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..8d11e10982 --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java @@ -0,0 +1,139 @@ +package coderising.array; + +import java.util.ArrayList; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public int[] reverseArray(int[] origin){ + int length = origin.length; + int loopNumber = length/2; + int temp; + for(int i = 0; i < loopNumber; i++){ + temp = origin[i]; + origin[i] = origin[length - 1 - i]; + origin[length -1 -i] = temp; + } + return origin; + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + ArrayList list = new ArrayList(); + for(int i = 0,j = 0; i < oldArray.length; i++){ + if(oldArray[i] != 0){ + list.add(oldArray[i]); + } + } + Object[] objectArray = list.toArray(); + int[] newArray = new int[objectArray.length]; + for(int i = 0; i < objectArray.length; i++){ + newArray[i] = (int)objectArray[i]; + } + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int [] newArray = new int[array1.length + array2.length]; + int i = 0,j = 0,k = 0; + //鍙煡閬撳惊鐜殑缁堟鏉′欢鏄紝鏁扮粍1閬嶅巻瀹岋紝鍚屾椂鏁扮粍2閬嶅巻瀹 + while(i < array1.length){ + while(j < array2.length){ + if(array1[i] < array2[j]){ + newArray[k++] = array1[i]; + i++; + }else if(array1[i] == array2[j]){ + //杩欑姣旇緝鐩哥瓑鏂规硶涓紝array1鍜宎rray2涓や釜鏁扮粍涓紝鏈韩涓嶈兘鏈夐噸澶嶆暟瀛楋紝鍚﹀垯鏂扮殑鏁扮粍浠嶆湁閲嶅. + newArray[k++] = array1[i]; + i++; + j++; + }else if(array1[i] > array2[j]){ + newArray[k++] = array2[j]; + j++; + } + } + //杩欑鎯呭喌鏄负浜嗛槻姝㈡寰幆锛屽嵆锛屽綋鏁扮粍1鏈亶鍘嗗畬锛屾暟缁2閬嶅巻瀹屾椂锛屽唴寰幆涓嶄細杩涘叆锛屽寰幆涔熶笉浼氬嚭鍘绘椂锛 + //姝ゆ椂锛屾暟缁1鐨勬渶鍚庝竴涓暟瀛楄偗瀹氭瘮鏁扮粍2澶э紝骞朵笖锛岃繖绉嶆儏鍐典笉浼氬瓨鍦ㄦ暟缁2鐨勬渶鍚庝竴涓暟瀛楁瘮鏁扮粍1澶ф椂銆 + newArray[k++] = array1[i++]; + } + return newArray; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/LoginAction.java b/group08/1144989424/secondPractice/src/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..c528df798a --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..b3570c4a26 --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java b/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..257f3d5a89 --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/View.java b/group08/1144989424/secondPractice/src/coderising/litestruts/View.java new file mode 100644 index 0000000000..22fdf877d8 --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..a6cfe43e6c --- /dev/null +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 2bbaec8cc749ad8233df36ebfaa4c93b3791d09f Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Wed, 1 Mar 2017 07:38:03 +0800 Subject: [PATCH 030/646] Structs half done --- group12/382266293/.classpath | 1 + .../382266293/coding/basic/util/Print.java | 2 +- .../coding/basic/util/XMLreader.java | 51 +++++++ group12/382266293/src/TestDom4J.java | 59 -------- .../coderising/action}/LoginAction.java | 2 +- group12/382266293/src/litestruts/Struts.java | 139 +++++++++++++++++- .../382266293/src/litestruts/StrutsTest.java | 6 +- group12/382266293/src/litestruts/struts.xml | 4 +- 8 files changed, 196 insertions(+), 68 deletions(-) create mode 100644 group12/382266293/coding/basic/util/XMLreader.java delete mode 100644 group12/382266293/src/TestDom4J.java rename group12/382266293/src/{litestruts => com/coderising/action}/LoginAction.java (92%) diff --git a/group12/382266293/.classpath b/group12/382266293/.classpath index 97b7b051d0..300ed0c62f 100644 --- a/group12/382266293/.classpath +++ b/group12/382266293/.classpath @@ -5,5 +5,6 @@ + diff --git a/group12/382266293/coding/basic/util/Print.java b/group12/382266293/coding/basic/util/Print.java index 81b5cf539e..403339f9aa 100644 --- a/group12/382266293/coding/basic/util/Print.java +++ b/group12/382266293/coding/basic/util/Print.java @@ -12,7 +12,7 @@ public static void println(Object o){ System.out.println(o); } - public static void printArr(int[] arr) { + public static void printArr(Object[] arr) { println(Arrays.toString(arr)); } diff --git a/group12/382266293/coding/basic/util/XMLreader.java b/group12/382266293/coding/basic/util/XMLreader.java new file mode 100644 index 0000000000..b7a345f7e6 --- /dev/null +++ b/group12/382266293/coding/basic/util/XMLreader.java @@ -0,0 +1,51 @@ +package util; +import java.net.URL; +import java.util.Iterator; +import java.util.List; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; + +import static util.Print.*; + +public class XMLreader { + + private static String address = "src/litestruts/struts.xml"; + + public Document parse(String add) throws DocumentException { + SAXReader reader = new SAXReader(); + Document document = reader.read(add); + return document; + } + + public String parseClass(String attr) { + + Document doc = null; + try { + doc = parse(address); + } catch (DocumentException e1) { + e1.printStackTrace(); + } + + Node root = doc.getRootElement(); + List list = root.selectNodes("action[@name='" + attr + "']"); + String clazz = null; + for(Object o:list){ + Element e = (Element) o; + clazz=e.attributeValue("class"); + System.out.println("class = " + clazz); + } + return clazz; + } + + public static void main(String args[]) throws DocumentException { + XMLreader reader = new XMLreader(); + reader.parseClass("login"); + + } + +} diff --git a/group12/382266293/src/TestDom4J.java b/group12/382266293/src/TestDom4J.java deleted file mode 100644 index b5dabfcc0c..0000000000 --- a/group12/382266293/src/TestDom4J.java +++ /dev/null @@ -1,59 +0,0 @@ -import java.net.URL; -import java.util.Iterator; -import java.util.List; - -import org.dom4j.Attribute; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Element; -import org.dom4j.Node; -import org.dom4j.io.SAXReader; - -import static util.Print.*; - -public class TestDom4J { - - public Document parse(String add) throws DocumentException { - SAXReader reader = new SAXReader(); - Document document = reader.read(add); - return document; - } - - - - public void bar(Document document) { - List list = document.selectNodes( "/struts-config/action-mappings/action" ); - Node node = document.selectSingleNode( "/struts-config/action-mappings/action/forward" ); - - String name = node.valueOf( "@name" ); - println(name); - } - - public void listNodes(Element node){ - System.out.println("褰撳墠鑺傜偣鐨勫悕绉帮細" + node.getName()); - //棣栧厛鑾峰彇褰撳墠鑺傜偣鐨勬墍鏈夊睘鎬ц妭鐐 - List list = node.attributes(); - //閬嶅巻灞炴ц妭鐐 - for(Attribute attribute : list){ - System.out.println("灞炴"+attribute.getName() +":" + attribute.getValue()); - } - //濡傛灉褰撳墠鑺傜偣鍐呭涓嶄负绌猴紝鍒欒緭鍑 - if(!(node.getTextTrim().equals(""))){ - System.out.println( node.getName() + "锛" + node.getText()); - } - //鍚屾椂杩唬褰撳墠鑺傜偣涓嬮潰鐨勬墍鏈夊瓙鑺傜偣 - //浣跨敤閫掑綊 - Iterator iterator = node.elementIterator(); - while(iterator.hasNext()){ - Element e = iterator.next(); - listNodes(e); - } - } - - public static void main(String args[]) throws DocumentException { - - - - } - -} diff --git a/group12/382266293/src/litestruts/LoginAction.java b/group12/382266293/src/com/coderising/action/LoginAction.java similarity index 92% rename from group12/382266293/src/litestruts/LoginAction.java rename to group12/382266293/src/com/coderising/action/LoginAction.java index c37c250014..b1224eb80d 100644 --- a/group12/382266293/src/litestruts/LoginAction.java +++ b/group12/382266293/src/com/coderising/action/LoginAction.java @@ -1,4 +1,4 @@ -package litestruts; +package com.coderising.action; /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java index f26fa8d8b7..088e88fdec 100644 --- a/group12/382266293/src/litestruts/Struts.java +++ b/group12/382266293/src/litestruts/Struts.java @@ -1,12 +1,26 @@ package litestruts; +import static util.Print.println; + +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.MethodDescriptor; +import java.beans.PropertyDescriptor; +import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; import java.util.Map; +import util.XMLreader; + public class Struts { - public static View runAction(String actionName, Map parameters) { + static Object actionObj; + static Object viewObj; + + public static View runAction(String actionName, Map parameters) throws IntrospectionException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { /* @@ -25,10 +39,129 @@ public static View runAction(String actionName, Map parameters) { 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + View view = Struts.runAction(actionName,params); + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + */ - return null; - } + XMLreader reader = new XMLreader(); + String clazz = reader.parseClass(actionName); + + actionObj = getObj(clazz); + + setParams(actionObj,parameters); + invoke(actionObj,"execute"); + + Map viewParams = getViewParams(actionObj); + println(viewParams); + viewObj = getObj("litestruts.View"); + + setParams(viewObj,viewParams); + + return (View) viewObj; + } + + + private static Object getObj(String clazz) { + Class cls = null; + try { + cls = Class.forName(clazz); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + try { + return cls.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + return cls; + } + + + public static Map getViewParams (Object obj) { + + PropertyDescriptor[] pd0 = getPropertyDescriptor(obj); + Map viewParams = new HashMap(); + + for (int i = 0; i < pd0.length; i++) { + String readMethod = pd0[i].getReadMethod().getName().substring(3); + String value = null; + try { + value = (String) pd0[i].getReadMethod().invoke(obj); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + viewParams.put(readMethod.toLowerCase(), value); + } + return viewParams; + } + + + private static PropertyDescriptor[] getPropertyDescriptor(Object obj) { + + BeanInfo bi0 = getBeanInfo(obj); + PropertyDescriptor[] pd0 = bi0.getPropertyDescriptors(); + return pd0; + } + + private static BeanInfo getBeanInfo(Object obj) { + + BeanInfo bi0 = null; + try { + bi0 = Introspector.getBeanInfo(obj.getClass(), Object.class); + } catch (IntrospectionException e) { + e.printStackTrace(); + } + return bi0; + } + + private static void setParams(Object pb0, Map parameters) { + + PropertyDescriptor[] pd0 = getPropertyDescriptor(pb0); + + for (int i = 0; i < pd0.length; i++) { + String name = pd0[i].getName(); + if(parameters.containsKey(name)) + try { + pd0[i].getWriteMethod().invoke(pb0,parameters.get(name)); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + } + + private static void invoke(Object obj, String execute) { + BeanInfo bi0 = getBeanInfo(obj); + MethodDescriptor[] methods = bi0.getMethodDescriptors(); + for (int i = 0; i < methods.length; i++) { + String methodName = methods[i].getName(); + if(methodName.equals(execute)) + try { + println(methods[i].getMethod().invoke(actionObj)); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + } + + + public static void main(String args[]) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException { + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + View view = runAction("login",params); + println(view.getParameters()); + + } } \ No newline at end of file diff --git a/group12/382266293/src/litestruts/StrutsTest.java b/group12/382266293/src/litestruts/StrutsTest.java index e08fab55c9..67893b9f3b 100644 --- a/group12/382266293/src/litestruts/StrutsTest.java +++ b/group12/382266293/src/litestruts/StrutsTest.java @@ -1,5 +1,7 @@ package litestruts; +import java.beans.IntrospectionException; +import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; @@ -13,7 +15,7 @@ public class StrutsTest { @Test - public void testLoginActionSuccess() { + public void testLoginActionSuccess() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException { String actionName = "login"; @@ -29,7 +31,7 @@ public void testLoginActionSuccess() { } @Test - public void testLoginActionFailed() { + public void testLoginActionFailed() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException { String actionName = "login"; Map params = new HashMap(); params.put("name","test"); diff --git a/group12/382266293/src/litestruts/struts.xml b/group12/382266293/src/litestruts/struts.xml index 99063bcb0c..fb0c2be3de 100644 --- a/group12/382266293/src/litestruts/struts.xml +++ b/group12/382266293/src/litestruts/struts.xml @@ -5,7 +5,7 @@ /jsp/showLogin.jsp - /jsp/welcome.jsp - /jsp/error.jsp + /jsp/welcome.jsp + /jsp/error.jsp \ No newline at end of file From 47f11b37b9da1dfe0ac02c7d45bb9b7ba8b7e9d4 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Wed, 1 Mar 2017 07:40:23 +0800 Subject: [PATCH 031/646] ignore file updaet --- group12/382266293/lib/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/group12/382266293/lib/.gitignore b/group12/382266293/lib/.gitignore index 3d08860a86..edf7850106 100644 --- a/group12/382266293/lib/.gitignore +++ b/group12/382266293/lib/.gitignore @@ -1 +1,3 @@ /dom4j-1.6.1.zip +/jaxen-1.1-beta-6.jar +/dom4j-1.6.1.jar From b0bfb33cd3b56bc8efe0b271a406b3ed850e82b3 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Wed, 1 Mar 2017 12:57:51 +0800 Subject: [PATCH 032/646] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BD=8D=E5=9B=BE?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/array/ArrayUtil.java | 29 +++++++++++++++++++ .../com/coderising/array/ArrayUtilTest.java | 5 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java b/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java index fe8f130afb..3f41a350e8 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java +++ b/group12/2258659044/zj-2017/src/com/coderising/array/ArrayUtil.java @@ -93,6 +93,35 @@ private int[] duplicate(int[] array){ return removeZero(array); } + /** + * 浣嶅浘娉曞悎骞 + * @param array1 + * @param array2 + * @return + */ + public int[] merge2(int[] array1, int[] array2){ + + int bitSize = 0; + int a = array1[array1.length-1] ; + int b = array2[array2.length-1]; + bitSize =(a>b)?a:b; + boolean[] bitmap = new boolean[bitSize+1]; + for (int i = 0; i < array1.length; i++) { + bitmap[array1[i]]=true; + } + for (int i = 0; i < array2.length; i++) { + bitmap[array2[i]]=true; + } + + ArrayList ls = new ArrayList(); + for (int i = 0; i < bitmap.length; i++) { + if(bitmap[i]==true){ + ls.add(i); + } + } + return objList2int(ls); + } + /** * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java index 7eae6540bf..ea04dbbf3b 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/array/ArrayUtilTest.java @@ -34,8 +34,9 @@ public void testMerge() { int[] a1 = {3, 5, 7,8}; int[] a2 = {4, 5, 6,7}; - int[] assertArray = {3,4,5,6,7,8}; - int[] a3 = au.merge(a1, a2); + int[] assertArray = {3,4,5,6,7,8}; + //int[] a3 = au.merge(a1, a2); + int[] a3 = au.merge2(a1, a2); assertResult(assertArray,a3); } From d5e7382bcbb4f8cfe41e68dc07bfe7cae5b47f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Wed, 1 Mar 2017 14:36:45 +0800 Subject: [PATCH 033/646] =?UTF-8?q?.=E5=AE=9E=E7=8E=B0=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E4=BC=BC=E4=BA=8Estruts=E7=9A=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C,=20=E9=80=9A=E8=BF=87JUnit=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../03-05/com/coderising/Struts.java | 198 ++++++++++++++++++ .../03-05/com/coderising/StrutsTest.java | 43 ++++ .../1425809544/03-05/com/coderising/View.java | 34 +++ .../com/coderising/action/LoginAction.java | 39 ++++ .../03-05/com/coderising/struts.xml | 12 ++ 5 files changed, 326 insertions(+) create mode 100644 group08/1425809544/03-05/com/coderising/Struts.java create mode 100644 group08/1425809544/03-05/com/coderising/StrutsTest.java create mode 100644 group08/1425809544/03-05/com/coderising/View.java create mode 100644 group08/1425809544/03-05/com/coderising/action/LoginAction.java create mode 100644 group08/1425809544/03-05/com/coderising/struts.xml diff --git a/group08/1425809544/03-05/com/coderising/Struts.java b/group08/1425809544/03-05/com/coderising/Struts.java new file mode 100644 index 0000000000..81e6758c4d --- /dev/null +++ b/group08/1425809544/03-05/com/coderising/Struts.java @@ -0,0 +1,198 @@ +package com.coderising; + + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.*; + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + String actionClass = ""; + View view = null; + Element element = null; + File f = new File("src\\com\\coderising\\struts.xml"); + DocumentBuilder db = null; + DocumentBuilderFactory dbf = null; + //瀛樻斁result + Map returnResult = new HashMap<>(); + try { + dbf = DocumentBuilderFactory.newInstance(); + db = dbf.newDocumentBuilder(); + + //寰楀埌涓涓狣OM骞惰繑鍥炵粰document瀵硅薄 + Document dt = db.parse(f); + //寰楀埌涓涓猠lment鏍瑰厓绱 + element = dt.getDocumentElement(); + // 鑾峰緱鏍硅妭鐐 + System.out.println("鏍瑰厓绱狅細" + element.getNodeName()); + NodeList childNodes = element.getChildNodes(); +// 瀛樻斁action + List> actionList = new ArrayList<>(); + + + //閬嶅巻鑺傜偣action, + for (int i = 0; i < childNodes.getLength(); i++) { + //鑾峰彇姣忎竴鏉¤妭鐐规潯鐩 + Node node1 = childNodes.item(i); + Map actionMap = new HashMap<>(); + if ("action".equals(node1.getNodeName())) { + String actionClass1 = node1.getAttributes().getNamedItem("class").getNodeValue(); + String actionName1 = node1.getAttributes().getNamedItem("name").getNodeValue(); + //鏀惧叆key=name,value=class + actionMap.put(actionName1, actionClass1); + //濡傛灉action-name == login + if (actionName.equals(actionName1)) { + //鑾峰彇瀛愯妭鐐归泦鍚 + NodeList nodeDetail = node1.getChildNodes(); + //閬嶅巻action鐨勫瓙鑺傜偣resutlt + for (int j = 0; j < nodeDetail.getLength(); j++) { + //鑾峰彇姣忎竴鏉¤妭鐐 + Node detail = nodeDetail.item(j); +// 鍒ゆ柇鑺傜偣鍚嶅瓧鏄惁涓簉esult + if ("result".equals(detail.getNodeName())) { + String resultName = detail.getAttributes().getNamedItem("name").getNodeValue(); + String resultValue = detail.getTextContent(); + returnResult.put(resultName, resultValue); + } + } + } + //鎶奱ction鍔犲叆list, + actionList.add(actionMap); + } + } + for (Map i : actionList) { + if (i.containsKey(actionName)){ + actionClass = i.get(actionName); + } + } + + System.out.println("璇诲彇xml鏂囦欢鑾峰彇绫荤殑鍏ㄥ悕涓猴細"+actionClass); + } catch (Exception e) { + e.printStackTrace(); + } + + + try { + //鑾峰彇绫 + Class clazz = Class.forName(actionClass); + System.out.println("閫氳繃鍙嶅皠鑾峰彇鑾峰彇绫伙細" + clazz); + //鍒涘缓瀵硅薄 + Object instance = clazz.newInstance();//璋冪敤鏃犲弬鏁版瀯閫犳柟娉 + System.out.println("鍙嶅皠瀹炰緥鍖栫被鐨勫璞′负锛" + instance); + //鑾峰彇灞炴 + Field[] fs = clazz.getDeclaredFields(); + //鐢ㄤ簬瀛樺偍灞炴 + StringBuffer sb = new StringBuffer(); + //杩藉姞鏈澶栭潰鐨勫畾涔 + sb.append(Modifier.toString(clazz.getModifiers()) + " class " + clazz.getSimpleName() + "{\n"); + for (Field field : fs) { + sb.append("\t"); + sb.append(Modifier.toString(field.getModifiers()) + " ");//灞炴х殑淇グ绗 public/static + sb.append(field.getType().getSimpleName() + " ");//灞炴х殑绫诲瀷鐨勫悕瀛 + sb.append(field.getName() + ";\n");//灞炴х殑鍚嶅瓧 + } + sb.append("}"); + System.out.println(sb); + + Method[] methods = clazz.getDeclaredMethods(); + if (!parameters.isEmpty() && parameters.size() > 0) { + Set nameSet = parameters.keySet(); + for (Method method : methods) { + String name = method.getName(); + if (name.startsWith("set")) { + String keyName = name.substring(3);//鎴彇set鍚庨潰鐨勫瓧绗︿覆 + keyName = keyName.substring(0, 1).toLowerCase() + keyName.substring(1); + System.out.println("鑾峰彇set鏂规硶涓殑灞炴:\t"+keyName); + if (nameSet.contains(keyName)) { + //杩涜璧嬪兼搷浣 + method.invoke(instance, parameters.get(keyName)); + } + } + } + + String result = "";//杩斿洖鍊硷紝纭鐧婚檰鎴愬姛杩樻槸澶辫触 + String viewJsp = "";//鍏宠仈鐨勮鍥 + //閬嶅巻鎵鏈夌殑鏂规硶 + for (Method method1 : methods) { + String name = method1.getName(); + //鑾峰彇鏂规硶鍚嶄负execute鐨 + if (name.equals("execute")) { + result = (String) method1.invoke(instance); + + } + } + System.out.println("娴嬭瘯鐧诲綍鎴愬姛鎴栧け璐ワ細\t"+result);//杩斿洖鍊硷紝纭鐧婚檰鎴愬姛杩樻槸澶辫触 +// 瀛樺叆鎴愬憳鍙橀噺鐨勫 + Map classAttrMap = new HashMap<>(); + //閫氳繃get鏂规硶鑾峰彇鎴愬憳灞炴 + for (Method method2 : methods) { + String name = method2.getName(); + if (name.startsWith("get")) { + String keyName = name.substring(3); + keyName = keyName.substring(0, 1).toLowerCase() + keyName.substring(1); + System.out.println("鑾峰彇鍏锋湁get鏂规硶鐨勫睘鎬"+keyName); + //鑾峰緱鍊 + String value = (String) method2.invoke(instance); + classAttrMap.put(keyName, value); + } + } + System.out.println(classAttrMap.get("name") +"\t"+ classAttrMap.get("password") +"\t"+ classAttrMap.get("message")); + + view = new View(); + + Set keySet = returnResult.keySet(); + if (keySet.contains(result)){ + viewJsp = returnResult.get(result); + view.setJsp(viewJsp); + view.setParameters(classAttrMap); + } + System.out.println(view.toString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return view; + } + + + public static void main(String[] args) { + + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "1234"); + Struts struts = new Struts(); + struts.runAction("login", params); + + } + +} diff --git a/group08/1425809544/03-05/com/coderising/StrutsTest.java b/group08/1425809544/03-05/com/coderising/StrutsTest.java new file mode 100644 index 0000000000..3287ad8410 --- /dev/null +++ b/group08/1425809544/03-05/com/coderising/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/1425809544/03-05/com/coderising/View.java b/group08/1425809544/03-05/com/coderising/View.java new file mode 100644 index 0000000000..9d71d39ef8 --- /dev/null +++ b/group08/1425809544/03-05/com/coderising/View.java @@ -0,0 +1,34 @@ +package com.coderising; + +import java.util.Map; + +public class View { + private String jsp; + + + + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } + + @Override + public String toString() { + return "View{" + + "jsp='" + jsp + '\'' + + ", parameters=" + parameters + + '}'; + } +} diff --git a/group08/1425809544/03-05/com/coderising/action/LoginAction.java b/group08/1425809544/03-05/com/coderising/action/LoginAction.java new file mode 100644 index 0000000000..5496d8084d --- /dev/null +++ b/group08/1425809544/03-05/com/coderising/action/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.action; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group08/1425809544/03-05/com/coderising/struts.xml b/group08/1425809544/03-05/com/coderising/struts.xml new file mode 100644 index 0000000000..dca763845d --- /dev/null +++ b/group08/1425809544/03-05/com/coderising/struts.xml @@ -0,0 +1,12 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From dd2085c6b2faee4ba3b457347b5a21d2e1e1b23f Mon Sep 17 00:00:00 2001 From: maishihang <446031103@qq.com> Date: Wed, 1 Mar 2017 15:22:16 +0800 Subject: [PATCH 034/646] ArrayUtil complete ArrayUtil complete --- .../src/com/coderising/array/ArrayUtil.java | 113 ++++++++++++++---- .../com/coderising/array/ArrayUtilTest.java | 53 +++++++- 2 files changed, 138 insertions(+), 28 deletions(-) diff --git a/group12/446031103/src/com/coderising/array/ArrayUtil.java b/group12/446031103/src/com/coderising/array/ArrayUtil.java index fbbe3c1c89..751de62bcf 100644 --- a/group12/446031103/src/com/coderising/array/ArrayUtil.java +++ b/group12/446031103/src/com/coderising/array/ArrayUtil.java @@ -1,6 +1,8 @@ package com.coderising.array; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class ArrayUtil { @@ -12,6 +14,7 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin){ + //寰幆缁撴潫浣嶇疆 int end = origin.length-1; int temp ; for (int i = 0; i < end; i++,end--) { @@ -29,14 +32,16 @@ public void reverseArray(int[] origin){ * @return */ - public int[] removeZero(int[] oldArray){ + public int[] removeZero(int[] oldArray){ + //0鐨勪釜鏁 int zeroCnt = 0; for (int i : oldArray) { if(0==i){ zeroCnt++; } - } + } + //瀛樻斁浣嶇疆璁板綍 int size = 0; int [] result = new int[oldArray.length-zeroCnt]; for (int i : oldArray) { @@ -57,22 +62,31 @@ public int[] removeZero(int[] oldArray){ * @return */ - public int[] merge(int[] array1, int[] array2){ - int repetition = 0; - for (int i : array2) { - if(Arrays.asList(array1).contains(i)) - repetition++; + public int[] merge(int[] array1, int[] array2){ + //鍚堟嫾鏁扮粍锛岀己鎺掑簭锛岀己鍘婚噸 + int [] temp = new int[array1.length+array2.length]; + System.arraycopy(array1, 0, temp, 0, array1.length); + System.arraycopy(array2, 0, temp, array1.length, array2.length); + List resultList= new ArrayList(); + for (int i : temp) { + if(!resultList.contains(i)) + resultList.add(i); } - int [] result =Arrays.copyOf(array1, array1.length+array2.length-repetition); - int size = 0; - for (int i = 0; i < array2.length; i++) { - int temp=array2[i]; - if(!Arrays.asList(array1).contains(temp)){ - result[array1.length+size]=temp; - size++; + //宸插幓閲嶆暟缁勶紝缂烘帓搴 + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + //鍐掓场鎺掑簭 + for (int i = 0; i < result.length-1; i++) { + for (int j = 0; j < result.length-i-1; j++) { + if(result[j]>result[j+1]){ + int tempInt = result[j]; + result[j] =result[j+1]; + result[j+1] = tempInt; + } } - - } + } return result; } /** @@ -85,7 +99,7 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ - return null; + return Arrays.copyOf(oldArray, oldArray.length+size); } /** @@ -96,7 +110,16 @@ public int[] grow(int [] oldArray, int size){ * @return */ public int[] fibonacci(int max){ - return null; + int first =0; + int second = 1; + List resultList= new ArrayList(); + if(max!=second) + add(first,second,max,resultList); + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -106,7 +129,23 @@ public int[] fibonacci(int max){ * @return */ public int[] getPrimes(int max){ - return null; + List resultList= new ArrayList(); + for (int i = 2; i < max; i++) { + boolean isAdd = true; + for (int j = 2; j < i; j++) { + if(0==i%j){ + isAdd = false; + break; + } + } + if(isAdd) + resultList.add(i); + } + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -116,7 +155,22 @@ public int[] getPrimes(int max){ * @return */ public int[] getPerfectNumbers(int max){ - return null; + List resultList= new ArrayList(); + for (int i = 1; i < max; i++) { + int temp = 0; + for (int j = 1; j < i; j++) { + if(0==i%j){ + temp+=j; + } + } + if(i==temp) + resultList.add(i); + } + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -128,8 +182,23 @@ public int[] getPerfectNumbers(int max){ * @return */ public String join(int[] array, String seperator){ - return null; + return Arrays.toString(array).replace("[", "").replace("]", "").replace(", ", seperator); } - + /** + * + * @param number1 + * @param number2 + * @param max + * @param resultList + * @return + */ + public List add(int number1,int number2,int max,List resultList){ + if(number2 Date: Wed, 1 Mar 2017 15:31:29 +0800 Subject: [PATCH 035/646] Revert "ArrayUtil complete" This reverts commit dd2085c6b2faee4ba3b457347b5a21d2e1e1b23f. --- .../src/com/coderising/array/ArrayUtil.java | 113 ++++-------------- .../com/coderising/array/ArrayUtilTest.java | 53 +------- 2 files changed, 28 insertions(+), 138 deletions(-) diff --git a/group12/446031103/src/com/coderising/array/ArrayUtil.java b/group12/446031103/src/com/coderising/array/ArrayUtil.java index 751de62bcf..fbbe3c1c89 100644 --- a/group12/446031103/src/com/coderising/array/ArrayUtil.java +++ b/group12/446031103/src/com/coderising/array/ArrayUtil.java @@ -1,8 +1,6 @@ package com.coderising.array; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; public class ArrayUtil { @@ -14,7 +12,6 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin){ - //寰幆缁撴潫浣嶇疆 int end = origin.length-1; int temp ; for (int i = 0; i < end; i++,end--) { @@ -32,16 +29,14 @@ public void reverseArray(int[] origin){ * @return */ - public int[] removeZero(int[] oldArray){ - //0鐨勪釜鏁 + public int[] removeZero(int[] oldArray){ int zeroCnt = 0; for (int i : oldArray) { if(0==i){ zeroCnt++; } - } - //瀛樻斁浣嶇疆璁板綍 + } int size = 0; int [] result = new int[oldArray.length-zeroCnt]; for (int i : oldArray) { @@ -62,31 +57,22 @@ public int[] removeZero(int[] oldArray){ * @return */ - public int[] merge(int[] array1, int[] array2){ - //鍚堟嫾鏁扮粍锛岀己鎺掑簭锛岀己鍘婚噸 - int [] temp = new int[array1.length+array2.length]; - System.arraycopy(array1, 0, temp, 0, array1.length); - System.arraycopy(array2, 0, temp, array1.length, array2.length); - List resultList= new ArrayList(); - for (int i : temp) { - if(!resultList.contains(i)) - resultList.add(i); - } - //宸插幓閲嶆暟缁勶紝缂烘帓搴 - int [] result = new int[resultList.size()]; - for (int i = 0; i < resultList.size(); i++) { - result[i] = resultList.get(i); + public int[] merge(int[] array1, int[] array2){ + int repetition = 0; + for (int i : array2) { + if(Arrays.asList(array1).contains(i)) + repetition++; } - //鍐掓场鎺掑簭 - for (int i = 0; i < result.length-1; i++) { - for (int j = 0; j < result.length-i-1; j++) { - if(result[j]>result[j+1]){ - int tempInt = result[j]; - result[j] =result[j+1]; - result[j+1] = tempInt; - } + int [] result =Arrays.copyOf(array1, array1.length+array2.length-repetition); + int size = 0; + for (int i = 0; i < array2.length; i++) { + int temp=array2[i]; + if(!Arrays.asList(array1).contains(temp)){ + result[array1.length+size]=temp; + size++; } - } + + } return result; } /** @@ -99,7 +85,7 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ - return Arrays.copyOf(oldArray, oldArray.length+size); + return null; } /** @@ -110,16 +96,7 @@ public int[] grow(int [] oldArray, int size){ * @return */ public int[] fibonacci(int max){ - int first =0; - int second = 1; - List resultList= new ArrayList(); - if(max!=second) - add(first,second,max,resultList); - int [] result = new int[resultList.size()]; - for (int i = 0; i < resultList.size(); i++) { - result[i] = resultList.get(i); - } - return result; + return null; } /** @@ -129,23 +106,7 @@ public int[] fibonacci(int max){ * @return */ public int[] getPrimes(int max){ - List resultList= new ArrayList(); - for (int i = 2; i < max; i++) { - boolean isAdd = true; - for (int j = 2; j < i; j++) { - if(0==i%j){ - isAdd = false; - break; - } - } - if(isAdd) - resultList.add(i); - } - int [] result = new int[resultList.size()]; - for (int i = 0; i < resultList.size(); i++) { - result[i] = resultList.get(i); - } - return result; + return null; } /** @@ -155,22 +116,7 @@ public int[] getPrimes(int max){ * @return */ public int[] getPerfectNumbers(int max){ - List resultList= new ArrayList(); - for (int i = 1; i < max; i++) { - int temp = 0; - for (int j = 1; j < i; j++) { - if(0==i%j){ - temp+=j; - } - } - if(i==temp) - resultList.add(i); - } - int [] result = new int[resultList.size()]; - for (int i = 0; i < resultList.size(); i++) { - result[i] = resultList.get(i); - } - return result; + return null; } /** @@ -182,23 +128,8 @@ public int[] getPerfectNumbers(int max){ * @return */ public String join(int[] array, String seperator){ - return Arrays.toString(array).replace("[", "").replace("]", "").replace(", ", seperator); + return null; } - /** - * - * @param number1 - * @param number2 - * @param max - * @param resultList - * @return - */ - public List add(int number1,int number2,int max,List resultList){ - if(number2 Date: Wed, 1 Mar 2017 15:42:50 +0800 Subject: [PATCH 036/646] ArrayUtil complete ArrayUtil complete --- .../src/com/coderising/array/ArrayUtil.java | 101 +++++++++++++++--- .../com/coderising/array/ArrayUtilTest.java | 50 +++++++-- 2 files changed, 126 insertions(+), 25 deletions(-) diff --git a/group12/446031103/src/com/coderising/array/ArrayUtil.java b/group12/446031103/src/com/coderising/array/ArrayUtil.java index fbbe3c1c89..a771999a22 100644 --- a/group12/446031103/src/com/coderising/array/ArrayUtil.java +++ b/group12/446031103/src/com/coderising/array/ArrayUtil.java @@ -1,6 +1,8 @@ package com.coderising.array; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class ArrayUtil { @@ -58,21 +60,30 @@ public int[] removeZero(int[] oldArray){ */ public int[] merge(int[] array1, int[] array2){ - int repetition = 0; - for (int i : array2) { - if(Arrays.asList(array1).contains(i)) - repetition++; + //鍚堟嫾鏁扮粍锛岀己鎺掑簭锛岀己鍘婚噸 + int [] temp = new int[array1.length+array2.length]; + System.arraycopy(array1, 0, temp, 0, array1.length); + System.arraycopy(array2, 0, temp, array1.length, array2.length); + List resultList= new ArrayList(); + for (int i : temp) { + if(!resultList.contains(i)) + resultList.add(i); + }//宸插幓閲嶆暟缁勶紝缂烘帓搴 + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); } - int [] result =Arrays.copyOf(array1, array1.length+array2.length-repetition); - int size = 0; - for (int i = 0; i < array2.length; i++) { - int temp=array2[i]; - if(!Arrays.asList(array1).contains(temp)){ - result[array1.length+size]=temp; - size++; + //鍐掓场鎺掑簭 + for (int i = 0; i < result.length-1; i++) { + for (int j = 0; j < result.length-i-1; j++) { + if(result[j]>result[j+1]){ + int tempInt = result[j]; + result[j] =result[j+1]; + result[j+1] = tempInt; + } } - } + } return result; } /** @@ -85,7 +96,7 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ - return null; + return Arrays.copyOf(oldArray, oldArray.length+size); } /** @@ -96,7 +107,16 @@ public int[] grow(int [] oldArray, int size){ * @return */ public int[] fibonacci(int max){ - return null; + int first =0; + int second = 1; + List resultList= new ArrayList(); + if(max!=second) + add(first,second,max,resultList); + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -106,7 +126,23 @@ public int[] fibonacci(int max){ * @return */ public int[] getPrimes(int max){ - return null; + List resultList= new ArrayList(); + for (int i = 2; i < max; i++) { + boolean isAdd = true; + for (int j = 2; j < i; j++) { + if(0==i%j){ + isAdd = false; + break; + } + } + if(isAdd) + resultList.add(i); + } + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -116,7 +152,22 @@ public int[] getPrimes(int max){ * @return */ public int[] getPerfectNumbers(int max){ - return null; + List resultList= new ArrayList(); + for (int i = 1; i < max; i++) { + int temp = 0; + for (int j = 1; j < i; j++) { + if(0==i%j){ + temp+=j; + } + } + if(i==temp) + resultList.add(i); + } + int [] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** @@ -128,8 +179,24 @@ public int[] getPerfectNumbers(int max){ * @return */ public String join(int[] array, String seperator){ - return null; + return Arrays.toString(array).replace("[", "").replace("]", "").replace(", ", seperator); } + /** + * + * @param number1 + * @param number2 + * @param max + * @param resultList + * @return + */ + public List add(int number1,int number2,int max,List resultList){ + if(number2 Date: Wed, 1 Mar 2017 20:20:22 +0800 Subject: [PATCH 037/646] Create readme --- group08/1509102580/2.26/src/readme | 1 + 1 file changed, 1 insertion(+) create mode 100644 group08/1509102580/2.26/src/readme diff --git a/group08/1509102580/2.26/src/readme b/group08/1509102580/2.26/src/readme new file mode 100644 index 0000000000..3c84513d0e --- /dev/null +++ b/group08/1509102580/2.26/src/readme @@ -0,0 +1 @@ +浣滀笟1 From 1a55b9012b9871303acff36ed4ecb12a3936b470 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:21:46 +0800 Subject: [PATCH 038/646] Create aa --- group08/1509102580/2.26/aa | 1 + 1 file changed, 1 insertion(+) create mode 100644 group08/1509102580/2.26/aa diff --git a/group08/1509102580/2.26/aa b/group08/1509102580/2.26/aa new file mode 100644 index 0000000000..e61ef7b965 --- /dev/null +++ b/group08/1509102580/2.26/aa @@ -0,0 +1 @@ +aa From 742bd296b9b4af418b79c5c651f43aaed7e313aa Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:22:39 +0800 Subject: [PATCH 039/646] Delete ArrayList.java --- group08/1509102580/2.27/ArrayList.java | 103 ------------------------- 1 file changed, 103 deletions(-) delete mode 100644 group08/1509102580/2.27/ArrayList.java diff --git a/group08/1509102580/2.27/ArrayList.java b/group08/1509102580/2.27/ArrayList.java deleted file mode 100644 index 02af2fc04e..0000000000 --- a/group08/1509102580/2.27/ArrayList.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - - -public class ArrayList implements List { - - private int size = 0; - private int length = 100; - private Object[] elementData = new Object[length]; - - public void add(Object o){ - if(sizesize-1){ - return ; - }else{ - if(sizesize-1){ - return null; - }else{ - return elementData[index]; - } - } - - public Object remove(int index){ - if(index<0||index>size-1){ - return null; - }else{ - Object result = elementData[index]; - if(index+1==size){//鍗砳ndex鏄渶鍚庝竴涓厓绱 - elementData[index] = null; - size--; - return result; - }else{ - System.arraycopy(elementData, index+1, elementData, index, size-1-index); - size--; - return result; - } - } - } - - public int size(){ - return size; - } - - public Iterator iterator(){ - return new Iterator() { - int current = 0; - @Override - public Object next() { - // TODO Auto-generated method stub - if(current Date: Wed, 1 Mar 2017 20:23:03 +0800 Subject: [PATCH 040/646] Delete Iterator.java --- group08/1509102580/2.27/Iterator.java | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 group08/1509102580/2.27/Iterator.java diff --git a/group08/1509102580/2.27/Iterator.java b/group08/1509102580/2.27/Iterator.java deleted file mode 100644 index e30991a64a..0000000000 --- a/group08/1509102580/2.27/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} From d18d38fa9a6c48cfccb10412ec53d9d965ea5f6f Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:23:13 +0800 Subject: [PATCH 041/646] Delete LinkedList.java --- group08/1509102580/2.27/LinkedList.java | 196 ------------------------ 1 file changed, 196 deletions(-) delete mode 100644 group08/1509102580/2.27/LinkedList.java diff --git a/group08/1509102580/2.27/LinkedList.java b/group08/1509102580/2.27/LinkedList.java deleted file mode 100644 index bd97921dd8..0000000000 --- a/group08/1509102580/2.27/LinkedList.java +++ /dev/null @@ -1,196 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - if(head==null){ - head = new Node(); - head.data = o; - head.next = null; - }else{ - Node tmp = new Node(); - tmp.data = o; - tmp.next = head; - head = tmp; - } - } - public void add(int index , Object o){ - if(head==null){//濡傛灉head==null锛岃鏄庢牴鏈笉瀛樺湪杩欎釜閾捐〃锛屾墍浠ヤ笉鍙兘鎸囧畾涓涓猧ndex鏉ユ彃鍏ャ - return ; - }else{ - if(index<0){ - return; - }else{ - Node p = head; - int i = 0; - while(i Date: Wed, 1 Mar 2017 20:23:22 +0800 Subject: [PATCH 042/646] Delete List.java --- group08/1509102580/2.27/List.java | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 group08/1509102580/2.27/List.java diff --git a/group08/1509102580/2.27/List.java b/group08/1509102580/2.27/List.java deleted file mode 100644 index 10874d52a1..0000000000 --- a/group08/1509102580/2.27/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} From c4bbf2cda427d0fc1b881a8b377f055e72614886 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:23:53 +0800 Subject: [PATCH 043/646] Delete Queue.java --- group08/1509102580/2.27/Queue.java | 33 ------------------------------ 1 file changed, 33 deletions(-) delete mode 100644 group08/1509102580/2.27/Queue.java diff --git a/group08/1509102580/2.27/Queue.java b/group08/1509102580/2.27/Queue.java deleted file mode 100644 index 64426c4544..0000000000 --- a/group08/1509102580/2.27/Queue.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - -public class Queue { - ArrayList queue; - public Queue() { - // TODO Auto-generated constructor stub - queue = new ArrayList(); - } - public void enQueue(Object o){ - queue.add(o); - } - - public Object deQueue(){ - if(queue.size()==0){ - return null; - }else{ - Object result = queue.get(0); - queue.remove(0); - return result; - } - } - - public boolean isEmpty(){ - if(queue.size()==0) - return true; - else - return false; - } - - public int size(){ - return queue.size(); - } -} From 8ffe25b8917d366a269fc4c7ef95e2123534ddd9 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:24:02 +0800 Subject: [PATCH 044/646] Delete Stack.java --- group08/1509102580/2.27/Stack.java | 38 ------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 group08/1509102580/2.27/Stack.java diff --git a/group08/1509102580/2.27/Stack.java b/group08/1509102580/2.27/Stack.java deleted file mode 100644 index 13ce4461cc..0000000000 --- a/group08/1509102580/2.27/Stack.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.zzk.coding2017.zuoye_1; - -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ - elementData.add(o); - } - - public Object pop(){ - if(elementData.size()==0){ - return null; - } - else{ - Object result = elementData.get(elementData.size()-1); - elementData.remove(elementData.size()-1); - return result; - } - } - - public Object peek(){ - if(elementData.size()==0){ - return null; - } - else{ - return elementData.get(elementData.size()-1); - } - } - public boolean isEmpty(){ - if(elementData.size()==0) - return true; - else - return false; - } - public int size(){ - return elementData.size(); - } -} From 8b2fb28291b8a73a8e4ed47f8b263c7b531b66ce Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:24:13 +0800 Subject: [PATCH 045/646] =?UTF-8?q?Delete=20=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1509102580/2.27/\346\226\207\347\253\240" | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 "group08/1509102580/2.27/\346\226\207\347\253\240" diff --git "a/group08/1509102580/2.27/\346\226\207\347\253\240" "b/group08/1509102580/2.27/\346\226\207\347\253\240" deleted file mode 100644 index d1dd75f51f..0000000000 --- "a/group08/1509102580/2.27/\346\226\207\347\253\240" +++ /dev/null @@ -1,25 +0,0 @@ -CPU锛屽唴瀛橈紝纾佺洏锛屾寚浠や互鍙婁粬浠箣闂寸殑鍏崇郴 - -涓銆丆pu: -cpu鏄痗entral process unit鐨勭畝绉帮紝鏄绠楁満鐨勬牳蹇冨鐞嗗櫒銆侰pu鐨勪綔鐢ㄦ槸杩愯鏈哄櫒璇█鎸囦护銆傞珮绾ц瑷鍜屾眹缂栬瑷绋嬪簭琚紪璇戞垚cpu鑳界悊瑙g殑鏈哄櫒璇█鍚庯紝瀛樺叆鍒板唴瀛樹腑锛宑pu灏变細浠庡唴瀛樹腑璇诲彇骞舵墽琛岃繖浜涙寚浠ゅ簭鍒楋紝瀹屾垚绋嬪簭鍔熻兘銆 -鍖呮嫭鎺у埗鍣ㄣ佸瘎瀛樺櫒銆佽繍绠楀櫒銆佹椂閽熷洓涓儴鍒嗙粍鎴愩 -鍏朵腑杩愮畻鍣ㄦ槸鐢ㄦ潵璁$畻鐨勶紝 -瀵勫瓨鍣ㄦ槸涓存椂瀛樻斁涓棿鏁版嵁浠ュ強鎸囦护鐨勶紝鍖呮嫭绋嬪簭璁℃暟鍣ㄣ佹寚浠ゅ瘎瀛樺櫒銆佹暟鎹瘎瀛樺櫒銆佸湴鍧瀵勫瓨鍣ㄧ瓑銆 瀵勫瓨鍣ㄦ槸姹囩紪璇█鎵鐮旂┒鐨勫璞★紝姹囩紪璇█閫氳繃瀵瑰瘎瀛樺櫒鐨勬帶鍒讹紙鍐欏叆锛岃鍑猴紝鍔狅級锛屽疄鐜板姛鑳姐俥g锛 - -绗竴鍙モ斺斿璞★細eax瀵勫瓨鍣紱鍔ㄤ綔锛歮ov锛涚洰鐨勫湴锛氬唴瀛橈紙dword锛夛紱鍏蜂綋鍦板潃锛歟bp瀵勫瓨鍣ㄤ腑瀛樺偍鐨勫湴鍧銆 -绗簩鍙モ斺斿璞ax瀵勫瓨鍣紱鍔ㄤ綔锛歛dd锛涘弬鏁帮細鍐呭瓨涓殑鏁帮紱鍏蜂綋鍦板潃锛歟bp瀵勫瓨鍣ㄤ腑瀛樺偍鐨勫湴鍧銆 -绗笁鍙モ斺斿璞★細eax瀵勫瓨鍣紱鍔ㄤ綔锛歮ov锛涚洰鐨勫湴锛氬唴瀛橈紙dword锛夛紱鍏蜂綋鍦板潃锛歟bp瀵勫瓨鍣ㄤ腑瀛樺偍鐨勫湴鍧銆 -绋嬪簭璁℃暟鍣ㄧ殑浣滅敤鏄寚瀹氬綋鍓嶆墽琛屾寚浠ょ殑鍦板潃銆傞氳繃鏀瑰彉绋嬪簭璁℃暟鍣紝鍙互瀹炵幇绋嬪簭鐨勯昏緫鎺у埗銆備絾鏄紝铏界劧閫氳繃鏀瑰彉绋嬪簭璁℃暟鍣ㄧ殑鍊煎彲浠ュ疄鐜扮▼搴忚烦杞紝浣嗘槸鍗曠函閫氳繃鏀瑰彉绋嬪簭璁℃暟鍣ㄧ殑鍊煎嵈鏃犳硶瀹炵幇鍑芥暟璋冪敤銆傚洜涓鸿烦杞笉闇瑕佸洖鏉ワ紝鑰屽嚱鏁拌皟鐢ㄧ粨鏉熶箣鍚庤繕瑕佸洖鍒板師鎸囦护鐨勪笅涓鏉℃寚浠ゃ備负浜嗗疄鐜板嚱鏁拌皟鐢紝闇瑕佸皢绋嬪簭璁℃暟鍣ㄤ笌call/return鎸囦护缁撳悎浣跨敤銆備篃灏辨槸璇达紝鍦ㄥ嚱鏁拌皟鐢ㄦ椂锛屽湪鏀瑰彉绋嬪簭璁℃暟鍣ㄥ肩殑鍚屾椂锛岃繕瑕佽皟鐢╟all鎸囦护锛屽皢杩斿洖浣嶇疆鍐欏叆鏍堝唴瀛樹腑杩橀渶瑕佸湪琚皟鐢ㄥ嚱鏁扮殑鏈熬娣诲姞return鎸囦护锛岃繖鏍峰湪琚皟鐢ㄥ嚱鏁版墽琛岀粨鏉熷悗浼氱户缁墽琛宺eturn鎸囦护锛宺eturn鎸囦护浼氬皢绋嬪簭璁℃暟鍣ㄧ殑鍊艰缃负鏍堢殑鏈涓婅竟鐨勫硷紝涔熷氨鏄嚱鏁拌皟鐢ㄧ殑杩斿洖鍦板潃銆 -绋嬪簭璁℃暟鍣ㄥ拰鍐呭瓨鐨勫叧绯伙細绋嬪簭璁℃暟鍣ㄨ褰曚簡褰撳墠鎵ц鐨勬寚浠ゅ湪鍐呭瓨涓勾瀛樺偍鐨勪綅缃 -鎺у埗鍣ㄦ槸鐢ㄦ潵鎺у埗浣曟椂灏嗗唴瀛樼殑鏁版嵁鍙婃寚浠よ鍏ュ瘎瀛樺櫒锛屼綍鏃跺皢瀵勫瓨鍣ㄤ腑鐨勫艰緭鍑哄埌鍐呭瓨銆 -鏃堕挓鏄悓姝ュ悇涓儴浠朵箣闂寸殑姝ヨ皟銆 -浜屻佸唴瀛橈細 -鍐呭瓨鍙堝彨涓诲瓨锛屼笌cpu鐨勫瘎瀛樺櫒閾炬帴锛岀敤浜庡皢鏁版嵁浠ュ強鎸囦护杈撳叆鍒板瘎瀛樺櫒涓紱鍚屾椂涔熷彲浠ユ帴鍙楀瘎瀛樺櫒鐨勮緭鍑恒傛湰璐ㄦ槸浣滀负纾佺洏涓庡瘎瀛樺櫒鐨勪腑闂翠欢锛岃捣鍒扮紦鍐蹭綔鐢ㄣ傛柇鐢靛悗浼氫涪澶辨墍鏈夋暟鎹 -鍐呭瓨鍜岀鐩樼殑鍏崇郴锛氱敱浜庣鐩樼殑璇诲啓閫熷害涓巆pu鐩稿樊澶ぇ锛屽鏋渃pu鐩存帴浠庣鐩樹腑璇诲彇鏁版嵁锛屼細閫犳垚cpu璁$畻鑳藉姏鏋佸ぇ鐨勬氮璐广備负浜嗚В鍐宠繖涓棶棰橈紝鍦ㄧ鐩樹笌cpu涔嬮棿鍔犱竴涓唴瀛橈紝灏嗙鐩樺瓨鍌ㄧ殑绋嬪簭浠ュ強鏁版嵁绾胯鍏ュ唴瀛樹腑锛宑pu鐩存帴涓庡唴瀛樻墦浜ら亾銆傛澶栵紝鐢变簬鍐呭瓨鐨勭┖闂存瘮纾佺洏灏忓緢澶氾紝浼氬嚭鐜板唴瀛樹笉澶熺敤鐨勬儏鍐碉紝姝ゆ椂锛屼細灏嗕竴閮ㄥ垎纾佺洏褰撳仛鍐呭瓨鏉ヤ娇鐢紝涔熷氨鏄櫄鎷熷唴瀛樸 -涓夈佺鐩橈細 -瀛樻斁鏁版嵁鐨勶紝瀹归噺姣斿唴瀛樺ぇ锛岄熷害鎱€ -鏂數涓嶄細涓㈠け鏁版嵁銆 -鍥涖佹寚浠わ細 -鎸囦护鏄帶鍒禼pu鎸夌収涓瀹氬姛鑳借繍绠楃殑鏈哄櫒鐮併傛瘡涓绉峜pu鏈夎嚜宸辩殑涓濂楁寚浠ら泦銆傞珮绾ц瑷缂栧啓鐨勭▼搴忔渶缁堜篃瑕佺紪璇戞垚鍙互璁ヽpu鐞嗚В鐨勪竴鏉℃潯鏈哄櫒鎸囦护锛屾墠鑳借cpu鎵ц銆侰pu闄や簡鍙互璁$畻鏁版嵁浠ュ锛岃繕鍙互鎺у埗纭欢锛屾柟娉曟槸閫氳繃cpu瀵勫瓨鍣ㄤ笌I/O绔彛杩涜鏁版嵁浜ゆ崲銆傝绠楁満涓富鏈轰笌澶栧洿纭欢鐨勯摼鎺ユ柟寮忔槸閫氳繃I/O绔彛杩涜鐨勶紙绔彛鏄敤浜庝富鏈哄瘎瀛樺櫒涓庡鍥磋澶囦氦鎹㈡暟鎹椂涓存椂瀛樺偍鏁版嵁鐨勫瘎瀛樺櫒锛夈傛墍浠ワ紝鎸囦护閫氳繃鎺у埗cpu鐨勮緭鍑哄拰杈撳叆浣嶇疆锛屽彲浠ヨcpu瀵勫瓨鍣ㄥ悜I/O绔彛瀵勫瓨鍣ㄥ彂閫佹暟鎹紝澶栧洿璁惧閫氳繃涓嶪/O瀵勫瓨鍣ㄤ氦鎹㈡暟鎹紝浠庤岃揪鍒版帶鍒跺鍥磋澶囩殑鏁堟灉銆傝屾搷浣滅郴缁熺殑浣滅敤鏄皝瑁呬竴濂楁寚浠ゅ簭鍒楋紝cpu閫氳繃鎵ц杩欏鎸囦护搴忓垪锛屽彲浠ヨ纭欢瀹屾垚涓绯诲垪鍔ㄤ綔銆傝屽簲鐢ㄧ▼搴忓鏋滈渶瑕佸纭欢杩涜鎿嶄綔锛屽彧闇瑕佸皢鎿嶄綔绯荤粺鐨勮繖濂楁寚浠ゅ簭鍒楀鍒跺埌鑷繁鐨勭▼搴忎腑鍗冲彲銆傚鍒惰繖濂楁寚浠ょ殑鏂瑰紡灏辨槸API銆備粠杩欎釜瑙掑害鏉ョ湅锛屾搷浣滅郴缁熷氨鏄皝瑁呬簡鎺у埗纭欢瀹屾垚涓绯诲垪鍔ㄤ綔鐨勬寚浠ゅ簭鍒楃殑闆嗗悎锛岃繖濂楅泦鍚堟彁渚涚粰搴旂敤绋嬪簭浠ュ強璁$畻鏈虹殑浣跨敤鑰呫備粠鑰岃揪鍒颁簡灏嗕汉銆佸簲鐢ㄧ▼搴忎笌纭欢闅旂鐨勬晥鏋溿 -浜斻佸畠浠箣闂寸殑鍏崇郴 -鍙墽琛岀▼搴忥紙涔熷氨鏄満鍣ㄧ爜搴忓垪锛夐鍏堜粠纾佺洏涓璇诲叆鍒板唴瀛樹腑锛岀劧鍚庡唴瀛樹腑鐨勭▼搴忎細琚竴鏉′竴鏉$殑璇诲埌鎸囦护瀵勫瓨鍣ㄤ腑琚墽琛屻 From f1f9f8d05fce74587f89048fe96b0d4ccc91c4bc Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:24:38 +0800 Subject: [PATCH 046/646] Delete readme --- group08/1509102580/2.26/src/readme | 1 - 1 file changed, 1 deletion(-) delete mode 100644 group08/1509102580/2.26/src/readme diff --git a/group08/1509102580/2.26/src/readme b/group08/1509102580/2.26/src/readme deleted file mode 100644 index 3c84513d0e..0000000000 --- a/group08/1509102580/2.26/src/readme +++ /dev/null @@ -1 +0,0 @@ -浣滀笟1 From ef1fbe1a50680daffe5d504dd73afe3a302f6f3d Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:25:39 +0800 Subject: [PATCH 047/646] Delete ArrayUtil.java --- .../coding2017/zuoye_2/array/ArrayUtil.java | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java deleted file mode 100644 index 82a0ff094c..0000000000 --- a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/array/ArrayUtil.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.zzk.coding2017.zuoye_2.array; - -import com.zzk.coding2017.zuoye_1.ArrayList; - -public class ArrayUtil { - - /** - * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 - 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] - 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] - * @param origin - * @return - */ - public void reverseArray(int[] origin){ - int head = 0;int end = origin.length-1;//瀹氫箟鏀跺熬涓や釜鎸囩ず閲 - if(end<=head){ - return ; - }else{ - int temp; - while(end>head){ - temp = origin[head]; - origin[head] =origin[end]; - origin[end] = temp; - head++; - end--; - } - } - } - - /** - * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} - * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 - * {1,3,4,5,6,6,5,4,7,6,7,5} - * @param oldArray - * @return - */ - - public int[] removeZero(int[] oldArray){ - int length = oldArray.length; - if(length<=0){ - return null; - }else{ - ArrayList al = new ArrayList(); - for (int i = 0; i < oldArray.length; i++) { - if(oldArray[i]!=0){ - al.add(oldArray[i]); - }else{ - continue; - } - } - int[] result = new int[al.size()]; - for (int i = 0; i < result.length; i++) { - result[i]=(int)al.get(i); - } - return result; - } - } - - /** - * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 - * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 - * @param array1 - * @param array2 - * @return - */ - - public int[] merge(int[] array1, int[] array2){ - return null; - } - /** - * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size - * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 - * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 - * [2,3,6,0,0,0] - * @param oldArray - * @param size - * @return - */ - public int[] grow(int [] oldArray, int size){ - return null; - } - - /** - * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 - * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] - * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] - * @param max - * @return - */ - public int[] fibonacci(int max){ - return null; - } - - /** - * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 - * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] - * @param max - * @return - */ - public int[] getPrimes(int max){ - return null; - } - - /** - * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 - * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 - * @param max - * @return - */ - public int[] getPerfectNumbers(int max){ - return null; - } - - /** - * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 - * 渚嬪array= [3,8,9], seperator = "-" - * 鍒欒繑鍥炲间负"3-8-9" - * @param array - * @param s - * @return - */ - public String join(int[] array, String seperator){ - return null; - } - - -} From 8b31b1ae1f02d6172c3526c5c11a6d5dca3708b6 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:25:51 +0800 Subject: [PATCH 048/646] Delete ArrayUtilTest.java --- .../zuoye_2/test/ArrayUtilTest.java | 114 ------------------ 1 file changed, 114 deletions(-) delete mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java deleted file mode 100644 index 8bf636dacc..0000000000 --- a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/ArrayUtilTest.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.zzk.coding2017.zuoye_2.test; - -import static org.junit.Assert.*; - -import org.junit.Before; -import org.junit.Test; - -import com.zzk.coding2017.zuoye_2.array.ArrayUtil; - -public class ArrayUtilTest { - ArrayUtil au; - @Before - public void setUp() throws Exception { - au = new ArrayUtil(); - } - - @Test - public void testReverseArray() { - - int[] a = {1,2,3,4,5}; - int[] b = {1,2,3,4}; - int[] c = {}; - int[] d = {1}; - - au.reverseArray(a); - au.reverseArray(b); - au.reverseArray(c); - au.reverseArray(d); - - for (int i = 0; i < a.length; i++) { - System.out.print(a[i]); - } - System.out.println(); - for (int i = 0; i < b.length; i++) { - System.out.print(b[i]); - } - System.out.println(); - for (int i = 0; i < c.length; i++) { - System.out.print(c[i]); - } - System.out.println(); - for (int i = 0; i < d.length; i++) { - System.out.print(d[i]); - } - fail("Not yet implemented"); - } - - @Before - public void setUp2() throws Exception { - au = new ArrayUtil(); - System.out.println("testRemoveZero "); - } - - @Test - public void testRemoveZero() { - int[] a = {1,2,3,0,0,3}; - int[] b = {}; - int[] c = {0,0,0,0}; - int[] d = {1,2,3,3}; - a = au.removeZero(a); - b = au.removeZero(b); - c = au.removeZero(c); - d = au.removeZero(d); - System.out.println("a"); - for (int i = 0; i < a.length; i++) { - System.out.print(a[i]); - } - - System.out.println("c"); - for (int i = 0; i < c.length; i++) { - System.out.print(c[i]); - } - System.out.println("d"); - for (int i = 0; i < d.length; i++) { - System.out.print(d[i]); - } - System.out.println("b"); - for (int i = 0; i < b.length; i++) { - System.out.print(b[i]); - } - fail("Not yet implemented"); - } - - @Test - public void testMerge() { - fail("Not yet implemented"); - } - - @Test - public void testGrow() { - fail("Not yet implemented"); - } - - @Test - public void testFibonacci() { - fail("Not yet implemented"); - } - - @Test - public void testGetPrimes() { - fail("Not yet implemented"); - } - - @Test - public void testGetPerfectNumbers() { - fail("Not yet implemented"); - } - - @Test - public void testJoin() { - fail("Not yet implemented"); - } - -} From 7da6ae097f4fc4d9d032fde53a255381abadd02b Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Wed, 1 Mar 2017 20:26:04 +0800 Subject: [PATCH 049/646] Delete package-info.java --- .../src/com/zzk/coding2017/zuoye_2/test/package-info.java | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java diff --git a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java b/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java deleted file mode 100644 index 197779b51d..0000000000 --- a/group08/1509102580/2.26/src/com/zzk/coding2017/zuoye_2/test/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - */ -/** - * @author User - * - */ -package com.zzk.coding2017.zuoye_2.test; \ No newline at end of file From 69d3e2b1d6defe62de1fef6b7c16aa7b549bdb3c Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Wed, 1 Mar 2017 21:42:37 +0800 Subject: [PATCH 050/646] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/ArrayList.java | 196 +++++++++--------- 1 file changed, 99 insertions(+), 97 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java index 220e00459c..4c803377db 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java @@ -1,98 +1,100 @@ -锘縤mport java.util.NoSuchElementException; - -public class ArrayList implements List { - - private int size = 0; - /*鎵╁鍥犲瓙*/ - private static final int GENE = 10; - - private Object[] elementData = new Object[10]; - /*鎵╁寮曠敤*/ - private Object[] newElementData; - - public void add(Object o){ - grow(); - elementData[size] = o; - size ++; - } - public void add(int index, Object o){ - - if(index>size){ - throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); - } - grow(); - if(indexsize){ - throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); - } - return elementData[index]; - } - - public Object remove(int index){ - - Object o = elementData[index]; - System.arraycopy(elementData, index+1, elementData, index, size-(index+1)); - size --; - return o; - } - - public int size(){ - return size; - } - - public Object[] toArray(){ - Object[] objArr = new Object[size]; - System.arraycopy(elementData, 0, objArr, 0, size); - return objArr; - } - - /** - * 鎵╁锛屾墿瀹瑰洜瀛愪负10 - */ - private void grow(){ - - if(size>=elementData.length){//闀垮害涓嶅闇瑕佹墿瀹 - newElementData = new Object[size+GENE]; - System.arraycopy(elementData, 0, newElementData, 0, elementData.length); - elementData = newElementData; - } - } - - - public Iterator iterator(){ - - return new Itr(); - } - - private class Itr implements Iterator{ - - int cursor; - @Override - public boolean hasNext() { - return cursor != ArrayList.this.size; - } - - @Override - public Object next() { - - int i = this.cursor; - if (i >= ArrayList.this.size){ - throw new NoSuchElementException(); - } - this.cursor = (i + 1); - return ArrayList.this.elementData[i]; - } - - } +锘縫ackage com.coding.basic; + +import java.util.NoSuchElementException; + +public class ArrayList implements List { + + private int size = 0; + /*鎵╁鍥犲瓙*/ + private static final int GENE = 10; + + private Object[] elementData = new Object[10]; + /*鎵╁寮曠敤*/ + private Object[] newElementData; + + public void add(Object o){ + grow(); + elementData[size] = o; + size ++; + } + public void add(int index, Object o){ + + if(index>size){ + throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); + } + grow(); + if(indexsize){ + throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); + } + return elementData[index]; + } + + public Object remove(int index){ + + Object o = elementData[index]; + System.arraycopy(elementData, index+1, elementData, index, size-(index+1)); + size --; + return o; + } + + public int size(){ + return size; + } + + public Object[] toArray(){ + Object[] objArr = new Object[size]; + System.arraycopy(elementData, 0, objArr, 0, size); + return objArr; + } + + /** + * 鎵╁锛屾墿瀹瑰洜瀛愪负10 + */ + private void grow(){ + + if(size>=elementData.length){//闀垮害涓嶅闇瑕佹墿瀹 + newElementData = new Object[size+GENE]; + System.arraycopy(elementData, 0, newElementData, 0, elementData.length); + elementData = newElementData; + } + } + + + public Iterator iterator(){ + + return new Itr(); + } + + private class Itr implements Iterator{ + + int cursor; + @Override + public boolean hasNext() { + return cursor != ArrayList.this.size; + } + + @Override + public Object next() { + + int i = this.cursor; + if (i >= ArrayList.this.size){ + throw new NoSuchElementException(); + } + this.cursor = (i + 1); + return ArrayList.this.elementData[i]; + } + + } } \ No newline at end of file From e746e1b588a9aed822919698d1afb91fce273d37 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Wed, 1 Mar 2017 21:46:11 +0800 Subject: [PATCH 051/646] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2258659044/zj-2017/src/com/coding/basic/ArrayList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java index 4c803377db..f1fbf7e8b1 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/ArrayList.java @@ -19,7 +19,7 @@ public void add(Object o){ } public void add(int index, Object o){ - if(index>size){ + if(index<0||index>size){ throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); } grow(); @@ -35,7 +35,7 @@ public void add(int index, Object o){ public Object get(int index){ - if(index>size){ + if(index<0||index>size){ throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size); } return elementData[index]; From d1910a6a176548c38c7913a9a50a83d960e287bc Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Wed, 1 Mar 2017 22:23:57 +0800 Subject: [PATCH 052/646] package name changed with linkedList remove fix --- .../AbstractList.java | 2 +- .../{Collection => collection}/Iterator.java | 2 +- .../{Collection => collection}/List.java | 2 +- .../concrete}/ArrayList.java | 6 +-- .../concrete}/BinaryTreeNode.java | 2 +- .../concrete}/LinkedList.java | 15 +++++-- .../concrete}/Queue.java | 6 +-- .../concrete}/Stack.java | 6 +-- .../collection}/AllTests.java | 2 +- .../collection}/ArrayListTest.java | 9 ++-- .../collection}/BinaryTreeNodeTest.java | 4 +- .../collection}/LinkedListTest.java | 10 +++-- .../collection}/QueueTest.java | 7 ++- .../collection}/StackTest.java | 4 +- .../382266293/coding/basic/util/TestUtil.java | 8 ++-- .../coding/basic/util/XMLreader.java | 25 ++++++++++- .../382266293/eollection/AbstractList.java | 43 +++++++++++++++++++ group12/382266293/eollection/Iterator.java | 7 +++ group12/382266293/eollection/List.java | 16 +++++++ group12/382266293/src/array/ArrayUtil.java | 5 ++- group12/382266293/src/litestruts/Struts.java | 18 ++++---- 21 files changed, 151 insertions(+), 48 deletions(-) rename group12/382266293/coding/basic/{Collection => collection}/AbstractList.java (97%) rename group12/382266293/coding/basic/{Collection => collection}/Iterator.java (80%) rename group12/382266293/coding/basic/{Collection => collection}/List.java (89%) rename group12/382266293/coding/basic/{Collection/Concrete => collection/concrete}/ArrayList.java (96%) rename group12/382266293/coding/basic/{Collection/Concrete => collection/concrete}/BinaryTreeNode.java (98%) rename group12/382266293/coding/basic/{Collection/Concrete => collection/concrete}/LinkedList.java (92%) rename group12/382266293/coding/basic/{Collection/Concrete => collection/concrete}/Queue.java (93%) rename group12/382266293/coding/basic/{Collection/Concrete => collection/concrete}/Stack.java (95%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/AllTests.java (91%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/ArrayListTest.java (96%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/BinaryTreeNodeTest.java (93%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/LinkedListTest.java (96%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/QueueTest.java (96%) rename group12/382266293/coding/basic/{TestCollection => test/collection}/StackTest.java (97%) create mode 100644 group12/382266293/eollection/AbstractList.java create mode 100644 group12/382266293/eollection/Iterator.java create mode 100644 group12/382266293/eollection/List.java diff --git a/group12/382266293/coding/basic/Collection/AbstractList.java b/group12/382266293/coding/basic/collection/AbstractList.java similarity index 97% rename from group12/382266293/coding/basic/Collection/AbstractList.java rename to group12/382266293/coding/basic/collection/AbstractList.java index a81e76b587..93da57e1bd 100644 --- a/group12/382266293/coding/basic/Collection/AbstractList.java +++ b/group12/382266293/coding/basic/collection/AbstractList.java @@ -1,4 +1,4 @@ -package Collection; +package collection; public abstract class AbstractList implements List { diff --git a/group12/382266293/coding/basic/Collection/Iterator.java b/group12/382266293/coding/basic/collection/Iterator.java similarity index 80% rename from group12/382266293/coding/basic/Collection/Iterator.java rename to group12/382266293/coding/basic/collection/Iterator.java index d51656a3a8..79955745cd 100644 --- a/group12/382266293/coding/basic/Collection/Iterator.java +++ b/group12/382266293/coding/basic/collection/Iterator.java @@ -1,4 +1,4 @@ -package Collection; +package collection; public interface Iterator { diff --git a/group12/382266293/coding/basic/Collection/List.java b/group12/382266293/coding/basic/collection/List.java similarity index 89% rename from group12/382266293/coding/basic/Collection/List.java rename to group12/382266293/coding/basic/collection/List.java index 7ddb685cac..5fdc0de9ab 100644 --- a/group12/382266293/coding/basic/Collection/List.java +++ b/group12/382266293/coding/basic/collection/List.java @@ -1,4 +1,4 @@ -package Collection; +package collection; public interface List { diff --git a/group12/382266293/coding/basic/Collection/Concrete/ArrayList.java b/group12/382266293/coding/basic/collection/concrete/ArrayList.java similarity index 96% rename from group12/382266293/coding/basic/Collection/Concrete/ArrayList.java rename to group12/382266293/coding/basic/collection/concrete/ArrayList.java index 3db5ab47e6..449cdf4e1a 100644 --- a/group12/382266293/coding/basic/Collection/Concrete/ArrayList.java +++ b/group12/382266293/coding/basic/collection/concrete/ArrayList.java @@ -1,10 +1,10 @@ -package Collection.Concrete; +package collection.concrete; import java.util.Arrays; import java.util.NoSuchElementException; -import Collection.AbstractList; -import Collection.Iterator; +import collection.AbstractList; +import collection.Iterator; public class ArrayList extends AbstractList { diff --git a/group12/382266293/coding/basic/Collection/Concrete/BinaryTreeNode.java b/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java similarity index 98% rename from group12/382266293/coding/basic/Collection/Concrete/BinaryTreeNode.java rename to group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java index 34a9d4253e..442b06b1c9 100644 --- a/group12/382266293/coding/basic/Collection/Concrete/BinaryTreeNode.java +++ b/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java @@ -1,4 +1,4 @@ -package Collection.Concrete; +package collection.concrete; public class BinaryTreeNode> { diff --git a/group12/382266293/coding/basic/Collection/Concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java similarity index 92% rename from group12/382266293/coding/basic/Collection/Concrete/LinkedList.java rename to group12/382266293/coding/basic/collection/concrete/LinkedList.java index 66dbd9d8d0..c1e572d33c 100644 --- a/group12/382266293/coding/basic/Collection/Concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -1,8 +1,9 @@ -package Collection.Concrete; +package collection.concrete; import java.util.NoSuchElementException; -import Collection.AbstractList; -import Collection.Iterator; + +import collection.AbstractList; +import collection.Iterator; public class LinkedList extends AbstractList { @@ -87,15 +88,21 @@ public E removeLast(){ return remove(size-1); } + @SuppressWarnings("unchecked") public E remove(int index) { checkIndex(index); Node pNode = getNode(index); + if (index == 0) { head = head.next; } else if (index == size-1 ) { getNode(index-1).next = null; } else { - getNode(index-1).next = getNode(index+1); + Node node = head; + for ( int i = 0; i < index - 1 ; i++) { + node = node.next; + } + node.next = node.next.next; } size--; return pNode.data; diff --git a/group12/382266293/coding/basic/Collection/Concrete/Queue.java b/group12/382266293/coding/basic/collection/concrete/Queue.java similarity index 93% rename from group12/382266293/coding/basic/Collection/Concrete/Queue.java rename to group12/382266293/coding/basic/collection/concrete/Queue.java index 300fb633af..0875d8286a 100644 --- a/group12/382266293/coding/basic/Collection/Concrete/Queue.java +++ b/group12/382266293/coding/basic/collection/concrete/Queue.java @@ -1,8 +1,8 @@ -package Collection.Concrete; +package collection.concrete; import java.util.NoSuchElementException; -import Collection.AbstractList; -import Collection.Iterator; +import collection.AbstractList; +import collection.Iterator; public class Queue extends AbstractList { diff --git a/group12/382266293/coding/basic/Collection/Concrete/Stack.java b/group12/382266293/coding/basic/collection/concrete/Stack.java similarity index 95% rename from group12/382266293/coding/basic/Collection/Concrete/Stack.java rename to group12/382266293/coding/basic/collection/concrete/Stack.java index 17ec4364fa..ecc0994273 100644 --- a/group12/382266293/coding/basic/Collection/Concrete/Stack.java +++ b/group12/382266293/coding/basic/collection/concrete/Stack.java @@ -1,10 +1,10 @@ -package Collection.Concrete; +package collection.concrete; import java.util.EmptyStackException; import java.util.NoSuchElementException; -import Collection.AbstractList; -import Collection.Iterator; +import collection.AbstractList; +import collection.Iterator; public class Stack extends AbstractList { diff --git a/group12/382266293/coding/basic/TestCollection/AllTests.java b/group12/382266293/coding/basic/test/collection/AllTests.java similarity index 91% rename from group12/382266293/coding/basic/TestCollection/AllTests.java rename to group12/382266293/coding/basic/test/collection/AllTests.java index cd4eeadb58..661d6c3722 100644 --- a/group12/382266293/coding/basic/TestCollection/AllTests.java +++ b/group12/382266293/coding/basic/test/collection/AllTests.java @@ -1,4 +1,4 @@ -package TestCollection; +package test.collection; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/group12/382266293/coding/basic/TestCollection/ArrayListTest.java b/group12/382266293/coding/basic/test/collection/ArrayListTest.java similarity index 96% rename from group12/382266293/coding/basic/TestCollection/ArrayListTest.java rename to group12/382266293/coding/basic/test/collection/ArrayListTest.java index f29580616f..74a3a14212 100644 --- a/group12/382266293/coding/basic/TestCollection/ArrayListTest.java +++ b/group12/382266293/coding/basic/test/collection/ArrayListTest.java @@ -1,4 +1,4 @@ -package TestCollection; +package test.collection; import static util.Print.*; import static util.TestUtil.*; @@ -10,10 +10,9 @@ import org.junit.Before; import org.junit.Test; - -import Collection.Iterator; -import Collection.List; -import Collection.Concrete.ArrayList; +import collection.Iterator; +import collection.List; +import collection.concrete.ArrayList; import junit.framework.TestCase; public class ArrayListTest extends TestCase { diff --git a/group12/382266293/coding/basic/TestCollection/BinaryTreeNodeTest.java b/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java similarity index 93% rename from group12/382266293/coding/basic/TestCollection/BinaryTreeNodeTest.java rename to group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java index 275ef59484..161d29298a 100644 --- a/group12/382266293/coding/basic/TestCollection/BinaryTreeNodeTest.java +++ b/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java @@ -1,4 +1,4 @@ -package TestCollection; +package test.collection; import static util.Print.*; import java.util.Random; @@ -9,7 +9,7 @@ import org.junit.Before; import org.junit.Test; -import Collection.Concrete.BinaryTreeNode; +import collection.concrete.BinaryTreeNode; import junit.framework.TestCase; public class BinaryTreeNodeTest extends TestCase { diff --git a/group12/382266293/coding/basic/TestCollection/LinkedListTest.java b/group12/382266293/coding/basic/test/collection/LinkedListTest.java similarity index 96% rename from group12/382266293/coding/basic/TestCollection/LinkedListTest.java rename to group12/382266293/coding/basic/test/collection/LinkedListTest.java index 8b9fad15eb..5a2d7213af 100644 --- a/group12/382266293/coding/basic/TestCollection/LinkedListTest.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest.java @@ -1,4 +1,4 @@ -package TestCollection; +package test.collection; import static util.Print.*; import static util.TestUtil.*; @@ -8,9 +8,9 @@ import org.junit.Before; import org.junit.Test; -import Collection.Iterator; -import Collection.List; -import Collection.Concrete.LinkedList; +import collection.Iterator; +import collection.List; +import collection.concrete.LinkedList; import junit.framework.TestCase; @@ -182,7 +182,9 @@ public void testRemove() { assertEquals(i, myLL.size()); assertEquals(a,res); } + } + @Test public void testSize() { diff --git a/group12/382266293/coding/basic/TestCollection/QueueTest.java b/group12/382266293/coding/basic/test/collection/QueueTest.java similarity index 96% rename from group12/382266293/coding/basic/TestCollection/QueueTest.java rename to group12/382266293/coding/basic/test/collection/QueueTest.java index 01a9aa31f2..bbbd076f7d 100644 --- a/group12/382266293/coding/basic/TestCollection/QueueTest.java +++ b/group12/382266293/coding/basic/test/collection/QueueTest.java @@ -1,11 +1,14 @@ -package TestCollection; +package test.collection; import static util.Print.*; import org.junit.After; import org.junit.Before; import org.junit.Test; + +import collection.concrete.Queue; + import static util.TestUtil.*; -import Collection.Concrete.Queue; + import junit.framework.TestCase; public class QueueTest extends TestCase { diff --git a/group12/382266293/coding/basic/TestCollection/StackTest.java b/group12/382266293/coding/basic/test/collection/StackTest.java similarity index 97% rename from group12/382266293/coding/basic/TestCollection/StackTest.java rename to group12/382266293/coding/basic/test/collection/StackTest.java index 8d2f85e1bf..d64b3e60f3 100644 --- a/group12/382266293/coding/basic/TestCollection/StackTest.java +++ b/group12/382266293/coding/basic/test/collection/StackTest.java @@ -1,4 +1,4 @@ -package TestCollection; +package test.collection; import static util.Print.*; @@ -8,7 +8,7 @@ import org.junit.Before; import org.junit.Test; -import Collection.Concrete.Stack; +import collection.concrete.Stack; import junit.framework.TestCase; public class StackTest extends TestCase { diff --git a/group12/382266293/coding/basic/util/TestUtil.java b/group12/382266293/coding/basic/util/TestUtil.java index 0820e0e684..009e67ca26 100644 --- a/group12/382266293/coding/basic/util/TestUtil.java +++ b/group12/382266293/coding/basic/util/TestUtil.java @@ -3,10 +3,10 @@ import java.util.Arrays; import java.util.Random; -import Collection.List; -import Collection.Concrete.ArrayList; -import Collection.Concrete.LinkedList; -import Collection.Concrete.Queue; +import collection.List; +import collection.concrete.ArrayList; +import collection.concrete.LinkedList; +import collection.concrete.Queue; import junit.framework.TestCase; diff --git a/group12/382266293/coding/basic/util/XMLreader.java b/group12/382266293/coding/basic/util/XMLreader.java index b7a345f7e6..1cdee9dc1c 100644 --- a/group12/382266293/coding/basic/util/XMLreader.java +++ b/group12/382266293/coding/basic/util/XMLreader.java @@ -1,5 +1,4 @@ package util; -import java.net.URL; import java.util.Iterator; import java.util.List; @@ -41,6 +40,30 @@ public String parseClass(String attr) { } return clazz; } + + + + public String parseResult(String attr, String result) { + + Document doc = null; + try { + doc = parse(address); + } catch (DocumentException e1) { + e1.printStackTrace(); + } + + Node root = doc.getRootElement(); + List list = root.selectNodes("action[@name='" + attr + "']/result[@name='" + result + "']"); + + String jsp = null; + for(Object o:list){ + Element e = (Element) o; + jsp = e.getTextTrim(); + } + return jsp; + } + + public static void main(String args[]) throws DocumentException { XMLreader reader = new XMLreader(); diff --git a/group12/382266293/eollection/AbstractList.java b/group12/382266293/eollection/AbstractList.java new file mode 100644 index 0000000000..7add091ad4 --- /dev/null +++ b/group12/382266293/eollection/AbstractList.java @@ -0,0 +1,43 @@ + + +public abstract class AbstractList implements List { + + protected static final String PREFIX = "["; + protected static final String SUFFIX = "]"; + protected static final String SEPERATOR = ", "; + protected static final int MAX_SIZE = Integer.MAX_VALUE/3; + + protected void checkIndex(int i) { + if( i < 0 || i > Math.min(size(), MAX_SIZE)) + throw new IndexOutOfBoundsException("Size :" + size()+", Index: " + i); + } + + public boolean isEmpty() { + return size() == 0; + } + + + public int indexOf(E e) { + for (int i = 0; i < size()-1; i++) { + if (get(i).equals(e)) + return i; + } + return -1; + } + + protected abstract Iterator iterator(); + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PREFIX); + for (int i = 0; i < size(); i++) { + sb.append(get(i)); + if (i < size()-1) + sb.append(SEPERATOR); + } + sb.append(SUFFIX); + return sb.toString(); + } + +} diff --git a/group12/382266293/eollection/Iterator.java b/group12/382266293/eollection/Iterator.java new file mode 100644 index 0000000000..05ab137bf6 --- /dev/null +++ b/group12/382266293/eollection/Iterator.java @@ -0,0 +1,7 @@ + + +public interface Iterator { + + public boolean hasNext(); + public E next(); +} diff --git a/group12/382266293/eollection/List.java b/group12/382266293/eollection/List.java new file mode 100644 index 0000000000..f4730b943e --- /dev/null +++ b/group12/382266293/eollection/List.java @@ -0,0 +1,16 @@ + + +public interface List { + + public void add(E e); + + public int size(); + + public E get(int index); + + public boolean isEmpty(); + + public int indexOf(E e); + + +} diff --git a/group12/382266293/src/array/ArrayUtil.java b/group12/382266293/src/array/ArrayUtil.java index f33f64150b..85df44e987 100644 --- a/group12/382266293/src/array/ArrayUtil.java +++ b/group12/382266293/src/array/ArrayUtil.java @@ -3,8 +3,9 @@ import static util.Print.*; import java.util.Arrays; import java.util.BitSet; -import Collection.Iterator; -import Collection.Concrete.ArrayList; + +import collection.Iterator; +import collection.concrete.ArrayList; diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java index 088e88fdec..b520ee7e89 100644 --- a/group12/382266293/src/litestruts/Struts.java +++ b/group12/382266293/src/litestruts/Struts.java @@ -58,14 +58,14 @@ public static View runAction(String actionName, Map parameters) t actionObj = getObj(clazz); setParams(actionObj,parameters); - invoke(actionObj,"execute"); - + String result = (String) invoke(actionObj,"execute"); + String viewPage = reader.parseResult(actionName,result); Map viewParams = getViewParams(actionObj); + viewParams.put("jsp", viewPage); println(viewParams); viewObj = getObj("litestruts.View"); - - setParams(viewObj,viewParams); - + setParams(viewObj,viewParams); + return (View) viewObj; } @@ -138,18 +138,19 @@ private static void setParams(Object pb0, Map parameters) { } } - private static void invoke(Object obj, String execute) { + private static String invoke(Object obj, String execute) { BeanInfo bi0 = getBeanInfo(obj); MethodDescriptor[] methods = bi0.getMethodDescriptors(); for (int i = 0; i < methods.length; i++) { String methodName = methods[i].getName(); if(methodName.equals(execute)) try { - println(methods[i].getMethod().invoke(actionObj)); + return (String) methods[i].getMethod().invoke(actionObj); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } } + return null; } @@ -160,7 +161,8 @@ public static void main(String args[]) throws InstantiationException, IllegalAcc params.put("password","1234"); View view = runAction("login",params); - println(view.getParameters()); + println(view.getJsp()); + } From 6381c8f0201464309fc566296a54b2c9ba548d53 Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Wed, 1 Mar 2017 23:44:10 +0900 Subject: [PATCH 053/646] update dir --- .../.gitignore | 0 .../.project | 0 .../.settings/org.eclipse.m2e.core.prefs | 0 .../pom.xml | 10 +++-- .../src/site/.gitkeep | 0 .../.project | 0 .../.settings/org.eclipse.m2e.core.prefs | 0 .../pom.xml | 35 ++++++++++----- .../src/site}/.gitkeep | 0 .../.classpath | 0 .../.gitignore | 0 .../.project | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.m2e.core.prefs | 0 .../pom.xml | 10 ++--- .../jmr/collection/core}/ArrayList.java | 2 +- .../src/main}/resources/.gitkeep | 0 .../src/main/resources/log4j.xml | 16 +++++++ .../jmr/collection/core}/TestArrayList.java | 4 +- .../src/test/resources}/.gitkeep | 0 .../jmr-170305-analyzeStrutsXml/.classpath | 36 ++++++++++++++++ .../jmr-170305-analyzeStrutsXml/.gitignore | 1 + .../jmr-170305-analyzeStrutsXml/.project | 23 ++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 5 +++ .../.settings/org.eclipse.m2e.core.prefs | 4 ++ .../data/hello.xml | 5 +++ .../jmr-170305-analyzeStrutsXml/pom.xml | 43 +++++++++++++++++++ .../src/main/java/.gitkeep | 0 .../xmlparser/digester/core/FileRulerSet.java | 33 ++++++++++++++ .../digester/core/HelloDigester.java | 17 ++++++++ .../jmr/xmlparser/digester/driver/Driver.java | 27 ++++++++++++ .../jmr/xmlparser/digester/entity/Hello.java | 19 ++++++++ .../xmlparser/digester/entity/HelloFile.java | 11 +++++ .../xmlparser/digester/util/FileUtils.java | 13 ++++++ .../src/main/resources/.gitkeep | 0 .../src/main/resources/log4j.xml | 16 +++++++ .../src/test/java/.gitkeep | 0 .../src/test/resources/.gitkeep | 0 38 files changed, 310 insertions(+), 22 deletions(-) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection => }/.gitignore (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-aggregator => jmr-01-aggregator}/.project (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-aggregator => jmr-01-aggregator}/.settings/org.eclipse.m2e.core.prefs (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-aggregator => jmr-01-aggregator}/pom.xml (55%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-aggregator => jmr-01-aggregator}/src/site/.gitkeep (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-parent => jmr-02-parent}/.project (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-02-parent}/.settings/org.eclipse.m2e.core.prefs (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-parent => jmr-02-parent}/pom.xml (79%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib/src/main/resources => jmr-02-parent/src/site}/.gitkeep (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-170226-collection}/.classpath (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-170226-collection}/.gitignore (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-170226-collection}/.project (93%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-170226-collection}/.settings/org.eclipse.jdt.core.prefs (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-parent => jmr-170226-collection}/.settings/org.eclipse.m2e.core.prefs (100%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib => jmr-170226-collection}/pom.xml (72%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib/src/main/java/com/eulerlcs/collection => jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core}/ArrayList.java (99%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib/src/test => jmr-170226-collection/src/main}/resources/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-lib/src/test/java/com/eulerlcs/collection => jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core}/TestArrayList.java (88%) rename group09/41689722.eulerlcs/{20170226-eulerlcs-collection/collection-parent/src/site => jmr-170226-collection/src/test/resources}/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/data/hello.xml create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/pom.xml create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/.gitkeep create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/.gitkeep create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/java/.gitkeep create mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/.gitignore b/group09/41689722.eulerlcs/.gitignore similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/.gitignore rename to group09/41689722.eulerlcs/.gitignore diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/.project b/group09/41689722.eulerlcs/jmr-01-aggregator/.project similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/.project rename to group09/41689722.eulerlcs/jmr-01-aggregator/.project diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/.settings/org.eclipse.m2e.core.prefs rename to group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/pom.xml b/group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml similarity index 55% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/pom.xml rename to group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml index a09edb357b..70d9605d9e 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/pom.xml +++ b/group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml @@ -1,13 +1,15 @@ 4.0.0 - com.eulerlcs.collection - collection-aggregator + com.eulerlcs.jmr + jmr-01-aggregator 0.0.1-SNAPSHOT pom + eulerlcs master java road aggregator - ../collection-parent - ../collection-lib + ../jmr-02-parent + ../jmr-170226-collection + ../jmr-170305-analyzeStrutsXml \ No newline at end of file diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/src/site/.gitkeep b/group09/41689722.eulerlcs/jmr-01-aggregator/src/site/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-aggregator/src/site/.gitkeep rename to group09/41689722.eulerlcs/jmr-01-aggregator/src/site/.gitkeep diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/.project b/group09/41689722.eulerlcs/jmr-02-parent/.project similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/.project rename to group09/41689722.eulerlcs/jmr-02-parent/.project diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.settings/org.eclipse.m2e.core.prefs rename to group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/pom.xml b/group09/41689722.eulerlcs/jmr-02-parent/pom.xml similarity index 79% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/pom.xml rename to group09/41689722.eulerlcs/jmr-02-parent/pom.xml index 6f05e517e2..3f2dfec9df 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/pom.xml +++ b/group09/41689722.eulerlcs/jmr-02-parent/pom.xml @@ -1,23 +1,44 @@ 4.0.0 - com.eulerlcs.collection - collection-parent + com.eulerlcs.jmr + jmr-02-parent 0.0.1-SNAPSHOT pom + eulerlcs master java road parent - 1.7.23 + 1.7.24 4.12 2.17 1.8 1.8 - + + commons-digester + commons-digester + 2.1 + + + org.jdom + jdom2 + 2.0.6 + + + dom4j + dom4j + 1.6.1 + + + org.projectlombok + lombok + 1.16.14 + provided + org.slf4j slf4j-api @@ -37,7 +58,6 @@ - @@ -94,11 +114,6 @@ true - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/main/resources/.gitkeep b/group09/41689722.eulerlcs/jmr-02-parent/src/site/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/main/resources/.gitkeep rename to group09/41689722.eulerlcs/jmr-02-parent/src/site/.gitkeep diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath b/group09/41689722.eulerlcs/jmr-170226-collection/.classpath similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.classpath rename to group09/41689722.eulerlcs/jmr-170226-collection/.classpath diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.gitignore b/group09/41689722.eulerlcs/jmr-170226-collection/.gitignore similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.gitignore rename to group09/41689722.eulerlcs/jmr-170226-collection/.gitignore diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.project b/group09/41689722.eulerlcs/jmr-170226-collection/.project similarity index 93% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.project rename to group09/41689722.eulerlcs/jmr-170226-collection/.project index 69766f62bc..c7c2e05867 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.project +++ b/group09/41689722.eulerlcs/jmr-170226-collection/.project @@ -1,6 +1,6 @@ - collection-lib + jmr-170226-collection diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.settings/org.eclipse.jdt.core.prefs b/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/.settings/org.eclipse.jdt.core.prefs rename to group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/.settings/org.eclipse.m2e.core.prefs rename to group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/pom.xml b/group09/41689722.eulerlcs/jmr-170226-collection/pom.xml similarity index 72% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/pom.xml rename to group09/41689722.eulerlcs/jmr-170226-collection/pom.xml index 6d1654e23a..8f8db122c0 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/pom.xml +++ b/group09/41689722.eulerlcs/jmr-170226-collection/pom.xml @@ -2,13 +2,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.eulerlcs.collection - collection-parent + com.eulerlcs.jmr + jmr-02-parent 0.0.1-SNAPSHOT - ../collection-parent/pom.xml + ../jmr-02-parent/pom.xml - collection-lib - + jmr-170226-collection + eulerlcs master java road collection diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/main/java/com/eulerlcs/collection/ArrayList.java b/group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java similarity index 99% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/main/java/com/eulerlcs/collection/ArrayList.java rename to group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java index 219919719b..7d975bf917 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/main/java/com/eulerlcs/collection/ArrayList.java +++ b/group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java @@ -1,7 +1,7 @@ /** * 90% or more copy from jdk */ -package com.eulerlcs.collection; +package com.eulerlcs.jmr.collection.core; import java.util.Arrays; import java.util.Collection; diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/test/resources/.gitkeep rename to group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml new file mode 100644 index 0000000000..831b8d9ce3 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/test/java/com/eulerlcs/collection/TestArrayList.java b/group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java similarity index 88% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/test/java/com/eulerlcs/collection/TestArrayList.java rename to group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java index b66dd278e3..c46c159e75 100644 --- a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-lib/src/test/java/com/eulerlcs/collection/TestArrayList.java +++ b/group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java @@ -1,4 +1,4 @@ -package com.eulerlcs.collection; +package com.eulerlcs.jmr.collection.core; import java.util.List; @@ -9,6 +9,8 @@ import org.junit.BeforeClass; import org.junit.Test; +import com.eulerlcs.jmr.collection.core.ArrayList; + public class TestArrayList { @BeforeClass diff --git a/group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/src/site/.gitkeep b/group09/41689722.eulerlcs/jmr-170226-collection/src/test/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/20170226-eulerlcs-collection/collection-parent/src/site/.gitkeep rename to group09/41689722.eulerlcs/jmr-170226-collection/src/test/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath new file mode 100644 index 0000000000..fae1a2b37d --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project new file mode 100644 index 0000000000..cc415c517a --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project @@ -0,0 +1,23 @@ + + + jmr-170305-analyzeStrutsXml + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..714351aec1 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..f897a7f1cb --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/data/hello.xml b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/data/hello.xml new file mode 100644 index 0000000000..748019e106 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/data/hello.xml @@ -0,0 +1,5 @@ + + + a.txt + b.txt + diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/pom.xml b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/pom.xml new file mode 100644 index 0000000000..0ff3abf116 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + + com.eulerlcs.jmr + jmr-02-parent + 0.0.1-SNAPSHOT + ../jmr-02-parent/pom.xml + + jmr-170305-analyzeStrutsXml + eulerlcs master java road analyzeStrutsXml + + + + commons-digester + commons-digester + + + org.jdom + jdom2 + + + dom4j + dom4j + + + org.projectlombok + lombok + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + junit + junit + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/.gitkeep b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java new file mode 100644 index 0000000000..f02105eb71 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java @@ -0,0 +1,33 @@ +package com.eulerlcs.jmr.xmlparser.digester.core; + +import org.apache.commons.digester.Digester; +import org.apache.commons.digester.RuleSetBase; + +import com.eulerlcs.jmr.xmlparser.digester.entity.HelloFile; + +final class FileRulerSet extends RuleSetBase { + protected String prefix = null; + + public FileRulerSet() { + this(""); + } + + public FileRulerSet(String prefix) { + super(); + this.namespaceURI = null; + this.prefix = prefix; + } + + @Override + public void addRuleInstances(Digester digester) { + digester.addObjectCreate(prefix + "file", HelloFile.class); + digester.addSetProperties(prefix + "file", "dir", "path"); + + digester.addSetNext(prefix + "file", "addFile"); + + digester.addCallMethod(prefix + "file", "setName", 1); + digester.addCallParam(prefix + "file", 0); + + } + +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java new file mode 100644 index 0000000000..5c289cc1a9 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java @@ -0,0 +1,17 @@ +package com.eulerlcs.jmr.xmlparser.digester.core; + +import org.apache.commons.digester.Digester; + +import com.eulerlcs.jmr.xmlparser.digester.entity.Hello; + +public class HelloDigester { + public static Digester newInstance() { + Digester d = new Digester(); + + d.addObjectCreate("files", Hello.class); + d.addSetProperties("files"); + d.addRuleSet(new FileRulerSet("files/")); + + return d; + } +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java new file mode 100644 index 0000000000..b024fe7d5d --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java @@ -0,0 +1,27 @@ +package com.eulerlcs.jmr.xmlparser.digester.driver; + +import java.io.IOException; + +import org.apache.commons.digester.Digester; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.SAXException; + +import com.eulerlcs.jmr.xmlparser.digester.core.HelloDigester; +import com.eulerlcs.jmr.xmlparser.digester.entity.Hello; +import com.eulerlcs.jmr.xmlparser.digester.util.FileUtils; + +public class Driver { + private final static Logger log = LoggerFactory.getLogger(Driver.class); + + public static void main(String[] args) { + Digester d = HelloDigester.newInstance(); + + try { + Hello helloEntity = (Hello) d.parse(FileUtils.getXmlFile("hello")); + log.debug("hello.value=[{}]", helloEntity.getValue()); + } catch (IOException | SAXException e) { + e.printStackTrace(); + } + } +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java new file mode 100644 index 0000000000..4778a750c4 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java @@ -0,0 +1,19 @@ +package com.eulerlcs.jmr.xmlparser.digester.entity; + +import java.util.ArrayList; +import java.util.List; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class Hello { + private String project; + private String value; + private List files = new ArrayList<>(); + + public void addFile(HelloFile file) { + files.add(file); + } +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java new file mode 100644 index 0000000000..90c9bc956c --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java @@ -0,0 +1,11 @@ +package com.eulerlcs.jmr.xmlparser.digester.entity; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class HelloFile { + private String path; + private String name; +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java new file mode 100644 index 0000000000..0e69ef30e8 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java @@ -0,0 +1,13 @@ +package com.eulerlcs.jmr.xmlparser.digester.util; + +import java.io.File; + +public class FileUtils { + public static File getXmlFile(String fileName) { + String userDir = System.getProperty("user.dir"); + String fullName = userDir + File.separator + "data" + File.separator + fileName + ".xml"; + File xml = new File(fullName); + + return xml; + } +} diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/.gitkeep b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml new file mode 100644 index 0000000000..831b8d9ce3 --- /dev/null +++ b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/java/.gitkeep b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/java/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/resources/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From 2804027660154b6900cf73f141b55611451ff27a Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Wed, 1 Mar 2017 22:44:39 +0800 Subject: [PATCH 054/646] fix remove method --- .../basic/collection/concrete/LinkedList.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/group12/382266293/coding/basic/collection/concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java index c1e572d33c..cb3d87684d 100644 --- a/group12/382266293/coding/basic/collection/concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -91,21 +91,25 @@ public E removeLast(){ @SuppressWarnings("unchecked") public E remove(int index) { checkIndex(index); - Node pNode = getNode(index); - + Node pNode = null; + E data = null; if (index == 0) { + data = (E) head.data; head = head.next; - } else if (index == size-1 ) { - getNode(index-1).next = null; + } else if (index == size-1) { + pNode = getNode(index - 1); + data = (E) pNode.next.data; + pNode.next = null; } else { - Node node = head; + pNode = head; for ( int i = 0; i < index - 1 ; i++) { - node = node.next; + pNode = pNode.next; } - node.next = node.next.next; + data = (E) pNode.next.data; + pNode.next =pNode.next.next; } size--; - return pNode.data; + return data; } @Override From fb4d8610ed07f8d705e042d7fbc344e40c330cf7 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Wed, 1 Mar 2017 23:48:14 +0800 Subject: [PATCH 055/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/coderising/array/ArrayUtil.java | 83 +++++++++++++++++-- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java b/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java index 8d11e10982..e0783e0158 100644 --- a/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java +++ b/group08/1144989424/secondPractice/src/coderising/array/ArrayUtil.java @@ -2,6 +2,13 @@ import java.util.ArrayList; +/** + * + * @author Wayss + * 2017-03-01 + * + */ + public class ArrayUtil { /** @@ -89,7 +96,11 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ - return null; + int[] newArray = new int[oldArray.length + size]; + for(int i = 0; i < oldArray.length; i++){ + newArray[i] = oldArray[i]; + } + return newArray; } /** @@ -100,7 +111,26 @@ public int[] grow(int [] oldArray, int size){ * @return */ public int[] fibonacci(int max){ - return null; + if(1 == max){ + return new int[0]; + } + if(max == 2){ + return new int[]{1,1}; + } + int [] result = new int[]{1,1,2}; + //i琛ㄧず鏁扮粍涓渶鍚庝竴涓暟瀛楃殑涓嬫爣 + int i = 2; + //鏂愭尝閭e鏁板垪鐨勬渶鍚庝竴涓暟 + int lastNumber = 3; + while(lastNumber < max){ + lastNumber = result[i] + result[i-1]; + //娣诲姞鍓嶏紝鍒ゆ柇鏁扮粍鏄惁闇瑕佹墿澶 + if(result.length == i+1){ + result = grow(result, 1); + } + result[i++] = lastNumber; + } + return result; } /** @@ -110,7 +140,22 @@ public int[] fibonacci(int max){ * @return */ public int[] getPrimes(int max){ - return null; + //index涓簉esult鏈鍚庣殑涓嬫爣 + int index = 0; + int result[] = new int[0]; + for(int i = 2; i < max; i++){ + for(int j = 2; j < i; j++){ + //鍒ゆ柇鍐呭惊鐜痡鏄惁鏄寰幆i鐨勮川鏁 + if(i % j == 0){ + break; + } + if(result.length == index+1){ + result = grow(result, 1); + } + result[index++] = i; + } + } + return result; } /** @@ -120,7 +165,27 @@ public int[] getPrimes(int max){ * @return */ public int[] getPerfectNumbers(int max){ - return null; + //index涓簉esult鏈鍚庣殑涓嬫爣 + int index = 0; + int result[] = new int[0]; + for(int i = 0; i < max; i++){ + int sum = 0; + for(int j = 0; j < i; j++){ + //j濡傛灉鍙互琚玦鏁撮櫎锛屼唬琛╦鏄痠鐨勫洜瀛 + if(i % j == 0){ + sum += j; + } + } + //sum鏄洜瀛愪箣鍜岋紝鑻ョ瓑浜巌鏈韩锛屽氨鏄滃畬鏁扳 + if(sum == i){ + if(result.length == index+1){ + result = grow(result, 1); + } + result[index++] = i; + } + } + + return result; } /** @@ -132,7 +197,15 @@ public int[] getPerfectNumbers(int max){ * @return */ public String join(int[] array, String seperator){ - return null; + String result = ""; + for(int i = 0; i < array.length; i++){ + if(i == array.length -1 ){ + result += array[i]; + }else{ + result += array[i] + "-"; + } + } + return result; } From 46e983244e08729345884b661e7d4cdb0b83c979 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Thu, 2 Mar 2017 06:34:00 +0800 Subject: [PATCH 056/646] Struts Done --- .../coding/basic/util/ActionXMLreader.java | 53 ++++++ .../coding/basic/util/XMLreader.java | 74 -------- group12/382266293/src/litestruts/Struts.java | 174 +++++++----------- 3 files changed, 115 insertions(+), 186 deletions(-) create mode 100644 group12/382266293/coding/basic/util/ActionXMLreader.java delete mode 100644 group12/382266293/coding/basic/util/XMLreader.java diff --git a/group12/382266293/coding/basic/util/ActionXMLreader.java b/group12/382266293/coding/basic/util/ActionXMLreader.java new file mode 100644 index 0000000000..8f6e0eb497 --- /dev/null +++ b/group12/382266293/coding/basic/util/ActionXMLreader.java @@ -0,0 +1,53 @@ +package util; + +import java.util.List; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; + +import static util.Print.*; + +public class ActionXMLreader { + + public Node getRootNode(String add) { + SAXReader reader = new SAXReader(); + Document document = null; + Node root = null; + try { + document = reader.read(add); + root = document.getRootElement(); + } catch (DocumentException e) { + e.printStackTrace(); + } + return root; + } + + public String parseClass(Node root, String attr) { + + @SuppressWarnings("rawtypes") + List list = root.selectNodes("action[@name='" + attr + "']"); + String clazz = null; + for(Object o:list){ + Element e = (Element) o; + clazz = e.attributeValue("class"); + } + return clazz; + } + + public String parseResult(Node root, String attr, String result) { + + @SuppressWarnings("rawtypes") + List list = root.selectNodes("action[@name='" + attr + "']/result[@name='" + result + "']"); + + String jsp = null; + for(Object o:list){ + Element e = (Element) o; + jsp = e.getTextTrim(); + } + return jsp; + } + + +} diff --git a/group12/382266293/coding/basic/util/XMLreader.java b/group12/382266293/coding/basic/util/XMLreader.java deleted file mode 100644 index 1cdee9dc1c..0000000000 --- a/group12/382266293/coding/basic/util/XMLreader.java +++ /dev/null @@ -1,74 +0,0 @@ -package util; -import java.util.Iterator; -import java.util.List; - -import org.dom4j.Attribute; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Element; -import org.dom4j.Node; -import org.dom4j.io.SAXReader; - -import static util.Print.*; - -public class XMLreader { - - private static String address = "src/litestruts/struts.xml"; - - public Document parse(String add) throws DocumentException { - SAXReader reader = new SAXReader(); - Document document = reader.read(add); - return document; - } - - public String parseClass(String attr) { - - Document doc = null; - try { - doc = parse(address); - } catch (DocumentException e1) { - e1.printStackTrace(); - } - - Node root = doc.getRootElement(); - List list = root.selectNodes("action[@name='" + attr + "']"); - String clazz = null; - for(Object o:list){ - Element e = (Element) o; - clazz=e.attributeValue("class"); - System.out.println("class = " + clazz); - } - return clazz; - } - - - - public String parseResult(String attr, String result) { - - Document doc = null; - try { - doc = parse(address); - } catch (DocumentException e1) { - e1.printStackTrace(); - } - - Node root = doc.getRootElement(); - List list = root.selectNodes("action[@name='" + attr + "']/result[@name='" + result + "']"); - - String jsp = null; - for(Object o:list){ - Element e = (Element) o; - jsp = e.getTextTrim(); - } - return jsp; - } - - - - public static void main(String args[]) throws DocumentException { - XMLreader reader = new XMLreader(); - reader.parseClass("login"); - - } - -} diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java index b520ee7e89..2eb4a01848 100644 --- a/group12/382266293/src/litestruts/Struts.java +++ b/group12/382266293/src/litestruts/Struts.java @@ -1,7 +1,6 @@ package litestruts; -import static util.Print.println; - +import util.ActionXMLreader; import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; @@ -10,137 +9,82 @@ import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; - -import util.XMLreader; - - +import org.dom4j.Node; +import static util.Print.*; public class Struts { - static Object actionObj; - static Object viewObj; + private static Object actionObj = null; + private static String address = "src/litestruts/struts.xml"; - public static View runAction(String actionName, Map parameters) throws IntrospectionException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { - - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters - - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); - Assert.assertEquals("login successful", view.getParameters().get("message")); - - - - /jsp/homepage.jsp - /jsp/showLogin.jsp - - */ + @SuppressWarnings("unchecked") + public static View runAction(String actionName, Map parameters){ + + ActionXMLreader reader = new ActionXMLreader(); + Node root = reader.getRootNode(address); - XMLreader reader = new XMLreader(); - String clazz = reader.parseClass(actionName); - + String clazz = reader.parseClass(root, actionName); actionObj = getObj(clazz); - - setParams(actionObj,parameters); - String result = (String) invoke(actionObj,"execute"); - String viewPage = reader.parseResult(actionName,result); - Map viewParams = getViewParams(actionObj); - viewParams.put("jsp", viewPage); - println(viewParams); - viewObj = getObj("litestruts.View"); - setParams(viewObj,viewParams); - - return (View) viewObj; + BeanInfo bi = getBeanInfo(actionObj); + PropertyDescriptor[] pd = bi.getPropertyDescriptors(); + + setParameters(actionObj, pd, parameters); + String executeResult = (String) getResult(actionObj, bi, "execute"); + String jsp = reader.parseResult(root, actionName, executeResult); + + Map readParamters = new HashMap(); + readParamters = getReadParameters(actionObj, pd); + + View view = new View(); + view.setJsp(jsp); + view.setParameters(readParamters); + + return view; } - - private static Object getObj(String clazz) { - Class cls = null; - try { - cls = Class.forName(clazz); + + private static Object getObj(String clazz) { + @SuppressWarnings("rawtypes") + Class cls = null; + + try { + cls = Class.forName(clazz); + return cls.newInstance(); } catch (ClassNotFoundException e) { e.printStackTrace(); - } - try { - return cls.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { + }catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); - } - return cls; + } + return null; } - public static Map getViewParams (Object obj) { - - PropertyDescriptor[] pd0 = getPropertyDescriptor(obj); - Map viewParams = new HashMap(); - - for (int i = 0; i < pd0.length; i++) { - String readMethod = pd0[i].getReadMethod().getName().substring(3); - String value = null; - try { - value = (String) pd0[i].getReadMethod().invoke(obj); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - viewParams.put(readMethod.toLowerCase(), value); - } - return viewParams; - } - - - private static PropertyDescriptor[] getPropertyDescriptor(Object obj) { - - BeanInfo bi0 = getBeanInfo(obj); - PropertyDescriptor[] pd0 = bi0.getPropertyDescriptors(); - return pd0; - } - private static BeanInfo getBeanInfo(Object obj) { - BeanInfo bi0 = null; + BeanInfo bi = null; try { - bi0 = Introspector.getBeanInfo(obj.getClass(), Object.class); + bi = Introspector.getBeanInfo(obj.getClass(), Object.class); } catch (IntrospectionException e) { e.printStackTrace(); } - return bi0; + return bi; } - private static void setParams(Object pb0, Map parameters) { + private static void setParameters(Object obj, PropertyDescriptor[] pd ,Map parameters) { - PropertyDescriptor[] pd0 = getPropertyDescriptor(pb0); - - for (int i = 0; i < pd0.length; i++) { - String name = pd0[i].getName(); + for (int i = 0; i < pd.length; i++) { + String name = pd[i].getName(); if(parameters.containsKey(name)) try { - pd0[i].getWriteMethod().invoke(pb0,parameters.get(name)); + pd[i].getWriteMethod().invoke(obj,parameters.get(name)); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } } } - private static String invoke(Object obj, String execute) { - BeanInfo bi0 = getBeanInfo(obj); - MethodDescriptor[] methods = bi0.getMethodDescriptors(); + private static String getResult(Object obj, BeanInfo bi,String execute) { + MethodDescriptor[] methods = bi.getMethodDescriptors(); for (int i = 0; i < methods.length; i++) { String methodName = methods[i].getName(); if(methodName.equals(execute)) @@ -151,19 +95,25 @@ private static String invoke(Object obj, String execute) { } } return null; - } + + @SuppressWarnings("rawtypes") + public static Map getReadParameters (Object obj, PropertyDescriptor[] pd) { + Map viewParams = new HashMap(); - public static void main(String args[]) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException { - Map params = new HashMap(); - params.put("name","test"); - params.put("password","1234"); - - View view = runAction("login",params); - println(view.getJsp()); - - + for (int i = 0; i < pd.length; i++) { + String readMethod = pd[i].getReadMethod().getName().substring(3); + String value = null; + try { + value = (String) pd[i].getReadMethod().invoke(obj); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + viewParams.put(readMethod.toLowerCase(), value); + } + return viewParams; } + } \ No newline at end of file From 5655fd9cedfd34cc5ed90d29786a5b48e0471b67 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Thu, 2 Mar 2017 07:05:37 +0800 Subject: [PATCH 057/646] pack packages --- .../382266293/eollection/AbstractList.java | 43 ------------------- group12/382266293/eollection/Iterator.java | 7 --- group12/382266293/eollection/List.java | 16 ------- 3 files changed, 66 deletions(-) delete mode 100644 group12/382266293/eollection/AbstractList.java delete mode 100644 group12/382266293/eollection/Iterator.java delete mode 100644 group12/382266293/eollection/List.java diff --git a/group12/382266293/eollection/AbstractList.java b/group12/382266293/eollection/AbstractList.java deleted file mode 100644 index 7add091ad4..0000000000 --- a/group12/382266293/eollection/AbstractList.java +++ /dev/null @@ -1,43 +0,0 @@ - - -public abstract class AbstractList implements List { - - protected static final String PREFIX = "["; - protected static final String SUFFIX = "]"; - protected static final String SEPERATOR = ", "; - protected static final int MAX_SIZE = Integer.MAX_VALUE/3; - - protected void checkIndex(int i) { - if( i < 0 || i > Math.min(size(), MAX_SIZE)) - throw new IndexOutOfBoundsException("Size :" + size()+", Index: " + i); - } - - public boolean isEmpty() { - return size() == 0; - } - - - public int indexOf(E e) { - for (int i = 0; i < size()-1; i++) { - if (get(i).equals(e)) - return i; - } - return -1; - } - - protected abstract Iterator iterator(); - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PREFIX); - for (int i = 0; i < size(); i++) { - sb.append(get(i)); - if (i < size()-1) - sb.append(SEPERATOR); - } - sb.append(SUFFIX); - return sb.toString(); - } - -} diff --git a/group12/382266293/eollection/Iterator.java b/group12/382266293/eollection/Iterator.java deleted file mode 100644 index 05ab137bf6..0000000000 --- a/group12/382266293/eollection/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ - - -public interface Iterator { - - public boolean hasNext(); - public E next(); -} diff --git a/group12/382266293/eollection/List.java b/group12/382266293/eollection/List.java deleted file mode 100644 index f4730b943e..0000000000 --- a/group12/382266293/eollection/List.java +++ /dev/null @@ -1,16 +0,0 @@ - - -public interface List { - - public void add(E e); - - public int size(); - - public E get(int index); - - public boolean isEmpty(); - - public int indexOf(E e); - - -} From 7897b158a6c33a7048c5c948f88513fb9a3e9607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Thu, 2 Mar 2017 17:22:36 +0800 Subject: [PATCH 058/646] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=9C=BA=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E5=99=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/1425809544/1425809544.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group08/1425809544/1425809544.md b/group08/1425809544/1425809544.md index 61de0edff4..392a86ba1a 100644 --- a/group08/1425809544/1425809544.md +++ b/group08/1425809544/1425809544.md @@ -1 +1,3 @@ -娴嬭瘯 \ No newline at end of file +娴嬭瘯 + +[璁$畻鏈哄瓨鍌ㄥ櫒缁撴瀯](http://note.youdao.com/noteshare?id=a2da59b294d277d0e828f4f566015014&sub=04848681007A4C4A8649A411729AEADC) \ No newline at end of file From e29c4bb9a90ae677dd86eccfb003b82b3f9689e1 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Thu, 2 Mar 2017 18:03:45 +0800 Subject: [PATCH 059/646] cafa --- .../src/com/coderising/litestruts/Struts.java | 104 ++++++++++++------ 1 file changed, 72 insertions(+), 32 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index 82e61dbcf2..699c2e3a31 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -4,7 +4,9 @@ import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.xml.parsers.DocumentBuilder; @@ -18,28 +20,36 @@ import org.w3c.dom.NodeList; import org.xml.sax.SAXException; +import com.coderising.litestruts.bean.Action; +import com.coderising.litestruts.bean.Result; + public class Struts { private final static String ACTION = "action"; private final static String RESULT = "result"; private final static String NAME = "name"; private final static String CLASS = "class"; + private final static String TYPE = "type"; private final static String EXECUTE = "execute"; + private final static List actions; + static{ + String path = "src/com/coderising/litestruts/struts.xml"; + actions = readStrutsXml(path); + } + public static View runAction(String actionName, Map parameters) { - View view = new View(); Map viewMap = new HashMap(); - - String path = "src/com/coderising/litestruts/struts.xml"; - Map xmlMap = readStrutsXml(path, actionName); + + Action actionBean= getCurrentAction(actionName); try { - String calssPath = xmlMap.get(CLASS); + String calssPath = actionBean.getClaz(); Class clazz = Class.forName(calssPath); - Object action = clazz.newInstance(); + Object instance = clazz.newInstance(); Field[] fields = clazz.getDeclaredFields(); String fieldName; String methodName; @@ -49,25 +59,31 @@ public static View runAction(String actionName, methodName = "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); Method method = clazz.getMethod(methodName, fields[i].getType()); - method.invoke(action, parameters.get(fieldName)); + method.invoke(instance, parameters.get(fieldName)); } } Method successMethos = clazz.getMethod(EXECUTE); - Object result = successMethos.invoke(action); + Object result = successMethos.invoke(instance); for (int i = 0; i < fields.length; i++) { fieldName = fields[i].getName(); methodName = "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); Method method = clazz.getMethod(methodName); - Object value = method.invoke(action); + Object value = method.invoke(instance); viewMap.put(fieldName, value); } view.setParameters(viewMap); - String jsp = xmlMap.get(result.toString()); + List results = actionBean.getResults(); + for (int i = 0; i < results.size(); i++) { + if(results.get(i).getName()){ + + } + } + String jsp = actionBean.get(result.toString()); view.setJsp(jsp); } catch (Exception e) { @@ -85,11 +101,15 @@ public static View runAction(String actionName, * @param actionName * @return */ - private static Map readStrutsXml(String filePath, - String actionName) { + + private static List readStrutsXml(String filePath) { File xmlFile = new File(filePath); - Map xmlMap = new HashMap(); + Action action = null; + Result result = null; + List results = null; + List actions = new ArrayList(); + try { DocumentBuilder documentBuilder = DocumentBuilderFactory .newInstance().newDocumentBuilder(); @@ -100,31 +120,41 @@ private static Map readStrutsXml(String filePath, for (int i = 0; i < actionNodes.getLength(); i++) { Node actionNode = actionNodes.item(i); if (ACTION.equals(actionNode.getNodeName())) { + action = new Action(); + // 瑙f瀽action鏍囩 NamedNodeMap actionNodeMap = actionNode.getAttributes(); - String atName = actionNodeMap.getNamedItem(NAME) + String actionName = actionNodeMap.getNamedItem(NAME) .getNodeValue(); - if (atName.equals(actionName)) { - String classPath = actionNodeMap.getNamedItem(CLASS) - .getNodeValue(); - xmlMap.put(CLASS, classPath); - NodeList resultNodes = actionNode.getChildNodes(); - for (int j = 0; j < resultNodes.getLength(); j++) { - Node resultNode = resultNodes.item(j); - if (RESULT.equals(resultNode.getNodeName())) { - NamedNodeMap resultNodeMap = resultNode - .getAttributes(); - String jspName = resultNodeMap.getNamedItem( - NAME).getNodeValue(); - String jspPath = resultNode.getTextContent(); - xmlMap.put(jspName, jspPath); - } + String claz = actionNodeMap.getNamedItem(CLASS) + .getNodeValue(); + action.setName(actionName); + action.setClaz(claz); + // 瑙f瀽result鏍囩 + NodeList resultNodes = actionNode.getChildNodes(); + for (int j = 0; j < resultNodes.getLength(); j++) { + results = new ArrayList(); + Node resultNode = resultNodes.item(j); + if (RESULT.equals(resultNode.getNodeName())) { + result = new Result(); + NamedNodeMap resultNodeMap = resultNode + .getAttributes(); + String resultName = resultNodeMap + .getNamedItem(NAME).getNodeValue(); + String resultType = resultNodeMap + .getNamedItem(TYPE).getNodeValue(); + String jspPath = resultNode.getTextContent(); + result.setName(resultName); + result.setType(resultType); + result.setJspPath(jspPath); + results.add(result); } - } + action.setResults(results); } - } + actions.add(action); + } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { @@ -132,6 +162,16 @@ private static Map readStrutsXml(String filePath, } catch (IOException e) { e.printStackTrace(); } - return xmlMap; + return actions; } + + private static Action getCurrentAction(String actionName){ + + for (int i = 0; i < actions.size(); i++) { + if(actions.get(i).getName().equals(actionName)){ + return actions.get(i); + } + } + return null; + } } \ No newline at end of file From a5722d9fa6bb9b2d7528b339f794b1119410f629 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Thu, 2 Mar 2017 20:52:14 +0800 Subject: [PATCH 060/646] =?UTF-8?q?=E4=BC=98=E5=8C=96struts=E8=AF=BB?= =?UTF-8?q?=E5=8F=96xml=E6=80=9D=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/litestruts/Struts.java | 72 ++++++++++++------- .../coderising/litestruts/bean/Action.java | 45 ++++++++++++ .../coderising/litestruts/bean/Result.java | 43 +++++++++++ 3 files changed, 134 insertions(+), 26 deletions(-) create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Action.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Result.java diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index 699c2e3a31..325bb2b1c5 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -32,7 +32,9 @@ public class Struts { private final static String TYPE = "type"; private final static String EXECUTE = "execute"; + //Struts.xml鎻忚堪鐨勬墍鏈塧ction淇℃伅 private final static List actions; + //璇诲彇Struts.xml鑾峰彇鎵鏈塧ction鐩稿叧淇℃伅 static{ String path = "src/com/coderising/litestruts/struts.xml"; actions = readStrutsXml(path); @@ -43,16 +45,21 @@ public static View runAction(String actionName, View view = new View(); Map viewMap = new HashMap(); - + + //鑾峰彇褰撳墠璇锋眰鐨刟ction淇℃伅 Action actionBean= getCurrentAction(actionName); - + if(actionBean == null){ + return view; + } try { - String calssPath = actionBean.getClaz(); + //鍒涘缓瀹炰緥鑾峰彇灞炴 + String calssPath = actionBean.getClazz(); Class clazz = Class.forName(calssPath); Object instance = clazz.newInstance(); Field[] fields = clazz.getDeclaredFields(); String fieldName; String methodName; + //璋冪敤set鏂规硶涓哄睘鎬ц祴鍊 for (int i = 0; i < fields.length; i++) { fieldName = fields[i].getName(); if(parameters.containsKey(fieldName)){ @@ -63,9 +70,10 @@ public static View runAction(String actionName, } } + //璋冪敤榛樿execute鏂规硶 Method successMethos = clazz.getMethod(EXECUTE); Object result = successMethos.invoke(instance); - + // 璋冪敤get鏂规硶鑾峰彇灞炴у for (int i = 0; i < fields.length; i++) { fieldName = fields[i].getName(); methodName = "get" + fieldName.substring(0, 1).toUpperCase() @@ -75,16 +83,14 @@ public static View runAction(String actionName, viewMap.put(fieldName, value); } + //灏佽view瀵硅薄鎵闇鏁版嵁 view.setParameters(viewMap); - List results = actionBean.getResults(); for (int i = 0; i < results.size(); i++) { - if(results.get(i).getName()){ - + if(results.get(i).getName().equals(result)){ + view.setJsp(results.get(i).getRedirectUrl()); } } - String jsp = actionBean.get(result.toString()); - view.setJsp(jsp); } catch (Exception e) { e.printStackTrace(); @@ -123,38 +129,33 @@ private static List readStrutsXml(String filePath) { action = new Action(); // 瑙f瀽action鏍囩 NamedNodeMap actionNodeMap = actionNode.getAttributes(); - String actionName = actionNodeMap.getNamedItem(NAME) - .getNodeValue(); - String claz = actionNodeMap.getNamedItem(CLASS) - .getNodeValue(); + String actionName = getNodePropertyValue(actionNodeMap.getNamedItem(NAME)); + String claz = getNodePropertyValue(actionNodeMap.getNamedItem(CLASS)); action.setName(actionName); - action.setClaz(claz); + action.setClazz(claz); // 瑙f瀽result鏍囩 NodeList resultNodes = actionNode.getChildNodes(); - for (int j = 0; j < resultNodes.getLength(); j++) { - results = new ArrayList(); + results = new ArrayList(); + for (int j = 0; j < resultNodes.getLength(); j++) { Node resultNode = resultNodes.item(j); if (RESULT.equals(resultNode.getNodeName())) { result = new Result(); - NamedNodeMap resultNodeMap = resultNode - .getAttributes(); - String resultName = resultNodeMap - .getNamedItem(NAME).getNodeValue(); - String resultType = resultNodeMap - .getNamedItem(TYPE).getNodeValue(); + NamedNodeMap resultNodeMap = resultNode.getAttributes(); + String resultName = getNodePropertyValue(resultNodeMap.getNamedItem(NAME)); + String resultType = getNodePropertyValue(resultNodeMap.getNamedItem(TYPE)); String jspPath = resultNode.getTextContent(); result.setName(resultName); result.setType(resultType); - result.setJspPath(jspPath); + result.setRedirectUrl(jspPath); results.add(result); } + } action.setResults(results); + actions.add(action); } } - - actions.add(action); - + } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { @@ -165,6 +166,11 @@ private static List readStrutsXml(String filePath) { return actions; } + /** + * 鑾峰彇褰撳墠action淇℃伅 + * @param actionName + * @return + */ private static Action getCurrentAction(String actionName){ for (int i = 0; i < actions.size(); i++) { @@ -174,4 +180,18 @@ private static Action getCurrentAction(String actionName){ } return null; } + + /** + * 鑾峰彇鑺傜偣灞炴у + * @param node + * @return + */ + private static String getNodePropertyValue(Node node){ + + if(node!=null){ + return node.getNodeValue(); + } + return null; + } + } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Action.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Action.java new file mode 100644 index 0000000000..1c8c26f6d0 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Action.java @@ -0,0 +1,45 @@ +package com.coderising.litestruts.bean; + +import java.util.List; + +/** + * struts.xml 瀵瑰簲action鏍囩 + * @author zj + */ +public class Action { + + /*鍚嶇О*/ + private String name; + + /*绫诲叏鍚嶅悕绉*/ + private String clazz; + + /*result*/ + private List results; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getClazz() { + return clazz; + } + + public void setClazz(String clazz) { + this.clazz = clazz; + } + + public List getResults() { + return results; + } + + public void setResults(List results) { + this.results = results; + } + + +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Result.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Result.java new file mode 100644 index 0000000000..a595176c19 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/bean/Result.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts.bean; + +/** + * struts.xml 瀵瑰簲result鏍囩 + * @author zj + */ +public class Result { + + /*鍚嶇О*/ + private String name; + + /*璺宠浆绫诲瀷*/ + private String type; + + /*璺宠浆璺緞*/ + private String redirectUrl; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + +} From 1a328aa2e97fea2367e6c89e7315ffd144b65f6b Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Thu, 2 Mar 2017 21:53:19 +0800 Subject: [PATCH 061/646] 5commit 5 data struct homework --- group12/247565311/week1/LinkedList.java | 9 ++- group12/247565311/week2/ArrayUtil.java | 80 +++++++++------------- group12/247565311/week2/ArrayUtilTest.java | 7 +- 3 files changed, 44 insertions(+), 52 deletions(-) diff --git a/group12/247565311/week1/LinkedList.java b/group12/247565311/week1/LinkedList.java index c3f0ca2eb8..3acf90ac47 100644 --- a/group12/247565311/week1/LinkedList.java +++ b/group12/247565311/week1/LinkedList.java @@ -255,8 +255,13 @@ public Object[] toArray() { @Override public T[] toArray(T[] arg0) { - - return null; + T[]res = (T[]) new Object[size]; + Node n = head; + for(int i=0;i data = new ArrayList(); - int leno = oldArray.length; - for(int i=0;i data = new ArrayList(); - int p1=0,p2=0,len1=array1.length,len2=array2.length; - int val1=0,val2=0; - if(len1 == 0) return array2; - if(len2 == 0) return array1; - while(p1=len1){ - data.add(array2[p2]); + temparray[temp] = array2[p2]; p2 += 1; continue; } if(p2>=len2){ - data.add(array1[p1]); + temparray[temp] = array1[p1]; p1 += 1; continue; } - if(p1val2){ - data.add(val2); + if(array1[p1] > array2[p2]){ + temparray[temp] = array2[p2]; p2 += 1; - }else if(val1 li = null,resli = new ArrayList(); for(int i=6;i Date: Fri, 3 Mar 2017 00:12:03 +0800 Subject: [PATCH 062/646] week1 rebuild week2 work1 finished --- group12/495473393/Code/src/Week2/array/Main.java | 15 --------------- .../Code/src/{Week1 => week1}/ArrayList.java | 0 .../Code/src/{Week1 => week1}/BinaryTreeNode.java | 0 .../Code/src/{Week1 => week1}/Iterator.java | 0 .../Code/src/{Week1 => week1}/LinkedList.java | 0 .../495473393/Code/src/{Week1 => week1}/List.java | 0 .../Code/src/{Week1 => week1}/Queue.java | 0 .../Code/src/{Week1 => week1}/Stack.java | 0 .../src/{Week2 => week2}/array/ArrayUtil.java | 0 .../{Week2 => week2}/litestruts/LoginAction.java | 0 .../src/{Week2 => week2}/litestruts/Struts.java | 0 .../{Week2 => week2}/litestruts/StrutsTest.java | 0 .../src/{Week2 => week2}/litestruts/View.java | 0 .../src/{Week2 => week2}/litestruts/struts.xml | 0 14 files changed, 15 deletions(-) delete mode 100644 group12/495473393/Code/src/Week2/array/Main.java rename group12/495473393/Code/src/{Week1 => week1}/ArrayList.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/BinaryTreeNode.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/Iterator.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/LinkedList.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/List.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/Queue.java (100%) rename group12/495473393/Code/src/{Week1 => week1}/Stack.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/array/ArrayUtil.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/litestruts/LoginAction.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/litestruts/Struts.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/litestruts/StrutsTest.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/litestruts/View.java (100%) rename group12/495473393/Code/src/{Week2 => week2}/litestruts/struts.xml (100%) diff --git a/group12/495473393/Code/src/Week2/array/Main.java b/group12/495473393/Code/src/Week2/array/Main.java deleted file mode 100644 index ad4388fe87..0000000000 --- a/group12/495473393/Code/src/Week2/array/Main.java +++ /dev/null @@ -1,15 +0,0 @@ -package Week2.array; - -public class Main { - - public static void main(String[] args) { - ArrayUtil arrayUtil = new ArrayUtil(); - int[] a = { 1,3,5,7}; - int[] b={ 2,4,6,8,}; - int[] x = arrayUtil.merge(a,b); - for (int i : x) { - System.out.println(i); - } - } - -} diff --git a/group12/495473393/Code/src/Week1/ArrayList.java b/group12/495473393/Code/src/week1/ArrayList.java similarity index 100% rename from group12/495473393/Code/src/Week1/ArrayList.java rename to group12/495473393/Code/src/week1/ArrayList.java diff --git a/group12/495473393/Code/src/Week1/BinaryTreeNode.java b/group12/495473393/Code/src/week1/BinaryTreeNode.java similarity index 100% rename from group12/495473393/Code/src/Week1/BinaryTreeNode.java rename to group12/495473393/Code/src/week1/BinaryTreeNode.java diff --git a/group12/495473393/Code/src/Week1/Iterator.java b/group12/495473393/Code/src/week1/Iterator.java similarity index 100% rename from group12/495473393/Code/src/Week1/Iterator.java rename to group12/495473393/Code/src/week1/Iterator.java diff --git a/group12/495473393/Code/src/Week1/LinkedList.java b/group12/495473393/Code/src/week1/LinkedList.java similarity index 100% rename from group12/495473393/Code/src/Week1/LinkedList.java rename to group12/495473393/Code/src/week1/LinkedList.java diff --git a/group12/495473393/Code/src/Week1/List.java b/group12/495473393/Code/src/week1/List.java similarity index 100% rename from group12/495473393/Code/src/Week1/List.java rename to group12/495473393/Code/src/week1/List.java diff --git a/group12/495473393/Code/src/Week1/Queue.java b/group12/495473393/Code/src/week1/Queue.java similarity index 100% rename from group12/495473393/Code/src/Week1/Queue.java rename to group12/495473393/Code/src/week1/Queue.java diff --git a/group12/495473393/Code/src/Week1/Stack.java b/group12/495473393/Code/src/week1/Stack.java similarity index 100% rename from group12/495473393/Code/src/Week1/Stack.java rename to group12/495473393/Code/src/week1/Stack.java diff --git a/group12/495473393/Code/src/Week2/array/ArrayUtil.java b/group12/495473393/Code/src/week2/array/ArrayUtil.java similarity index 100% rename from group12/495473393/Code/src/Week2/array/ArrayUtil.java rename to group12/495473393/Code/src/week2/array/ArrayUtil.java diff --git a/group12/495473393/Code/src/Week2/litestruts/LoginAction.java b/group12/495473393/Code/src/week2/litestruts/LoginAction.java similarity index 100% rename from group12/495473393/Code/src/Week2/litestruts/LoginAction.java rename to group12/495473393/Code/src/week2/litestruts/LoginAction.java diff --git a/group12/495473393/Code/src/Week2/litestruts/Struts.java b/group12/495473393/Code/src/week2/litestruts/Struts.java similarity index 100% rename from group12/495473393/Code/src/Week2/litestruts/Struts.java rename to group12/495473393/Code/src/week2/litestruts/Struts.java diff --git a/group12/495473393/Code/src/Week2/litestruts/StrutsTest.java b/group12/495473393/Code/src/week2/litestruts/StrutsTest.java similarity index 100% rename from group12/495473393/Code/src/Week2/litestruts/StrutsTest.java rename to group12/495473393/Code/src/week2/litestruts/StrutsTest.java diff --git a/group12/495473393/Code/src/Week2/litestruts/View.java b/group12/495473393/Code/src/week2/litestruts/View.java similarity index 100% rename from group12/495473393/Code/src/Week2/litestruts/View.java rename to group12/495473393/Code/src/week2/litestruts/View.java diff --git a/group12/495473393/Code/src/Week2/litestruts/struts.xml b/group12/495473393/Code/src/week2/litestruts/struts.xml similarity index 100% rename from group12/495473393/Code/src/Week2/litestruts/struts.xml rename to group12/495473393/Code/src/week2/litestruts/struts.xml From f3673733c2597f6a8d2648b0e7949f9b68c132f9 Mon Sep 17 00:00:00 2001 From: tanghaojie Date: Fri, 3 Mar 2017 00:13:18 +0800 Subject: [PATCH 063/646] week1 rebuild and week2 first work finished --- .../org.eclipse.core.resources.prefs | 2 +- .../495473393/Code/src/week1/ArrayList.java | 2 +- .../Code/src/week1/BinaryTreeNode.java | 2 +- .../495473393/Code/src/week1/Iterator.java | 2 +- .../495473393/Code/src/week1/LinkedList.java | 2 +- group12/495473393/Code/src/week1/List.java | 2 +- group12/495473393/Code/src/week1/Queue.java | 2 +- group12/495473393/Code/src/week1/Stack.java | 2 +- .../Code/src/week2/array/ArrayUtil.java | 102 +++++++++++- .../Code/src/week2/array/ArrayUtilTest.java | 150 ++++++++++++++++++ .../src/week2/litestruts/LoginAction.java | 2 +- .../Code/src/week2/litestruts/Struts.java | 2 +- .../Code/src/week2/litestruts/StrutsTest.java | 2 +- .../Code/src/week2/litestruts/View.java | 2 +- 14 files changed, 257 insertions(+), 19 deletions(-) create mode 100644 group12/495473393/Code/src/week2/array/ArrayUtilTest.java diff --git a/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs b/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs index 3a0682eb48..7bc4554011 100644 --- a/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs +++ b/group12/495473393/Code/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,3 @@ eclipse.preferences.version=1 -encoding//src/Week2/array/ArrayUtil.java=UTF-8 +encoding//src/week2/array/ArrayUtil.java=UTF-8 encoding/src=UTF-8 diff --git a/group12/495473393/Code/src/week1/ArrayList.java b/group12/495473393/Code/src/week1/ArrayList.java index 3614ed930a..daec2f718b 100644 --- a/group12/495473393/Code/src/week1/ArrayList.java +++ b/group12/495473393/Code/src/week1/ArrayList.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public class ArrayList implements List { diff --git a/group12/495473393/Code/src/week1/BinaryTreeNode.java b/group12/495473393/Code/src/week1/BinaryTreeNode.java index d5518b7b96..2e4d695983 100644 --- a/group12/495473393/Code/src/week1/BinaryTreeNode.java +++ b/group12/495473393/Code/src/week1/BinaryTreeNode.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public class BinaryTreeNode { private Object data; diff --git a/group12/495473393/Code/src/week1/Iterator.java b/group12/495473393/Code/src/week1/Iterator.java index b6075594ac..dbf72bf1f7 100644 --- a/group12/495473393/Code/src/week1/Iterator.java +++ b/group12/495473393/Code/src/week1/Iterator.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public interface Iterator { public boolean hasNext(); diff --git a/group12/495473393/Code/src/week1/LinkedList.java b/group12/495473393/Code/src/week1/LinkedList.java index 9a77242c40..b6c3b9af89 100644 --- a/group12/495473393/Code/src/week1/LinkedList.java +++ b/group12/495473393/Code/src/week1/LinkedList.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public class LinkedList implements List { diff --git a/group12/495473393/Code/src/week1/List.java b/group12/495473393/Code/src/week1/List.java index 6785ebabbf..00d6eda9f6 100644 --- a/group12/495473393/Code/src/week1/List.java +++ b/group12/495473393/Code/src/week1/List.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public interface List { public void add(Object o); diff --git a/group12/495473393/Code/src/week1/Queue.java b/group12/495473393/Code/src/week1/Queue.java index a03fd44b6b..c503ef3853 100644 --- a/group12/495473393/Code/src/week1/Queue.java +++ b/group12/495473393/Code/src/week1/Queue.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public class Queue { diff --git a/group12/495473393/Code/src/week1/Stack.java b/group12/495473393/Code/src/week1/Stack.java index 074f310add..9c731b59f0 100644 --- a/group12/495473393/Code/src/week1/Stack.java +++ b/group12/495473393/Code/src/week1/Stack.java @@ -1,4 +1,4 @@ -package Week1; +package week1; public class Stack { private ArrayList elementData = new ArrayList(); diff --git a/group12/495473393/Code/src/week2/array/ArrayUtil.java b/group12/495473393/Code/src/week2/array/ArrayUtil.java index a280dd49c9..6fa6830304 100644 --- a/group12/495473393/Code/src/week2/array/ArrayUtil.java +++ b/group12/495473393/Code/src/week2/array/ArrayUtil.java @@ -1,4 +1,4 @@ -package Week2.array; +package week2.array; import java.util.Arrays; @@ -12,6 +12,9 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin) { + if (origin == null) { + return; + } int len = origin.length; int forLen = len / 2; int temp; @@ -31,6 +34,9 @@ public void reverseArray(int[] origin) { */ public int[] removeZero(int[] oldArray) { + if (oldArray == null) { + return null; + } int[] newArray = new int[oldArray.length]; int index = 0; for (int x : oldArray) { @@ -52,6 +58,13 @@ public int[] removeZero(int[] oldArray) { */ public int[] merge(int[] array1, int[] array2) { + if (array1 == null && array2 == null) { + return null; + } else if (array1 == null) { + return array2; + } else if (array2 == null) { + return array1; + } int[] newArray = new int[array1.length + array2.length]; int newIndex = 0; int index1 = 0; @@ -97,7 +110,13 @@ public int[] merge(int[] array1, int[] array2) { * @return */ public int[] grow(int[] oldArray, int size) { - return null; + if (oldArray == null) { + return null; + } + if (size < 0) { + size = 0; + } + return Arrays.copyOf(oldArray, oldArray.length + size); } /** @@ -108,7 +127,20 @@ public int[] grow(int[] oldArray, int size) { * @return */ public int[] fibonacci(int max) { - return null; + if (max <= 1) { + return null; + } + int now = 2; + int index = 1; + int[] fiboArray = new int[] { 1, 1 }; + while (now < max) { + now = fiboArray[index] + fiboArray[index - 1]; + if (index + 2 > fiboArray.length) { + fiboArray = Arrays.copyOf(fiboArray, fiboArray.length * 2); + } + fiboArray[++index] = now; + } + return Arrays.copyOf(fiboArray, index); } /** @@ -116,9 +148,36 @@ public int[] fibonacci(int max) { * * @param max * @return + * @throws Exception */ - public int[] getPrimes(int max) { - return null; + public int[] getPrimes(int max) throws Exception { + if (max < 2) { + return null; + } + int[] primes = new int[] { 2 }; + int index = 0; + int newPrimes = 3; + while (newPrimes < max) { + if (index + 2 > primes.length) { + primes = Arrays.copyOf(primes, primes.length * 2); + } + primes[++index] = newPrimes; + + boolean foundPrime = false; + while (!foundPrime) { + newPrimes += 2; + foundPrime = true; + int mid = newPrimes / 2 + 1; + for (int i = 3; i <= mid; i++) { + if (newPrimes % i == 0) { + foundPrime = false; + break; + } + } + } + } + + return Arrays.copyOf(primes, ++index); } /** @@ -128,7 +187,28 @@ public int[] getPrimes(int max) { * @return */ public int[] getPerfectNumbers(int max) { - return null; + int perfectNumber = 6; + if (max < perfectNumber) { + return null; + } + int[] perfectNumbers = new int[] { perfectNumber }; + + while (perfectNumber < max) { + perfectNumber++; + int sum = 0; + for (int i = 1; i < perfectNumber; i++) { + if (perfectNumber % i == 0) { + sum += i; + } + } + if (sum == perfectNumber) { + int[] newArr = new int[perfectNumbers.length + 1]; + System.arraycopy(perfectNumbers, 0, newArr, 0, perfectNumbers.length); + perfectNumbers = newArr; + perfectNumbers[perfectNumbers.length - 1] = perfectNumber; + } + } + return perfectNumbers; } /** @@ -139,7 +219,15 @@ public int[] getPerfectNumbers(int max) { * @return */ public String join(int[] array, String seperator) { - return null; + if (array == null || array.length == 0) { + return null; + } + StringBuilder sb = new StringBuilder(); + sb.append(array[0]); + for (int i = 1; i < array.length; i++) { + sb.append(seperator + array[i]); + } + return sb.toString(); } } diff --git a/group12/495473393/Code/src/week2/array/ArrayUtilTest.java b/group12/495473393/Code/src/week2/array/ArrayUtilTest.java new file mode 100644 index 0000000000..7f5cf05025 --- /dev/null +++ b/group12/495473393/Code/src/week2/array/ArrayUtilTest.java @@ -0,0 +1,150 @@ +/** + * + */ +package week2.array; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * @author TangHaoJie + * + */ +public class ArrayUtilTest { + + private ArrayUtil au; + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + au = new ArrayUtil(); + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * {@link week2.array.ArrayUtil#reverseArray(int[])} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testReverseArray() { + int[] a1 = null; + au.reverseArray(a1); + assertArrayEquals(null, a1); + + int[] a2 = new int[0]; + au.reverseArray(a2); + assertArrayEquals(new int[0], a2); + + int[] a3 = new int[] { 1, 2, 3, 4, 5, 6 }; + au.reverseArray(a3); + assertArrayEquals(new int[] { 6, 5, 4, 3, 2, 1 }, a3); + } + + /** + * {@link week2.array.ArrayUtil#removeZero(int[])} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testRemoveZero() { + int[] a1 = null; + int[] b1 = au.removeZero(a1); + assertArrayEquals(b1, a1); + + int[] a2 = new int[0]; + int[] b2 = au.removeZero(a2); + assertArrayEquals(b2, a2); + + int[] a3 = new int[] { 1, 2, 3, 4, 5, 6 }; + int[] b3 = au.removeZero(a3); + assertArrayEquals(b3, a3); + + int[] a4 = new int[] { 0, 0, 1, 2, 0, 3, 4, 0, 5, 6 }; + int[] b4 = au.removeZero(a4); + assertArrayEquals(b4, new int[] { 1, 2, 3, 4, 5, 6 }); + + int[] a5 = new int[] { 1, 2, 0, 3, 4, 0, 5, 6, 0, 0, 0 }; + int[] b5 = au.removeZero(a5); + assertArrayEquals(b5, new int[] { 1, 2, 3, 4, 5, 6 }); + } + + /** + * {@link week2.array.ArrayUtil#merge(int[], int[])} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testMerge() { + int[] a1 = null; + int[] b1 = null; + int[] c1 = au.merge(a1, b1); + assertArrayEquals(c1, null); + + int[] a2 = new int[0]; + int[] b2 = new int[0]; + int[] c2 = au.merge(a2, b2); + assertArrayEquals(c2, new int[0]); + + int[] a3 = new int[] { 1, 3, 5, 7, 9 }; + int[] b3 = new int[] { 2, 4, 6, 8, 10 }; + int[] c3 = au.merge(a3, b3); + assertArrayEquals(c3, new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); + } + + /** + * {@link week2.array.ArrayUtil#grow(int[], int)} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testGrow() { + int[] a1 = null; + int[] b1 = au.grow(a1, 0); + assertArrayEquals(b1, a1); + + int[] a2 = new int[0]; + int[] b2 = au.grow(a2, 0); + assertArrayEquals(b2, a2); + + int[] a3 = new int[] { 1, 2 }; + int[] b3 = au.grow(a3, -10); + assertArrayEquals(b3, a3); + + int[] a4 = new int[] { 1, 2 }; + int[] b4 = au.grow(a4, 5); + assertArrayEquals(b4, new int[] { 1, 2, 0, 0, 0, 0, 0 }); + } + + /** + * {@link week2.array.ArrayUtil#fibonacci(int)} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testFibonacci() { + } + + /** + * {@link week2.array.ArrayUtil#getPrimes(int)} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testGetPrimes() { + } + + /** + * {@link week2.array.ArrayUtil#getPerfectNumbers(int)} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testGetPerfectNumbers() { + } + + /** + * {@link week2.array.ArrayUtil#join(int[], java.lang.String)} 鐨勬祴璇曟柟娉曘 + */ + @Test + public void testJoin() { + } + +} diff --git a/group12/495473393/Code/src/week2/litestruts/LoginAction.java b/group12/495473393/Code/src/week2/litestruts/LoginAction.java index de7a05b462..d8daf1c835 100644 --- a/group12/495473393/Code/src/week2/litestruts/LoginAction.java +++ b/group12/495473393/Code/src/week2/litestruts/LoginAction.java @@ -1,4 +1,4 @@ -package Week2.litestruts; +package week2.litestruts; /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 diff --git a/group12/495473393/Code/src/week2/litestruts/Struts.java b/group12/495473393/Code/src/week2/litestruts/Struts.java index db818b0924..bafaaafd8c 100644 --- a/group12/495473393/Code/src/week2/litestruts/Struts.java +++ b/group12/495473393/Code/src/week2/litestruts/Struts.java @@ -1,4 +1,4 @@ -package Week2.litestruts; +package week2.litestruts; import java.util.Map; diff --git a/group12/495473393/Code/src/week2/litestruts/StrutsTest.java b/group12/495473393/Code/src/week2/litestruts/StrutsTest.java index 326e33daee..9187ef02f2 100644 --- a/group12/495473393/Code/src/week2/litestruts/StrutsTest.java +++ b/group12/495473393/Code/src/week2/litestruts/StrutsTest.java @@ -1,4 +1,4 @@ -package Week2.litestruts; +package week2.litestruts; import java.util.HashMap; import java.util.Map; diff --git a/group12/495473393/Code/src/week2/litestruts/View.java b/group12/495473393/Code/src/week2/litestruts/View.java index 5abed5f20d..01a422a808 100644 --- a/group12/495473393/Code/src/week2/litestruts/View.java +++ b/group12/495473393/Code/src/week2/litestruts/View.java @@ -1,4 +1,4 @@ -package Week2.litestruts; +package week2.litestruts; import java.util.Map; From 14f2ec470bc08e424ea5f675ba72e3a3e4d91512 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Fri, 3 Mar 2017 00:25:59 +0800 Subject: [PATCH 064/646] save to github --- .../src/coderising/litestruts/Struts.java | 39 +++++++++++++++++-- .../src/coderising/litestruts/struts.xml | 4 +- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java index b3570c4a26..083dfc4a53 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java @@ -1,17 +1,43 @@ package coderising.litestruts; +import java.io.File; +import java.util.List; import java.util.Map; +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + public class Struts { + + public static void main(String [] args) throws Exception{ + Document document = readStrutsXml("src/coderising/litestruts/struts.xml"); + Element rootElement = document.getRootElement(); + List childElements = rootElement.elements(); + for (Element child : childElements) { + System.out.println("login" + child.elementText("login")); + } + } - public static View runAction(String actionName, Map parameters) { + public static View runAction(String actionName, Map parameters) throws Exception { /* 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - + */ + Document document = readStrutsXml("src/coderising/litestruts/struts.xml"); + //鎷垮埌鏍笶lement + Element rootElement = document.getRootElement(); + //鐢ㄦ牴閬嶅巻鑺傜偣寰楀埌Node + List childElements = rootElement.elements(); + for (Element child : childElements) { + String name = child.getName(); + } + //鏍规嵁Node鍚嶅瓧鑾峰緱鍊 + + /* 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , "password"="1234") , @@ -29,6 +55,13 @@ public static View runAction(String actionName, Map parameters) { */ return null; - } + } + + private static Document readStrutsXml(String filePath) throws Exception{ + SAXReader reader = new SAXReader(); + Document document = reader.read(new File(filePath)); + + return document; + } } diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml index a6cfe43e6c..f6aecf208a 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml @@ -5,7 +5,7 @@ /jsp/showLogin.jsp - /jsp/welcome.jsp - /jsp/error.jsp + /jsp/welcome.jsp + /jsp/error.jsp \ No newline at end of file From dc83eec51c3186a7e6a31178c083933b24109805 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Fri, 3 Mar 2017 09:33:23 +0800 Subject: [PATCH 065/646] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2258659044/zj-2017/src/com/coderising/litestruts/Struts.java | 1 + 1 file changed, 1 insertion(+) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index 325bb2b1c5..d7196e4ce5 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -89,6 +89,7 @@ public static View runAction(String actionName, for (int i = 0; i < results.size(); i++) { if(results.get(i).getName().equals(result)){ view.setJsp(results.get(i).getRedirectUrl()); + break; } } From 00d48e6bf328abd2388ebe70dded3f0abfa5adaa Mon Sep 17 00:00:00 2001 From: vegetableDogBai Date: Fri, 3 Mar 2017 09:37:52 +0800 Subject: [PATCH 066/646] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/week2/litestruts/struts.xml | 11 + .../563253496/week2/src/array/ArrayUtil.java | 329 ++++++++++++++++++ .../week2/src/litestruts/LoginAction.java | 39 +++ .../week2/src/litestruts/Struts.java | 128 +++++++ .../week2/src/litestruts/StrutsTest.java | 43 +++ .../563253496/week2/src/litestruts/View.java | 23 ++ .../563253496/week2/src/litestruts/struts.xml | 11 + .../563253496/week2/src/litestruts/test.java | 44 +++ .../week2/src/test/array/ArrayUtilTest.java | 166 +++++++++ 9 files changed, 794 insertions(+) create mode 100644 group12/563253496/week2/out/production/week2/litestruts/struts.xml create mode 100644 group12/563253496/week2/src/array/ArrayUtil.java create mode 100644 group12/563253496/week2/src/litestruts/LoginAction.java create mode 100644 group12/563253496/week2/src/litestruts/Struts.java create mode 100644 group12/563253496/week2/src/litestruts/StrutsTest.java create mode 100644 group12/563253496/week2/src/litestruts/View.java create mode 100644 group12/563253496/week2/src/litestruts/struts.xml create mode 100644 group12/563253496/week2/src/litestruts/test.java create mode 100644 group12/563253496/week2/src/test/array/ArrayUtilTest.java diff --git a/group12/563253496/week2/out/production/week2/litestruts/struts.xml b/group12/563253496/week2/out/production/week2/litestruts/struts.xml new file mode 100644 index 0000000000..bfc639857c --- /dev/null +++ b/group12/563253496/week2/out/production/week2/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/563253496/week2/src/array/ArrayUtil.java b/group12/563253496/week2/src/array/ArrayUtil.java new file mode 100644 index 0000000000..d9236e72d4 --- /dev/null +++ b/group12/563253496/week2/src/array/ArrayUtil.java @@ -0,0 +1,329 @@ +package array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int temp; + for (int i = 0; i < origin.length / 2; i++) { + temp = origin[i]; + origin[i] = origin[origin.length - i - 1]; + origin[origin.length - i - 1] = temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int count = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] == 0) { + count++; + } + } + int[] newArray = new int[oldArray.length - count]; + int flag = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + newArray[flag] = oldArray[i]; + flag++; + } else { + continue; + } + } + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2) { + + /* + int[] temp = new int[array1.length + array2.length]; + int count = array1.length; + int point = array1.length; + for (int i = 0; i < array1.length; i++) { + temp[i] = array1[i]; + } + boolean flag = true; + for (int i = 0; i < array2.length; i++) { + for (int j = 0; j < array1.length; j++) { + if (array1[j] == array2[i]) { + flag = false; + } + } + if (flag) { + temp[count]=array2[i]; + count++; + } + flag = true; + } + */ + if (array1.length == 0) { + return array2; + } + if (array2.length == 0) { + return array1; + } + + int[] temp = new int[array1.length + array2.length]; + int ap = 0; + int bp = 0; + int count = 0; + while (ap < array1.length && bp < array2.length) { + if (array1[ap] == array2[bp]) { + temp[count] = array1[ap]; + ap++; + bp++; + count++; + } else if (array1[ap] > array2[bp]) { + temp[count] = array2[bp]; + bp++; + count++; + } else { + temp[count] = array1[ap]; + ap++; + count++; + } + } + if (ap == array1.length) { + for (int i = bp; i < array2.length; i++) { + temp[count] = array2[i]; + count++; + } + } else if (bp == array2.length) { + for (int i = ap; i < array1.length; i++) { + temp[count] = array1[i]; + count++; + } + + + } + int array3[] = new int[count]; + System.arraycopy(temp, 0, array3, 0, count); + + return array3; + /*int[] temp = new int[array2.length]; + boolean flag = true; + int count = 0; + for (int i = 0; i < array2.length; i++) { + for (int j = 0; j < array1.length; j++) { + if (array2[j] == array1[i]) { + flag = false; + } + } + if (flag) { + temp[count] = array2[i]; + count++; + } + } + if (count == 0) { + return array1; + } + + int ap = 0; //鏁扮粍1鐨勬寚閽 + int bp = 0; //鏁扮粍2鐨勬寚閽 + int[] array3 = new int[count + array1.length]; + for (int i = 0; i < array3.length; i++) { + if (array1[ap] > array2[bp]) { + array3[i] = array2[bp]; + bp++; + }else { + array3[i] = array1[ap]; + ap++; + } + + } +*/ + + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + int[] newArray = new int[oldArray.length + size]; + for (int i = 0; i < oldArray.length; i++) { + newArray[i] = oldArray[i]; + } + return newArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public int[] fibonacci(int max) { + + if (max == 1) { + return null; + } + int a = 1; + int b = 1; + int[] result = {1, 1}; + int[] temp; + while (b < max) { + + b = a + b; + a = b - a; + temp = result; + result = new int[result.length + 1]; + + for (int i = 0; i < temp.length; i++) { + result[i] = temp[i]; + } + result[result.length - 1] = b; + } + temp = result; + result = new int[result.length - 1]; + for (int i = 0; i < result.length; i++) { + result[i] = temp[i]; + } + return result; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + /* int[] result = null; + int[] temp = null; + if (max < 2) { + return null; + } + boolean flag = true; + for (int i = 2; i < max; i++) { + for (int j = 2; j * j < i; j++) { + if (i % j == 0) { + flag = false; + } + } + if (flag) { + if (result == null) { + result = new int[1]; + result[0] = i; + } else { + temp = result; + result = new int[result.length + 1]; + for (int j = 0; j < temp.length; j++) { + result[j] = temp[j]; + } + result[result.length - 1] = i; + } + } + flag = true; + } + + return result;*/ + if (max < 2) { + return null; + } + int[] result = {2}; + int[] temp ; + boolean flag = true; + for (int i = 3; i < max; i++) { + for (int j = 2; j * j <= i; j++) { + if (i % j == 0){ + flag = false; + } + } + if (flag) { + temp=result; + result=new int[temp.length+1]; + System.arraycopy(temp,0,result,0,temp.length); + result[result.length-1]=i; + } + flag=true; + + } + return result; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public int[] getPerfectNumbers(int max) { + int[] result = {}; + int[] temp = null; + int count = 0; + for (int i = 1; i < max; i++) { + for (int j = 1; j < i; j++) { + if (i % j == 0) { + count += j; + } + } + if (count == i) { + temp = result; + result = new int[temp.length + 1]; + for (int j = 0; j < temp.length; j++) { + result[j] = temp[j]; + } + result[result.length - 1] = i; + } + + } + return result; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param seperator + * @return + */ + public String join(int[] array, String seperator) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < array.length - 1; i++) { + sb.append(array[i]); + sb.append(seperator); + } + sb.append(array[array.length - 1]); + return sb.toString(); + + } + + +} diff --git a/group12/563253496/week2/src/litestruts/LoginAction.java b/group12/563253496/week2/src/litestruts/LoginAction.java new file mode 100644 index 0000000000..bba4c11c9f --- /dev/null +++ b/group12/563253496/week2/src/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group12/563253496/week2/src/litestruts/Struts.java b/group12/563253496/week2/src/litestruts/Struts.java new file mode 100644 index 0000000000..4c478cae5e --- /dev/null +++ b/group12/563253496/week2/src/litestruts/Struts.java @@ -0,0 +1,128 @@ +package litestruts; + +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛屼緥濡俻arameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + //璇诲彇閰嶇疆鏂囦欢 + + SAXReader reader = new SAXReader(); + try { + Document document = reader.read("src/litestruts/struts.xml"); + Element root = document.getRootElement(); + Element temp = null; + + /* + *淇濆瓨root鐨勫瓙鑺傜偣 + Map lables = new HashMap(); + + for (int i = 0; i < root.elements().size(); i++) { + temp = (Element) root.elements().get(i); + lables.put(temp.attribute(0).getText(), i); + } + */ + + Map viewResult = new HashMap<>(); + Map resultLable = new HashMap<>(); + Map firstLayorNode = new HashMap<>(); + + //淇濆瓨鏍硅妭鐐圭殑瀛愯妭鐐 + for (int i = 0; i < root.elements().size(); i++) { + temp = (Element)root.elements().get(i); + firstLayorNode.put(temp.attribute("name").getText(),i); + } + + View view = new View(); + + Element actionLable = (Element)root.elements().get(firstLayorNode.get(actionName)); + + if (actionName.equals("login")) { + + + for (int i = 0; i < actionLable.elements().size(); i++) { + temp = (Element) actionLable.elements().get(i); + resultLable.put(temp.attribute("name").getText(), temp.getText()); + } + + + Class clazz = Class.forName(actionLable.attribute("class").getText()); + + LoginAction la = (LoginAction) clazz.newInstance(); + la.setName(parameters.get("name")); + la.setPassword(parameters.get("password")); + + Method m = clazz.getMethod("execute"); + String result = (String) m.invoke(la); + + + view.setJsp(resultLable.get(result)); + + + m = clazz.getMethod("getMessage"); + result = (String) m.invoke(la); + viewResult.put("message", result); + + m = clazz.getMethod("getName"); + result = (String) m.invoke(la); + viewResult.put("name", result); + + m = clazz.getMethod("getPassword"); + result = (String)m.invoke(la); + viewResult.put("password", result); + + view.setParameters(viewResult); + return view; + } + + + } catch (DocumentException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + + + return null; + } + +} diff --git a/group12/563253496/week2/src/litestruts/StrutsTest.java b/group12/563253496/week2/src/litestruts/StrutsTest.java new file mode 100644 index 0000000000..d6be3a2d14 --- /dev/null +++ b/group12/563253496/week2/src/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/563253496/week2/src/litestruts/View.java b/group12/563253496/week2/src/litestruts/View.java new file mode 100644 index 0000000000..1eed614744 --- /dev/null +++ b/group12/563253496/week2/src/litestruts/View.java @@ -0,0 +1,23 @@ +package litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/563253496/week2/src/litestruts/struts.xml b/group12/563253496/week2/src/litestruts/struts.xml new file mode 100644 index 0000000000..bfc639857c --- /dev/null +++ b/group12/563253496/week2/src/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/563253496/week2/src/litestruts/test.java b/group12/563253496/week2/src/litestruts/test.java new file mode 100644 index 0000000000..f29f7ee366 --- /dev/null +++ b/group12/563253496/week2/src/litestruts/test.java @@ -0,0 +1,44 @@ +package litestruts; + +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +/** + * Created by bdl19 on 2017/3/2. + */ +public class test { + public static void main(String[] args) { + SAXReader reader = new SAXReader(); + try { + Document document = reader.read("src/litestruts/struts.xml"); + Element root = document.getRootElement(); + System.out.println(root.elements().size()); + + +/* + + String s = "login"; + String string = "login"; + System.out.println(root.getName()); + Element action = root.element("action"); + System.out.print(action.getName()); + System.out.print(action.attribute("name").getText()); + System.out.print(action.attribute("name").getText()); + String str = action.attribute("name").getText(); + if (str.equals(s)) { + System.out.println(123123); + System.out.println("123"); + // Class clazz = Class.forName(action.attribute("class")); + } + System.out.println(s); + System.out.println(str); + +*/ + + } catch (DocumentException e) { + e.printStackTrace(); + } + } +} diff --git a/group12/563253496/week2/src/test/array/ArrayUtilTest.java b/group12/563253496/week2/src/test/array/ArrayUtilTest.java new file mode 100644 index 0000000000..57a0c6d648 --- /dev/null +++ b/group12/563253496/week2/src/test/array/ArrayUtilTest.java @@ -0,0 +1,166 @@ +package test.array; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.Before; +import org.junit.After; + +import array.ArrayUtil; + +import java.lang.reflect.Array; + +/** + * ArrayUtil Tester. + * + * @author + * @version 1.0 + * @since
三月 2, 2017
+ */ +public class ArrayUtilTest { + + @Before + public void before() throws Exception { + + } + + @After + public void after() throws Exception { + + } + + /** + * Method: reverseArray(int[] origin) + */ + @Test + public void testReverseArray() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + int[] a = {7, 9, 30, 3}; + int[] b = {3, 30, 9, 7}; + au.reverseArray(a); + for (int i = 0; i < a.length; i++) { + Assert.assertEquals(b[i], a[i]); + } + + a = new int[]{7, 9, 30, 3, 4}; + b = new int[]{4, 3, 30, 9, 7}; + au.reverseArray(a); + for (int i = 0; i < a.length; i++) { + Assert.assertEquals(b[i], a[i]); + } + + } + + /** + * Method: removeZero(int[] oldArray) + */ + @Test + public void testRemoveZero() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + + int oldArr[] = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; + int result[] = au.removeZero(oldArr); + int exResult[] = {1, 3, 4, 5, 6, 6, 5, 4, 7, 6, 7, 5}; + Assert.assertEquals(result.length,exResult.length); + for (int i = 0; i < result.length; i++) { + Assert.assertEquals(result[i], exResult[i]); + + } + } + + /** + * Method: merge(int[] array1, int[] array2) + */ + @Test + public void testMerge() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + int[] a1 = {3, 5, 7, 8}; + int[] a2 = {4, 5, 6, 7}; + int[] a3 = {3, 4, 5, 6, 7, 8}; + int[] result = au.merge(a1,a2); + Assert.assertEquals(a3.length, result.length); + for (int i = 0; i < result.length; i++) { + Assert.assertEquals(a3[i],result[i]); + } + } + + /** + * Method: grow(int[] oldArray, int size) + */ + @Test + public void testGrow() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + + int[] oldArray = {2,3,6}; + int size = 3; + + int[] newArray = au.grow(oldArray,size); + int[] exArray = {2,3,6,0,0,0}; + for (int i = 0; i < newArray.length; i++) { + Assert.assertEquals(exArray[i],newArray[i]); + } + + } + + /** + * Method: fibonacci(int max) + */ + @Test + public void testFibonacci() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + int[] exArray = {1,1,2,3,5,8,13}; + int[] newArray = au.fibonacci(14); + for (int i = 0; i < newArray.length; i++) { + Assert.assertEquals(exArray[i],newArray[i]); + } + } + + /** + * Method: getPrimes(int max) + */ + @Test + public void testGetPrimes() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + int[] exArray = {2,3,5,7,11,13,17,19}; + int[] newArray = au.getPrimes(23); + for (int i = 0; i < newArray.length; i++) { + Assert.assertEquals(exArray[i],newArray[i]); + } + } + + /** + * Method: getPerfectNumbers(int max) + */ + @Test + public void testGetPerfectNumbers() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + int exArray[] = {6,28,496}; + int[] newArray = au.getPerfectNumbers(1000); + for (int i = 0; i < newArray.length; i++) { + Assert.assertEquals(exArray[i],newArray[i]); + } + + + } + + /** + * Method: join(int[] array, String seperator) + */ + @Test + public void testJoin() throws Exception { +//TODO: Test goes here... + ArrayUtil au = new ArrayUtil(); + String exS = "3-8-9"; + int[] array= {3,8,9}; + String result = au.join(array,"-"); + Assert.assertEquals(exS,result); + } + + +} From 585c20afac15446082674f25f8b24449b86540ea Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Fri, 3 Mar 2017 10:02:24 +0800 Subject: [PATCH 067/646] update --- group08/286060098/2-26/pom.xml | 66 ++++++ group08/286060098/3-05/pom.xml | 91 ++++++++ .../src/com/coderising/array/ArrayUtil.java | 218 ++++++++++++++++++ .../src/com/coderising/litestruts/Struts.java | 109 +++++++++ .../litestruts/action/LoginAction.java | 49 ++++ .../litestruts/api/StructAction.java | 48 ++++ .../com/coderising/litestruts/api/View.java | 31 +++ .../litestruts/parser/StructXmlParser.java | 105 +++++++++ .../src/com/coderising/litestruts/struts.xml | 11 + .../litestruts/test/StrutsTest.java | 41 ++++ 10 files changed, 769 insertions(+) create mode 100644 group08/286060098/2-26/pom.xml create mode 100644 group08/286060098/3-05/pom.xml create mode 100644 group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/Struts.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/action/LoginAction.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/api/StructAction.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/api/View.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/struts.xml create mode 100644 group08/286060098/3-05/src/com/coderising/litestruts/test/StrutsTest.java diff --git a/group08/286060098/2-26/pom.xml b/group08/286060098/2-26/pom.xml new file mode 100644 index 0000000000..d62a9b8a10 --- /dev/null +++ b/group08/286060098/2-26/pom.xml @@ -0,0 +1,66 @@ + + + + 2-26 + 2-26 + 1.0.0- + + 4.0.0 + + + 4.1 + 3.5 + 19.0 + + 1.7 + 1.7 + + true + + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + + com.google.guava + guava + ${guava.version} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${jdk.source.version} + ${jdk.target.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${maven-surefire-plugin.skip} + + + + + + + \ No newline at end of file diff --git a/group08/286060098/3-05/pom.xml b/group08/286060098/3-05/pom.xml new file mode 100644 index 0000000000..71c04a881f --- /dev/null +++ b/group08/286060098/3-05/pom.xml @@ -0,0 +1,91 @@ + + + + 3-05 + 3-05 + 1.0.0- + + 4.0.0 + + + 4.1 + 3.5 + 19.0 + + 1.7 + 1.7 + + 1.7.5 + + true + 4.11 + 1.6.1 + 2.0.1 + + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + + com.google.guava + guava + ${guava.version} + + + + junit + junit-dep + ${junit-dep.version} + + + + + + org.slf4j + slf4j-api + ${org.slf4j.version} + + + + org.slf4j + jcl-over-slf4j + ${org.slf4j.version} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${jdk.source.version} + ${jdk.target.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${maven-surefire-plugin.skip} + + + + + + + \ No newline at end of file diff --git a/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java b/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..91d03c88d0 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,218 @@ +package com.coderising.array; + +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; + +public class ArrayUtil { + + /** + *
+     * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 
+     * 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7]
+     * 
+ */ + public void reverseArray(int[] origin) { + if (origin == null || Objects.equals(origin.length, 0)) { + return; + } + int left = 0; + int right = origin.length - 1; + int tmp; + while (left < right) { + tmp = origin[left]; + origin[left] = origin[right]; + origin[right] = tmp; + left++; + right++; + } + } + + /** + *
+     * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}
+     * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細
+     * {1,3,4,5,6,6,5,4,7,6,7,5}
+     * 
+ */ + public int[] removeZero(int... oldArray) { + if (oldArray == null || Objects.equals(oldArray.length, 0)) { + return new int[0]; + } + int[] newArray = new int[oldArray.length]; + int index = 0; + for (int ele : oldArray) { + if (!Objects.equals(0, ele)) { + newArray[index++] = ele; + } + } + return newArray; + } + + /** + *
+     * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 
+     * 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3
+     * 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶
+     * 
+ */ + public int[] merge(int[] array1, int[] array2) { + int left = 0; + int right = 0; + int[] result = new int[array1.length + array2.length]; + int index = 0; + while (left < array1.length && right < array2.length) { + if (array1[left] <= array2[right]) { + result[index++] = array1[left++]; + } else { + result[index++] = array2[right++]; + } + } + if (left < array1.length - 1) { + for (int i = left; i < array1.length; i++) { + result[index++] = array1[i]; + } + } + if (right < array2.length - 1) { + for (int i = left; i < array2.length; i++) { + result[index++] = array2[i]; + } + } + return result; + } + + /** + *
+     * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size 娉ㄦ剰锛
+     * 鑰佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size =
+     * 3,鍒欒繑鍥炵殑鏂版暟缁勪负 [2,3,6,0,0,0]
+     * 
+ **/ + public int[] grow(int[] oldArray, int size) { + if (size < 0) { + throw new IllegalArgumentException("鏁扮粍鎵╁鐨勫ぇ灏忓繀椤诲ぇ浜0"); + } + int targetLength; + if (oldArray == null) { + targetLength = size; + } else { + targetLength = oldArray.length + size; + } + return buildResult(targetLength, oldArray, 0); + } + + private int[] buildResult(int targetLength, int[] origin, final int defaultValue) { + int[] result = new int[targetLength]; + if (origin == null) { + for (int i = 0; i < targetLength; i++) { + result[i] = defaultValue; + } + return result; + } + for (int i = 0; i < targetLength; i++) { + if (i < origin.length) { + result[i] = origin[i]; + continue; + } + result[i] = defaultValue; + } + return result; + } + + /** + *
+     * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 
+     * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 []
+     * 
+ */ + public Integer[] fibonacci(int max) { + if (max < 0) { + throw new IllegalArgumentException("涓婇檺涓嶈兘灏忎簬0"); + } + if (max == 0) { + return null; + } + int begin = 0; + int next = 1; + int tmp = 0; + List result = new LinkedList(); + while (tmp < max) { + tmp = begin + next; + begin = next; + next = tmp; + result.add(tmp); + } + return (Integer[]) result.toArray(); + } + + /** + *
+     * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19]
+     * 
+ */ + public Integer[] getPrimes(int max) { + if (max < 0) { + throw new IllegalArgumentException("涓婇檺涓嶈兘灏忎簬0"); + } + if (max == 0) { + return null; + } + List result = new LinkedList(); + int[] keyList = new int[] { 2, 3, 5, 7, 11 }; + for (int i = 0; i < max; i++) { + boolean flag = true; + for (int key : keyList) { + flag &= (key % keyList[i] == 0); + } + if (flag) { + result.add(i); + } + } + return (Integer[]) result.toArray(); + } + + /** + *
+     * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁
+     * 
+ */ + public Integer[] getPerfectNumbers(int max) { + if (max < 0) { + throw new IllegalArgumentException("涓婇檺涓嶈兘灏忎簬0"); + } + if (max == 0) { + return null; + } + List result = new LinkedList(); + for (int i = 1; i <= max; i++) { + int count = 0; + for (int j = 1; j < i; j++) { + if (i % j == 0) { + count += j; + } + } + if (count == i) { + result.add(count); + } + } + return (Integer[]) result.toArray(); + } + + /** + *
+     * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], seperator = "-" 鍒欒繑鍥炲间负"3-8-9"
+     * 
+ */ + public String join(int[] array, String seperator) { + if (array.length == 0) { + return ""; + } + StringBuilder cache = new StringBuilder(); + cache.append(array[0]).append(seperator); + for (int i = 1; i < array.length; i++) { + cache.append(seperator).append(array[i]); + } + return cache.toString(); + } + +} diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java b/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..57169923b6 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,109 @@ +package com.coderising.litestruts; + +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Map; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.apache.commons.collections4.CollectionUtils; + +import com.coderising.litestruts.api.StructAction; +import com.coderising.litestruts.api.View; +import com.coderising.litestruts.parser.StructXmlParser; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +public class Struts { + + private static Map actionMapping = Maps.newConcurrentMap(); + + private static final String DEFAULT_CONFIG = "struts.xml"; + + private static List configFiles; + + static { + // 璇诲彇閰嶇疆鏂囦欢struts.xml + loadStrutsConfig(configFiles); + } + + public static View runAction(String actionName, Map parameters) { + View view = new View(); + try { + StructAction action = actionMapping.get(actionName); + Class clazz = Class.forName(action.getClazzName()); + Object instance = clazz.newInstance(); + String result = (String) process(clazz, instance, parameters, action); + buildView(view, action, instance, result); + } catch (Exception e) { + e.printStackTrace(); + } + return view; + } + + private static void buildView(View view, StructAction action, Object instance, String result) + throws IntrospectionException, ClassNotFoundException, IllegalAccessException, InvocationTargetException { + // 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap + BeanInfo beanInfo = Introspector.getBeanInfo(Class.forName(action.getClazzName())); + PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); + Map prop = Maps.newHashMap(); + for (PropertyDescriptor PropertyDescriptor : propertyDescriptors) { + Method readMethod = PropertyDescriptor.getReadMethod(); + Object invoke = readMethod.invoke(instance); + prop.put(PropertyDescriptor.getName(), invoke); + } + // 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + Map actions = action.getActions(); + view.setParameters(prop); + view.setJsp(actions.get(result)); + } + + @SuppressWarnings("unchecked") + private static Object process(Class clazz, Object instance, Map parameters, StructAction action) + throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException, + NoSuchMethodException, InvocationTargetException { + // 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛屽睘鎬у~鍏呮垜璁や负鏆村姏鍙嶅皠浼氭洿濂戒竴鐐 + for (Map.Entry entry : parameters.entrySet()) { + Field field = clazz.getDeclaredField(entry.getKey()); + field.setAccessible(true); + field.set(instance, entry.getValue()); + } + // 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶 + Method execute = clazz.getDeclaredMethod("execute"); + execute.setAccessible(true); + return execute.invoke(instance); + } + + private static void loadStrutsConfig(List configFiles) { + if (CollectionUtils.isEmpty(configFiles)) { + configFiles = Lists.newArrayList(DEFAULT_CONFIG); + } + for (String configFile : configFiles) { + InputStream inputStream = Struts.class.getResourceAsStream(configFile); + SAXParser parser = null; + try { + parser = SAXParserFactory.newInstance().newSAXParser(); + StructXmlParser structXmlParser = new StructXmlParser(); + parser.parse(inputStream, structXmlParser); + List actions = structXmlParser.getData(); + for (StructAction action : actions) { + actionMapping.put(action.getName(), action); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + public void setConfigFiles(List configFiles) { + configFiles = configFiles; + } +} diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/action/LoginAction.java b/group08/286060098/3-05/src/com/coderising/litestruts/action/LoginAction.java new file mode 100644 index 0000000000..fc0ee6f814 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/action/LoginAction.java @@ -0,0 +1,49 @@ +package com.coderising.litestruts.action; + +import java.io.Serializable; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * + * @author liuxin + * + */ +public class LoginAction implements Serializable { + + private static final long serialVersionUID = -8339841773543093451L; + + private String name; + + private String password; + + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute() { + if ("test".equals(name) && "1234".equals(password)) { + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name) { + this.name = name; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getMessage() { + return this.message; + } +} diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/api/StructAction.java b/group08/286060098/3-05/src/com/coderising/litestruts/api/StructAction.java new file mode 100644 index 0000000000..da9d12ed76 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/api/StructAction.java @@ -0,0 +1,48 @@ +package com.coderising.litestruts.api; + +import java.io.Serializable; +import java.util.Map; + +/** + * @author haipop Date: 17-3-2 Time: 涓嬪崍3:18 + */ +public class StructAction implements Serializable { + + private static final long serialVersionUID = -8955018500533743847L; + + private String name; + + private String clazzName; + + private Map actions; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getClazzName() { + return clazzName; + } + + public void setClazzName(String clazzName) { + this.clazzName = clazzName; + } + + public Map getActions() { + return actions; + } + + public void setActions(Map actions) { + this.actions = actions; + } + + @Override + public String toString() { + return "StructAction{" + "name='" + name + '\'' + ", clazzName='" + clazzName + '\'' + ", actions=" + actions + + '}'; + } +} \ No newline at end of file diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/api/View.java b/group08/286060098/3-05/src/com/coderising/litestruts/api/View.java new file mode 100644 index 0000000000..a3f23a048f --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/api/View.java @@ -0,0 +1,31 @@ +package com.coderising.litestruts.api; + +import java.io.Serializable; +import java.util.Map; + +public class View implements Serializable { + + private static final long serialVersionUID = 3253386991720311844L; + + private String jsp; + + private Map parameters; + + public String getJsp() { + return jsp; + } + + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + + public Map getParameters() { + return parameters; + } + + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java b/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java new file mode 100644 index 0000000000..c125f1fe1f --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java @@ -0,0 +1,105 @@ +package com.coderising.litestruts.parser; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import com.coderising.litestruts.api.StructAction; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +/** + * @author haipop Date: 17-3-2 Time: 涓嬪崍3:13 + */ +public class StructXmlParser extends DefaultHandler { + // 鏁版嵁闆嗗悎 + private List data; + // 鑺傜偣鍐呯殑灞炴у悕绉 + private String tagName; + // 鏋勫缓鍏冪礌 + private StructAction action; + // 褰撳墠key锛 + private String key; + + /** + * 鍙皟鐢ㄤ竴娆 鍒濆鍖杔ist闆嗗悎 + */ + @Override + public void startDocument() throws SAXException { + data = Lists.newArrayList(); + } + + /** + * 璋冪敤澶氭 寮濮嬭В鏋 + */ + @Override + public void startElement(String uri, String localName, String eleNme, Attributes attributes) throws SAXException { + if (eleNme.equals("action")) { + this.action = new StructAction(); + this.action.setClazzName(attributes.getValue("class")); + this.action.setName(attributes.getValue("name")); + } + if (eleNme.equals("result")) { + if (this.action == null) { + throw new RuntimeException("閰嶇疆鏂囦欢涓嶅悎娉"); + } + key = attributes.getValue("name"); + } + + this.tagName = eleNme; + } + + @Override + public void endElement(String uri, String localName, String eleNme) throws SAXException { + if (eleNme.equals("action")) { + this.data.add(this.action); + } + this.tagName = eleNme; + } + + @Override + public void characters(char[] ch, int start, int length) throws SAXException { + if (Objects.equals(this.tagName, "result")) { + Map actions = this.action.getActions(); + if (MapUtils.isEmpty(actions)) { + actions = Maps.newHashMap(); + } + String value = new String(ch, start, length); + if (StringUtils.isNotBlank(value.trim())) { + actions.put(this.key, value); + } + this.action.setActions(actions); + } + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public String getTagName() { + return tagName; + } + + public void setTagName(String tagName) { + this.tagName = tagName; + } + + public StructAction getAction() { + return action; + } + + public void setAction(StructAction action) { + this.action = action; + } + +} \ No newline at end of file diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/struts.xml b/group08/286060098/3-05/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..69677589d8 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/test/StrutsTest.java b/group08/286060098/3-05/src/com/coderising/litestruts/test/StrutsTest.java new file mode 100644 index 0000000000..da44e04d86 --- /dev/null +++ b/group08/286060098/3-05/src/com/coderising/litestruts/test/StrutsTest.java @@ -0,0 +1,41 @@ +package com.coderising.litestruts.test; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +import com.coderising.litestruts.Struts; +import com.coderising.litestruts.api.View; + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "1234"); + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "123456"); // 瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} From 22c6a068d985d6d52553fd789972dff309120ddb Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Fri, 3 Mar 2017 10:04:22 +0800 Subject: [PATCH 068/646] format --- .../src/com/coderising/array/ArrayUtil.java | 3 +++ .../litestruts/parser/StructXmlParser.java | 23 ------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java b/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java index 91d03c88d0..e0ca76cab1 100644 --- a/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java +++ b/group08/286060098/3-05/src/com/coderising/array/ArrayUtil.java @@ -4,6 +4,9 @@ import java.util.List; import java.util.Objects; +/** + * @author haipop Date: 17-3-2 Time: 涓嬪崍3:13 + */ public class ArrayUtil { /** diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java b/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java index c125f1fe1f..1a0d5c9a25 100644 --- a/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java +++ b/group08/286060098/3-05/src/com/coderising/litestruts/parser/StructXmlParser.java @@ -27,9 +27,6 @@ public class StructXmlParser extends DefaultHandler { // 褰撳墠key锛 private String key; - /** - * 鍙皟鐢ㄤ竴娆 鍒濆鍖杔ist闆嗗悎 - */ @Override public void startDocument() throws SAXException { data = Lists.newArrayList(); @@ -82,24 +79,4 @@ public List getData() { return data; } - public void setData(List data) { - this.data = data; - } - - public String getTagName() { - return tagName; - } - - public void setTagName(String tagName) { - this.tagName = tagName; - } - - public StructAction getAction() { - return action; - } - - public void setAction(StructAction action) { - this.action = action; - } - } \ No newline at end of file From 7a17d90d4e2636b37770b7c09cc6ecb4613ee6b3 Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Fri, 3 Mar 2017 10:17:10 +0800 Subject: [PATCH 069/646] update --- .../src/com/coderising/litestruts/Struts.java | 25 ++++++++++++------- group08/286060098/readme.md | 2 +- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java b/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java index 57169923b6..69bc534f77 100644 --- a/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java +++ b/group08/286060098/3-05/src/com/coderising/litestruts/Struts.java @@ -51,14 +51,17 @@ public static View runAction(String actionName, Map parameters) private static void buildView(View view, StructAction action, Object instance, String result) throws IntrospectionException, ClassNotFoundException, IllegalAccessException, InvocationTargetException { - // 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap + // 璇诲彇action灞炴 BeanInfo beanInfo = Introspector.getBeanInfo(Class.forName(action.getClazzName())); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); Map prop = Maps.newHashMap(); for (PropertyDescriptor PropertyDescriptor : propertyDescriptors) { Method readMethod = PropertyDescriptor.getReadMethod(); - Object invoke = readMethod.invoke(instance); - prop.put(PropertyDescriptor.getName(), invoke); + // 鍐呯渷瀛樺湪涓涓棶棰樺氨鏄灞炴х殑get鏂规硶鏈韩涓嶄竴瀹氬瓨鍦 + if (readMethod != null) { + Object invoke = readMethod.invoke(instance); + prop.put(PropertyDescriptor.getName(), invoke); + } } // 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 Map actions = action.getActions(); @@ -68,15 +71,19 @@ private static void buildView(View view, StructAction action, Object instance, S @SuppressWarnings("unchecked") private static Object process(Class clazz, Object instance, Map parameters, StructAction action) - throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException, - NoSuchMethodException, InvocationTargetException { + throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, + InvocationTargetException { // 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛屽睘鎬у~鍏呮垜璁や负鏆村姏鍙嶅皠浼氭洿濂戒竴鐐 for (Map.Entry entry : parameters.entrySet()) { - Field field = clazz.getDeclaredField(entry.getKey()); - field.setAccessible(true); - field.set(instance, entry.getValue()); + try { + Field field = clazz.getDeclaredField(entry.getKey()); + field.setAccessible(true); + field.set(instance, entry.getValue()); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } } - // 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶 + // 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xecute鏂规硶 Method execute = clazz.getDeclaredMethod("execute"); execute.setAccessible(true); return execute.invoke(instance); diff --git a/group08/286060098/readme.md b/group08/286060098/readme.md index a6325e29da..28865db0f1 100644 --- a/group08/286060098/readme.md +++ b/group08/286060098/readme.md @@ -11,7 +11,7 @@ ### 浠g爜璇存槑 -> 浣滀笟鍦╤omework鐩綍涓 +> 姣忓懆鐨勪綔涓氶兘鏄竴涓狹AVEN椤圭洰,浣滀笟鐨勬埅姝㈡棩鏈熶负椤圭洰鍚嶇О From 5f621a0c6969c756441fa707066c78b6a457b0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Fri, 3 Mar 2017 11:44:40 +0800 Subject: [PATCH 070/646] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=5F?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xuyangyang/util_1/ArrayUtil.java | 117 +++++++++++++++--- .../com/xuyangyang/util_1/ArrayUtilTest.java | 99 +++++++++++++++ 2 files changed, 202 insertions(+), 14 deletions(-) create mode 100644 group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtilTest.java diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java index c4cd46f75c..f370e38dd4 100644 --- a/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtil.java @@ -82,25 +82,25 @@ public int[] merge(int[] array1, int[] array2) { } } //鏁扮粍鍘婚噸 - boolean[] b=new boolean[newArr.length]; + boolean[] b = new boolean[newArr.length]; int counts = newArr.length; - for (int i=0;i= max) { + return Arrays.copyOf(arr, i - 1); + } + return Arrays.copyOf(arr, i); } /** @@ -137,7 +161,36 @@ public int[] fibonacci(int max) { * @return */ public int[] getPrimes(int max) { - return null; + + class IsPrime { + // 鍒ゆ柇鏌愭暣鏁版槸鍚︿负绱犳暟 + public boolean isPrimes(int n) { + if (n < 2) { + return false; + } + for (int i = 2; i * i <= n; i++) { + if (n % i == 0) { + return false; + } + } + return true; + + } + } + List list = new ArrayList(); + IsPrime isPrime = new IsPrime(); + for (int i = 2; i < max; i++) { + if (isPrime.isPrimes(i)) { + list.add(i); + } + } + + int[] arr = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + arr[i] = (int) list.get(i); + } + + return arr; } /** @@ -148,7 +201,33 @@ public int[] getPrimes(int max) { * @return */ public int[] getPerfectNumbers(int max) { - return null; + //淇濆瓨姣忕粍鐨勫垎瑙e洜瀛 + List list = new ArrayList(); + List pm = new ArrayList(); + int sum = 0; + //闄ゆ暟 + for (int i = 2; i < max; i++) { + //琚櫎鏁 + sum=0; + for (int j = 1; j < i / 2 + 1; j++) { + if (i % j == 0) { + list.add(j); + sum += j; + } + } + + if (sum == i) { + pm.add(i); + } + + list.clear(); + } + + int[] pmaArr = new int[pm.size()]; + for (int i = 0; i < pm.size(); i++) { + pmaArr[i] = (int) pm.get(i); + } + return pmaArr; } /** @@ -160,8 +239,18 @@ public int[] getPerfectNumbers(int max) { * @param * @return */ + public String join(int[] array, String seperator) { - return null; + + String s = new String(); + for (int i = 0; i < array.length; i++) { + if (i < array.length - 1) { + s += array[i] + seperator; + } else { + s += array[i]; + } + } + return s; } diff --git a/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtilTest.java b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtilTest.java new file mode 100644 index 0000000000..ad348045f9 --- /dev/null +++ b/group08/1425809544/02-26/com/xuyangyang/util_1/ArrayUtilTest.java @@ -0,0 +1,99 @@ +package com.util_1; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Created by 14258 on 2017/2/28. + */ +public class ArrayUtilTest { + ArrayUtil arrayUtil = new ArrayUtil(); + + @Before + public void setUp() throws Exception { + + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void testReverseArray() throws Exception { + + int[] testArr = {7, 9, 30, 3}; + + arrayUtil.reverseArray(testArr); + } + + @Test + public void testRemoveZero() throws Exception { + int oldArr[] = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; + int[] newArr = arrayUtil.removeZero(oldArr); + for (int s : newArr) { + System.out.println(s); + } + + } + + @Test + public void testMerge() throws Exception { + int[] a1 = {3, 5, 7}; + int[] a2 = {4, 5, 6, 7}; + int[] newArr = arrayUtil.merge(a1, a2); + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testGrow() throws Exception { + int[] oldArray = {2, 3, 6}; + + int[] newArr = arrayUtil.grow(oldArray, 3); + + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testFibonacci() throws Exception { + + int[] newArr = arrayUtil.fibonacci(16); + System.out.print("["); + for (int i : newArr) { + System.out.print(i+","); + } + System.out.print("]"); + } + + @Test + public void testGetPrimes() throws Exception { + int[] prime = arrayUtil.getPrimes(23); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testGetPerfectNumbers() throws Exception { + int[] prime = arrayUtil.getPerfectNumbers(10000); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testJoin() throws Exception { + int[] array = {3, 8, 9}; + String s = arrayUtil.join(array, "-"); + System.out.println(s); + } +} \ No newline at end of file From 30451976494cc5513a923ddacda73f34e1f0820c Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Fri, 3 Mar 2017 11:57:30 +0800 Subject: [PATCH 071/646] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zj-2017/src/com/coderising/litestruts/Struts.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java index d7196e4ce5..57f4f6d55e 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java +++ b/group12/2258659044/zj-2017/src/com/coderising/litestruts/Struts.java @@ -66,7 +66,9 @@ public static View runAction(String actionName, methodName = "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); Method method = clazz.getMethod(methodName, fields[i].getType()); - method.invoke(instance, parameters.get(fieldName)); + if(method != null){ + method.invoke(instance, parameters.get(fieldName)); + } } } @@ -79,9 +81,10 @@ public static View runAction(String actionName, methodName = "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); Method method = clazz.getMethod(methodName); - Object value = method.invoke(instance); - viewMap.put(fieldName, value); - + if(method != null){ + Object value = method.invoke(instance); + viewMap.put(fieldName, value); + } } //灏佽view瀵硅薄鎵闇鏁版嵁 view.setParameters(viewMap); From 23e6c4261e1aafcb614dcd52c203f8383b8c4b2e Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Fri, 3 Mar 2017 12:55:44 +0800 Subject: [PATCH 072/646] =?UTF-8?q?=E4=BA=A4=E7=AC=AC=E4=BA=8C=E5=91=A8?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A=EF=BC=9A=E6=A8=A1=E6=8B=9Fstrut?= =?UTF-8?q?=E8=AF=BB=E5=8F=96xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group12/247565311/week2/LoginAction.java | 30 +++++++ group12/247565311/week2/Struts.java | 105 +++++++++++++++++++++++ group12/247565311/week2/StrutsTest.java | 50 +++++++++++ group12/247565311/week2/View.java | 21 +++++ group12/247565311/week2/struts.xml | 11 +++ 5 files changed, 217 insertions(+) create mode 100644 group12/247565311/week2/LoginAction.java create mode 100644 group12/247565311/week2/Struts.java create mode 100644 group12/247565311/week2/StrutsTest.java create mode 100644 group12/247565311/week2/View.java create mode 100644 group12/247565311/week2/struts.xml diff --git a/group12/247565311/week2/LoginAction.java b/group12/247565311/week2/LoginAction.java new file mode 100644 index 0000000000..b0ae6ebf5b --- /dev/null +++ b/group12/247565311/week2/LoginAction.java @@ -0,0 +1,30 @@ +package week2; + +public class LoginAction { + private String name ; + private String password; + private String message; + public String getName(){ + return name; + } + public String getPassword(){ + return password; + } + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group12/247565311/week2/Struts.java b/group12/247565311/week2/Struts.java new file mode 100644 index 0000000000..b8a9f8a721 --- /dev/null +++ b/group12/247565311/week2/Struts.java @@ -0,0 +1,105 @@ +package week2; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + + + + + + + +import org.dom4j.*; +import org.dom4j.io.SAXReader; + +public class Struts { + @SuppressWarnings("unchecked") + public static View runAction(String actionName,Mapparameters){ + if(actionName == null || parameters == null) return null; + List actions = null; + try { + File xmlfile = new File("D:\\5Java\\coding2017\\group12\\247565311\\week2\\struts.xml"); + Document doc = new SAXReader().read(xmlfile); + Element root = doc.getRootElement(); + actions = root.elements(); + } catch (DocumentException e) { + e.printStackTrace(); + } + + String className=""; + Element curActNode = null; + for(int i=0;i attrs = actions.get(i).attributes(); + for(int j=0;j class1 = null; + try { + class1 = Class.forName(className); + class1Instance = class1.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + for(String key : parameters.keySet()){ + String methodName = "set"+(new StringBuilder()).append(Character.toUpperCase(key.charAt(0))).append(key.substring(1)).toString(); + Object methodPara=parameters.get(key); + try { + Method method =class1.getMethod(methodName, String.class); + method.invoke(class1Instance, methodPara); + } catch (Exception e) { + e.printStackTrace(); + } + } + Object exeResult = null; + try { + Method method =class1.getMethod("execute"); + exeResult = method.invoke(class1Instance); + } catch (Exception e) { + e.printStackTrace(); + } + + String jsp = null; + List results = curActNode.elements(); + for(int i=0;i attrs = results.get(i).attributes(); + for(int j=0;j para = new HashMap(); + view.setParameters(para); + + Field [] fields = class1.getDeclaredFields(); + for(int i=0;i params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //密码和预设的不一致 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } + +} diff --git a/group12/247565311/week2/View.java b/group12/247565311/week2/View.java new file mode 100644 index 0000000000..ccf254d458 --- /dev/null +++ b/group12/247565311/week2/View.java @@ -0,0 +1,21 @@ +package week2; +import java.util.Map; +public class View { + private String jsp; + private Map parameters; + + public String getJsp(){ + return jsp; + } + public View setJsp(String jsp){ + this.jsp = jsp; + return this; + } + public Map getParameters(){ + return parameters; + } + public View setParameters(Map parameters){ + this.parameters = parameters; + return this; + } +} diff --git a/group12/247565311/week2/struts.xml b/group12/247565311/week2/struts.xml new file mode 100644 index 0000000000..234232d0b6 --- /dev/null +++ b/group12/247565311/week2/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + From 29954837d7626621b786df0c1c8d63b39e417e12 Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Fri, 3 Mar 2017 12:57:17 +0800 Subject: [PATCH 073/646] some changes to homework1 not important --- group12/247565311/week1/ArrayListTest.java | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 group12/247565311/week1/ArrayListTest.java diff --git a/group12/247565311/week1/ArrayListTest.java b/group12/247565311/week1/ArrayListTest.java new file mode 100644 index 0000000000..846dd152f5 --- /dev/null +++ b/group12/247565311/week1/ArrayListTest.java @@ -0,0 +1,113 @@ +package week1; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ArrayListTest { + + @Before + public void setUp() throws Exception { + // 执行测试方法钱执行此方法 + } + + @After + public void tearDown() throws Exception { + // 测试用例执行完了执行此方法 + } + + @Test + public void testArrayList() { + fail("尚未实现"); + } + + @Test + public void testAddE() { + fail("尚未实现"); + } + + @Test + public void testAddIntE() { + fail("尚未实现"); + } + + @Test + public void testAddAllCollectionOfQextendsE() { + fail("尚未实现"); + } + + @Test + public void testAddAllIntCollectionOfQextendsE() { + fail("尚未实现"); + } + + @Test + public void testClear() { + fail("尚未实现"); + } + + @Test + public void testContains() { + fail("尚未实现"); + } + + @Test + public void testContainsAll() { + fail("尚未实现"); + } + + @Test + public void testGet() { + fail("尚未实现"); + } + + @Test + public void testIndexOf() { + fail("尚未实现"); + } + + @Test + public void testIsEmpty() { + fail("尚未实现"); + } + + @Test + public void testRemoveObject() { + fail("尚未实现"); + } + + @Test + public void testRemoveInt() { + fail("尚未实现"); + } + + @Test + public void testRemoveAll() { + fail("尚未实现"); + } + + @Test + public void testRetainAll() { + fail("尚未实现"); + } + + @Test + public void testSet() { + fail("尚未实现"); + } + + @Test + public void testSize() { + fail("尚未实现"); + } + + @Test + public void testToArray() { + fail("尚未实现"); + } + +} From 270670d1df9cda1b432112c368c9c8e01541d8c7 Mon Sep 17 00:00:00 2001 From: PreciousLiu Date: Fri, 3 Mar 2017 17:15:50 +0800 Subject: [PATCH 074/646] 286674878 week01 --- group09/286674878/.gitignore | 1 + group09/286674878/src/week01/ArrayList.java | 101 +++++++++++++ group09/286674878/src/week01/BinaryTree.java | 81 +++++++++++ group09/286674878/src/week01/Iterator.java | 7 + group09/286674878/src/week01/LinkedList.java | 145 +++++++++++++++++++ group09/286674878/src/week01/List.java | 10 ++ group09/286674878/src/week01/Queue.java | 30 ++++ group09/286674878/src/week01/Stack.java | 51 +++++++ 8 files changed, 426 insertions(+) create mode 100644 group09/286674878/.gitignore create mode 100644 group09/286674878/src/week01/ArrayList.java create mode 100644 group09/286674878/src/week01/BinaryTree.java create mode 100644 group09/286674878/src/week01/Iterator.java create mode 100644 group09/286674878/src/week01/LinkedList.java create mode 100644 group09/286674878/src/week01/List.java create mode 100644 group09/286674878/src/week01/Queue.java create mode 100644 group09/286674878/src/week01/Stack.java diff --git a/group09/286674878/.gitignore b/group09/286674878/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group09/286674878/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group09/286674878/src/week01/ArrayList.java b/group09/286674878/src/week01/ArrayList.java new file mode 100644 index 0000000000..f379af550b --- /dev/null +++ b/group09/286674878/src/week01/ArrayList.java @@ -0,0 +1,101 @@ +package week01; + +import java.util.Arrays; + + + +public class ArrayList implements List { + /** + * The current array's size. + */ + private int size = 0; + private static final int DEFAULT_CAPACITY = 10; + private Object[] elementData; + /** + * Return an empty Array instance if no initial elements has specified. + */ + private static final Object[] EMPTY_ELEMENTDATA ={}; + /** + * Construct an ArrayList with default capacity. + */ + public ArrayList(){ + this(DEFAULT_CAPACITY); + } + /** + * Construct an ArrayList instance with specified capacity. + * @param initialSize the specified capacity + */ + public ArrayList(int initialSize){ + if(initialSize>0){ //Does it right >0 but > DEFAULTCAPACITY? + this.elementData = new Object[initialSize]; + }else if(initialSize==0){ + this.elementData = EMPTY_ELEMENTDATA; + }else{ + throw new IllegalArgumentException("IllegalCapacity:" + initialSize); + } + } + /** + * Increase the capacity + */ + public void grow(int capacity){ + elementData = Arrays.copyOf(elementData, capacity); + } + /** + * Add an element to ArrayList's tail + */ + public boolean add(Object o){ + if(this.size == elementData.length){ + grow(size+10); + } + elementData[size++] = o; + return true; + } + /** + * Add an element to an Array with specified location + */ + public boolean add(int index, Object o){ + if(index<0 || index>this.size){ + throw new IllegalArgumentException("IllegalIndex"); + }else if(this.size+1>elementData.length){ + grow(size+10); + }else{ + for(int i=this.size+1;i>index;i--){ + elementData[i] = elementData[i-1]; + } + elementData[index] = o; + size++; + } + return true; + } + /** + * Return an element that specified + */ + public Object get(int index){ + if(index<0 || index>this.size){ + throw new IllegalArgumentException("IllegalIndex"); + } + return elementData[index]; + } + + public boolean remove(int index){ + if(index<0 || index>this.size){ + throw new IllegalArgumentException("IllegalIndex"); + }else{ + for(int i=index;i<=this.size;i++){ + elementData[i] = elementData[i+1]; + } + size--; + } + return true; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return null; + } + +} + diff --git a/group09/286674878/src/week01/BinaryTree.java b/group09/286674878/src/week01/BinaryTree.java new file mode 100644 index 0000000000..db334fdf7a --- /dev/null +++ b/group09/286674878/src/week01/BinaryTree.java @@ -0,0 +1,81 @@ +package week01; + + + +public class BinaryTree { + class BinaryTreeNode { + private int data; + private BinaryTreeNode left = null; + private BinaryTreeNode right = null; + public BinaryTreeNode(int data){ + this.data = data; + } + } + //鍓嶅簭閬嶅巻 + private BinaryTreeNode root; + public void preorder(BinaryTreeNode bt){ + if(bt!=null) + { + getData(bt); + preorder(bt.left); + preorder(bt.right); + } + } + public int getData(BinaryTreeNode bt){ + preorder(bt); + return bt.data; + } + public void setData(int data) { + BinaryTreeNode newadd = new BinaryTree.BinaryTreeNode(data); + Insert(newadd,data); + + } + public BinaryTreeNode getLeft(BinaryTreeNode bt) { + preorder(bt); + return bt.left; + } + //public void setLeft(BinaryTreeNode left) { + // this.left = left; + //} + public BinaryTreeNode getRight(BinaryTreeNode bt) { + preorder(bt); + return bt.right; + } + + //public void setRight(BinaryTreeNode right) { + // this.right = right; + //} + + public boolean Insert(BinaryTreeNode bt,int data){ + if(bt == null){ + bt.data = data; + return true; + } + else{ + if(data==bt.data) + { + System.out.println("The data has already exist"); + return false;} + else if(data < bt.data){ + return Insert(bt.left,data); + }else return Insert(bt.right,data); + } + + } + public BinaryTreeNode Search(BinaryTreeNode root, int data){ + if(root==null){ + //throw new IllegalArgumentException("The Tree is Empty "+root.data); + System.out.println("The Tree is an empty tree."); + return root; + }else{ + if(root.data==data) + {return root;} + else if(data>root.data) + {return Search(root.right,data);} + else + {return Search(root.left,data);} + } + } + +} + diff --git a/group09/286674878/src/week01/Iterator.java b/group09/286674878/src/week01/Iterator.java new file mode 100644 index 0000000000..42cf1ca740 --- /dev/null +++ b/group09/286674878/src/week01/Iterator.java @@ -0,0 +1,7 @@ +package week01; + +public interface Iterator { + public boolean hasNext(); + public Object next(); +} + diff --git a/group09/286674878/src/week01/LinkedList.java b/group09/286674878/src/week01/LinkedList.java new file mode 100644 index 0000000000..6b652a9c2d --- /dev/null +++ b/group09/286674878/src/week01/LinkedList.java @@ -0,0 +1,145 @@ +package week01; + + + +public class LinkedList implements List{ + /** + * Class Node is an inner class + */ + class Node{ + private Object data; + private Node next = null; + private Node prev = null; + public Node(Object data){ + this.data = data; + } + } + private Node head; + private Node tail; + private int size = 0; + + /** + * Add an element in the LinkedList + */ + public boolean add(Object data){ + if(head.next==null){ + addFirst(data); + }else{ + addLast(data); + } + return true; + } + /** + * Add an element in the LinkedList that with specified location + */ + public boolean add(int index , Object data){ + if(index<0 || index>this.size){ + throw new IllegalArgumentException("IllegalArgument"+index); + }else{ + Node indexnodehere = findIndex(index); + Node newadd = new Node(data); + newadd.next = indexnodehere.next; + newadd.prev = indexnodehere; + indexnodehere.next.prev = newadd; + indexnodehere.next = newadd; + size++; + } + return true; + } + /** + * Find node according index + * @param index + * @return + */ + public Node findIndex(int index){ + Node indexnode = this.head; + if(index<0 || index>this.size){ + throw new IllegalArgumentException("IllegalArgument"+index); + }else{ + for(int i=1;ithis.size){ + throw new IllegalArgumentException("IllegalArgument"+index); + }else{ + Node indexnodehere2 = findIndex(index); + if(indexnodehere2.prev == this.head){ + removeFirst(); + }else if(indexnodehere2.next == this.tail){ + removeLast(); + }else{ + indexnodehere2.prev.next = indexnodehere2.next; + indexnodehere2.next.prev = indexnodehere2.prev; + size--; + } + + } + return true; + } + + public int size(){ + return this.size; + } + /** + * Add an new element in the beginning of an LinledList(just after head) + * @param data + */ + public void addFirst(Object data){ + Node newfirstincrease = new Node(data); + newfirstincrease.next = head.next; + head.next = newfirstincrease; + newfirstincrease.prev = head; + newfirstincrease.next = tail; + tail.prev = newfirstincrease; + size++; + } + /** + * Add an new element in the tail of an LinkedList + * @param data + */ + public void addLast(Object data){ + Node newincrease = new Node(data); + newincrease.next = tail; + newincrease.prev = tail.prev; + tail.prev.next = newincrease; + tail.prev = newincrease; + size++; + } + /** + * Delete the first element(node) which just after the head + * @return + */ + public boolean removeFirst(){ + head.next = head.next.next; + head.next.next.prev = head; + size--; + return true; + } + /** + * Delete the last element(node) which just before the tail + * @return + */ + public boolean removeLast(){ + tail.prev = tail.prev.prev; + tail.prev.prev.next= tail; + size--; + return true; + } + public Iterator iterator(){ + return null; + } + + + + +} + diff --git a/group09/286674878/src/week01/List.java b/group09/286674878/src/week01/List.java new file mode 100644 index 0000000000..c6f8dcbce3 --- /dev/null +++ b/group09/286674878/src/week01/List.java @@ -0,0 +1,10 @@ +package week01; + +public interface List { + public boolean add(Object o); + public boolean add(int index, Object o); + public Object get(int index); + public boolean remove(int index); + public int size(); + +} diff --git a/group09/286674878/src/week01/Queue.java b/group09/286674878/src/week01/Queue.java new file mode 100644 index 0000000000..0c8fb2ea54 --- /dev/null +++ b/group09/286674878/src/week01/Queue.java @@ -0,0 +1,30 @@ +package week01; + +import java.util.Arrays; +//浠ュ悗鏈夋椂闂磋鏀规垚寰幆闃熷垪 +public class Queue { + private ArrayList elementData = new ArrayList(); + private int front; + private int rear; + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + + return null; + } + + public boolean isEmpty(){ + if(elementData.size()>0){ + return false; + }else return true; + } + + public int size(){ + return elementData.size(); + } + +} + diff --git a/group09/286674878/src/week01/Stack.java b/group09/286674878/src/week01/Stack.java new file mode 100644 index 0000000000..2b6ef12e0a --- /dev/null +++ b/group09/286674878/src/week01/Stack.java @@ -0,0 +1,51 @@ +package week01; + +import java.util.Arrays; + +public class Stack { +private ArrayList elementData = new ArrayList(); + + /** + * Pushes an item onto the top of this stack + * @param o + */ + public void push(Object o){ + elementData.add(o); + } + /** + * Removes the object at the top of this stack + * @return + */ + public Object pop(){ + if(isEmpty()){ + throw new UnsupportedOperationException(); + } + elementData.remove(elementData.size()); + return null; + } + /** + * Looks at the object at the top of this stack without removing it from the stack + * @return + */ + public Object peek(){ + if(isEmpty()){ + throw new UnsupportedOperationException(); + }else{ + return elementData.get(elementData.size()); + } + } + /** + * Tests if this stack is empty + * @return + */ + public boolean isEmpty(){ + if(elementData.size()>0){ + return false; + }else return true; + + } + public int size(){ + return elementData.size(); + } + +} From 66c131f662cf93b807793a30d8360b19d65684d6 Mon Sep 17 00:00:00 2001 From: guodongym Date: Fri, 3 Mar 2017 21:58:14 +0800 Subject: [PATCH 075/646] del --- group12/377401843/learning_1/.gitignore | 3 - .../com/guodong/datastructure/ArrayList.java | 171 ----------- .../guodong/datastructure/BinaryTreeNode.java | 58 ---- .../com/guodong/datastructure/Iterator.java | 7 - .../com/guodong/datastructure/LinkedList.java | 285 ------------------ .../src/com/guodong/datastructure/List.java | 14 - .../src/com/guodong/datastructure/Queue.java | 21 -- .../src/com/guodong/datastructure/Stack.java | 25 -- .../datastructure/test/ArrayListTest.java | 135 --------- .../test/BinaryTreeNodeTest.java | 37 --- .../datastructure/test/LinkedListTest.java | 143 --------- .../guodong/datastructure/test/QueueTest.java | 62 ---- .../guodong/datastructure/test/StackTest.java | 46 --- 13 files changed, 1007 deletions(-) delete mode 100644 group12/377401843/learning_1/.gitignore delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/ArrayList.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/BinaryTreeNode.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/Iterator.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/LinkedList.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/List.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/Queue.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/Stack.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/test/ArrayListTest.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/test/BinaryTreeNodeTest.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/test/LinkedListTest.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/test/QueueTest.java delete mode 100644 group12/377401843/learning_1/src/com/guodong/datastructure/test/StackTest.java diff --git a/group12/377401843/learning_1/.gitignore b/group12/377401843/learning_1/.gitignore deleted file mode 100644 index b12088665a..0000000000 --- a/group12/377401843/learning_1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -/.project -/.classpath diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/ArrayList.java b/group12/377401843/learning_1/src/com/guodong/datastructure/ArrayList.java deleted file mode 100644 index 880af45da8..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/ArrayList.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.guodong.datastructure; - -import java.util.Arrays; - -public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData = new Object[100]; - - /** - * 鎸変笅鏍囬『搴忔柊澧炲厓绱 - * - * @Method add - * @param o - * @see com.guodong.datastructure.List#add(java.lang.Object) - */ - public void add(Object o) { - ensureCapacityInternal(size + 1); - elementData[size] = o; - size++; - } - - /** - * 鍦ㄦ寚瀹氫笅鏍囦綅缃彃鍏ュ厓绱 - * - * @Method add - * @param index - * @param o - * @see com.guodong.datastructure.List#add(int, java.lang.Object) - */ - public void add(int index, Object o) { - checkRangeForAdd(index); - - ensureCapacityInternal(size + 1); - - System.arraycopy(elementData, index, elementData, index + 1, size - index); - - elementData[index] = o; - size++; - } - - /** - * 鏍规嵁涓嬫爣鑾峰彇鍒楄〃鏁版嵁 - * - * @Method get - * @param index - * @return - * @see com.guodong.datastructure.List#get(int) - */ - public Object get(int index) { - checkRangeForGetOrRemove(index); - - return elementData[index]; - } - - /** - * 鏍规嵁涓嬫爣绉婚櫎鍏冪礌锛屽苟杩斿洖绉婚櫎鐨勫厓绱犲 - * - * @Method remove - * @param index - * @return - * @see com.guodong.datastructure.List#remove(int) - */ - public Object remove(int index) { - checkRangeForGetOrRemove(index); - - Object oldValue = elementData[index]; - - System.arraycopy(elementData, index + 1, elementData, index, size - index -1); - - size--; - elementData[size] = null; - - return oldValue; - } - - /** - * 鑾峰緱鍒楄〃闀垮害 - * - * @Method size - * @return - * @see com.guodong.datastructure.List#size() - */ - public int size() { - return size; - } - - /** - * 鑾峰彇ArrayList鐨勮凯浠e櫒 - * - * @MethodName iterator - * @author zhaogd - * @date 2017骞2鏈21鏃 涓嬪崍8:19:28 - * @return - */ - public Iterator iterator() { - return new ArrayListIterator(); - } - - /** - * 纭繚鏁扮粍瀹归噺瓒冲锛屽鏋滀笉澶熷垯鎵╁厖鏁扮粍 - * - * @MethodName ensureCapacityInternal - * @author zhaogd - * @date 2017骞2鏈21鏃 涓嬪崍5:06:46 - * @param minCapacity - */ - private void ensureCapacityInternal(int minCapacity) { - if(minCapacity > elementData.length){ - grow(minCapacity); - } - } - - /** - * 鏁扮粍鎵╁厖锛屾瘡娆℃墿鍏呭師鏁扮粍涓鍗婄殑闀垮害锛岀劧鍚庢妸鍘熸暟缁勬嫹璐濆埌鏂版暟缁 - * - * @MethodName grow - * @author zhaogd - * @date 2017骞2鏈21鏃 涓嬪崍5:20:55 - * @param minCapacity - */ - private void grow(int minCapacity) { - minCapacity = elementData.length + elementData.length / 2; - elementData = Arrays.copyOf(elementData, minCapacity); - } - - /** - * 妫鏌dd鏂规硶鐨勪笅鏍囪寖鍥存槸鍚﹀悎娉 - * - * @MethodName checkRangeForAdd - * @author zhaogd - * @date 2017骞2鏈21鏃 涓嬪崍7:32:55 - * @param index - */ - private void checkRangeForAdd(int index) { - if(index > size || index < 0){ - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); - } - } - - /** - * 妫鏌et鎴栬匯emove鏂规硶鐨勪笅鏍囪寖鍥存槸鍚﹀悎娉 - * - * @MethodName checkRangeForGetOrRemove - * @author zhaogd - * @date 2017骞2鏈21鏃 涓嬪崍7:33:21 - * @param index - */ - private void checkRangeForGetOrRemove(int index) { - if(index >= size || index < 0){ - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); - } - } - - - private class ArrayListIterator implements Iterator{ - - private int lastIndex = 0; - - @Override - public boolean hasNext() { - return lastIndex < size; - } - - @Override - public Object next() { - return elementData[lastIndex++]; - } - } -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/BinaryTreeNode.java b/group12/377401843/learning_1/src/com/guodong/datastructure/BinaryTreeNode.java deleted file mode 100644 index 2ced039d20..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/BinaryTreeNode.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.guodong.datastructure; - -public class BinaryTreeNode { - - private int data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public BinaryTreeNode(int data) { - this.data = data; - } - - public int getData() { - return data; - } - - public void setData(int data) { - this.data = data; - } - - public BinaryTreeNode getLeft() { - return left; - } - - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - - public BinaryTreeNode getRight() { - return right; - } - - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(int o) { - - if (o < data) { - if (left != null) { - left.insert(o); - } else { - left = new BinaryTreeNode(o); - return left; - } - } else { - if (right != null) { - right.insert(o); - } else { - right = new BinaryTreeNode(o); - return right; - } - } - - return null; - } - -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/Iterator.java b/group12/377401843/learning_1/src/com/guodong/datastructure/Iterator.java deleted file mode 100644 index 8d486220b0..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.guodong.datastructure; - -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/LinkedList.java b/group12/377401843/learning_1/src/com/guodong/datastructure/LinkedList.java deleted file mode 100644 index 976129cc84..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/LinkedList.java +++ /dev/null @@ -1,285 +0,0 @@ -package com.guodong.datastructure; - -import java.util.NoSuchElementException; - -public class LinkedList implements List { - - private int size; - - private Node head; - - private Node last; - - /** - * 鍚 閾捐〃灏剧鎻掑叆鍏冪礌 - * - * @Method add - * @param o - * @see com.guodong.datastructure.List#add(java.lang.Object) - */ - public void add(Object o) { - linkLast(o); - } - - /** - * 鍚戦摼琛ㄦ寚瀹氫綅缃彃鍏ュ厓绱 - * - * @Method add - * @param index - * @param o - * @see com.guodong.datastructure.List#add(int, java.lang.Object) - */ - public void add(int index, Object o) { - checkIndexForAdd(index); - - if (index == size) { - linkLast(o); - } else { - Node prevNode = getNodeByIndex(index - 1); // 鍙栧埌褰撳墠涓嬫爣鐨勫墠涓涓妭鐐 - Node currentNode = getNodeByIndex(index); // 鍙栧埌褰撳墠涓嬫爣鑺傜偣 - Node newNode = new Node(o, currentNode); // 鍒涘缓鏂拌妭鐐癸紝鏂拌妭鐐圭殑涓嬩竴涓妭鐐逛负褰撳墠涓嬫爣鑺傜偣 - - if (prevNode == null) { // 濡傛灉鍓嶄竴涓妭鐐逛负绌猴紝璇存槑浠庡ご閮ㄦ彃鍏 - head = newNode; - } else { - prevNode.next = newNode; - } - size++; - } - } - - /** - * 鏍规嵁涓嬫爣鑾峰彇閾捐〃涓厓绱 - * - * @Method get - * @param index - * @return - * @see com.guodong.datastructure.List#get(int) - */ - public Object get(int index) { - checkIndexForGet(index); - return getNodeByIndex(index).data; - } - - public Object getLast() { - return last.data; - } - - /** - * 鏍规嵁涓嬫爣绉婚櫎閾捐〃鍏冪礌 - * - * @Method remove - * @param index - * @return - * @see com.guodong.datastructure.List#remove(int) - */ - public Object remove(int index) { - checkIndexForGet(index); - - Node prevNode = getNodeByIndex(index - 1); // 鑾峰彇褰撳墠index鍓嶄竴涓厓绱 - Node currentNode = null; - if (prevNode == null) { - currentNode = getNodeByIndex(index); // 濡傛灉鍓嶄竴涓负绌猴紝鍒欐妸涓嬩竴涓厓绱犺祴鍊肩粰閾捐〃澶 - head = currentNode.next; - } else { - currentNode = prevNode.next; // 濡傛灉涓嶄负绌猴紝鍒欐妸鍓嶄竴涓妭鐐硅窡鍚庝竴涓妭鐐归摼鎺 - prevNode.next = currentNode.next; - } - Node nextNode = currentNode.next; - - if (nextNode == null) { // 濡傛灉鍚庝竴涓妭鐐逛负绌猴紝鍒欐妸閾惧熬璧嬪间负鍓嶄竴涓妭鐐 - last = prevNode; - } else { - currentNode.next = null; // 濡傛灉鍚庝竴涓妭鐐逛笉涓虹┖锛屼笉鍋氫换浣曞鐞嗭紝鍙墦鏂綋鍓嶈妭鐐圭殑閾炬帴 - } - Object data = currentNode.data; - currentNode.data = null; // 娓呯┖褰撳墠鑺傜偣鐨勫硷紝绛夊緟鍨冨溇鍥炴敹 - - size--; - - return data; - } - - /** - * 杩斿洖List闀垮害 - */ - public int size() { - return size; - } - - /** - * 鍚戝垪琛ㄥご閮ㄦ坊鍔犲厓绱 - * - * @param o - */ - public void addFirst(Object o) { - Node n = head; - Node newNode = new Node(o, n); - - head = newNode; - if (n == null) { - last = newNode; - } - size++; - } - - /** - * 鍚戝垪琛ㄥ熬閮ㄦ坊鍔犲厓绱 - * - * @param o - */ - public void addLast(Object o) { - linkLast(o); - } - - /** - * 绉婚櫎閾捐〃绗竴涓厓绱 - * - * @return - */ - public Object removeFirst() { - Node n = head; - if (n == null) { - throw new NoSuchElementException(); - } - Object data = n.data; - Node nextNode = n.next; - - n.data = null; - n.next = null; - - head = nextNode; - if (nextNode == null) { - last = null; - } - - size--; - return data; - } - - public Object removeLast() { - Node n = last; - if (n == null) { - throw new NoSuchElementException(); - } - Object data = n.data; - Node prevNode = getNodeByIndex(size - 2); - n.data = null; - if (prevNode == null) { - head = null; - } else { - prevNode.next = null; - } - last = prevNode; - - size--; - return data; - } - - /** - * 鏍规嵁涓嬫爣鑾峰彇瀵瑰簲鐨勮妭鐐 - * - * @MethodName getNodeByIndex - * @author zhaogd - * @date 2017骞2鏈23鏃 涓嬪崍3:32:48 - * @param index - * @return - */ - private Node getNodeByIndex(int index) { - if (index < 0) { - return null; - } - Node n = head; - for (int i = 0; i < index; i++) { - n = n.next; - } - return n; - } - - /** - * 鍦ㄩ摼琛ㄥ熬绔彃鍏ヨ妭鐐 - * - * @MethodName linkLast - * @author zhaogd - * @date 2017骞2鏈23鏃 涓嬪崍3:14:28 - * @param o - */ - private void linkLast(Object o) { - Node n = last; // 鍙栧嚭鍘熷熬绔暟鎹 - Node newNode = new Node(o, null); // 鍒涘缓鏂拌妭鐐 - last = newNode; // 鎶婃柊鑺傜偣鏀惧叆閾捐〃灏剧 - // 濡傛灉鍘熷熬绔负绌猴紝璇存槑閾捐〃涓虹┖锛屾妸鏂拌妭鐐逛篃鏀惧叆閾捐〃澶撮儴 - // 濡傛灉涓嶄负绌猴紝鎶婂師灏剧鑺傜偣鎸囧悜鏂拌妭鐐 - if (n == null) { - head = newNode; - } else { - n.next = newNode; - } - - size++; - } - - /** - * 妫鏌ヤ笅鏍囨槸鍚﹀悎娉 - * - * @MethodName checkIndexForAdd - * @author zhaogd - * @date 2017骞2鏈23鏃 涓嬪崍3:05:07 - * @param index - */ - private void checkIndexForAdd(int index) { - if (index < 0 || index > size) { - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); - } - } - - /** - * 妫鏌ヤ笅鏍囨槸鍚﹀悎娉 - * - * @MethodName checkIndexForGet - * @author zhaogd - * @date 2017骞2鏈23鏃 涓嬪崍4:21:35 - * @param index - */ - private void checkIndexForGet(int index) { - if (index < 0 || index >= size) { - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); - } - } - - private static class Node { - Object data; - Node next; - - Node(Object data, Node next) { - this.data = data; - this.next = next; - } - } - - public Iterator iterator() { - return new LinkedListIterator(); - } - - private class LinkedListIterator implements Iterator { - private Node current; - - private int index; - - @Override - public boolean hasNext() { - return index < size; - } - - @Override - public Object next() { - if (current == null) { - current = getNodeByIndex(index); - } - Object data = current.data; - current = current.next; - index++; - return data; - } - } -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/List.java b/group12/377401843/learning_1/src/com/guodong/datastructure/List.java deleted file mode 100644 index 1a6f12da52..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/List.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.guodong.datastructure; - -public interface List { - - public void add(Object o); - - public void add(int index, Object o); - - public Object get(int index); - - public Object remove(int index); - - public int size(); -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/Queue.java b/group12/377401843/learning_1/src/com/guodong/datastructure/Queue.java deleted file mode 100644 index 6dc85d8ec0..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/Queue.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.guodong.datastructure; - -public class Queue { - private LinkedList element = new LinkedList(); - - public void enQueue(Object o) { - element.addLast(o); - } - - public Object deQueue() { - return element.removeFirst(); - } - - public boolean isEmpty() { - return element.size() == 0; - } - - public int size() { - return element.size(); - } -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/Stack.java b/group12/377401843/learning_1/src/com/guodong/datastructure/Stack.java deleted file mode 100644 index c2b5049e73..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/Stack.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.guodong.datastructure; - -public class Stack { - private LinkedList elementData = new LinkedList(); - - public void push(Object o) { - elementData.addLast(o); - } - - public Object pop() { - return elementData.removeLast(); - } - - public Object peek() { - return elementData.getLast(); - } - - public boolean isEmpty() { - return elementData.size() == 0; - } - - public int size() { - return elementData.size(); - } -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/test/ArrayListTest.java b/group12/377401843/learning_1/src/com/guodong/datastructure/test/ArrayListTest.java deleted file mode 100644 index f38f58614d..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/test/ArrayListTest.java +++ /dev/null @@ -1,135 +0,0 @@ -package com.guodong.datastructure.test; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.guodong.datastructure.ArrayList; -import com.guodong.datastructure.Iterator; - -public class ArrayListTest { - - ArrayList arrayList; - - @Before - public void setUp() throws Exception { - arrayList = new ArrayList(); - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testAddObject() { - // 娴嬭瘯鏂板 - arrayList.add(0); - assertEquals(0, arrayList.get(0)); - assertEquals(1, arrayList.size()); - - // 娴嬭瘯鎵╁厖 - for (int i = 1; i < 101; i++) { - arrayList.add(i); - } - assertEquals(101, arrayList.size()); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForAdd1() { - // 娴嬭瘯鏂板涓嬫爣寮傚父鏃讹紝鏄惁鍙互姝g‘鎶涘嚭寮傚父 - arrayList.add(-1, 2); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForAdd2() { - // 娴嬭瘯鏂板涓嬫爣寮傚父鏃讹紝鏄惁鍙互姝g‘鎶涘嚭寮傚父 - arrayList.add(1, 3); - } - - @Test - public void testAddIntObject() { - // 娴嬭瘯涓嬫爣鏂板 - arrayList.add(0, 1); - arrayList.add(1, 2); - arrayList.add(2, 3); - arrayList.add(3, 4); - assertEquals(4, arrayList.size()); - - // 娴嬭瘯涓棿鎻掑叆 - arrayList.add(2, 5); - assertEquals(5, arrayList.size()); // 娴嬭瘯鎻掑叆涔嬪悗闀垮害 - assertEquals(5, arrayList.get(2)); - assertEquals(4, arrayList.get(4)); // 娴嬭瘯鎻掑叆涔嬪悗鍘熸潵鏁版嵁鏄惁鍚庣Щ - assertEquals(3, arrayList.get(3)); // 娴嬭瘯鎻掑叆涔嬪悗鍘熸潵鏁版嵁鏄惁鍚庣Щ - - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForGet1() { - // 娴嬭瘯Get鏃讹紝涓嬫爣寮傚父锛屾槸鍚﹀彲浠ユ纭姏鍑哄紓甯 - arrayList.get(-1); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForGet2() { - // 娴嬭瘯Get鏃讹紝涓嬫爣寮傚父锛屾槸鍚﹀彲浠ユ纭姏鍑哄紓甯 - arrayList.get(0); - } - - @Test - public void testGet() { - arrayList.add(1); - arrayList.add(2); - arrayList.add(3); - assertEquals(1, arrayList.get(0)); - assertEquals(2, arrayList.get(1)); - assertEquals(3, arrayList.get(2)); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForRemove1() { - arrayList.remove(-1); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForRemove2() { - arrayList.remove(0); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForRemove3() { - arrayList.remove(1); - } - - @Test - public void testRemove() { - arrayList.add(1); - arrayList.remove(0); - assertEquals(0, arrayList.size()); - - arrayList.add(1); - arrayList.add(2); - arrayList.remove(0); - assertEquals(1, arrayList.size()); - assertEquals(2, arrayList.get(0)); - } - - @Test - public void testSize() { - arrayList.add(1); - assertEquals(1, arrayList.size()); - } - - @Test - public void testIterator() { - Iterator iterator = arrayList.iterator(); - assertFalse(iterator.hasNext()); - - arrayList.add(1); - assertTrue(iterator.hasNext()); - assertEquals(1, iterator.next()); - assertFalse(iterator.hasNext()); - } -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/test/BinaryTreeNodeTest.java b/group12/377401843/learning_1/src/com/guodong/datastructure/test/BinaryTreeNodeTest.java deleted file mode 100644 index 537cd5961f..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/test/BinaryTreeNodeTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.guodong.datastructure.test; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.guodong.datastructure.BinaryTreeNode; - -public class BinaryTreeNodeTest { - - private BinaryTreeNode binaryTreeNode; - - @Before - public void setUp() throws Exception { - binaryTreeNode = new BinaryTreeNode(50); - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testInsert() { - binaryTreeNode.insert(20); - binaryTreeNode.insert(30); - binaryTreeNode.insert(60); - binaryTreeNode.insert(80); - - assertEquals(20, binaryTreeNode.getLeft().getData()); - assertEquals(30, binaryTreeNode.getLeft().getRight().getData()); - assertEquals(60, binaryTreeNode.getRight().getData()); - assertEquals(80, binaryTreeNode.getRight().getRight().getData()); - } - -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/test/LinkedListTest.java b/group12/377401843/learning_1/src/com/guodong/datastructure/test/LinkedListTest.java deleted file mode 100644 index 52d42b5aa7..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/test/LinkedListTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package com.guodong.datastructure.test; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.guodong.datastructure.Iterator; -import com.guodong.datastructure.LinkedList; - -public class LinkedListTest { - - private LinkedList linkedList; - - @Before - public void setUp() throws Exception { - linkedList = new LinkedList(); - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testAddObject() { - linkedList.add(1); - assertEquals(1, linkedList.size()); - assertEquals(1, linkedList.get(0)); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForAdd1() { - linkedList.add(-1, 1); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForAdd2() { - linkedList.add(1, 1); - } - - @Test - public void testAddIntObject() { - linkedList.add(0, 1); - linkedList.add(1, 2); - assertEquals(1, linkedList.get(0)); - - linkedList.add(1,3); - assertEquals(2, linkedList.get(2)); - assertEquals(3, linkedList.get(1)); - assertEquals(3, linkedList.size()); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForGet1() { - linkedList.get(-1); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForGet2() { - linkedList.get(0); - } - - @Test(expected = IndexOutOfBoundsException.class) - public void testExceptionForGet3() { - linkedList.get(1); - } - - @Test - public void testGet() { - linkedList.add(0, 1); - linkedList.add(1, 2); - assertEquals(2, linkedList.get(1)); - } - - @Test - public void testGetLast() { - linkedList.add(1); - assertEquals(1, linkedList.getLast()); - - linkedList.add(2); - assertEquals(2, linkedList.getLast()); - } - - @Test - public void testRemove() { - linkedList.add(1); - assertEquals(1, linkedList.remove(0)); - assertEquals(0, linkedList.size()); - } - - @Test - public void testSize() { - linkedList.add(1); - linkedList.add(1); - linkedList.add(1); - assertEquals(3, linkedList.size()); - } - - @Test - public void testAddFirst() { - linkedList.addFirst(1); - assertEquals(1, linkedList.get(0)); - - linkedList.addFirst(2); - linkedList.addFirst(3); - assertEquals(3, linkedList.get(0)); - assertEquals(1, linkedList.getLast()); - } - - @Test - public void testAddLast() { - linkedList.addLast(1); - assertEquals(1, linkedList.getLast()); - assertEquals(1, linkedList.get(0)); - } - - @Test - public void testRemoveFirst() { - linkedList.addFirst(1); - assertEquals(1, linkedList.removeFirst()); - assertEquals(0, linkedList.size()); - } - - @Test - public void testRemoveLast() { - linkedList.addLast(2); - assertEquals(2, linkedList.removeLast()); - assertEquals(0, linkedList.size()); - } - - @Test - public void testIterator() { - Iterator iterator = linkedList.iterator(); - assertFalse(iterator.hasNext()); - - linkedList.add(1); - assertTrue(iterator.hasNext()); - assertEquals(1, iterator.next()); - assertFalse(iterator.hasNext()); - } - -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/test/QueueTest.java b/group12/377401843/learning_1/src/com/guodong/datastructure/test/QueueTest.java deleted file mode 100644 index 1773b5027c..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/test/QueueTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.guodong.datastructure.test; - -import static org.junit.Assert.*; - -import java.util.NoSuchElementException; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.guodong.datastructure.Queue; - -public class QueueTest { - - private Queue queue; - - @Before - public void setUp() throws Exception { - queue = new Queue(); - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testEnQueue() { - queue.enQueue(1); - assertFalse(queue.isEmpty()); - } - - @Test(expected = NoSuchElementException.class) - public void testDeQueueExecption() { - queue.deQueue(); - } - - @Test - public void testDeQueue() { - queue.enQueue(1); - assertEquals(1, queue.deQueue()); - assertTrue(queue.isEmpty()); - } - - @Test - public void testIsEmpty() { - queue.enQueue(1); - assertFalse(queue.isEmpty()); - - queue.deQueue(); - assertTrue(queue.isEmpty()); - } - - @Test - public void testSize() { - queue.enQueue(1); - queue.enQueue(1); - queue.enQueue(1); - - assertEquals(3, queue.size()); - } - -} diff --git a/group12/377401843/learning_1/src/com/guodong/datastructure/test/StackTest.java b/group12/377401843/learning_1/src/com/guodong/datastructure/test/StackTest.java deleted file mode 100644 index 74ac8e7cc7..0000000000 --- a/group12/377401843/learning_1/src/com/guodong/datastructure/test/StackTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.guodong.datastructure.test; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.guodong.datastructure.Stack; - -public class StackTest { - - private Stack stack; - - @Before - public void setUp() throws Exception { - stack = new Stack(); - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testPush() { - stack.push(11); - assertEquals(11, stack.pop()); - assertTrue(stack.isEmpty()); - } - - @Test - public void testPop() { - stack.push(11); - assertEquals(11, stack.pop()); - assertTrue(stack.isEmpty()); - } - - @Test - public void testPeek() { - stack.push(11); - assertEquals(11, stack.peek()); - assertFalse(stack.isEmpty()); - assertEquals(1, stack.size()); - } - -} From 9e6f0cb292b6e9d9622df42a1bc74d906a0b362e Mon Sep 17 00:00:00 2001 From: guodongym Date: Fri, 3 Mar 2017 22:07:02 +0800 Subject: [PATCH 076/646] maven --- group12/377401843/learning/.gitignore | 4 + group12/377401843/learning/pom.xml | 71 +++++ .../main/java/com/zhaogd/array/ArrayUtil.java | 114 +++++++ .../java/com/zhaogd/collection/ArrayList.java | 170 +++++++++++ .../com/zhaogd/collection/BinaryTreeNode.java | 58 ++++ .../java/com/zhaogd/collection/Iterator.java | 9 + .../com/zhaogd/collection/LinkedList.java | 285 ++++++++++++++++++ .../main/java/com/zhaogd/collection/List.java | 14 + .../java/com/zhaogd/collection/Queue.java | 21 ++ .../java/com/zhaogd/collection/Stack.java | 25 ++ .../com/zhaogd/litestruts/LoginAction.java | 39 +++ .../java/com/zhaogd/litestruts/Struts.java | 34 +++ .../com/zhaogd/litestruts/StrutsTest.java | 43 +++ .../main/java/com/zhaogd/litestruts/View.java | 23 ++ .../java/com/zhaogd/litestruts/struts.xml | 11 + .../com/zhaogd/collection/ArrayListTest.java | 134 ++++++++ .../zhaogd/collection/BinaryTreeNodeTest.java | 35 +++ .../com/zhaogd/collection/LinkedListTest.java | 142 +++++++++ .../java/com/zhaogd/collection/QueueTest.java | 62 ++++ .../java/com/zhaogd/collection/StackTest.java | 46 +++ 20 files changed, 1340 insertions(+) create mode 100644 group12/377401843/learning/.gitignore create mode 100644 group12/377401843/learning/pom.xml create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/ArrayList.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/BinaryTreeNode.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/Iterator.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/LinkedList.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/List.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/Queue.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/collection/Stack.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java create mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/collection/ArrayListTest.java create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/collection/BinaryTreeNodeTest.java create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/collection/LinkedListTest.java create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/collection/QueueTest.java create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/collection/StackTest.java diff --git a/group12/377401843/learning/.gitignore b/group12/377401843/learning/.gitignore new file mode 100644 index 0000000000..8bd3a05882 --- /dev/null +++ b/group12/377401843/learning/.gitignore @@ -0,0 +1,4 @@ +/target/ +/.settings/ +/.classpath +/.project diff --git a/group12/377401843/learning/pom.xml b/group12/377401843/learning/pom.xml new file mode 100644 index 0000000000..1d11205656 --- /dev/null +++ b/group12/377401843/learning/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + com.zhaogd.projects + learning + 1.0.0 + jar + + + + junit + junit + 4.12 + + + + + + + ${project.basedir}/src/main/resources + true + + + ${project.basedir}/src/main/java + + **/*.java + + + + + + + ${project.basedir}/src/test/java + + **/*.java + + + + ${project.basedir}/src/test/resources + + + ${project.basedir}/src/main/java + + **/*.java + + + + ${project.basedir}/src/main/resources + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + 1.8 + UTF-8 + true + 128m + 512m + + + + + diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java b/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java new file mode 100644 index 0000000000..f62f0eceef --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java @@ -0,0 +1,114 @@ +package com.zhaogd.array; + +import java.util.ArrayList; +import java.util.Arrays; + + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = + * [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public static void reverseArray(int[] origin) { + for (int i = 0; i < origin.length / 2; i++) { + int tmp = origin[i]; + origin[i] = origin[origin.length - 1 - i]; + origin[origin.length - 1 - i] = tmp; + } + System.out.println(Arrays.toString(origin)); + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + public Integer[] removeZero(int[] oldArray) { + ArrayList arrayList = new ArrayList(); + for (int i : oldArray) { + if (i != 0) { + arrayList.add(i); + } + } + return arrayList.toArray(new Integer[arrayList.size()]); + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = + * [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + public int[] merge(int[] array1, int[] array2) { + int[] array3 = new int[array1.length + array2.length]; + + System.arraycopy(array1, 0, array3, 0, array1.length); + System.arraycopy(array2, 0, array3, array1.length, array2.length); + + Arrays.sort(array3); + return array3; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 渚嬪锛 max = 15 , + * 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public int[] fibonacci(int max) { + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public int[] getPerfectNumbers(int max) { + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], seperator = "-" 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator) { + return null; + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/ArrayList.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/ArrayList.java new file mode 100644 index 0000000000..d3afc5e01a --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/ArrayList.java @@ -0,0 +1,170 @@ +package com.zhaogd.collection; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + /** + * 鎸変笅鏍囬『搴忔柊澧炲厓绱 + * + * @Method add + * @param o + * @see com.guodong.datastructure.List#add(java.lang.Object) + */ + public void add(Object o) { + ensureCapacityInternal(size + 1); + elementData[size] = o; + size++; + } + + /** + * 鍦ㄦ寚瀹氫笅鏍囦綅缃彃鍏ュ厓绱 + * + * @Method add + * @param index + * @param o + * @see com.guodong.datastructure.List#add(int, java.lang.Object) + */ + public void add(int index, Object o) { + checkRangeForAdd(index); + + ensureCapacityInternal(size + 1); + + System.arraycopy(elementData, index, elementData, index + 1, size - index); + + elementData[index] = o; + size++; + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇鍒楄〃鏁版嵁 + * + * @Method get + * @param index + * @return + * @see com.guodong.datastructure.List#get(int) + */ + public Object get(int index) { + checkRangeForGetOrRemove(index); + + return elementData[index]; + } + + /** + * 鏍规嵁涓嬫爣绉婚櫎鍏冪礌锛屽苟杩斿洖绉婚櫎鐨勫厓绱犲 + * + * @Method remove + * @param index + * @return + * @see com.guodong.datastructure.List#remove(int) + */ + public Object remove(int index) { + checkRangeForGetOrRemove(index); + + Object oldValue = elementData[index]; + + System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); + + size--; + elementData[size] = null; + + return oldValue; + } + + /** + * 鑾峰緱鍒楄〃闀垮害 + * + * @Method size + * @return + * @see com.guodong.datastructure.List#size() + */ + public int size() { + return size; + } + + /** + * 鑾峰彇ArrayList鐨勮凯浠e櫒 + * + * @MethodName iterator + * @author zhaogd + * @date 2017骞2鏈21鏃 涓嬪崍8:19:28 + * @return + */ + public Iterator iterator() { + return new ArrayListIterator(); + } + + /** + * 纭繚鏁扮粍瀹归噺瓒冲锛屽鏋滀笉澶熷垯鎵╁厖鏁扮粍 + * + * @MethodName ensureCapacityInternal + * @author zhaogd + * @date 2017骞2鏈21鏃 涓嬪崍5:06:46 + * @param minCapacity + */ + private void ensureCapacityInternal(int minCapacity) { + if (minCapacity > elementData.length) { + grow(minCapacity); + } + } + + /** + * 鏁扮粍鎵╁厖锛屾瘡娆℃墿鍏呭師鏁扮粍涓鍗婄殑闀垮害锛岀劧鍚庢妸鍘熸暟缁勬嫹璐濆埌鏂版暟缁 + * + * @MethodName grow + * @author zhaogd + * @date 2017骞2鏈21鏃 涓嬪崍5:20:55 + * @param minCapacity + */ + private void grow(int minCapacity) { + minCapacity = elementData.length + elementData.length / 2; + elementData = Arrays.copyOf(elementData, minCapacity); + } + + /** + * 妫鏌dd鏂规硶鐨勪笅鏍囪寖鍥存槸鍚﹀悎娉 + * + * @MethodName checkRangeForAdd + * @author zhaogd + * @date 2017骞2鏈21鏃 涓嬪崍7:32:55 + * @param index + */ + private void checkRangeForAdd(int index) { + if (index > size || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); + } + } + + /** + * 妫鏌et鎴栬匯emove鏂规硶鐨勪笅鏍囪寖鍥存槸鍚﹀悎娉 + * + * @MethodName checkRangeForGetOrRemove + * @author zhaogd + * @date 2017骞2鏈21鏃 涓嬪崍7:33:21 + * @param index + */ + private void checkRangeForGetOrRemove(int index) { + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); + } + } + + private class ArrayListIterator implements Iterator { + + private int lastIndex = 0; + + @Override + public boolean hasNext() { + return lastIndex < size; + } + + @Override + public Object next() { + return elementData[lastIndex++]; + } + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/BinaryTreeNode.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/BinaryTreeNode.java new file mode 100644 index 0000000000..ee256391e7 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/BinaryTreeNode.java @@ -0,0 +1,58 @@ +package com.zhaogd.collection; + +public class BinaryTreeNode { + + private int data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(int data) { + this.data = data; + } + + public int getData() { + return data; + } + + public void setData(int data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(int o) { + + if (o < data) { + if (left != null) { + left.insert(o); + } else { + left = new BinaryTreeNode(o); + return left; + } + } else { + if (right != null) { + right.insert(o); + } else { + right = new BinaryTreeNode(o); + return right; + } + } + + return null; + } + +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/Iterator.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Iterator.java new file mode 100644 index 0000000000..0d9e6013d6 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Iterator.java @@ -0,0 +1,9 @@ +package com.zhaogd.collection; + +public interface Iterator { + + public boolean hasNext(); + + public Object next(); + +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/LinkedList.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/LinkedList.java new file mode 100644 index 0000000000..1cd0c2e2b3 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/LinkedList.java @@ -0,0 +1,285 @@ +package com.zhaogd.collection; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private int size; + + private Node head; + + private Node last; + + /** + * 鍚 閾捐〃灏剧鎻掑叆鍏冪礌 + * + * @Method add + * @param o + * @see com.guodong.datastructure.List#add(java.lang.Object) + */ + public void add(Object o) { + linkLast(o); + } + + /** + * 鍚戦摼琛ㄦ寚瀹氫綅缃彃鍏ュ厓绱 + * + * @Method add + * @param index + * @param o + * @see com.guodong.datastructure.List#add(int, java.lang.Object) + */ + public void add(int index, Object o) { + checkIndexForAdd(index); + + if (index == size) { + linkLast(o); + } else { + Node prevNode = getNodeByIndex(index - 1); // 鍙栧埌褰撳墠涓嬫爣鐨勫墠涓涓妭鐐 + Node currentNode = getNodeByIndex(index); // 鍙栧埌褰撳墠涓嬫爣鑺傜偣 + Node newNode = new Node(o, currentNode); // 鍒涘缓鏂拌妭鐐癸紝鏂拌妭鐐圭殑涓嬩竴涓妭鐐逛负褰撳墠涓嬫爣鑺傜偣 + + if (prevNode == null) { // 濡傛灉鍓嶄竴涓妭鐐逛负绌猴紝璇存槑浠庡ご閮ㄦ彃鍏 + head = newNode; + } else { + prevNode.next = newNode; + } + size++; + } + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇閾捐〃涓厓绱 + * + * @Method get + * @param index + * @return + * @see com.guodong.datastructure.List#get(int) + */ + public Object get(int index) { + checkIndexForGet(index); + return getNodeByIndex(index).data; + } + + public Object getLast() { + return last.data; + } + + /** + * 鏍规嵁涓嬫爣绉婚櫎閾捐〃鍏冪礌 + * + * @Method remove + * @param index + * @return + * @see com.guodong.datastructure.List#remove(int) + */ + public Object remove(int index) { + checkIndexForGet(index); + + Node prevNode = getNodeByIndex(index - 1); // 鑾峰彇褰撳墠index鍓嶄竴涓厓绱 + Node currentNode = null; + if (prevNode == null) { + currentNode = getNodeByIndex(index); // 濡傛灉鍓嶄竴涓负绌猴紝鍒欐妸涓嬩竴涓厓绱犺祴鍊肩粰閾捐〃澶 + head = currentNode.next; + } else { + currentNode = prevNode.next; // 濡傛灉涓嶄负绌猴紝鍒欐妸鍓嶄竴涓妭鐐硅窡鍚庝竴涓妭鐐归摼鎺 + prevNode.next = currentNode.next; + } + Node nextNode = currentNode.next; + + if (nextNode == null) { // 濡傛灉鍚庝竴涓妭鐐逛负绌猴紝鍒欐妸閾惧熬璧嬪间负鍓嶄竴涓妭鐐 + last = prevNode; + } else { + currentNode.next = null; // 濡傛灉鍚庝竴涓妭鐐逛笉涓虹┖锛屼笉鍋氫换浣曞鐞嗭紝鍙墦鏂綋鍓嶈妭鐐圭殑閾炬帴 + } + Object data = currentNode.data; + currentNode.data = null; // 娓呯┖褰撳墠鑺傜偣鐨勫硷紝绛夊緟鍨冨溇鍥炴敹 + + size--; + + return data; + } + + /** + * 杩斿洖List闀垮害 + */ + public int size() { + return size; + } + + /** + * 鍚戝垪琛ㄥご閮ㄦ坊鍔犲厓绱 + * + * @param o + */ + public void addFirst(Object o) { + Node n = head; + Node newNode = new Node(o, n); + + head = newNode; + if (n == null) { + last = newNode; + } + size++; + } + + /** + * 鍚戝垪琛ㄥ熬閮ㄦ坊鍔犲厓绱 + * + * @param o + */ + public void addLast(Object o) { + linkLast(o); + } + + /** + * 绉婚櫎閾捐〃绗竴涓厓绱 + * + * @return + */ + public Object removeFirst() { + Node n = head; + if (n == null) { + throw new NoSuchElementException(); + } + Object data = n.data; + Node nextNode = n.next; + + n.data = null; + n.next = null; + + head = nextNode; + if (nextNode == null) { + last = null; + } + + size--; + return data; + } + + public Object removeLast() { + Node n = last; + if (n == null) { + throw new NoSuchElementException(); + } + Object data = n.data; + Node prevNode = getNodeByIndex(size - 2); + n.data = null; + if (prevNode == null) { + head = null; + } else { + prevNode.next = null; + } + last = prevNode; + + size--; + return data; + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇瀵瑰簲鐨勮妭鐐 + * + * @MethodName getNodeByIndex + * @author zhaogd + * @date 2017骞2鏈23鏃 涓嬪崍3:32:48 + * @param index + * @return + */ + private Node getNodeByIndex(int index) { + if (index < 0) { + return null; + } + Node n = head; + for (int i = 0; i < index; i++) { + n = n.next; + } + return n; + } + + /** + * 鍦ㄩ摼琛ㄥ熬绔彃鍏ヨ妭鐐 + * + * @MethodName linkLast + * @author zhaogd + * @date 2017骞2鏈23鏃 涓嬪崍3:14:28 + * @param o + */ + private void linkLast(Object o) { + Node n = last; // 鍙栧嚭鍘熷熬绔暟鎹 + Node newNode = new Node(o, null); // 鍒涘缓鏂拌妭鐐 + last = newNode; // 鎶婃柊鑺傜偣鏀惧叆閾捐〃灏剧 + // 濡傛灉鍘熷熬绔负绌猴紝璇存槑閾捐〃涓虹┖锛屾妸鏂拌妭鐐逛篃鏀惧叆閾捐〃澶撮儴 + // 濡傛灉涓嶄负绌猴紝鎶婂師灏剧鑺傜偣鎸囧悜鏂拌妭鐐 + if (n == null) { + head = newNode; + } else { + n.next = newNode; + } + + size++; + } + + /** + * 妫鏌ヤ笅鏍囨槸鍚﹀悎娉 + * + * @MethodName checkIndexForAdd + * @author zhaogd + * @date 2017骞2鏈23鏃 涓嬪崍3:05:07 + * @param index + */ + private void checkIndexForAdd(int index) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); + } + } + + /** + * 妫鏌ヤ笅鏍囨槸鍚﹀悎娉 + * + * @MethodName checkIndexForGet + * @author zhaogd + * @date 2017骞2鏈23鏃 涓嬪崍4:21:35 + * @param index + */ + private void checkIndexForGet(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + size); + } + } + + private static class Node { + Object data; + Node next; + + Node(Object data, Node next) { + this.data = data; + this.next = next; + } + } + + public Iterator iterator() { + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator { + private Node current; + + private int index; + + @Override + public boolean hasNext() { + return index < size; + } + + @Override + public Object next() { + if (current == null) { + current = getNodeByIndex(index); + } + Object data = current.data; + current = current.next; + index++; + return data; + } + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/List.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/List.java new file mode 100644 index 0000000000..fb2f1bb78e --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/List.java @@ -0,0 +1,14 @@ +package com.zhaogd.collection; + +public interface List { + + public void add(Object o); + + public void add(int index, Object o); + + public Object get(int index); + + public Object remove(int index); + + public int size(); +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/Queue.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Queue.java new file mode 100644 index 0000000000..d4a0647ab6 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Queue.java @@ -0,0 +1,21 @@ +package com.zhaogd.collection; + +public class Queue { + private LinkedList element = new LinkedList(); + + public void enQueue(Object o) { + element.addLast(o); + } + + public Object deQueue() { + return element.removeFirst(); + } + + public boolean isEmpty() { + return element.size() == 0; + } + + public int size() { + return element.size(); + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/collection/Stack.java b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Stack.java new file mode 100644 index 0000000000..afb01f5f92 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/collection/Stack.java @@ -0,0 +1,25 @@ +package com.zhaogd.collection; + +public class Stack { + private LinkedList elementData = new LinkedList(); + + public void push(Object o) { + elementData.addLast(o); + } + + public Object pop() { + return elementData.removeLast(); + } + + public Object peek() { + return elementData.getLast(); + } + + public boolean isEmpty() { + return elementData.size() == 0; + } + + public int size() { + return elementData.size(); + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java new file mode 100644 index 0000000000..17edaa63b1 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.zhaogd.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java new file mode 100644 index 0000000000..fa2f5eea7c --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.zhaogd.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java new file mode 100644 index 0000000000..41e8313502 --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.zhaogd.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java new file mode 100644 index 0000000000..a790924f7d --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java @@ -0,0 +1,23 @@ +package com.zhaogd.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml new file mode 100644 index 0000000000..a6cfe43e6c --- /dev/null +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/collection/ArrayListTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/collection/ArrayListTest.java new file mode 100644 index 0000000000..c54e99b4db --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/collection/ArrayListTest.java @@ -0,0 +1,134 @@ +package com.zhaogd.collection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ArrayListTest { + + ArrayList arrayList; + + @Before + public void setUp() throws Exception { + arrayList = new ArrayList(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testAddObject() { + // 娴嬭瘯鏂板 + arrayList.add(0); + assertEquals(0, arrayList.get(0)); + assertEquals(1, arrayList.size()); + + // 娴嬭瘯鎵╁厖 + for (int i = 1; i < 101; i++) { + arrayList.add(i); + } + assertEquals(101, arrayList.size()); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForAdd1() { + // 娴嬭瘯鏂板涓嬫爣寮傚父鏃讹紝鏄惁鍙互姝g‘鎶涘嚭寮傚父 + arrayList.add(-1, 2); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForAdd2() { + // 娴嬭瘯鏂板涓嬫爣寮傚父鏃讹紝鏄惁鍙互姝g‘鎶涘嚭寮傚父 + arrayList.add(1, 3); + } + + @Test + public void testAddIntObject() { + // 娴嬭瘯涓嬫爣鏂板 + arrayList.add(0, 1); + arrayList.add(1, 2); + arrayList.add(2, 3); + arrayList.add(3, 4); + assertEquals(4, arrayList.size()); + + // 娴嬭瘯涓棿鎻掑叆 + arrayList.add(2, 5); + assertEquals(5, arrayList.size()); // 娴嬭瘯鎻掑叆涔嬪悗闀垮害 + assertEquals(5, arrayList.get(2)); + assertEquals(4, arrayList.get(4)); // 娴嬭瘯鎻掑叆涔嬪悗鍘熸潵鏁版嵁鏄惁鍚庣Щ + assertEquals(3, arrayList.get(3)); // 娴嬭瘯鎻掑叆涔嬪悗鍘熸潵鏁版嵁鏄惁鍚庣Щ + + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForGet1() { + // 娴嬭瘯Get鏃讹紝涓嬫爣寮傚父锛屾槸鍚﹀彲浠ユ纭姏鍑哄紓甯 + arrayList.get(-1); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForGet2() { + // 娴嬭瘯Get鏃讹紝涓嬫爣寮傚父锛屾槸鍚﹀彲浠ユ纭姏鍑哄紓甯 + arrayList.get(0); + } + + @Test + public void testGet() { + arrayList.add(1); + arrayList.add(2); + arrayList.add(3); + assertEquals(1, arrayList.get(0)); + assertEquals(2, arrayList.get(1)); + assertEquals(3, arrayList.get(2)); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForRemove1() { + arrayList.remove(-1); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForRemove2() { + arrayList.remove(0); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForRemove3() { + arrayList.remove(1); + } + + @Test + public void testRemove() { + arrayList.add(1); + arrayList.remove(0); + assertEquals(0, arrayList.size()); + + arrayList.add(1); + arrayList.add(2); + arrayList.remove(0); + assertEquals(1, arrayList.size()); + assertEquals(2, arrayList.get(0)); + } + + @Test + public void testSize() { + arrayList.add(1); + assertEquals(1, arrayList.size()); + } + + @Test + public void testIterator() { + Iterator iterator = arrayList.iterator(); + assertFalse(iterator.hasNext()); + + arrayList.add(1); + assertTrue(iterator.hasNext()); + assertEquals(1, iterator.next()); + assertFalse(iterator.hasNext()); + } +} diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/collection/BinaryTreeNodeTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/collection/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..797d457c21 --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/collection/BinaryTreeNodeTest.java @@ -0,0 +1,35 @@ +package com.zhaogd.collection; + +import static org.junit.Assert.assertEquals; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class BinaryTreeNodeTest { + + private BinaryTreeNode binaryTreeNode; + + @Before + public void setUp() throws Exception { + binaryTreeNode = new BinaryTreeNode(50); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testInsert() { + binaryTreeNode.insert(20); + binaryTreeNode.insert(30); + binaryTreeNode.insert(60); + binaryTreeNode.insert(80); + + assertEquals(20, binaryTreeNode.getLeft().getData()); + assertEquals(30, binaryTreeNode.getLeft().getRight().getData()); + assertEquals(60, binaryTreeNode.getRight().getData()); + assertEquals(80, binaryTreeNode.getRight().getRight().getData()); + } + +} diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/collection/LinkedListTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/collection/LinkedListTest.java new file mode 100644 index 0000000000..32cac4bc6d --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/collection/LinkedListTest.java @@ -0,0 +1,142 @@ +package com.zhaogd.collection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class LinkedListTest { + + private LinkedList linkedList; + + @Before + public void setUp() throws Exception { + linkedList = new LinkedList(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testAddObject() { + linkedList.add(1); + assertEquals(1, linkedList.size()); + assertEquals(1, linkedList.get(0)); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForAdd1() { + linkedList.add(-1, 1); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForAdd2() { + linkedList.add(1, 1); + } + + @Test + public void testAddIntObject() { + linkedList.add(0, 1); + linkedList.add(1, 2); + assertEquals(1, linkedList.get(0)); + + linkedList.add(1, 3); + assertEquals(2, linkedList.get(2)); + assertEquals(3, linkedList.get(1)); + assertEquals(3, linkedList.size()); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForGet1() { + linkedList.get(-1); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForGet2() { + linkedList.get(0); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void testExceptionForGet3() { + linkedList.get(1); + } + + @Test + public void testGet() { + linkedList.add(0, 1); + linkedList.add(1, 2); + assertEquals(2, linkedList.get(1)); + } + + @Test + public void testGetLast() { + linkedList.add(1); + assertEquals(1, linkedList.getLast()); + + linkedList.add(2); + assertEquals(2, linkedList.getLast()); + } + + @Test + public void testRemove() { + linkedList.add(1); + assertEquals(1, linkedList.remove(0)); + assertEquals(0, linkedList.size()); + } + + @Test + public void testSize() { + linkedList.add(1); + linkedList.add(1); + linkedList.add(1); + assertEquals(3, linkedList.size()); + } + + @Test + public void testAddFirst() { + linkedList.addFirst(1); + assertEquals(1, linkedList.get(0)); + + linkedList.addFirst(2); + linkedList.addFirst(3); + assertEquals(3, linkedList.get(0)); + assertEquals(1, linkedList.getLast()); + } + + @Test + public void testAddLast() { + linkedList.addLast(1); + assertEquals(1, linkedList.getLast()); + assertEquals(1, linkedList.get(0)); + } + + @Test + public void testRemoveFirst() { + linkedList.addFirst(1); + assertEquals(1, linkedList.removeFirst()); + assertEquals(0, linkedList.size()); + } + + @Test + public void testRemoveLast() { + linkedList.addLast(2); + assertEquals(2, linkedList.removeLast()); + assertEquals(0, linkedList.size()); + } + + @Test + public void testIterator() { + Iterator iterator = linkedList.iterator(); + assertFalse(iterator.hasNext()); + + linkedList.add(1); + assertTrue(iterator.hasNext()); + assertEquals(1, iterator.next()); + assertFalse(iterator.hasNext()); + } + +} diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/collection/QueueTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/collection/QueueTest.java new file mode 100644 index 0000000000..29c5e15752 --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/collection/QueueTest.java @@ -0,0 +1,62 @@ +package com.zhaogd.collection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.NoSuchElementException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class QueueTest { + + private Queue queue; + + @Before + public void setUp() throws Exception { + queue = new Queue(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testEnQueue() { + queue.enQueue(1); + assertFalse(queue.isEmpty()); + } + + @Test(expected = NoSuchElementException.class) + public void testDeQueueExecption() { + queue.deQueue(); + } + + @Test + public void testDeQueue() { + queue.enQueue(1); + assertEquals(1, queue.deQueue()); + assertTrue(queue.isEmpty()); + } + + @Test + public void testIsEmpty() { + queue.enQueue(1); + assertFalse(queue.isEmpty()); + + queue.deQueue(); + assertTrue(queue.isEmpty()); + } + + @Test + public void testSize() { + queue.enQueue(1); + queue.enQueue(1); + queue.enQueue(1); + + assertEquals(3, queue.size()); + } + +} diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/collection/StackTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/collection/StackTest.java new file mode 100644 index 0000000000..510e4c45f6 --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/collection/StackTest.java @@ -0,0 +1,46 @@ +package com.zhaogd.collection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class StackTest { + + private Stack stack; + + @Before + public void setUp() throws Exception { + stack = new Stack(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testPush() { + stack.push(11); + assertEquals(11, stack.pop()); + assertTrue(stack.isEmpty()); + } + + @Test + public void testPop() { + stack.push(11); + assertEquals(11, stack.pop()); + assertTrue(stack.isEmpty()); + } + + @Test + public void testPeek() { + stack.push(11); + assertEquals(11, stack.peek()); + assertFalse(stack.isEmpty()); + assertEquals(1, stack.size()); + } + +} From c4baf113d519d68f2d9076300c092b29921822fe Mon Sep 17 00:00:00 2001 From: wayss000 Date: Sat, 4 Mar 2017 01:04:26 +0800 Subject: [PATCH 077/646] sava in git --- .../src/coderising/litestruts/Struts.java | 61 +++++++++++++------ 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java index 083dfc4a53..460e5a3751 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java @@ -1,6 +1,8 @@ package coderising.litestruts; import java.io.File; +import java.lang.reflect.Method; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -12,13 +14,28 @@ public class Struts { + private static String filePath = "src/coderising/litestruts/struts.xml"; + public static void main(String [] args) throws Exception{ - Document document = readStrutsXml("src/coderising/litestruts/struts.xml"); - Element rootElement = document.getRootElement(); - List childElements = rootElement.elements(); - for (Element child : childElements) { - System.out.println("login" + child.elementText("login")); + String className = getClassNameFromXml(filePath,"login"); + Map parameters = new HashMap(); + parameters.put("name","test"); + parameters.put("password","1234"); + + Class clz = Class.forName(className); + LoginAction loginAction = (LoginAction)clz.newInstance(); + + loginAction.setName(parameters.get("name")); + loginAction.setPassword(parameters.get("password")); + + Method[] methods = clz.getMethods(); + String value; + for(Method m : methods){ + if(m.getName().equals("exectue")){ + value = (String) m.invoke(clz); + } } + } public static View runAction(String actionName, Map parameters) throws Exception { @@ -26,18 +43,7 @@ public static View runAction(String actionName, Map parameters) t /* 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - */ - Document document = readStrutsXml("src/coderising/litestruts/struts.xml"); - //鎷垮埌鏍笶lement - Element rootElement = document.getRootElement(); - //鐢ㄦ牴閬嶅巻鑺傜偣寰楀埌Node - List childElements = rootElement.elements(); - for (Element child : childElements) { - String name = child.getName(); - } - //鏍规嵁Node鍚嶅瓧鑾峰緱鍊 - - /* + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , "password"="1234") , @@ -53,15 +59,30 @@ public static View runAction(String actionName, Map parameters) t 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 */ - + String [] result = readStrutsXml(filePath); + Class login = Class.forName(result[1]); + + return null; } - private static Document readStrutsXml(String filePath) throws Exception{ + private static String getClassNameFromXml(String filePath,String actionName) throws Exception{ + + //鐢╠om4j璇诲彇xml SAXReader reader = new SAXReader(); Document document = reader.read(new File(filePath)); - return document; + Element rootElement = document.getRootElement(); + List childElements = rootElement.elements(); + for(Element child : childElements){ + String nodeName = child.attributeValue("name"); + if(actionName.equals(nodeName)){ + String className = child.attributeValue("class"); + return className; + } + } + + return null; } } From a2cfa0a8bb58901c28b42d64dfe365b906b3cd45 Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Sat, 4 Mar 2017 11:56:16 +0800 Subject: [PATCH 078/646] update --- ...32\204\344\272\213\344\273\266\346\234\272\345\210\266.md" | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 "group08/286060098/3-05/blong/Spring\344\270\255\347\232\204\344\272\213\344\273\266\346\234\272\345\210\266.md" diff --git "a/group08/286060098/3-05/blong/Spring\344\270\255\347\232\204\344\272\213\344\273\266\346\234\272\345\210\266.md" "b/group08/286060098/3-05/blong/Spring\344\270\255\347\232\204\344\272\213\344\273\266\346\234\272\345\210\266.md" new file mode 100644 index 0000000000..3752b3a54b --- /dev/null +++ "b/group08/286060098/3-05/blong/Spring\344\270\255\347\232\204\344\272\213\344\273\266\346\234\272\345\210\266.md" @@ -0,0 +1,4 @@ + +鍐欏湪鍗氬涓婁簡,閾炬帴濡備笅 + +http://www.jianshu.com/p/ccea84c2a6ba# \ No newline at end of file From 41acf07fb209b78fe453a9789cd8fdb477676e59 Mon Sep 17 00:00:00 2001 From: jacky <1271620150@qq.com> Date: Sat, 4 Mar 2017 12:07:36 +0800 Subject: [PATCH 079/646] Work02 Commit --- group09/1271620150/Work02/.classpath | 8 + group09/1271620150/Work02/.gitignore | 1 + group09/1271620150/Work02/.project | 17 ++ .../src/com/coderising/array/ArrayUtil.java | 199 +++++++++++++++ .../com/coderising/array/ArrayUtilTest.java | 62 +++++ .../coderising/litestruts/ActionClass.java | 60 +++++ .../coderising/litestruts/LoginAction.java | 39 +++ .../src/com/coderising/litestruts/Struts.java | 227 ++++++++++++++++++ .../com/coderising/litestruts/StrutsTest.java | 49 ++++ .../src/com/coderising/litestruts/View.java | 23 ++ .../src/com/coderising/litestruts/struts.xml | 11 + .../litestruts/util/StringUtil.java | 102 ++++++++ .../coderising/litestruts/util/XmlUtil.java | 109 +++++++++ 13 files changed, 907 insertions(+) create mode 100644 group09/1271620150/Work02/.classpath create mode 100644 group09/1271620150/Work02/.gitignore create mode 100644 group09/1271620150/Work02/.project create mode 100644 group09/1271620150/Work02/src/com/coderising/array/ArrayUtil.java create mode 100644 group09/1271620150/Work02/src/com/coderising/array/ArrayUtilTest.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/ActionClass.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/LoginAction.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/Struts.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/View.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/struts.xml create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/util/StringUtil.java create mode 100644 group09/1271620150/Work02/src/com/coderising/litestruts/util/XmlUtil.java diff --git a/group09/1271620150/Work02/.classpath b/group09/1271620150/Work02/.classpath new file mode 100644 index 0000000000..9b2ed0d520 --- /dev/null +++ b/group09/1271620150/Work02/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/group09/1271620150/Work02/.gitignore b/group09/1271620150/Work02/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group09/1271620150/Work02/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group09/1271620150/Work02/.project b/group09/1271620150/Work02/.project new file mode 100644 index 0000000000..fc557efe11 --- /dev/null +++ b/group09/1271620150/Work02/.project @@ -0,0 +1,17 @@ + + + Work02 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group09/1271620150/Work02/src/com/coderising/array/ArrayUtil.java b/group09/1271620150/Work02/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..8f620875f2 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,199 @@ +package com.coderising.array; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int n = origin.length; + int temp =0; + int halfLength = origin.length/2; + for (int i = 0; i < halfLength; i++) { + temp= origin[i]; + origin[i] = origin[n-i-1]; + origin[n-i-1] = temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + ArrayList list = new ArrayList<>(); + for (int i = 0; i < oldArray.length; i++) { + if(oldArray[i]!=0){ + list.add(oldArray[i]); + } + } + int[] new_array = new int[list.size()]; + for(int i=0;i set = new HashSet(); + for (int i = 0; i < array1.length; i++) { + set.add(array1[i]); + } + for (int i = 0; i < array2.length; i++) { + set.add(array2[i]); + } + Iterator i = set.iterator(); + int[] arrays = new int[set.size()]; + int num = 0; + while (i.hasNext()) { + int a = (Integer) i.next(); + arrays[num++] = a; + } + Arrays.sort(arrays); + return arrays; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + int[] new_array = new int[oldArray.length+size]; + for (int i = 0; i < oldArray.length; i++) { + new_array[i] = oldArray[i]; + } + return new_array; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + ArrayList list = new ArrayList<>(); + int a=1,b=1; + list.add(a); + list.add(b); + for(int c=0;c prime = new ArrayList(); + for(int i = 2 ; i < max ;i++){ + boolean sign = true; + for(int j = 2 ; j < i ;j++){ + if(i%j == 0){ + sign = false; + continue; + } + } + if(sign){ + prime.add(i); + } + } + int[] array = new int[prime.size()]; + for(int i =0;i perfect = new ArrayList(); + for(int i = 1 ; i < max ;i++){ + boolean sign = false; + for(int j = 1, k=0; j { + /** + * 绫诲悕 + */ + private String className; + /** + * 杩斿洖缁撴灉椤甸潰 + */ + private String result; + /** + * 涓存椂瀛樺偍Action涓嬬殑鎵鏈塺esult缁撶偣 + */ + private List elements = new ArrayList(); + + /** + * 瑕佽皟鐢ㄧ殑Action鏈韩 + */ + private Object action; + + public Object getAction() { + return action; + } + + public void setAction(Object action) { + this.action = action; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + + public List getElements() { + return elements; + } + + public void setElements(List elements) { + this.elements = elements; + } + +} \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/LoginAction.java b/group09/1271620150/Work02/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..ed2436ce4e --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author jacky + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/Struts.java b/group09/1271620150/Work02/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..2162de7ab4 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,227 @@ +package com.coderising.litestruts; + +import java.io.InputStream; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; + +import com.coderising.litestruts.util.StringUtil; +import com.coderising.litestruts.util.XmlUtil; + + + + + + +public class Struts { + + /** + * struts.xml榛樿绫昏矾寰 + */ + public static final String STRUTS_XML_FILE = "struts.xml"; + + public View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + View view = null; + if(StringUtil.isNotBlank(actionName)){ + ActionClass clas = getActionClass(actionName); + Object action = setActionValues(clas, parameters); + clas.setAction(action); + view = setResultValue(clas); + } + + return view; + } + + + private View setResultValue(ActionClass clas) { + Map params = new HashMap(); + View view = new View(); + Object obj = invokeAction(clas); + Field[] fields = obj.getClass().getDeclaredFields(); + Method[] methods = obj.getClass().getMethods(); + // 鍒ゆ柇鏌愪釜瀛楁鏄惁鏈塯et鏂规硶锛屽鏋滄湁锛屽垯灏嗗叾璁剧疆鍦╮equest涓 + for (Field field : fields) { + String fieldName = field.getName(); + String upperFirstLetter = fieldName.substring(0, 1).toUpperCase(); + // 鑾峰緱鍜屽睘鎬у搴旂殑getXXX()鏂规硶鐨勫悕瀛 + String getMethodName = "get" + upperFirstLetter + + fieldName.substring(1); + // 鑾峰緱鍜屽睘鎬у搴旂殑getXXX()鏂规硶 + for (Method method : methods) { + if (StringUtil.equals(getMethodName, method.getName())) { + field.setAccessible(true); + try { + params.put(field.getName(), field.get(obj)); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + } + view.setParameters(params); + view.setJsp(clas.getResult()); + return view; + } + + + private Object invokeAction(ActionClass actionClass) { + try { + Object obj = actionClass.getAction(); + Class clas = obj.getClass(); + Method method = clas.getMethod("execute", null); + String result = (String) method.invoke(obj, null); + this.setInvokeResult(result, actionClass); + actionClass.setAction(obj); + return obj; + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new RuntimeException("鍑虹幇InvocationTargetException寮傚父:" + + e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new RuntimeException("鍑虹幇SecurityException寮傚父:" + + e.getMessage()); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new RuntimeException("鍑虹幇NoSuchMethodException寮傚父:" + + e.getMessage()); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new RuntimeException("鍑虹幇IllegalAccessException寮傚父:" + + e.getMessage()); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + throw new RuntimeException("鍑虹幇IllegalArgumentException寮傚父:" + + e.getMessage()); + } + } + + + private void setInvokeResult(String result, ActionClass actionClass) { + List elements = actionClass.getElements(); + for (Element elem : elements) { + Attribute name = XmlUtil.getAttributeByName(elem, "name"); + if (StringUtil.equals(result, name.getText())) { + actionClass.setResult(elem.getText()); + return; + } + } + throw new RuntimeException("璇风‘瀹氬湪xml閰嶇疆鏂囦欢涓槸鍚︽湁鍚嶅彨 [" + result + + "]銆鐨勮繑鍥炵被鍨嬬粨鐐 "); + + } + + + @SuppressWarnings("unchecked") + private Object setActionValues(ActionClass actionClass, Map params) { + try { + // 寰楀埌Action鐨凜lass,骞舵牴鎹棤鍙傛瀯閫犲嚱鏁扮敓鎴愪竴涓狝ction瀵硅薄 + Class clas = Class.forName(actionClass.getClassName()); + Object obj = clas.newInstance(); + + if (params != null && params.size() > 0) { + Iterator it = params.keySet().iterator(); + while (it.hasNext()) { + String key = it.next(); + String value = params.get(key); + String upperFirstLetter = key.substring(0, 1).toUpperCase(); + // 鑾峰緱鍜屽睘鎬у搴旂殑setXXX()鏂规硶鐨勫悕瀛 + String setMethodName = "set" + upperFirstLetter + + key.substring(1); + Method method = null; + // 鐪嬬湅璇ラ〉闈㈡彁浜ょ殑鍙傛暟鍚嶄腑,鏄惁鍦ˋction鏈塻et鏂规硶 + try { + method = clas.getMethod(setMethodName, + new Class[] { String.class }); + } catch (NoSuchMethodException e) { + System.out.println("璀﹀憡 " + actionClass.getClassName() + + "." + setMethodName + "(" + + String.class.getName() + ") 涓嶅瓨鍦"); + } + if (method != null) { + // 濡傛灉鏈塻et鏂规硶,灏辫皟鐢╯et鏂规硶,杩涜璧嬪兼搷浣 + method.invoke(obj, new String[] { value }); + } + } + } + return obj; + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (SecurityException e) { + e.printStackTrace(); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } + throw new RuntimeException("鍑虹幇鏈煡寮傚父"); + } + + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private ActionClass getActionClass(String actionName) { + // 寰楀埌struts.xml绫昏矾寰 + InputStream is = this.getClass().getResourceAsStream(STRUTS_XML_FILE); + try { + Document doc = XmlUtil.getDocument(is); + Element root = XmlUtil.getRoot(doc); + // 寰楀埌鎵鏈夌殑action缁撶偣 + List actions = XmlUtil.getElementsByName(root, "action"); + if (actions != null && actions.size() > 0) { + for (Element elem : actions) { + // 鍒ゆ柇鏌愪釜缁撶偣鍏冪礌鐨刵ame灞炴ф槸鍚︿笌浼犻掕繃鏉ョ殑actionName鐩哥瓑,濡傛灉鐩哥瓑閭d箞灏嗗叾method灞炴у彇鍑 + Attribute att = XmlUtil.getAttributeByName(elem, "name"); + if (StringUtil.equals(att.getText(), actionName)) { + Attribute cls = XmlUtil.getAttributeByName(elem, "class"); + List results = XmlUtil.getElementsByName(elem, "result"); + ActionClass actionClass = new ActionClass(); + actionClass.setClassName(cls.getText()); + actionClass.setElements(results); + return actionClass; + } + } + } + } catch (DocumentException e) { + e.printStackTrace(); + throw new RuntimeException("struts.xml 涓嶅瓨鍦ㄦ垨鏈夎"); + } + throw new RuntimeException("鎵句笉鍒板悕绉颁负 [" + actionName + "] 鐨凙ction鏄犲皠"); + } + +} \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/StrutsTest.java b/group09/1271620150/Work02/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..cd946ddf29 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,49 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + Struts struts = new Struts(); + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + System.out.println(view.getJsp()); + System.out.println(view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + System.out.println(view.getJsp()); + System.out.println(view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/View.java b/group09/1271620150/Work02/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..9024d72158 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/struts.xml b/group09/1271620150/Work02/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..4c6eeabbd4 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/util/StringUtil.java b/group09/1271620150/Work02/src/com/coderising/litestruts/util/StringUtil.java new file mode 100644 index 0000000000..c6ca4e3d72 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/util/StringUtil.java @@ -0,0 +1,102 @@ +锘縫ackage com.coderising.litestruts.util; + +public class StringUtil { + + /** + * 鍒ゆ柇鏄惁涓虹┖瀛楃涓 + * + * @param str + * 瑕佸垽鏂殑瀛楃涓 + * @return 濡傛灉涓嶄负绌鸿繑鍥瀟rue + */ + public static boolean isNotBlank(String str) { + return (str != null && !"".equals(str)) ? true : false; + } + + /** + * 鍒ゆ柇鏄惁涓虹┖瀛楃涓 + * + * @param str + * 瑕佸垽鏂殑瀛楃涓 + * @return 濡傛灉涓虹┖杩斿洖true + */ + public static boolean isBlank(String str) { + return !isNotBlank(str); + } + + /** + * 鍒ゆ柇鏄惁涓虹┖瀛楃涓(鍖呮嫭绌烘牸) + * + * @param str + * 瑕佸垽鏂殑瀛楃涓 + * @return 濡傛灉涓嶄负绌鸿繑鍥瀟rue + */ + public static boolean isNotEmpty(String str) { + return (str != null && !"".equals(str.trim())) ? true : false; + } + + /** + * 鍒ゆ柇鏄惁涓虹┖瀛楃涓(鍖呮嫭绌烘牸) + * + * @param str + * 瑕佸垽鏂殑瀛楃涓 + * @return 濡傛灉涓虹┖杩斿洖true + */ + public static boolean isEmpty(String str) { + return !isNotEmpty(str); + } + + /** + * 瀛楃涓叉瘮杈 + * + * @param src + * @param des + * @return + */ + public static boolean equals(String src, String des) { + if (src == null) + return (des == null ? true : false); + if (des == null) + return (src == null ? true : false); + return src.equals(des); + } + + /** + * 灏哠tring鏁扮粍鍙樻垚","鍙烽棿闅旂殑瀛楃涓 + * + * @param str + * 瑕佸垽鏂殑瀛楃涓 + * @return 濡傛灉涓虹┖杩斿洖true + */ + public static String StringArrayToString(String[] str) { + StringBuilder sb = new StringBuilder(); + if (str != null && str.length > 0) { + for (String s : str) { + if (s != null) { + sb.append(s + ","); + } + } + if (sb.length() == 0) + return ""; + return sb.substring(0, sb.length() - 1).toString(); + } + return str[0]; + } + + /** + * 鍒ゆ柇URL鍚庣紑鏄惁涓.action,濡傛灉鏄殑璇濓紝鎻愬彇actionName + * + * @param servletPath + * request.getServletPath() + * @return actionName + */ + public static String parseServletPath(String servletPath) { + if (null != servletPath && !"".equals(servletPath)) { + if (servletPath.contains(".action")) { + return servletPath.substring(servletPath.lastIndexOf("/") + 1, + servletPath.indexOf(".action")); + } + } + return ""; + } +} diff --git a/group09/1271620150/Work02/src/com/coderising/litestruts/util/XmlUtil.java b/group09/1271620150/Work02/src/com/coderising/litestruts/util/XmlUtil.java new file mode 100644 index 0000000000..62bd7686d4 --- /dev/null +++ b/group09/1271620150/Work02/src/com/coderising/litestruts/util/XmlUtil.java @@ -0,0 +1,109 @@ +锘縫ackage com.coderising.litestruts.util; + +import java.io.File; +import java.io.InputStream; +import java.util.List; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +public class XmlUtil { + /** + * 鏍规嵁Xml鏂囦欢鐢熸垚Document瀵硅薄 + * + * @param file + * xml鏂囦欢璺緞 + * @return Document瀵硅薄 + * @throws DocumentException + */ + public static Document getDocument(File file) throws DocumentException { + SAXReader xmlReader = new SAXReader(); + return xmlReader.read(file); + } + + /** + * 鏍规嵁杈撳叆娴佺敓鎴怐ocument瀵硅薄 + * + * @param is + * 杈撳叆娴 + * @return Document瀵硅薄 + * @throws DocumentException + */ + public static Document getDocument(InputStream is) throws DocumentException { + SAXReader xmlReader = new SAXReader(); + return xmlReader.read(is); + } + + /** + * 鏍规嵁Document寰楀埌鏍圭粨鐐 + * + * @param doc + * Document鐩綍 + * @return 鏍圭粨鐐 + */ + public static Element getRoot(Document doc) { + return doc.getRootElement(); + } + + /** + * 鍙栧嚭褰撳墠缁撶偣涓嬬殑鎵鏈夊瓙缁撶偣 + * + * @param root + * 褰撳墠缁撶偣 + * @return 涓缁凟lement + */ + public static List getElements(Element root) { + return root.elements(); + } + + /** + * 鏍规嵁鍏冪礌鍚嶇О杩斿洖涓缁凟lement + * + * @param root + * 褰撳墠缁撶偣 + * @param name + * 瑕佽繑鍥炵殑鍏冪礌鍚嶇О + * @return 涓缁凟lement + */ + public static List getElementsByName(Element root, String name) { + return root.elements(name); + } + + /** + * 鏍规嵁鍏冪礌鍚嶇О杩斿洖涓涓厓绱(濡傛灉鏈夊涓厓绱犵殑璇濓紝鍙繑鍥炵涓涓) + * + * @param root + * 褰撳墠缁撶偣 + * @param name + * 瑕佽繑鍥炵殑鍏冪礌鍚嶇О + * @return 涓涓狤lement鍏冪礌 + */ + public static Element getElementByName(Element root, String name) { + return root.element(name); + } + + /** + * 鏍规嵁褰撳墠鍏冪礌,杩斿洖璇ュ厓绱犵殑鎵鏈夊睘鎬 + * + * @param root + * 褰撳墠缁撶偣 + * @return 褰撳墠缁撶偣鐨勬墍鏈夊睘鎬 + */ + public static List getAttributes(Element root) { + return root.attributes(); + } + + /** + * 鏍规嵁灞炴у悕绉,杩斿洖褰撳墠鍏冪礌鐨勬煇涓睘鎬 + * + * @param root + * 褰撳墠缁撶偣 + * @return 褰撳墠缁撶偣鐨勪竴涓睘鎬 + */ + public static Attribute getAttributeByName(Element root, String name) { + return root.attribute(name); + } +} From 5e833832bbbcae62efc0142133c8d9368beaae56 Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sat, 4 Mar 2017 12:44:19 +0800 Subject: [PATCH 080/646] upload homework for 3-5 (code part) --- .../3-5/code/coderising/array/ArrayUtil.java | 253 ++++++++++++++++++ .../code/coderising/array/ArrayUtilTest.java | 74 +++++ .../coderising/litestruts/LoginAction.java | 39 +++ .../code/coderising/litestruts/Struts.java | 126 +++++++++ .../coderising/litestruts/StrutsTest.java | 43 +++ .../3-5/code/coderising/litestruts/View.java | 23 ++ .../3-5/code/coderising/litestruts/struts.xml | 11 + 7 files changed, 569 insertions(+) create mode 100644 group08/619057560/3-5/code/coderising/array/ArrayUtil.java create mode 100644 group08/619057560/3-5/code/coderising/array/ArrayUtilTest.java create mode 100644 group08/619057560/3-5/code/coderising/litestruts/LoginAction.java create mode 100644 group08/619057560/3-5/code/coderising/litestruts/Struts.java create mode 100644 group08/619057560/3-5/code/coderising/litestruts/StrutsTest.java create mode 100644 group08/619057560/3-5/code/coderising/litestruts/View.java create mode 100644 group08/619057560/3-5/code/coderising/litestruts/struts.xml diff --git a/group08/619057560/3-5/code/coderising/array/ArrayUtil.java b/group08/619057560/3-5/code/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..8791408a16 --- /dev/null +++ b/group08/619057560/3-5/code/coderising/array/ArrayUtil.java @@ -0,0 +1,253 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int i, tmp; + int len = origin.length; + + for (i = 0; i < len/2; i++) { + tmp = origin[i]; + origin[i] = origin[len - i - 1]; + origin[len - i - 1] = tmp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int newLen = 0; + int[] tmpArray = new int[oldArray.length]; + + for (int item:oldArray) { + if (item != 0) { + tmpArray[newLen++] = item; + } + } + + int[] newArray = new int[newLen]; + System.arraycopy(tmpArray, 0, newArray, 0, newLen); + + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int i = 0, j = 0, newLen = 0; + int len1 = array1.length, len2 = array2.length; + int[] tmpArray = new int[len1+len2]; + + while (i < len1 && j < len2) { + if (array1[i] < array2[j]) { + tmpArray[newLen++] = array1[i++]; + } + else if (array1[i] > array2[j]) { + tmpArray[newLen++] = array2[j++]; + } + else { + tmpArray[newLen++] = array1[i]; + i++; + j++; + } + } + + if (i < len1) { + System.arraycopy(array1, i, tmpArray, newLen, len1 - i); + newLen += (len1 - i); + } + else if (j < len2) { + System.arraycopy(array2, j, tmpArray, newLen, len2 - j); + newLen += (len2 - j); + } + + int[] newArray = new int[newLen]; + System.arraycopy(tmpArray, 0, newArray, 0, newLen); + + return newArray; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + int[] newArray = new int[oldArray.length + size]; + + System.arraycopy(oldArray, 0, newArray, 0, oldArray.length); + + return newArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + int realSize = 0; + int[] array = new int[10]; + int[] resultArray; + int x0 = 1, x1 = 1; + int tmp; + + if (max <= x0) { + return new int[0]; + } + + for (array[realSize++] = x0; max > x1; tmp = x0 + x1, x0 = x1, x1 = tmp) { + if (realSize + 1 > array.length) { + array = grow(array, 5); + } + + array[realSize++] = x1; + } + + if (array.length > realSize) { + resultArray = new int[realSize]; + System.arraycopy(array, 0, resultArray, 0, realSize); + } + else { + resultArray = array; + } + + return resultArray; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + private boolean isPrime(int num) { + for (int i = 2; i <= num/2; i++) { + if (num % i == 0) { + return false; + } + } + return true; + } + + public int[] getPrimes(int max){ + int realSize = 0; + int[] array = new int[10]; + int[] resultArray; + + for (int num = 2; num < max; num++) { + if (isPrime(num)) { + if (realSize + 1 > array.length) { + array = grow(array, 5); + } + array[realSize++] = num; + } + } + + if (array.length > realSize) { + resultArray = new int[realSize]; + System.arraycopy(array, 0, resultArray, 0, realSize); + } + else { + resultArray = array; + } + return resultArray; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + private int exponentiation(int base, int expo) { + int result = 1; + for (int i = 0; i < expo; i++) { + result *= base; + } + return result; + } + /* + * a perfect number = 2^(n-1) * (2^n - 1), where (2^n - 1) is a prime + */ + public int[] getPerfectNumbers(int max){ + int realSize = 0; + int[] array = new int[10]; + int[] resultArray; + int num = 0; + int x1, x2; + + for (int i = 2; true; i++) { + x2 = exponentiation(2, i) - 1; + if (x2 >= max) { + break; + } + if (!isPrime(x2)) { + continue; + } + x1 = exponentiation(2, i - 1); + num = x1 * x2; + if (num >= max) { + break; + } + + if (realSize + 1 > array.length) { + array = grow(array, 5); + } + array[realSize++] = num; + } + + if (array.length > realSize) { + resultArray = new int[realSize]; + System.arraycopy(array, 0, resultArray, 0, realSize); + } + else { + resultArray = array; + } + return resultArray; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < array.length - 1; i++) { + sb.append(array[i]).append(seperator); + } + if (array.length > 0) + sb.append(array[array.length-1]); + return sb.toString(); + } + + +} diff --git a/group08/619057560/3-5/code/coderising/array/ArrayUtilTest.java b/group08/619057560/3-5/code/coderising/array/ArrayUtilTest.java new file mode 100644 index 0000000000..0ddc7b7547 --- /dev/null +++ b/group08/619057560/3-5/code/coderising/array/ArrayUtilTest.java @@ -0,0 +1,74 @@ +package com.coderising.array; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ArrayUtilTest { + + ArrayUtil arrayUtil; + + @Before + public void setUp() { + arrayUtil = new ArrayUtil(); + } + + @After + public void release() { + arrayUtil = null; + } + + @Test + public void testReverseArray() { + int[] origin = new int[] {1,2,3,4,5}; + int[] result = new int[] {5,4,3,2,1}; + arrayUtil.reverseArray(origin); + Assert.assertArrayEquals(origin, result); + } + + @Test + public void testRemoveZero() { + int[] origin = new int[] {0,1,2,0,0,3,0,4,5,0,0}; + int[] result = new int[] {1,2,3,4,5}; + Assert.assertArrayEquals(result, arrayUtil.removeZero(origin)); + } + + @Test + public void testMerge() { + int[] origin1 = new int[] {3,4,7,11}; + int[] origin2 = new int[] {2,3,5,8,12}; + int[] result = new int[] {2,3,4,5,7,8,11,12}; + Assert.assertArrayEquals(result, arrayUtil.merge(origin1, origin2)); + } + + @Test + public void testGrow() { + int[] origin = new int[] {1,2,3}; + int[] result = new int[] {1,2,3,0,0,0,0}; + Assert.assertArrayEquals(result, arrayUtil.grow(origin, 4)); + } + + @Test + public void testFibonacci() { + Assert.assertArrayEquals(new int[] {1,1,2,3,5,8}, arrayUtil.fibonacci(9)); + Assert.assertArrayEquals(new int[] {}, arrayUtil.fibonacci(1)); + } + + @Test + public void testGetPrimes() { + Assert.assertArrayEquals(new int[] {2,3,5,7,11,13,17,19}, arrayUtil.getPrimes(23)); + } + + @Test + public void testGetPerfectNumbers() { + Assert.assertArrayEquals(new int[] {}, arrayUtil.getPerfectNumbers(6)); + Assert.assertArrayEquals(new int[] {6,28}, arrayUtil.getPerfectNumbers(29)); + + } + + @Test + public void testJoin() { + Assert.assertEquals("1-2-3-4-5", arrayUtil.join(new int[] {1,2,3,4,5}, "-")); + } +} diff --git a/group08/619057560/3-5/code/coderising/litestruts/LoginAction.java b/group08/619057560/3-5/code/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..1005f35a29 --- /dev/null +++ b/group08/619057560/3-5/code/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group08/619057560/3-5/code/coderising/litestruts/Struts.java b/group08/619057560/3-5/code/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..dc9ee37046 --- /dev/null +++ b/group08/619057560/3-5/code/coderising/litestruts/Struts.java @@ -0,0 +1,126 @@ +package com.coderising.litestruts; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + File file = new File("src/com/coderising/litestruts/struts.xml"); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder; + try { + dBuilder = dbFactory.newDocumentBuilder(); + Document doc = (Document) dBuilder.parse(file); + doc.getDocumentElement().normalize(); + NodeList nodeList = doc.getElementsByTagName("action"); + + int nodeLen = nodeList.getLength(); + for (int i = 0; i < nodeLen; i++) { + Element actionE = (Element) nodeList.item(i); + if (actionE.getAttribute("name").contentEquals(actionName)) { + Class c = Class.forName(actionE.getAttribute("class").replace("action", "litestruts")); + Object ob = c.getConstructor(null).newInstance(null); + + Method mSetName = c.getMethod("setName", String.class); + Method mSetPwd = c.getMethod("setPassword", String.class); + Method mGetName = c.getMethod("getName", null); + Method mGetPwd = c.getMethod("getPassword", null); + Method mExecute = c.getMethod("execute", null); + Method mGetMsg = c.getMethod("getMessage", null); + + mSetName.invoke(ob, parameters.get("name")); + mSetPwd.invoke(ob, parameters.get("password")); + String result = (String)mExecute.invoke(ob, null); + String message = (String)mGetMsg.invoke(ob, null); + + NodeList resultList = actionE.getElementsByTagName("result"); + for (int j = 0; j < resultList.getLength(); j++) { + Element resultE = (Element)resultList.item(j); + if (resultE.getAttribute("name").contentEquals(result)) { + HashMap params = new HashMap(); + View retView = new View(); + retView.setJsp(resultE.getTextContent()); + params.put("message", message); + retView.setParameters(params); + + return retView; + } + } + + break; + } + } + + } catch (ParserConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SAXException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return null; + } + +} diff --git a/group08/619057560/3-5/code/coderising/litestruts/StrutsTest.java b/group08/619057560/3-5/code/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..a44c1878ac --- /dev/null +++ b/group08/619057560/3-5/code/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/619057560/3-5/code/coderising/litestruts/View.java b/group08/619057560/3-5/code/coderising/litestruts/View.java new file mode 100644 index 0000000000..0194c681f6 --- /dev/null +++ b/group08/619057560/3-5/code/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/619057560/3-5/code/coderising/litestruts/struts.xml b/group08/619057560/3-5/code/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..fb0c2be3de --- /dev/null +++ b/group08/619057560/3-5/code/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From a3d8d43169a988eb075b3f7a3c447c0c459bdbc0 Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Sat, 4 Mar 2017 14:02:12 +0900 Subject: [PATCH 081/646] update project & organize git ignore --- group09/41689722.eulerlcs/.gitignore | 1 - group09/41689722.eulerlcs/2.code/.gitignore | 6 ++ .../{ => 2.code}/jmr-01-aggregator/pom.xml | 7 ++- .../jmr-01-aggregator/src/site/.gitkeep | 0 .../{ => 2.code}/jmr-02-parent/pom.xml | 8 ++- .../jmr-02-parent/src/site/.gitkeep | 0 .../sample/CalculatorAdvanced.class | Bin 0 -> 896 bytes .../classloader/sample/CalculatorBasic.class | Bin 0 -> 705 bytes .../challenge/classloader/sample/Sample.class | Bin 0 -> 514 bytes .../data/xmlparser}/hello.xml | 0 .../jmr-11-challenge}/pom.xml | 11 +++- .../core/FileSystemClassLoader.java | 58 ++++++++++++++++++ .../classloader/core/ICalculator.java | 5 ++ .../classloader/core/NetworkClassLoader.java | 48 +++++++++++++++ .../challenge/classloader/core/Versioned.java | 5 ++ .../classloader/driver/CalculatorTest.java | 24 ++++++++ .../classloader/driver/ClassIdentity.java | 36 +++++++++++ .../classloader/driver/ClassLoaderTree.java | 12 ++++ .../challenge/classloader/package-info.java | 7 +++ .../sampleRename/CalculatorAdvanced.java | 15 +++++ .../sampleRename/CalculatorBasic.java | 15 +++++ .../classloader/sampleRename/Sample.java | 10 +++ .../challenge/systemrules/AppWithExit.java | 13 ++++ .../challenge/systemrules/package-info.java | 5 ++ .../digester/core/HelloDigester.java | 6 +- .../digester/core/HelloFileRulerSet.java} | 17 ++--- .../xmlparser/digester/driver/Driver.java | 11 ++-- .../xmlparser/digester/entity/Hello.java | 2 +- .../xmlparser/digester/entity/HelloFile.java | 2 +- .../jmr/challenge/xmlparser/package-info.java | 13 ++++ .../src/main/resources/.gitkeep | 0 .../src/main/resources/log4j.xml | 0 .../jmr-11-challenge/src/test/java}/.gitkeep | 0 .../systemrules/AppWithExitTest.java | 51 +++++++++++++++ .../src/test/resources}/.gitkeep | 0 .../jmr-61-170226-collection}/pom.xml | 4 +- .../jmr/collection/core/ArrayList.java | 10 +-- .../src/main/resources/.gitkeep | 0 .../src/main/resources/log4j.xml | 0 .../jmr/collection/core/TestArrayList.java | 4 +- .../src/test/resources}/.gitkeep | 0 .../jmr-61-170305-litestruts/data}/.gitkeep | 0 .../2.code/jmr-61-170305-litestruts/pom.xml | 39 ++++++++++++ .../src/main/java/.gitkeep | 0 .../src/main/resources/log4j.xml | 16 +++++ .../src/test/java/.gitkeep | 0 .../src/test/resources/.gitkeep | 0 .../jmr-01-aggregator/.project | 17 ----- .../.settings/org.eclipse.m2e.core.prefs | 4 -- .../41689722.eulerlcs/jmr-02-parent/.project | 17 ----- .../.settings/org.eclipse.m2e.core.prefs | 4 -- .../jmr-170226-collection/.classpath | 36 ----------- .../jmr-170226-collection/.gitignore | 1 - .../jmr-170226-collection/.project | 23 ------- .../.settings/org.eclipse.jdt.core.prefs | 5 -- .../.settings/org.eclipse.m2e.core.prefs | 4 -- .../jmr-170305-analyzeStrutsXml/.classpath | 36 ----------- .../jmr-170305-analyzeStrutsXml/.gitignore | 1 - .../jmr-170305-analyzeStrutsXml/.project | 23 ------- .../.settings/org.eclipse.jdt.core.prefs | 5 -- .../.settings/org.eclipse.m2e.core.prefs | 4 -- .../xmlparser/digester/util/FileUtils.java | 13 ---- 62 files changed, 423 insertions(+), 231 deletions(-) delete mode 100644 group09/41689722.eulerlcs/.gitignore create mode 100644 group09/41689722.eulerlcs/2.code/.gitignore rename group09/41689722.eulerlcs/{ => 2.code}/jmr-01-aggregator/pom.xml (73%) rename group09/41689722.eulerlcs/{ => 2.code}/jmr-01-aggregator/src/site/.gitkeep (100%) rename group09/41689722.eulerlcs/{ => 2.code}/jmr-02-parent/pom.xml (94%) rename group09/41689722.eulerlcs/{ => 2.code}/jmr-02-parent/src/site/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorAdvanced.class create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorBasic.class create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/Sample.class rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/data => 2.code/jmr-11-challenge/data/xmlparser}/hello.xml (100%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml => 2.code/jmr-11-challenge}/pom.xml (81%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/FileSystemClassLoader.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/ICalculator.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/NetworkClassLoader.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/Versioned.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/CalculatorTest.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassIdentity.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassLoaderTree.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/package-info.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorAdvanced.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorBasic.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/Sample.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExit.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/package-info.java rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr => 2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge}/xmlparser/digester/core/HelloDigester.java (55%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java => 2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloFileRulerSet.java} (57%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr => 2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge}/xmlparser/digester/driver/Driver.java (58%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr => 2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge}/xmlparser/digester/entity/Hello.java (81%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr => 2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge}/xmlparser/digester/entity/HelloFile.java (65%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/package-info.java rename group09/41689722.eulerlcs/{jmr-170226-collection => 2.code/jmr-11-challenge}/src/main/resources/.gitkeep (100%) rename group09/41689722.eulerlcs/{jmr-170226-collection => 2.code/jmr-11-challenge}/src/main/resources/log4j.xml (100%) rename group09/41689722.eulerlcs/{jmr-170226-collection/src/test/resources => 2.code/jmr-11-challenge/src/test/java}/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExitTest.java rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/main/java => 2.code/jmr-11-challenge/src/test/resources}/.gitkeep (100%) rename group09/41689722.eulerlcs/{jmr-170226-collection => 2.code/jmr-61-170226-collection}/pom.xml (89%) rename group09/41689722.eulerlcs/{jmr-170226-collection/src/main/java/com => 2.code/jmr-61-170226-collection/src/main/java/com/github}/eulerlcs/jmr/collection/core/ArrayList.java (97%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml => 2.code/jmr-61-170226-collection}/src/main/resources/.gitkeep (100%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml => 2.code/jmr-61-170226-collection}/src/main/resources/log4j.xml (100%) rename group09/41689722.eulerlcs/{jmr-170226-collection/src/test/java/com => 2.code/jmr-61-170226-collection/src/test/java/com/github}/eulerlcs/jmr/collection/core/TestArrayList.java (86%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/test/java => 2.code/jmr-61-170226-collection/src/test/resources}/.gitkeep (100%) rename group09/41689722.eulerlcs/{jmr-170305-analyzeStrutsXml/src/test/resources => 2.code/jmr-61-170305-litestruts/data}/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/pom.xml create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/.gitkeep create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/resources/log4j.xml create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/.gitkeep create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/resources/.gitkeep delete mode 100644 group09/41689722.eulerlcs/jmr-01-aggregator/.project delete mode 100644 group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-02-parent/.project delete mode 100644 group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/.classpath delete mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/.gitignore delete mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/.project delete mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs delete mode 100644 group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java diff --git a/group09/41689722.eulerlcs/.gitignore b/group09/41689722.eulerlcs/.gitignore deleted file mode 100644 index e10e727be5..0000000000 --- a/group09/41689722.eulerlcs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.metadata/ diff --git a/group09/41689722.eulerlcs/2.code/.gitignore b/group09/41689722.eulerlcs/2.code/.gitignore new file mode 100644 index 0000000000..c2be49c379 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/.gitignore @@ -0,0 +1,6 @@ +.metadata/ +.recommenders/ +**/.settings/ +**/target/ +**/.classpath +**/.project diff --git a/group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml similarity index 73% rename from group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml rename to group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml index 70d9605d9e..be065e6a95 100644 --- a/group09/41689722.eulerlcs/jmr-01-aggregator/pom.xml +++ b/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - com.eulerlcs.jmr + com.github.eulerlcs jmr-01-aggregator 0.0.1-SNAPSHOT pom @@ -9,7 +9,8 @@ ../jmr-02-parent - ../jmr-170226-collection - ../jmr-170305-analyzeStrutsXml + ../jmr-11-challenge + ../jmr-61-170226-collection + ../jmr-61-170305-litestruts \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-01-aggregator/src/site/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/src/site/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-01-aggregator/src/site/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-01-aggregator/src/site/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-02-parent/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-02-parent/pom.xml similarity index 94% rename from group09/41689722.eulerlcs/jmr-02-parent/pom.xml rename to group09/41689722.eulerlcs/2.code/jmr-02-parent/pom.xml index 3f2dfec9df..8e6a7752f7 100644 --- a/group09/41689722.eulerlcs/jmr-02-parent/pom.xml +++ b/group09/41689722.eulerlcs/2.code/jmr-02-parent/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - com.eulerlcs.jmr + com.github.eulerlcs jmr-02-parent 0.0.1-SNAPSHOT pom @@ -55,6 +55,12 @@ ${junit.version} test
+ + com.github.stefanbirkner + system-rules + 1.16.1 + test +
diff --git a/group09/41689722.eulerlcs/jmr-02-parent/src/site/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-02-parent/src/site/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-02-parent/src/site/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-02-parent/src/site/.gitkeep diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorAdvanced.class b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorAdvanced.class new file mode 100644 index 0000000000000000000000000000000000000000..d1655401e6f33d062d9b61872e380d9db5efb246 GIT binary patch literal 896 zcmb7CTWb?R6#gbjv)gsGc5NH)#(S!?BjQ`6phcw+6j}-RIGG(b6DGT1cDMMm^rZy_ ze}F$qJd>=Xr17B-b8ejZ&UY@q|NQs`;1xO^Y78G_Hs*;ghUI{((kN?W&PQX*W#LDtqj3-9%ePLv2M3LDy@v%syiaj(Ku8zd9;6|hg|1=mWS$JqN>|Lyc z%&g)E^9l^j*E-e39z(se-Dha*XR!)U$E6S+e1^52PSwY9JW%$t7#PJ6^)e|;Us&z@ zD%dE7I%hcOU5w9vTkbNfQkCf-sOFPSZ{GeTw`c0X1*=8q51mQWC#vb zUYeq<^LBs;E!X9BhRtR8eV1`F#4X&WIf=E&&n^9-j z=qzDR?9|tZRe7$n)XjOZ5gJO6sG_f|%kc4-w)S%O1x1gt(n|GSyZyB0>-~2?yABEW zLHYDn=tP~S{gPZIkCSGkSDu|B_)bO*A<5<}h|6S$m3;+k-h<8oZ!wk3Z4b>r$Ae?WXyo*8}WKTPz(>zt{``&KCz4*ErNt+*wiZ!x{qn8 Gr+)#JZrLFK literal 0 HcmV?d00001 diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorBasic.class b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/classloader/com/github/eulerlcs/jmr/challenge/classloader/sample/CalculatorBasic.class new file mode 100644 index 0000000000000000000000000000000000000000..41c161a767607f5a5f78f1015b2fcbc61903e658 GIT binary patch literal 705 zcmb7B$w~u35Ph9JF>X=ga`Pfl(N+*IiU%VBA?P8Jd#6)OI&@~FXGZ)iJqaHC06$8s znFJC{E*`qJuJ>yD{`vd@aDlxdG6Hux7)j4WgSaOtw&bi1<#6Pr9w=+c_eg51!q5h) zPfmtv^lV8smDRCTQQ&S>Xmk-dfwiG}QPL{klaIY2>8OZ;z|H^ob>K+ePw52;*Ty%| zjX<_>*cHe%gFaP|#ZnbTlmu4W#;1pP)Fbz#dX@xg?LaHrRn8>-B$$f^CKPD3|JTpr zd9MV@Tq0co7d&XRr?Yn=XMFGKa6TkZq1R_eVQ2zBX>$(586HJla^sB6#sZcSws{xl zr)Qkp31X+IWs<2kr%Ow3a+= zC-w?f+2adion->PWSwE1Ietsz46>9W>*HUHkx51k8;s#Lu{Gg1NqugsR{u*G8?9~RgZD~-kSGu}4}}=p zk&vLInfw1{c0a$~-T_=-)P+NssWcWVQ>@EK=+f%Us$6X1OsKWARwpYhl$CjIQ@PZc z$YuOwwV2ngixy$9k{^h}Z$GEtgv75;-iBXllJVv1{mJDw~Et=n{| zeYofc=%PnB2u-5z%Q({6ql_$XJPK1K?Luaz%6G+9u{Jru%XQJ5P8g2E-Qq9%q6*v2Rab;cx49z_wEt zUF>ljGy~YL<@`DfxKfF480N6|re`0Z7aaZo{JK%?>D7=?Gq{7Wgs(Yf4B> 4.0.0 - com.eulerlcs.jmr + com.github.eulerlcs jmr-02-parent 0.0.1-SNAPSHOT ../jmr-02-parent/pom.xml - jmr-170305-analyzeStrutsXml - eulerlcs master java road analyzeStrutsXml + jmr-11-challenge + eulerlcs master java road challenge + @@ -39,5 +40,9 @@ junit junit + + com.github.stefanbirkner + system-rules +
\ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/FileSystemClassLoader.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/FileSystemClassLoader.java new file mode 100644 index 0000000000..82c8b60d56 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/FileSystemClassLoader.java @@ -0,0 +1,58 @@ +package com.github.eulerlcs.jmr.challenge.classloader.core; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class FileSystemClassLoader extends ClassLoader { + + private String rootDir; + + public FileSystemClassLoader(String rootDir) { + this.rootDir = rootDir; + } + + @Override + protected Class findClass(String name) throws ClassNotFoundException { + byte[] classData = getClassData(name); + if (classData == null) { + throw new ClassNotFoundException(); + } else { + return defineClass(name, classData, 0, classData.length); + } + } + + private byte[] getClassData(String className) { + String path = classNameToPath(className); + InputStream ins = null; + try { + ins = new FileInputStream(path); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int bufferSize = 4096; + byte[] buffer = new byte[bufferSize]; + int bytesNumRead = 0; + while ((bytesNumRead = ins.read(buffer)) != -1) { + baos.write(buffer, 0, bytesNumRead); + } + return baos.toByteArray(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (ins != null) { + try { + ins.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + return null; + } + + private String classNameToPath(String className) { + return rootDir + File.separatorChar + className.replace('.', File.separatorChar) + ".class"; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/ICalculator.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/ICalculator.java new file mode 100644 index 0000000000..697bf8065f --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/ICalculator.java @@ -0,0 +1,5 @@ +package com.github.eulerlcs.jmr.challenge.classloader.core; + +public interface ICalculator extends Versioned { + String calculate(String expression); +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/NetworkClassLoader.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/NetworkClassLoader.java new file mode 100644 index 0000000000..0241e92a5c --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/NetworkClassLoader.java @@ -0,0 +1,48 @@ +package com.github.eulerlcs.jmr.challenge.classloader.core; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.net.URL; + +public class NetworkClassLoader extends ClassLoader { + + private String rootUrl; + + public NetworkClassLoader(String rootUrl) { + this.rootUrl = rootUrl; + } + + protected Class findClass(String name) throws ClassNotFoundException { + byte[] classData = getClassData(name); + if (classData == null) { + throw new ClassNotFoundException(); + } + else { + return defineClass(name, classData, 0, classData.length); + } + } + + private byte[] getClassData(String className) { + String path = classNameToPath(className); + try { + URL url = new URL(path); + InputStream ins = url.openStream(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int bufferSize = 4096; + byte[] buffer = new byte[bufferSize]; + int bytesNumRead = 0; + while ((bytesNumRead = ins.read(buffer)) != -1) { + baos.write(buffer, 0, bytesNumRead); + } + return baos.toByteArray(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + private String classNameToPath(String className) { + return rootUrl + "/" + + className.replace('.', '/') + ".class"; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/Versioned.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/Versioned.java new file mode 100644 index 0000000000..34dfacbbd1 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/core/Versioned.java @@ -0,0 +1,5 @@ +package com.github.eulerlcs.jmr.challenge.classloader.core; + +public interface Versioned { + String getVersion(); +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/CalculatorTest.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/CalculatorTest.java new file mode 100644 index 0000000000..d19ee1dbe0 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/CalculatorTest.java @@ -0,0 +1,24 @@ +package com.github.eulerlcs.jmr.challenge.classloader.driver; + +import com.github.eulerlcs.jmr.challenge.classloader.core.ICalculator; +import com.github.eulerlcs.jmr.challenge.classloader.core.NetworkClassLoader; + +public class CalculatorTest { + + public static void main(String[] args) { + String url = "http://localhost:8080/ClassloaderTest/classes"; + NetworkClassLoader ncl = new NetworkClassLoader(url); + String basicClassName = "com.example.CalculatorBasic"; + String advancedClassName = "com.example.CalculatorAdvanced"; + try { + Class clazz = ncl.loadClass(basicClassName); + ICalculator calculator = (ICalculator) clazz.newInstance(); + System.out.println(calculator.getVersion()); + clazz = ncl.loadClass(advancedClassName); + calculator = (ICalculator) clazz.newInstance(); + System.out.println(calculator.getVersion()); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassIdentity.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassIdentity.java new file mode 100644 index 0000000000..3a9226b8ca --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassIdentity.java @@ -0,0 +1,36 @@ +package com.github.eulerlcs.jmr.challenge.classloader.driver; + +import java.io.File; +import java.lang.reflect.Method; + +import com.github.eulerlcs.jmr.challenge.classloader.core.FileSystemClassLoader; + +public class ClassIdentity { + + public static void main(String[] args) { + new ClassIdentity().testClassIdentity(); + } + + public void testClassIdentity() { + String userDir = System.getProperty("user.dir"); + String classDataRootPath = userDir + File.separator + "data" + File.separator + "classloader"; + + FileSystemClassLoader fscl1 = new FileSystemClassLoader(classDataRootPath); + FileSystemClassLoader fscl2 = new FileSystemClassLoader(classDataRootPath); + String className = "com.github.eulerlcs.jmr.challenge.classloader.sample.Sample"; + + try { + Class class1 = fscl1.loadClass(className); + Object obj1 = class1.newInstance(); + + Class class2 = fscl2.loadClass(className); + Object obj2 = class2.newInstance(); + + Method setSampleMethod = class1.getMethod("setSample", java.lang.Object.class); + + setSampleMethod.invoke(obj1, obj2); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassLoaderTree.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassLoaderTree.java new file mode 100644 index 0000000000..38916b6db5 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/driver/ClassLoaderTree.java @@ -0,0 +1,12 @@ +package com.github.eulerlcs.jmr.challenge.classloader.driver; + +public class ClassLoaderTree { + + public static void main(String[] args) { + ClassLoader loader = ClassLoaderTree.class.getClassLoader(); + while (loader != null) { + System.out.println(loader.toString()); + loader = loader.getParent(); + } + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/package-info.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/package-info.java new file mode 100644 index 0000000000..d35a4ee992 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/package-info.java @@ -0,0 +1,7 @@ +/** + * download from ibm developerworks + * + * @see https://www.ibm.com/developerworks/cn/java/j-lo-classloader/ + */ +package com.github.eulerlcs.jmr.challenge.classloader; \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorAdvanced.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorAdvanced.java new file mode 100644 index 0000000000..9076a4f4c8 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorAdvanced.java @@ -0,0 +1,15 @@ +package com.github.eulerlcs.jmr.challenge.classloader.sampleRename; + +import com.github.eulerlcs.jmr.challenge.classloader.core.ICalculator; + +public class CalculatorAdvanced implements ICalculator { + + public String calculate(String expression) { + return "Result is " + expression; + } + + public String getVersion() { + return "2.0"; + } + +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorBasic.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorBasic.java new file mode 100644 index 0000000000..d5f7b054dd --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/CalculatorBasic.java @@ -0,0 +1,15 @@ +package com.github.eulerlcs.jmr.challenge.classloader.sampleRename; + +import com.github.eulerlcs.jmr.challenge.classloader.core.ICalculator; + +public class CalculatorBasic implements ICalculator { + + public String calculate(String expression) { + return expression; + } + + public String getVersion() { + return "1.0"; + } + +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/Sample.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/Sample.java new file mode 100644 index 0000000000..c67a7278e8 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/classloader/sampleRename/Sample.java @@ -0,0 +1,10 @@ +package com.github.eulerlcs.jmr.challenge.classloader.sampleRename; + +public class Sample { + @SuppressWarnings("unused") + private Sample instance; + + public void setSample(Object instance) { + this.instance = (Sample) instance; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExit.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExit.java new file mode 100644 index 0000000000..2afd5b2074 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExit.java @@ -0,0 +1,13 @@ +package com.github.eulerlcs.jmr.challenge.systemrules; + +public class AppWithExit { + public static String message; + + public static void doSomethingAndExit() { + message = "exit ..."; + System.exit(1); + } + + public static void doNothing() { + } +} \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/package-info.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/package-info.java new file mode 100644 index 0000000000..1710e69d47 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/systemrules/package-info.java @@ -0,0 +1,5 @@ +/** + * copy from http://stefanbirkner.github.io/system-rules/index.html + */ + +package com.github.eulerlcs.jmr.challenge.systemrules; \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloDigester.java similarity index 55% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloDigester.java index 5c289cc1a9..3f58d74c7f 100644 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/HelloDigester.java +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloDigester.java @@ -1,8 +1,8 @@ -package com.eulerlcs.jmr.xmlparser.digester.core; +package com.github.eulerlcs.jmr.challenge.xmlparser.digester.core; import org.apache.commons.digester.Digester; -import com.eulerlcs.jmr.xmlparser.digester.entity.Hello; +import com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity.Hello; public class HelloDigester { public static Digester newInstance() { @@ -10,7 +10,7 @@ public static Digester newInstance() { d.addObjectCreate("files", Hello.class); d.addSetProperties("files"); - d.addRuleSet(new FileRulerSet("files/")); + d.addRuleSet(new HelloFileRulerSet("files/")); return d; } diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloFileRulerSet.java similarity index 57% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloFileRulerSet.java index f02105eb71..3d62c8c93e 100644 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/core/FileRulerSet.java +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/core/HelloFileRulerSet.java @@ -1,18 +1,18 @@ -package com.eulerlcs.jmr.xmlparser.digester.core; +package com.github.eulerlcs.jmr.challenge.xmlparser.digester.core; import org.apache.commons.digester.Digester; import org.apache.commons.digester.RuleSetBase; -import com.eulerlcs.jmr.xmlparser.digester.entity.HelloFile; +import com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity.HelloFile; -final class FileRulerSet extends RuleSetBase { +final class HelloFileRulerSet extends RuleSetBase { protected String prefix = null; - public FileRulerSet() { + public HelloFileRulerSet() { this(""); } - public FileRulerSet(String prefix) { + public HelloFileRulerSet(String prefix) { super(); this.namespaceURI = null; this.prefix = prefix; @@ -22,12 +22,7 @@ public FileRulerSet(String prefix) { public void addRuleInstances(Digester digester) { digester.addObjectCreate(prefix + "file", HelloFile.class); digester.addSetProperties(prefix + "file", "dir", "path"); - + digester.addBeanPropertySetter(prefix + "file", "name"); digester.addSetNext(prefix + "file", "addFile"); - - digester.addCallMethod(prefix + "file", "setName", 1); - digester.addCallParam(prefix + "file", 0); - } - } diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/driver/Driver.java similarity index 58% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/driver/Driver.java index b024fe7d5d..59a2987909 100644 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/driver/Driver.java +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/driver/Driver.java @@ -1,5 +1,6 @@ -package com.eulerlcs.jmr.xmlparser.digester.driver; +package com.github.eulerlcs.jmr.challenge.xmlparser.digester.driver; +import java.io.File; import java.io.IOException; import org.apache.commons.digester.Digester; @@ -7,9 +8,8 @@ import org.slf4j.LoggerFactory; import org.xml.sax.SAXException; -import com.eulerlcs.jmr.xmlparser.digester.core.HelloDigester; -import com.eulerlcs.jmr.xmlparser.digester.entity.Hello; -import com.eulerlcs.jmr.xmlparser.digester.util.FileUtils; +import com.github.eulerlcs.jmr.challenge.xmlparser.digester.core.HelloDigester; +import com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity.Hello; public class Driver { private final static Logger log = LoggerFactory.getLogger(Driver.class); @@ -18,7 +18,8 @@ public static void main(String[] args) { Digester d = HelloDigester.newInstance(); try { - Hello helloEntity = (Hello) d.parse(FileUtils.getXmlFile("hello")); + File file = new File("data//xmlparser", "hello.xml"); + Hello helloEntity = (Hello) d.parse(file); log.debug("hello.value=[{}]", helloEntity.getValue()); } catch (IOException | SAXException e) { e.printStackTrace(); diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/Hello.java similarity index 81% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/Hello.java index 4778a750c4..415dbef23a 100644 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/Hello.java +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/Hello.java @@ -1,4 +1,4 @@ -package com.eulerlcs.jmr.xmlparser.digester.entity; +package com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity; import java.util.ArrayList; import java.util.List; diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/HelloFile.java similarity index 65% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/HelloFile.java index 90c9bc956c..2892a3058e 100644 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/entity/HelloFile.java +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/digester/entity/HelloFile.java @@ -1,4 +1,4 @@ -package com.eulerlcs.jmr.xmlparser.digester.entity; +package com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity; import lombok.Getter; import lombok.Setter; diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/package-info.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/package-info.java new file mode 100644 index 0000000000..4f7a71c4bc --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/package-info.java @@ -0,0 +1,13 @@ +/** + * 鍚勭xml搴 + *
    + *
  • apache digester + *
  • dom + *
  • dom4j + *
  • ldom + *
  • jaxb + *
  • sax + *
+ */ + +package com.github.eulerlcs.jmr.challenge.xmlparser; \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/resources/log4j.xml similarity index 100% rename from group09/41689722.eulerlcs/jmr-170226-collection/src/main/resources/log4j.xml rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/resources/log4j.xml diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170226-collection/src/test/resources/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/.gitkeep diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExitTest.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExitTest.java new file mode 100644 index 0000000000..c849302200 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/java/com/github/eulerlcs/jmr/challenge/systemrules/AppWithExitTest.java @@ -0,0 +1,51 @@ +/* copy from http://stefanbirkner.github.io/system-rules/index.html */ + +package com.github.eulerlcs.jmr.challenge.systemrules; + +import static org.junit.Assert.assertEquals; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.contrib.java.lang.system.Assertion; +import org.junit.contrib.java.lang.system.ExpectedSystemExit; + +public class AppWithExitTest { + @Rule + public final ExpectedSystemExit exit = ExpectedSystemExit.none(); + + @Test + public void exits() { + exit.expectSystemExit(); + AppWithExit.doSomethingAndExit(); + } + + @Test + public void exitsWithStatusCode1() { + exit.expectSystemExitWithStatus(1); + AppWithExit.doSomethingAndExit(); + } + + @Test + public void writesMessage() { + exit.expectSystemExitWithStatus(1); + exit.checkAssertionAfterwards(new Assertion() { + @Override + public void checkAssertion() { + assertEquals("exit ...", AppWithExit.message); + } + }); + AppWithExit.doSomethingAndExit(); + } + + @Test + public void systemExitWithStatusCode1() { + exit.expectSystemExitWithStatus(1); + AppWithExit.doSomethingAndExit(); + } + + @Test + public void noSystemExit() { + AppWithExit.doNothing(); + // passes + } +} \ No newline at end of file diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/test/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/pom.xml similarity index 89% rename from group09/41689722.eulerlcs/jmr-170226-collection/pom.xml rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/pom.xml index 8f8db122c0..90b5cc3818 100644 --- a/group09/41689722.eulerlcs/jmr-170226-collection/pom.xml +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/pom.xml @@ -2,12 +2,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.eulerlcs.jmr + com.github.eulerlcs jmr-02-parent 0.0.1-SNAPSHOT ../jmr-02-parent/pom.xml - jmr-170226-collection + jmr-61-170226-collection eulerlcs master java road collection diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/java/com/github/eulerlcs/jmr/collection/core/ArrayList.java similarity index 97% rename from group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/java/com/github/eulerlcs/jmr/collection/core/ArrayList.java index 7d975bf917..1c039b8c62 100644 --- a/group09/41689722.eulerlcs/jmr-170226-collection/src/main/java/com/eulerlcs/jmr/collection/core/ArrayList.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/java/com/github/eulerlcs/jmr/collection/core/ArrayList.java @@ -1,7 +1,7 @@ /** * 90% or more copy from jdk */ -package com.eulerlcs.jmr.collection.core; +package com.github.eulerlcs.jmr.collection.core; import java.util.Arrays; import java.util.Collection; @@ -15,7 +15,7 @@ import java.util.function.Consumer; public class ArrayList implements List, RandomAccess { - private static final int MAX丵ARRAY丵SIZE = 1 << 10; + private static final int MAX_ARRAY_SIZE = 1 << 10; private transient Object[] elementData = new Object[0]; private int size; private transient int modCount = 0; @@ -267,15 +267,15 @@ private void ensureExplicitCapacity(int minCapacity) { if (elementData.length > minCapacity) { return; - } else if (minCapacity > MAX丵ARRAY丵SIZE) { + } else if (minCapacity > MAX_ARRAY_SIZE) { throw new OutOfMemoryError(); } int oldCapacity = elementData.length; int newCapacity = oldCapacity == 0 ? 10 : (oldCapacity + (oldCapacity >> 1)); - if (newCapacity > MAX丵ARRAY丵SIZE) { - newCapacity = MAX丵ARRAY丵SIZE; + if (newCapacity > MAX_ARRAY_SIZE) { + newCapacity = MAX_ARRAY_SIZE; } elementData = Arrays.copyOf(elementData, newCapacity); diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/resources/log4j.xml similarity index 100% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/resources/log4j.xml rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/main/resources/log4j.xml diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/test/java/com/github/eulerlcs/jmr/collection/core/TestArrayList.java similarity index 86% rename from group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/test/java/com/github/eulerlcs/jmr/collection/core/TestArrayList.java index c46c159e75..96e1049d73 100644 --- a/group09/41689722.eulerlcs/jmr-170226-collection/src/test/java/com/eulerlcs/jmr/collection/core/TestArrayList.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/test/java/com/github/eulerlcs/jmr/collection/core/TestArrayList.java @@ -1,4 +1,4 @@ -package com.eulerlcs.jmr.collection.core; +package com.github.eulerlcs.jmr.collection.core; import java.util.List; @@ -9,7 +9,7 @@ import org.junit.BeforeClass; import org.junit.Test; -import com.eulerlcs.jmr.collection.core.ArrayList; +import com.github.eulerlcs.jmr.collection.core.ArrayList; public class TestArrayList { diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/java/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/test/resources/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/java/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-61-170226-collection/src/test/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/test/resources/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/.gitkeep diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/pom.xml new file mode 100644 index 0000000000..6ce14ac574 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/pom.xml @@ -0,0 +1,39 @@ + + 4.0.0 + + com.github.eulerlcs + jmr-02-parent + 0.0.1-SNAPSHOT + ../jmr-02-parent/pom.xml + + jmr-61-170305-litestruts + eulerlcs master java road lite struts + + + + commons-digester + commons-digester + + + org.projectlombok + lombok + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + junit + junit + + + com.github.stefanbirkner + system-rules + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/resources/log4j.xml new file mode 100644 index 0000000000..831b8d9ce3 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/resources/log4j.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/resources/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/group09/41689722.eulerlcs/jmr-01-aggregator/.project b/group09/41689722.eulerlcs/jmr-01-aggregator/.project deleted file mode 100644 index 47cffea382..0000000000 --- a/group09/41689722.eulerlcs/jmr-01-aggregator/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - collection-aggregator - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/group09/41689722.eulerlcs/jmr-01-aggregator/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/group09/41689722.eulerlcs/jmr-02-parent/.project b/group09/41689722.eulerlcs/jmr-02-parent/.project deleted file mode 100644 index 3467a254de..0000000000 --- a/group09/41689722.eulerlcs/jmr-02-parent/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - collection-parent - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/group09/41689722.eulerlcs/jmr-02-parent/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/.classpath b/group09/41689722.eulerlcs/jmr-170226-collection/.classpath deleted file mode 100644 index fae1a2b37d..0000000000 --- a/group09/41689722.eulerlcs/jmr-170226-collection/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/.gitignore b/group09/41689722.eulerlcs/jmr-170226-collection/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/group09/41689722.eulerlcs/jmr-170226-collection/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/.project b/group09/41689722.eulerlcs/jmr-170226-collection/.project deleted file mode 100644 index c7c2e05867..0000000000 --- a/group09/41689722.eulerlcs/jmr-170226-collection/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - jmr-170226-collection - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs b/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec1..0000000000 --- a/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/group09/41689722.eulerlcs/jmr-170226-collection/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath deleted file mode 100644 index fae1a2b37d..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project deleted file mode 100644 index cc415c517a..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - jmr-170305-analyzeStrutsXml - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec1..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java b/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java deleted file mode 100644 index 0e69ef30e8..0000000000 --- a/group09/41689722.eulerlcs/jmr-170305-analyzeStrutsXml/src/main/java/com/eulerlcs/jmr/xmlparser/digester/util/FileUtils.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.eulerlcs.jmr.xmlparser.digester.util; - -import java.io.File; - -public class FileUtils { - public static File getXmlFile(String fileName) { - String userDir = System.getProperty("user.dir"); - String fullName = userDir + File.separator + "data" + File.separator + fileName + ".xml"; - File xml = new File(fullName); - - return xml; - } -} From 15484d412ab93643b646e05b4594cbe1ae665a74 Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Sat, 4 Mar 2017 14:04:53 +0900 Subject: [PATCH 082/646] update project & organize git ignore --- group09/41689722.eulerlcs/1.article/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 group09/41689722.eulerlcs/1.article/.gitkeep diff --git a/group09/41689722.eulerlcs/1.article/.gitkeep b/group09/41689722.eulerlcs/1.article/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From 66f6f1c37d70ebc5943b0261bbe7c309bc66aef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Sat, 4 Mar 2017 14:14:12 +0800 Subject: [PATCH 083/646] =?UTF-8?q?=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/1425809544/03-05/array/ArrayUtil.java | 257 ++++++++++++++++++ .../1425809544/03-05/array/ArrayUtilTest.java | 99 +++++++ ...0\345\231\250\347\273\223\346\236\204.txt" | 1 + 3 files changed, 357 insertions(+) create mode 100644 group08/1425809544/03-05/array/ArrayUtil.java create mode 100644 group08/1425809544/03-05/array/ArrayUtilTest.java create mode 100644 "group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" diff --git a/group08/1425809544/03-05/array/ArrayUtil.java b/group08/1425809544/03-05/array/ArrayUtil.java new file mode 100644 index 0000000000..f370e38dd4 --- /dev/null +++ b/group08/1425809544/03-05/array/ArrayUtil.java @@ -0,0 +1,257 @@ +package com.util_1; + +import java.util.*; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int[] oldArr = origin; + int newLength = oldArr.length; + int[] newArr = new int[newLength]; + for (int i = 0; i < newLength; i++) { + newArr[newLength - i - 1] = oldArr[i]; + } + for (int s : newArr) { + System.out.println(s); + } + + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int[] oldArr = oldArray; + int oldLength = oldArr.length; + int[] newArr = new int[oldLength]; + int index = 0; + int zeroCount = 0; + for (int i = 0; i < oldLength; i++) { + if (oldArr[i] == 0) { + zeroCount++; + } else { + newArr[index++] = oldArr[i]; + } + } + int[] newArrs = Arrays.copyOf(newArr, index); + return newArrs; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2) { + int newLength = array1.length + array2.length; + int[] newArr = new int[newLength]; + int index = 0; + for (int i = 0; i < array1.length; i++) { + newArr[index++] = array1[i]; + } + for (int i = 0; i < array2.length; i++) { + newArr[index++] = array2[i]; + } + //鍐掓场鎺掑簭 + for (int i = 0; i < newArr.length; i++) { + for (int j = i + 1; j < newArr.length; j++) { + if (newArr[i] > newArr[j]) { + int temp = newArr[i]; + newArr[i] = newArr[j]; + newArr[j] = temp; + } + } + } + //鏁扮粍鍘婚噸 + boolean[] b = new boolean[newArr.length]; + int counts = newArr.length; + for (int i = 0; i < newArr.length; i++) { + for (int j = i + 1; j < newArr.length; j++) { + if (newArr[i] == newArr[j] && b[i] == false) { + b[j] = true; + counts--; + } + } + } + int[] result = new int[counts]; + int j = 0; + for (int i = 0; i < newArr.length; i++) { + if (b[i] == false) { + result[j] = newArr[i]; + j++; + } + } + return result; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + int oldLength = oldArray.length; + int newLength = oldLength + size; + int[] result = Arrays.copyOf(oldArray, newLength); + return result; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public int[] fibonacci(int max) { + int a = 1, b = 1, c = 2; + int[] arr = new int[max + 1]; + int i = 2; + if (max == 1) { + return Arrays.copyOf(arr, 0); + } else if (max <= 0) { + throw new IllegalArgumentException("涓嶈兘杈撳叆<=0鐨勫弬鏁帮細" + max); + } else { + arr[0] = 1; + arr[1] = 1; + do { + c = a + b; + a = b; + b = c; + arr[i++] = c; + } while (c < max); + } + + if (arr[i - 1] >= max) { + return Arrays.copyOf(arr, i - 1); + } + return Arrays.copyOf(arr, i); + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + + class IsPrime { + // 鍒ゆ柇鏌愭暣鏁版槸鍚︿负绱犳暟 + public boolean isPrimes(int n) { + if (n < 2) { + return false; + } + for (int i = 2; i * i <= n; i++) { + if (n % i == 0) { + return false; + } + } + return true; + + } + } + List list = new ArrayList(); + IsPrime isPrime = new IsPrime(); + for (int i = 2; i < max; i++) { + if (isPrime.isPrimes(i)) { + list.add(i); + } + } + + int[] arr = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + arr[i] = (int) list.get(i); + } + + return arr; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public int[] getPerfectNumbers(int max) { + //淇濆瓨姣忕粍鐨勫垎瑙e洜瀛 + List list = new ArrayList(); + List pm = new ArrayList(); + int sum = 0; + //闄ゆ暟 + for (int i = 2; i < max; i++) { + //琚櫎鏁 + sum=0; + for (int j = 1; j < i / 2 + 1; j++) { + if (i % j == 0) { + list.add(j); + sum += j; + } + } + + if (sum == i) { + pm.add(i); + } + + list.clear(); + } + + int[] pmaArr = new int[pm.size()]; + for (int i = 0; i < pm.size(); i++) { + pmaArr[i] = (int) pm.get(i); + } + return pmaArr; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param + * @return + */ + + public String join(int[] array, String seperator) { + + String s = new String(); + for (int i = 0; i < array.length; i++) { + if (i < array.length - 1) { + s += array[i] + seperator; + } else { + s += array[i]; + } + } + return s; + } + + +} diff --git a/group08/1425809544/03-05/array/ArrayUtilTest.java b/group08/1425809544/03-05/array/ArrayUtilTest.java new file mode 100644 index 0000000000..ad348045f9 --- /dev/null +++ b/group08/1425809544/03-05/array/ArrayUtilTest.java @@ -0,0 +1,99 @@ +package com.util_1; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Created by 14258 on 2017/2/28. + */ +public class ArrayUtilTest { + ArrayUtil arrayUtil = new ArrayUtil(); + + @Before + public void setUp() throws Exception { + + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void testReverseArray() throws Exception { + + int[] testArr = {7, 9, 30, 3}; + + arrayUtil.reverseArray(testArr); + } + + @Test + public void testRemoveZero() throws Exception { + int oldArr[] = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; + int[] newArr = arrayUtil.removeZero(oldArr); + for (int s : newArr) { + System.out.println(s); + } + + } + + @Test + public void testMerge() throws Exception { + int[] a1 = {3, 5, 7}; + int[] a2 = {4, 5, 6, 7}; + int[] newArr = arrayUtil.merge(a1, a2); + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testGrow() throws Exception { + int[] oldArray = {2, 3, 6}; + + int[] newArr = arrayUtil.grow(oldArray, 3); + + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testFibonacci() throws Exception { + + int[] newArr = arrayUtil.fibonacci(16); + System.out.print("["); + for (int i : newArr) { + System.out.print(i+","); + } + System.out.print("]"); + } + + @Test + public void testGetPrimes() throws Exception { + int[] prime = arrayUtil.getPrimes(23); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testGetPerfectNumbers() throws Exception { + int[] prime = arrayUtil.getPerfectNumbers(10000); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testJoin() throws Exception { + int[] array = {3, 8, 9}; + String s = arrayUtil.join(array, "-"); + System.out.println(s); + } +} \ No newline at end of file diff --git "a/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" "b/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" new file mode 100644 index 0000000000..233cfeaa89 --- /dev/null +++ "b/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" @@ -0,0 +1 @@ + http://blog.csdn.net/qq_25385555/article/month/2017/03 \ No newline at end of file From 2ace81487936655e49f90d16a6c221a0ae5b7ada Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sat, 4 Mar 2017 15:50:53 +0800 Subject: [PATCH 084/646] Create week2.md --- group01/895457260/journal/week2.md | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 group01/895457260/journal/week2.md diff --git a/group01/895457260/journal/week2.md b/group01/895457260/journal/week2.md new file mode 100644 index 0000000000..2085496dc6 --- /dev/null +++ b/group01/895457260/journal/week2.md @@ -0,0 +1,48 @@ +缁勮涓涓畝鍗曠殑绫讳技cpu鐨勬満鍣 +------------------------- +>鎺ュ埌瀛︽牎甯冪疆鐨勪换鍔★紝瑕佺敤浠跨湡杞欢鐢讳竴涓畝鍗曠殑鑳借繍琛岀殑cpu锛岃姹8浣嶅瓧闀匡紝缁欏畾14绉嶆寚浠ゃ +杩欎竴涓嬮毦鍊掍簡涓嶅皯鍚屽锛屾垜涔熻姳浜10澶╁乏鍙虫潵瀹屾垚杩欎釜浠诲姟銆傝繖绡囨枃绔犲氨璁板綍涓涓嬫垜鏄浣曚粠澶村紑濮嬬粍瑁呰繖涓猚pu锛堟垨鑰呰绫讳技cpu鐨勬満鍣級鐨勩 + +鎵撳紑浠跨湡杞欢锛岀┖绌哄涔熶笉鐭ヤ粠浣曚笅鎵嬶紝鎬讳箣鍏堟妸鍗拌薄涓殑鈥渃pu鏁版嵁閫氳矾鍥锯濈敾鍑烘潵銆 +闇瑕佷竴涓狝LU锛孯AM锛孭C锛孖R锛孉R锛屼袱涓狝LU鐨凞R锛屼互鍙婅嫢骞查氱敤瀵勫瓨鍣紝杩欓噷鎴戠敤浜3涓氱敤瀵勫瓨鍣ㄣ + +RAM鍚屾椂淇濆瓨鎸囦护鍜屾暟鎹紙鏈川鐩稿悓锛岄兘鏄簩杩涘埗鏁帮級锛孭C浠0寮濮嬩笉鍋滃湴澧炲姞1锛岃繖鏍稲AM閲岀殑姣旂壒灏变細琚竴涓竴涓鍑烘潵鏀惧埌鏁版嵁鎬荤嚎涓婏紙涔熸湁涓嶇粡杩嘝C鐨勬儏鍐碉級锛 +涔嬪悗杩欎簺姣旂壒濡傛灉琚獻R浠庢荤嚎涓婅璧帮紝閭d箞瀹冧滑灏辨槸鎸囦护锛屽惁鍒欏氨鏄暟鎹傛満鍣ㄤ細鎸変竴瀹氱殑椤哄簭璁㊣R鎴栧叾浠栦笢瑗夸粠鎬荤嚎涓婅姣旂壒锛 +姣斿IR鍏堣涓娆★紝鍏朵粬涓滆タ鍐嶈锛屽叾浠栦笢瑗胯瀹屼箣鍚庯紝鍙堣疆鍒癐R璇讳竴娆°傛垜浠彧瑕侀厤鍚堣繖涓『搴忥紝鎶婄浉搴旂殑姣旂壒瀛樿繘RAM锛屽氨鑳借鏈哄櫒鎸夋垜浠殑鎯虫硶杩愯銆 + +鐜板湪RAM閲屽叏鏄0锛屾満鍣ㄨ兘浠庡ご鍒板熬璇讳竴閬峈AM锛岀劧鍚庢寜鑷繁鐨勯『搴忔妸杩欎簺0浜ょ粰IR鎴栧埆鐨勪笢瑗裤 +鎶婃瘮鐗逛氦鍑哄幓涔嬪悗鎬庝箞鍔炲憿锛烶C搴旇鏆傚仠涓嬫潵锛屽厛璁╄繖娆$殑鎸囦护鎴栨暟鎹澶勭悊瀹岋紝鐒跺悗PC鍐嶄粠RAM閲岃涓嬩竴涓叉瘮鐗广 +杩欏氨鎰忓懗鐫锛氬寘鎷琍C锛孯AM锛孖R锛屽瘎瀛樺櫒绛夌瓑鍦ㄥ唴鐨勬墍鏈変笢瑗匡紝闄や簡瀹冧滑鐨勬暟鎹緭鍏ョ浠ュ锛屽埆鐨勮緭鍏ョ閮藉簲璇ョ敱鏈哄櫒鏉ユ帶鍒讹紝 +鑰屼笉鏄洿鎺ユ帴鐢垫簮鎴栨帴鍦帮紝鎴栨帴涓婁竴涓鐜囨亽瀹氱殑鏃堕挓銆 + +杩欏ぇ姒傚氨鏄帶鍒朵俊鍙凤紝鐢ㄦ潵鎺у埗杩欎簺閮ㄤ欢濡備綍宸ヤ綔銆 +瑕佸畬鎴愪竴涓姩浣滃彲鑳介渶瑕佸ソ鍑犵粍鎺у埗淇″彿锛屾瘮濡備粠RAM閲屽彇鍑烘瘮鐗癸紝閫佺粰IR锛 +锛堟垜娌¤兘鐞嗚ВT1,T2,T3,T4鍏蜂綋鏄浣曞伐浣滅殑锛屽彧濂借嚜宸辨兂浜嗕釜鐪嬩笂鍘诲鏄撳疄鐜扮殑鏂规硶锛 +>瀵圭収鈥滄暟鎹氳矾鍥锯濈湅杩欎釜杩囩▼銆 +>绗1缁勩佹墍鏈夋帶鍒朵俊鍙峰浣嶏紙缃负鏃犳晥锛岄珮鏈夋晥鐨勭疆0锛屼綆鏈夋晥鐨勭疆1锛 +>绗2缁勩丳C鐨勫兼斁鍒版荤嚎锛圥C鐨勮緭鍑轰笁鎬侀棬鎺у埗绔疆鏈夋晥锛屽埆鐨勪俊鍙峰悓涓婂浣嶇姸鎬侊級 +>3銆丄R浠庢荤嚎涓婂彇鍊硷紝閫佸埌RAM鍦板潃绔紝PC涓夋侀棬鍏充笂锛孯AM鍑嗗璇绘搷浣滐紙AR鐨勬椂閽熻烦涓涓笂鍗囨部锛孭C涓夋侀棬缃棤鏁堬紝RAM璇绘搷浣滄帶鍒剁缃湁鏁堬紝鍒殑淇″彿鍚屼笂锛 +>4銆丷AM璇诲嚭鍊兼斁鍒版荤嚎锛圓R鏃堕挓澶嶄綅锛孯AM鐗囬変俊鍙风疆鏈夋晥锛屽埆鐨勪俊鍙峰悓涓婏級 +>5銆両R鎷胯蛋鎬荤嚎涓婄殑鍊硷紝RAM鍏充笂锛圛R鏃堕挓涓涓笂鍗囨部锛孯AM鐗囬変俊鍙风疆鏃犳晥锛屽埆鐨勪俊鍙峰悓涓婏級 +>6銆佹墍鏈変俊鍙峰浣 + +涓婇潰鐨勮繃绋嬪氨鏄滃彇鎸団濓紝鈥滆瘧鐮佲濄傚緢鏄庢樉杩欎簺鎺у埗淇″彿鏄寜椤哄簭閫佸嚭鐨勶紝瑕佸疄鐜拌繖涓鐐癸紝鍒欓渶瑕佸彟涓涓鏁板櫒锛屼笉鏂姞1锛屾寜椤哄簭浠嶳OM閲岃鍑烘帶鍒朵俊鍙凤紝 +鐒跺悗鐩存帴閫佺粰PC锛孯AM绛夐儴浠躲傚儚杩欐牱鎶婂彇鎸囪瘧鐮佸拰鎵鏈夋寚浠ゆ墍闇瑕佺殑鎺у埗淇″彿搴忓垪锛屽瓨杩涗竴鍧桼OM閲岋紙缂栦釜鍙凤紝鍙玆OM1锛夛紝姣忓綋鍙栨寚璇戠爜瀹屾垚锛孖R閫佹潵鎸囦护锛 +灏辨妸璁℃暟鍣ㄧ疆鏁颁负杩欐潯鎸囦护鐨勭1缁勬帶鍒朵俊鍙锋墍鍦ㄧ殑鍦板潃锛岀劧鍚庡氨浼氳嚜鍔ㄦ寜椤哄簭閫佸嚭鎺у埗淇″彿锛岃繖灏辨槸鈥滄墽琛屸濄 + +闄や簡鍋滄満鎸囦护HALT涔嬪锛屼竴鏉℃寚浠ゆ墽琛屽畬鎴愬悗锛岀揣鎺ョ潃鍙堝簲璇ュ彇鎸囪瘧鐮侊紝绠鍗曡捣瑙侊紝鎴戠洿鎺ュ湪闄ALT涔嬪鐨勬瘡鏉℃寚浠ょ殑鎺у埗淇″彿涔嬪悗锛屽張閲嶅浜嗕竴閬嶅彇鎸囪瘧鐮佺殑鎺у埗淇″彿銆 + +鑷充簬濡備綍鏍规嵁鎸囦护鑾峰緱绗1缁勬帶鍒朵俊鍙风殑鍦板潃锛岃繕鏄畝鍗曡捣瑙侊紝鎴戝張鎷夸簡涓鍧桼OM锛堢紪鍙峰彨ROM2锛夛紝鐩存帴鎶8浣嶆寚浠ゅ綋鍋氬湴鍧锛屾帶鍒朵俊鍙风殑鍦板潃褰撳仛鍐呭锛屽瓨杩涘幓銆 +姣斿锛歁OV R0锛孯1杩欐潯鎸囦护鏄10000001锛屽叾绗竴缁勬帶鍒朵俊鍙蜂綅浜嶳OM1鐨00001001鍦板潃澶勶紝閭e氨鎶00001001鍐欏叆ROM2鐨10000001鍦板潃澶勩 +杩欐牱锛屾妸8浣嶆寚浠ょ洿鎺ラ佸叆ROM2鐨勫湴鍧绔紝鍑烘潵鐨勫氨鏄涓缁勬帶鍒朵俊鍙锋墍鍦ㄧ殑鍦板潃锛屽啀鐢ㄥ畠缁欒鏁板櫒缃暟锛岀劧鍚庡氨浼氫粠杩欎釜鍦板潃寮濮嬭嚜鍔ㄦ寜椤哄簭閫佸嚭鎺у埗淇″彿銆 + +鎶婁竴涓椂閽熸帴鍒拌鏁板櫒涓婏紝鍩烘湰涓婂ぇ鍔熷憡鎴愪簡銆傝繕鏈変竴涓棶棰橈細閬囧埌HALT鏃讹紝鍏跺悗铏芥病鏈夊彇鎸囪瘧鐮佺殑鎺у埗淇″彿锛屼絾璁℃暟鍣ㄤ粛鐒朵細涓嶆柇鍔1锛岃屼箣鍚庣殑鍦板潃澶勫叏鏄0锛 +浜庢槸閫佸嚭浜嗕竴鍫0浣滀负鎺у埗淇″彿锛岃繖鏄笉姝g‘鐨勩 +鎴戠敤D鍨嬭Е鍙戝櫒鍜屽嚑涓昏緫闂ㄥ仛浜嗕竴涓皬鐢佃矾锛屽綋8浣嶆寚浠ゆ槸HALT鏃讹紝璁╄鏁板櫒鎺у埗绔棤鏁堝苟閿佸瓨杩欎釜鏃犳晥鐘舵侊紝涓嶄細鍐嶅姞1锛岃繖鏍峰氨瀹炵幇浜嗗仠鏈恒 + +杩樻湁涓涓棶棰橈細鎵鏈夋帶鍒朵俊鍙峰簲璇ュ悓鏃堕佸嚭銆備负姝ゆ垜鎶婃帶鍒朵俊鍙烽兘鍏堟帴鍦ㄤ簡閿佸瓨鍣ㄤ笂锛岄攣瀛樺櫒浼氬湪涓嬩竴涓椂閽熶笂鍗囨部鍚屾椂閫佸嚭鎵鏈夋帶鍒朵俊鍙枫 + +鐒跺悗锛屽啓鍑犱釜灏忕▼搴忥紝璇诲彇EXCEL閲岀殑鎺у埗淇″彿搴忓垪锛屽瓨鍒癛OM1閲岋紝骞舵妸ROM2涔熻皟鏁村ソ銆 +璇诲彇璁颁簨鏈噷鐨勬眹缂栦唬鐮侊紝鐢熸垚瀵瑰簲鐨勬満鍣ㄦ寚浠わ紝瀛樺埌RAM閲屻 + +杩愯涓涓嬶紝缁撴灉姝g‘銆傝嚦姝わ紝杩欎釜绫讳技cpu鐨勬満鍣ㄥ畬鎴愪簡銆 From 550f0fd2fb2e74dae0db0badc7c54a9b50381d20 Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sat, 4 Mar 2017 15:52:49 +0800 Subject: [PATCH 085/646] Update week2.md --- group01/895457260/journal/week2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group01/895457260/journal/week2.md b/group01/895457260/journal/week2.md index 2085496dc6..e7b09d9d4e 100644 --- a/group01/895457260/journal/week2.md +++ b/group01/895457260/journal/week2.md @@ -1,7 +1,7 @@ 缁勮涓涓畝鍗曠殑绫讳技cpu鐨勬満鍣 ------------------------- >鎺ュ埌瀛︽牎甯冪疆鐨勪换鍔★紝瑕佺敤浠跨湡杞欢鐢讳竴涓畝鍗曠殑鑳借繍琛岀殑cpu锛岃姹8浣嶅瓧闀匡紝缁欏畾14绉嶆寚浠ゃ -杩欎竴涓嬮毦鍊掍簡涓嶅皯鍚屽锛屾垜涔熻姳浜10澶╁乏鍙虫潵瀹屾垚杩欎釜浠诲姟銆傝繖绡囨枃绔犲氨璁板綍涓涓嬫垜鏄浣曚粠澶村紑濮嬬粍瑁呰繖涓猚pu锛堟垨鑰呰绫讳技cpu鐨勬満鍣級鐨勩 +鎴戣姳浜10澶╁乏鍙虫潵瀹屾垚杩欎釜浠诲姟銆傝繖绡囨枃绔犲氨璁板綍涓涓嬫垜鏄浣曚粠澶村紑濮嬬粍瑁呰繖涓猚pu锛堟垨鑰呰绫讳技cpu鐨勬満鍣級鐨勩 鎵撳紑浠跨湡杞欢锛岀┖绌哄涔熶笉鐭ヤ粠浣曚笅鎵嬶紝鎬讳箣鍏堟妸鍗拌薄涓殑鈥渃pu鏁版嵁閫氳矾鍥锯濈敾鍑烘潵銆 闇瑕佷竴涓狝LU锛孯AM锛孭C锛孖R锛孉R锛屼袱涓狝LU鐨凞R锛屼互鍙婅嫢骞查氱敤瀵勫瓨鍣紝杩欓噷鎴戠敤浜3涓氱敤瀵勫瓨鍣ㄣ From 1022c1e13f42b327d208238657dccadbcb12e15f Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sat, 4 Mar 2017 15:53:17 +0800 Subject: [PATCH 086/646] Update week2.md --- group01/895457260/journal/week2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group01/895457260/journal/week2.md b/group01/895457260/journal/week2.md index e7b09d9d4e..5d66f6dfc0 100644 --- a/group01/895457260/journal/week2.md +++ b/group01/895457260/journal/week2.md @@ -45,4 +45,4 @@ RAM鍚屾椂淇濆瓨鎸囦护鍜屾暟鎹紙鏈川鐩稿悓锛岄兘鏄簩杩涘埗鏁帮級锛孭C浠0 鐒跺悗锛屽啓鍑犱釜灏忕▼搴忥紝璇诲彇EXCEL閲岀殑鎺у埗淇″彿搴忓垪锛屽瓨鍒癛OM1閲岋紝骞舵妸ROM2涔熻皟鏁村ソ銆 璇诲彇璁颁簨鏈噷鐨勬眹缂栦唬鐮侊紝鐢熸垚瀵瑰簲鐨勬満鍣ㄦ寚浠わ紝瀛樺埌RAM閲屻 -杩愯涓涓嬶紝缁撴灉姝g‘銆傝嚦姝わ紝杩欎釜绫讳技cpu鐨勬満鍣ㄥ畬鎴愪簡銆 +鍐欎竴娈垫眹缂栵紝杩愯锛岀粨鏋滄纭傝嚦姝わ紝杩欎釜绫讳技cpu鐨勬満鍣ㄥ畬鎴愪簡銆 From 3ba074729cbcac97a23a13e6fec129ea2b4fc367 Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sat, 4 Mar 2017 16:07:23 +0800 Subject: [PATCH 087/646] Update week2.md --- group01/895457260/journal/week2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group01/895457260/journal/week2.md b/group01/895457260/journal/week2.md index 5d66f6dfc0..0516617b90 100644 --- a/group01/895457260/journal/week2.md +++ b/group01/895457260/journal/week2.md @@ -1,7 +1,7 @@ -缁勮涓涓畝鍗曠殑绫讳技cpu鐨勬満鍣 +浠跨湡涓涓畝鍗曠殑绫讳技cpu鐨勬満鍣 ------------------------- >鎺ュ埌瀛︽牎甯冪疆鐨勪换鍔★紝瑕佺敤浠跨湡杞欢鐢讳竴涓畝鍗曠殑鑳借繍琛岀殑cpu锛岃姹8浣嶅瓧闀匡紝缁欏畾14绉嶆寚浠ゃ -鎴戣姳浜10澶╁乏鍙虫潵瀹屾垚杩欎釜浠诲姟銆傝繖绡囨枃绔犲氨璁板綍涓涓嬫垜鏄浣曚粠澶村紑濮嬬粍瑁呰繖涓猚pu锛堟垨鑰呰绫讳技cpu鐨勬満鍣級鐨勩 +鎴戣姳浜10澶╁乏鍙虫潵瀹屾垚杩欎釜浠诲姟銆傝繖绡囨枃绔犲氨璁板綍涓涓嬫垜鏄浣曚粠澶村紑濮嬬敾杩欎釜cpu锛堟垨鑰呰绫讳技cpu鐨勬満鍣級鐨勩 鎵撳紑浠跨湡杞欢锛岀┖绌哄涔熶笉鐭ヤ粠浣曚笅鎵嬶紝鎬讳箣鍏堟妸鍗拌薄涓殑鈥渃pu鏁版嵁閫氳矾鍥锯濈敾鍑烘潵銆 闇瑕佷竴涓狝LU锛孯AM锛孭C锛孖R锛孉R锛屼袱涓狝LU鐨凞R锛屼互鍙婅嫢骞查氱敤瀵勫瓨鍣紝杩欓噷鎴戠敤浜3涓氱敤瀵勫瓨鍣ㄣ From a81401d150d9e5fe1c35b9aa7bb5e7fb7f8c8c30 Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sat, 4 Mar 2017 16:07:48 +0800 Subject: [PATCH 088/646] Update week2.md --- group01/895457260/journal/week2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group01/895457260/journal/week2.md b/group01/895457260/journal/week2.md index 0516617b90..ee03c6667f 100644 --- a/group01/895457260/journal/week2.md +++ b/group01/895457260/journal/week2.md @@ -42,7 +42,7 @@ RAM鍚屾椂淇濆瓨鎸囦护鍜屾暟鎹紙鏈川鐩稿悓锛岄兘鏄簩杩涘埗鏁帮級锛孭C浠0 杩樻湁涓涓棶棰橈細鎵鏈夋帶鍒朵俊鍙峰簲璇ュ悓鏃堕佸嚭銆備负姝ゆ垜鎶婃帶鍒朵俊鍙烽兘鍏堟帴鍦ㄤ簡閿佸瓨鍣ㄤ笂锛岄攣瀛樺櫒浼氬湪涓嬩竴涓椂閽熶笂鍗囨部鍚屾椂閫佸嚭鎵鏈夋帶鍒朵俊鍙枫 -鐒跺悗锛屽啓鍑犱釜灏忕▼搴忥紝璇诲彇EXCEL閲岀殑鎺у埗淇″彿搴忓垪锛屽瓨鍒癛OM1閲岋紝骞舵妸ROM2涔熻皟鏁村ソ銆 +鏈鍚庯紝鍐欏嚑涓皬绋嬪簭锛岃鍙朎XCEL閲岀殑鎺у埗淇″彿搴忓垪锛屽瓨鍒癛OM1閲岋紝骞舵妸ROM2涔熻皟鏁村ソ銆 璇诲彇璁颁簨鏈噷鐨勬眹缂栦唬鐮侊紝鐢熸垚瀵瑰簲鐨勬満鍣ㄦ寚浠わ紝瀛樺埌RAM閲屻 -鍐欎竴娈垫眹缂栵紝杩愯锛岀粨鏋滄纭傝嚦姝わ紝杩欎釜绫讳技cpu鐨勬満鍣ㄥ畬鎴愪簡銆 +鎵撳紑璁颁簨鏈啓涓娈垫眹缂栵紝杩愯锛岀粨鏋滄纭傝嚦姝わ紝杩欎釜绫讳技cpu鐨勬満鍣ㄥ畬鎴愪簡銆 From 85c69461f62a42f5e7480e3bdf86f5518d26ceae Mon Sep 17 00:00:00 2001 From: xiongyilun Date: Sat, 4 Mar 2017 21:04:15 +0800 Subject: [PATCH 089/646] =?UTF-8?q?struts=E4=BB=A5=E5=8F=8A=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit struts浠ュ強鏁扮粍鎿嶄綔 --- .../com/coderising/action/LoginAction.java" | 39 ++++ .../com/coderising/action/Struts.java" | 102 ++++++++ .../com/coderising/action/StrutsTest.java" | 43 ++++ .../com/coderising/action/View.java" | 23 ++ .../com/coderising/action/struts.xml" | 11 + .../com/coderising/array/ArrayUtil.java" | 218 ++++++++++++++++++ 6 files changed, 436 insertions(+) create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/LoginAction.java" create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/Struts.java" create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/StrutsTest.java" create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/View.java" create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/struts.xml" create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/array/ArrayUtil.java" diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/LoginAction.java" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/LoginAction.java" new file mode 100644 index 0000000000..8b1b4a0135 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/LoginAction.java" @@ -0,0 +1,39 @@ +package com.coderising.action; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/Struts.java" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/Struts.java" new file mode 100644 index 0000000000..ccd3c619b3 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/Struts.java" @@ -0,0 +1,102 @@ +package com.coderising.action; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + SAXReader saxReader = new SAXReader(); + Document document; + View view = new View(); + Map resultMap = new HashMap<>(); + for (Map.Entry entry : parameters.entrySet()) { + System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue()); + } + try { + document = saxReader.read(new File("src/com/coderising/action/struts.xml")); + Element root = document.getRootElement(); + @SuppressWarnings("unchecked") + Iterator it = root.elementIterator(); + // 閬嶅巻鏍硅妭鐐圭殑瀛愯妭鐐 + while (it.hasNext()) { + Element e = it.next(); + // 鍒ゆ柇action鐨凬ame鏄惁鍜屼紶鍏ョ殑actionName鐩稿悓 + if (actionName.equals(e.attribute("name").getData())) { + // 鏍规嵁鍙嶅皠鍒涘缓瀵硅薄瀹炰緥 + String classPath = e.attribute("class").getData().toString(); + Class class1 = Class.forName(classPath); + LoginAction loginAction = (LoginAction) class1.newInstance(); + Field[] fields = class1.getDeclaredFields(); + // 瀵逛簬瀹炰緥鐨勬垚鍛樺彉閲忚繘琛岄亶鍘嗭紝骞跺垽鏂槸鍚﹀拰Map涓彁渚涚殑鍙傛暟鏄惁鍖归厤锛屽鏋滃尮閰嶇殑璇濆氨璋冪敤鍏秙et鏂规硶銆 + for (Field field : fields) { + String fieldName = field.getName(); + for (Map.Entry entry : parameters.entrySet()) { + if (entry.getKey().equals(fieldName)) { + Method method = class1.getDeclaredMethod( + "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1), + String.class); + method.invoke(loginAction, entry.getValue()); + } + continue; + } + } + // 鎵цexecute鏂规硶骞惰幏鍙栧叾杩斿洖鍊 + Method method = class1.getDeclaredMethod("execute"); + String result = (String) method.invoke(loginAction); + + String jsp = null; + for (@SuppressWarnings("unchecked") + Iterator iterator = e.elementIterator(); iterator.hasNext();) { + Element element = iterator.next(); + if (result.equals(element.attribute("name").getData())) { + jsp = element.getText(); + } + } + + for (Field field : fields) { + String fieldName = field.getName(); + Method method2 = class1.getDeclaredMethod( + "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1)); + resultMap.put(fieldName, (String) method2.invoke(loginAction)); + } + + view.setParameters(resultMap); + view.setJsp(jsp); + } + continue; + } + } catch (Exception e) { + e.printStackTrace(); + } + + /* + * + * 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + * + * 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , + * "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + * + * 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + * + * 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 + * {"message": "鐧诲綍鎴愬姛"} , 鏀惧埌View瀵硅薄鐨刾arameters + * + * 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + * 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + * + */ + + return view; + } + +} \ No newline at end of file diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/StrutsTest.java" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/StrutsTest.java" new file mode 100644 index 0000000000..134a4501a6 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/StrutsTest.java" @@ -0,0 +1,43 @@ +package com.coderising.action; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + //@Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/View.java" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/View.java" new file mode 100644 index 0000000000..5144103281 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/View.java" @@ -0,0 +1,23 @@ +package com.coderising.action; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/struts.xml" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/struts.xml" new file mode 100644 index 0000000000..9d1c5b98f6 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/action/struts.xml" @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/array/ArrayUtil.java" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/array/ArrayUtil.java" new file mode 100644 index 0000000000..d8e277f502 --- /dev/null +++ "b/group08/529757467/2017-03-05\344\275\234\344\270\232/com/coderising/array/ArrayUtil.java" @@ -0,0 +1,218 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = + * [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int size = origin.length; + int[] originReverse = new int[size]; + for (int i = 0; i < size; i++) { + originReverse[i] = origin[size - 1 - i]; + } + origin = originReverse; + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int oldSize = oldArray.length; + int[] array = new int[oldSize]; + int newSize = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + array[newSize] = oldArray[i]; + newSize++; + } + } + + if (oldSize == newSize) { + return array; + } else { + int[] temp = new int[newSize]; + for (int i = 0; i < newSize; i++) { + temp[i] = array[i]; + } + return temp; + } + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = + * [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public static int[] merge(int a[], int b[]) { + int lengthA = a.length; + int lengthB = b.length; + int c[] = new int[lengthA+lengthB]; + + int indexA = 0; + int indexB = 0; + int indexC = 0; + + while (indexA < lengthA && indexB < lengthB) { + if (a[indexA] <= b[indexB]) { + if (indexC == 0 || c[indexC - 1] != a[indexA]) // 鍘婚噸澶 + c[indexC++] = a[indexA]; + indexA++; + } else { + if (indexC == 0 || c[indexC - 1] != b[indexB]) // 鍘婚噸澶 + c[indexC++] = b[indexB]; + indexB++; + } + } + + while (indexA < lengthA) { + if (indexC == 0 || c[indexC - 1] != a[indexA]) // 鍘婚噸澶 + c[indexC++] = a[indexA]; + indexA++; + } + while (indexB < lengthB) { + if (indexC == 0 || c[indexC - 1] != b[indexB]) // 鍘婚噸澶 + c[indexC++] = b[indexB]; + indexB++; + } + + int[] temp = new int[indexC]; + for (int i = 0; i < indexC; i++) { + temp[i] = c[i]; + } + + return temp; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + int oldArraySize = oldArray.length; + int[] temp = new int[oldArraySize + size]; + for (int i = 0; i < oldArraySize; i++) { + temp[i] = oldArray[i]; + } + return oldArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 渚嬪锛 max = 15 , + * 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public static int[] fibonacci(int max) { + int[] array = new int[20]; + int i = 1; + int j = 1; + int sum = i+j; + array[0] = 1; + array[1] = 1; + array[2] = 2; + int k =3; + while(sum < max){ + int temp = i; + i = j; + j = temp +j; + sum = i+j; + array[k++] = sum; + } + int[] temp = new int[k]; + for (int p = 0; p < k; p++) { + temp[p] = array[p]; + } + return temp; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + int[] a = new int[max]; + int num = 0; + int j; + for (int i = 2; i < max; i++) { + for (j = 2; j <= Math.sqrt(i); j++) { + if (i % j == 0) + break; + } + if (j > Math.sqrt(i)) + a[num++] = i; + } + int[] temp = new int[num]; + for (int i = 0; i < temp.length; i++) { + temp[i] = a[i]; + } + return temp; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public static int[] getPerfectNumbers(int max) { + int[] a = new int[max]; + int num = 0; + int j; + int sum = 0; + for (int i = 1; i < max; i++) { + sum = 0; + for (j = 1; j < i; j++) { + if (i % j == 0) + sum = sum + j; + } + if (sum == i) { + a[num++] = i; + } + } + int[] temp = new int[num]; + for (int i = 0; i < temp.length; i++) { + temp[i] = a[i]; + } + return temp; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], seperator = "-" 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator) { + int size = array.length; + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < size - 1; i++) { + stringBuilder.append(array[i] + seperator); + } + stringBuilder.append(array[size - 1]); + return stringBuilder.toString(); + } + +} \ No newline at end of file From b612c2552c175df09326d84c22717dea99b0ec6e Mon Sep 17 00:00:00 2001 From: xiongyilun Date: Sat, 4 Mar 2017 21:16:39 +0800 Subject: [PATCH 090/646] =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鏂囩珷 --- ...243\347\240\201\346\204\237\345\217\227.doc" | Bin 0 -> 11264 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "group08/529757467/2017-03-05\344\275\234\344\270\232/\345\206\231\344\273\243\347\240\201\346\204\237\345\217\227.doc" diff --git "a/group08/529757467/2017-03-05\344\275\234\344\270\232/\345\206\231\344\273\243\347\240\201\346\204\237\345\217\227.doc" "b/group08/529757467/2017-03-05\344\275\234\344\270\232/\345\206\231\344\273\243\347\240\201\346\204\237\345\217\227.doc" new file mode 100644 index 0000000000000000000000000000000000000000..94a2592cc1c697511d3e1c03d5ee5416456b1940 GIT binary patch literal 11264 zcmeHN4Nz3q6+Z9n0*mYd{voa=tOgYcKM((-jjqvJtMM(cDB_|k$Syc2v4V>xRX1j1 zKy<)1X`HE}X2#4olTJ&=wwX*bO;R&a+cMfrY;`)B!D*T1r_HRfX+u)H{my&)=t@9V z&FC08%=gayIrpA(&pr3P$Gv<0-0;qqer~@^eP}+J=$c5R_^5ITX@*9rL^2Ybzb1sx z3yF{%qI<{#J+PJMnCH+89tU7*wY&v95f}y}0am~UBm*e`w;2vT0vHL5ij>_$!@uuM zEv6^%*FX;XHr0V|r5%{X*eMMWV>prbg7`$<6^P!{p0q?~`m@lptMc#9zbl!Lb#f4a z;>bRV!(rjY!w&qWwOzNR~KmSu5MouTVdQ>AIQFzZe=eXg2sX z58RwRbD-ZCf2{g>P5mpfk(O#>t@?@;{g~WuksTwyS^Wv=V)Je>B>p0b_u4U@Tw<#sTAj2Y?5G48Q?Q044$t0hz!gU@|ZT$O5JU z*}%g<4v-7v0r`Le6adqJ>A(zNCNK+_4a@=9{vjIJ1J|%(hG`K1XGIamMd!0eKkata zq`q>{LJv36j=>+dfnjKKi^=2sHI5WihrrB0f zC%c&St&48MwyC{)(k8@T6><&Oq4air`(Yb6E}a0i9r|+1)pHW3gTFEN?tk3B)-H;( z4fBCgD#WhnAQyH*KX$+kcu*nu+_nwY*Fqr=*anGW#$f>9Fy3bx_FbAJfnzK#PN6YT)U62}dpRPHGv$PuCS+A$b<`k?+iOf<8Y?YB>OU#GseJ6>> zY!G{5Fp8EROxCF9HhtU8!lGc@46%I*mEg;(64BwinWnw6$@u=^b;z;JZ<*eT8zi*# z%8L=S7}^_vTP1#XMZeu*>4(1wVv&ng=4SQB+Hb6Kx1;|bFTX|2O^MiMMisuHE99+M z3$R_-D3fWqd%646SK^ID%$Bs???}!sFg8Wb^g}}Mj;_-{X`}w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h$1)iiyp zhVNYFu1caAe~KrGf3u(^WYZ=+VKz!ED3N>bY+wl9sQl*C4&x(fzKN2JaYv3xQKet+ zd?&39M#^%$Db5@xo6OHWNe)y6H31|=UE&27?N z9LL9#Nn+yYCu+?yZUt~jqm{I1!=Ih0X-$cfW!Y?!&6t}`@e^`Jl+jTM-GdgP_f61T ziHoC+$j^foS-X1U+I}g>rKOOr!+%Fr5nhinA^7?>nsCmE3t0UbU2dcuuvxM+rQ-rn zI#X1m8E5%tcJ;zZ?$az|SgXtHIWw6IS8K(RCS^!Y(A`2NgyLlU{9r16R**+?X&x=0 zwYUO3L9fzj`K&zJk>(idc)&5)F>9iv$cjmcQxcUV#ipbv!7)27YNDzs_Dw2g= zj1w8+QQ;KjVy##wI=|Kn27PolerAyeSHZ7Rx?{YNpQGe+9re3;KGh}UHoU{LK;+qgi={B@j Date: Sat, 4 Mar 2017 22:37:44 +0800 Subject: [PATCH 091/646] comlete comlete --- .../com/coderising/action/LoginAction.java | 42 +++++++ .../src/com/coderising/litestruts/Struts.java | 117 ++++++++++++++++++ .../com/coderising/litestruts/StrutsTest.java | 43 +++++++ .../src/com/coderising/litestruts/View.java | 23 ++++ .../src/com/coderising/litestruts/struts.xml | 11 ++ 5 files changed, 236 insertions(+) create mode 100644 group12/446031103/src/com/coderising/action/LoginAction.java create mode 100644 group12/446031103/src/com/coderising/litestruts/Struts.java create mode 100644 group12/446031103/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group12/446031103/src/com/coderising/litestruts/View.java create mode 100644 group12/446031103/src/com/coderising/litestruts/struts.xml diff --git a/group12/446031103/src/com/coderising/action/LoginAction.java b/group12/446031103/src/com/coderising/action/LoginAction.java new file mode 100644 index 0000000000..2a0b6d477b --- /dev/null +++ b/group12/446031103/src/com/coderising/action/LoginAction.java @@ -0,0 +1,42 @@ +package com.coderising.action; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } + public void setMessage(String message){ + this.message = message; + } +} diff --git a/group12/446031103/src/com/coderising/litestruts/Struts.java b/group12/446031103/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..b0e784d9fa --- /dev/null +++ b/group12/446031103/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,117 @@ +package com.coderising.litestruts; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.io.File; +import java.io.IOException; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +import com.coderising.action.LoginAction; + +/** + * @ClassName: Struts + * @Description: TODO + * @author: msh + * @date: 2017-3-2 涓婂崍9:37:55 + * @version: V1.0 + */ +public class Struts { + public static View runAction(String actionName, Map parameters) { + Map xmlDoc = getXMLDOC(actionName); + Map viewMap = new HashMap(); + View view = new View(); + view.setParameters(viewMap); + try { + Class classz = Class.forName(xmlDoc.get(actionName)); + LoginAction la = (LoginAction) classz.newInstance(); + la.setName(parameters.get("name")); + la.setPassword(parameters.get("password")); + Method exectue = classz.getMethod("execute", null); + Object result = exectue.invoke(la, null); + Field[] fields = classz.getDeclaredFields(); + for (Field field : fields) { + PropertyDescriptor pd = new PropertyDescriptor(field.getName(), classz); + Method readMethod = pd.getReadMethod(); + viewMap.put(field.getName(), (String) readMethod.invoke(la, null)); + } + view.setJsp(xmlDoc.get(result)); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IntrospectionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + /* + * 0. 璇诲彇閰嶇疆鏂囦欢struts.xml 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛夛紝 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , "password"="1234") , + * 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" 3. + * 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + * 鏀惧埌View瀵硅薄鐨刾arameters 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + * 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + */ + return view; + } + /** + * @MethodName: getXMLDOC + * @Description: 瑙f瀽xml鏂囦欢 + * @param actionName + * @return + * @return: Map + */ + private static Map getXMLDOC(String actionName) { + Map xmldoc = new HashMap(); + // 瑙f瀽struts.xml鏂囦欢 + // 鍒涘缓SAXReader鐨勫璞eader + SAXReader reader = new SAXReader(); + try { + // 閫氳繃reader瀵硅薄鐨剅ead鏂规硶璇诲彇struts.xml锛屽緱鍒癲ocument瀵硅薄 + Document document = reader.read(new File("src/com/coderising/litestruts/struts.xml")); + // 鑾峰彇鏍硅妭鐐 + Element struts = document.getRootElement(); + // 杩唬鑺傜偣 + Iterator actions = struts.elementIterator(); + while (actions.hasNext()) { + Element action = (Element) actions.next(); + if (actionName.equals(action.attributeValue("name"))) { + xmldoc.put(action.attributeValue("name"), action.attributeValue("class")); + Iterator results = action.elementIterator(); + while (results.hasNext()) { + Element result = (Element) results.next(); + xmldoc.put(result.attributeValue("name"), result.getStringValue()); + } + break; + } + } + } catch (DocumentException e) { + e.printStackTrace(); + } + return xmldoc; + } + +} diff --git a/group12/446031103/src/com/coderising/litestruts/StrutsTest.java b/group12/446031103/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group12/446031103/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/446031103/src/com/coderising/litestruts/View.java b/group12/446031103/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group12/446031103/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/446031103/src/com/coderising/litestruts/struts.xml b/group12/446031103/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..90cf18b7da --- /dev/null +++ b/group12/446031103/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 224bb966bb46492d125a28730e5802d1b5b62410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Sat, 4 Mar 2017 22:51:13 +0800 Subject: [PATCH 092/646] =?UTF-8?q?Revert=20"=E5=8D=9A=E5=AE=A2"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 66f6f1c37d70ebc5943b0261bbe7c309bc66aef4. --- group08/1425809544/03-05/array/ArrayUtil.java | 257 ------------------ .../1425809544/03-05/array/ArrayUtilTest.java | 99 ------- ...0\345\231\250\347\273\223\346\236\204.txt" | 1 - 3 files changed, 357 deletions(-) delete mode 100644 group08/1425809544/03-05/array/ArrayUtil.java delete mode 100644 group08/1425809544/03-05/array/ArrayUtilTest.java delete mode 100644 "group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" diff --git a/group08/1425809544/03-05/array/ArrayUtil.java b/group08/1425809544/03-05/array/ArrayUtil.java deleted file mode 100644 index f370e38dd4..0000000000 --- a/group08/1425809544/03-05/array/ArrayUtil.java +++ /dev/null @@ -1,257 +0,0 @@ -package com.util_1; - -import java.util.*; - -public class ArrayUtil { - - /** - * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 - * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] - * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] - * - * @param origin - * @return - */ - public void reverseArray(int[] origin) { - int[] oldArr = origin; - int newLength = oldArr.length; - int[] newArr = new int[newLength]; - for (int i = 0; i < newLength; i++) { - newArr[newLength - i - 1] = oldArr[i]; - } - for (int s : newArr) { - System.out.println(s); - } - - - } - - /** - * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} - * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 - * {1,3,4,5,6,6,5,4,7,6,7,5} - * - * @param oldArray - * @return - */ - - public int[] removeZero(int[] oldArray) { - int[] oldArr = oldArray; - int oldLength = oldArr.length; - int[] newArr = new int[oldLength]; - int index = 0; - int zeroCount = 0; - for (int i = 0; i < oldLength; i++) { - if (oldArr[i] == 0) { - zeroCount++; - } else { - newArr[index++] = oldArr[i]; - } - } - int[] newArrs = Arrays.copyOf(newArr, index); - return newArrs; - } - - /** - * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 - * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 - * - * @param array1 - * @param array2 - * @return - */ - - public int[] merge(int[] array1, int[] array2) { - int newLength = array1.length + array2.length; - int[] newArr = new int[newLength]; - int index = 0; - for (int i = 0; i < array1.length; i++) { - newArr[index++] = array1[i]; - } - for (int i = 0; i < array2.length; i++) { - newArr[index++] = array2[i]; - } - //鍐掓场鎺掑簭 - for (int i = 0; i < newArr.length; i++) { - for (int j = i + 1; j < newArr.length; j++) { - if (newArr[i] > newArr[j]) { - int temp = newArr[i]; - newArr[i] = newArr[j]; - newArr[j] = temp; - } - } - } - //鏁扮粍鍘婚噸 - boolean[] b = new boolean[newArr.length]; - int counts = newArr.length; - for (int i = 0; i < newArr.length; i++) { - for (int j = i + 1; j < newArr.length; j++) { - if (newArr[i] == newArr[j] && b[i] == false) { - b[j] = true; - counts--; - } - } - } - int[] result = new int[counts]; - int j = 0; - for (int i = 0; i < newArr.length; i++) { - if (b[i] == false) { - result[j] = newArr[i]; - j++; - } - } - return result; - } - - /** - * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size - * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 - * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 - * [2,3,6,0,0,0] - * - * @param oldArray - * @param size - * @return - */ - public int[] grow(int[] oldArray, int size) { - int oldLength = oldArray.length; - int newLength = oldLength + size; - int[] result = Arrays.copyOf(oldArray, newLength); - return result; - } - - /** - * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 - * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] - * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] - * - * @param max - * @return - */ - public int[] fibonacci(int max) { - int a = 1, b = 1, c = 2; - int[] arr = new int[max + 1]; - int i = 2; - if (max == 1) { - return Arrays.copyOf(arr, 0); - } else if (max <= 0) { - throw new IllegalArgumentException("涓嶈兘杈撳叆<=0鐨勫弬鏁帮細" + max); - } else { - arr[0] = 1; - arr[1] = 1; - do { - c = a + b; - a = b; - b = c; - arr[i++] = c; - } while (c < max); - } - - if (arr[i - 1] >= max) { - return Arrays.copyOf(arr, i - 1); - } - return Arrays.copyOf(arr, i); - } - - /** - * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 - * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] - * - * @param max - * @return - */ - public int[] getPrimes(int max) { - - class IsPrime { - // 鍒ゆ柇鏌愭暣鏁版槸鍚︿负绱犳暟 - public boolean isPrimes(int n) { - if (n < 2) { - return false; - } - for (int i = 2; i * i <= n; i++) { - if (n % i == 0) { - return false; - } - } - return true; - - } - } - List list = new ArrayList(); - IsPrime isPrime = new IsPrime(); - for (int i = 2; i < max; i++) { - if (isPrime.isPrimes(i)) { - list.add(i); - } - } - - int[] arr = new int[list.size()]; - for (int i = 0; i < list.size(); i++) { - arr[i] = (int) list.get(i); - } - - return arr; - } - - /** - * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 - * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 - * - * @param max - * @return - */ - public int[] getPerfectNumbers(int max) { - //淇濆瓨姣忕粍鐨勫垎瑙e洜瀛 - List list = new ArrayList(); - List pm = new ArrayList(); - int sum = 0; - //闄ゆ暟 - for (int i = 2; i < max; i++) { - //琚櫎鏁 - sum=0; - for (int j = 1; j < i / 2 + 1; j++) { - if (i % j == 0) { - list.add(j); - sum += j; - } - } - - if (sum == i) { - pm.add(i); - } - - list.clear(); - } - - int[] pmaArr = new int[pm.size()]; - for (int i = 0; i < pm.size(); i++) { - pmaArr[i] = (int) pm.get(i); - } - return pmaArr; - } - - /** - * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 - * 渚嬪array= [3,8,9], seperator = "-" - * 鍒欒繑鍥炲间负"3-8-9" - * - * @param array - * @param - * @return - */ - - public String join(int[] array, String seperator) { - - String s = new String(); - for (int i = 0; i < array.length; i++) { - if (i < array.length - 1) { - s += array[i] + seperator; - } else { - s += array[i]; - } - } - return s; - } - - -} diff --git a/group08/1425809544/03-05/array/ArrayUtilTest.java b/group08/1425809544/03-05/array/ArrayUtilTest.java deleted file mode 100644 index ad348045f9..0000000000 --- a/group08/1425809544/03-05/array/ArrayUtilTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.util_1; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Created by 14258 on 2017/2/28. - */ -public class ArrayUtilTest { - ArrayUtil arrayUtil = new ArrayUtil(); - - @Before - public void setUp() throws Exception { - - } - - @After - public void tearDown() throws Exception { - - } - - @Test - public void testReverseArray() throws Exception { - - int[] testArr = {7, 9, 30, 3}; - - arrayUtil.reverseArray(testArr); - } - - @Test - public void testRemoveZero() throws Exception { - int oldArr[] = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; - int[] newArr = arrayUtil.removeZero(oldArr); - for (int s : newArr) { - System.out.println(s); - } - - } - - @Test - public void testMerge() throws Exception { - int[] a1 = {3, 5, 7}; - int[] a2 = {4, 5, 6, 7}; - int[] newArr = arrayUtil.merge(a1, a2); - for (int s : newArr) { - System.out.println(s); - } - } - - @Test - public void testGrow() throws Exception { - int[] oldArray = {2, 3, 6}; - - int[] newArr = arrayUtil.grow(oldArray, 3); - - for (int s : newArr) { - System.out.println(s); - } - } - - @Test - public void testFibonacci() throws Exception { - - int[] newArr = arrayUtil.fibonacci(16); - System.out.print("["); - for (int i : newArr) { - System.out.print(i+","); - } - System.out.print("]"); - } - - @Test - public void testGetPrimes() throws Exception { - int[] prime = arrayUtil.getPrimes(23); - - for (int i :prime){ - System.out.print(i+" "); - } - } - - @Test - public void testGetPerfectNumbers() throws Exception { - int[] prime = arrayUtil.getPerfectNumbers(10000); - - for (int i :prime){ - System.out.print(i+" "); - } - } - - @Test - public void testJoin() throws Exception { - int[] array = {3, 8, 9}; - String s = arrayUtil.join(array, "-"); - System.out.println(s); - } -} \ No newline at end of file diff --git "a/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" "b/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" deleted file mode 100644 index 233cfeaa89..0000000000 --- "a/group08/1425809544/03-05/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\231\250\347\273\223\346\236\204.txt" +++ /dev/null @@ -1 +0,0 @@ - http://blog.csdn.net/qq_25385555/article/month/2017/03 \ No newline at end of file From f86730b9bbe5dd3206739ee30badce14bf19b91b Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Sun, 5 Mar 2017 10:44:57 +0800 Subject: [PATCH 093/646] minor refactor --- group12/382266293/src/litestruts/Struts.java | 11 ++++------- group12/382266293/src/litestruts/StrutsTest.java | 4 ---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java index 2eb4a01848..cb7593c657 100644 --- a/group12/382266293/src/litestruts/Struts.java +++ b/group12/382266293/src/litestruts/Struts.java @@ -16,13 +16,12 @@ public class Struts { private static Object actionObj = null; private static String address = "src/litestruts/struts.xml"; + private static ActionXMLreader reader = new ActionXMLreader(); @SuppressWarnings("unchecked") public static View runAction(String actionName, Map parameters){ - - ActionXMLreader reader = new ActionXMLreader(); + Node root = reader.getRootNode(address); - String clazz = reader.parseClass(root, actionName); actionObj = getObj(clazz); BeanInfo bi = getBeanInfo(actionObj); @@ -30,10 +29,8 @@ public static View runAction(String actionName, Map parameters){ setParameters(actionObj, pd, parameters); String executeResult = (String) getResult(actionObj, bi, "execute"); - String jsp = reader.parseResult(root, actionName, executeResult); - - Map readParamters = new HashMap(); - readParamters = getReadParameters(actionObj, pd); + String jsp = reader.parseResult(root, actionName, executeResult); + Map readParamters = getReadParameters(actionObj, pd); View view = new View(); view.setJsp(jsp); diff --git a/group12/382266293/src/litestruts/StrutsTest.java b/group12/382266293/src/litestruts/StrutsTest.java index 67893b9f3b..35686c8e30 100644 --- a/group12/382266293/src/litestruts/StrutsTest.java +++ b/group12/382266293/src/litestruts/StrutsTest.java @@ -8,10 +8,6 @@ import org.junit.Assert; import org.junit.Test; - - - - public class StrutsTest { @Test From 70b2393c99d99c9311d669ac1b48e52dd5ce9487 Mon Sep 17 00:00:00 2001 From: akinaru-lu Date: Sun, 5 Mar 2017 12:31:06 +0900 Subject: [PATCH 094/646] assignment 3-5 --- group08/729770920/3-5/res/struts.xml | 11 + .../3-5/src/com/action/LoginAction.java | 41 ++++ .../3-5/src/com/array/utils/ArrayUtil.java | 202 ++++++++++++++++ .../src/com/array/utils/TestArrayUtil.java | 131 +++++++++++ .../com/datastructures/basic/ArrayList.java | 116 ++++++++++ .../com/datastructures/basic/BinaryTree.java | 105 +++++++++ .../com/datastructures/basic/Iterator.java | 9 + .../com/datastructures/basic/LinkedList.java | 168 ++++++++++++++ .../src/com/datastructures/basic/List.java | 21 ++ .../src/com/datastructures/basic/Queue.java | 21 ++ .../src/com/datastructures/basic/Stack.java | 25 ++ .../3-5/src/com/litestruts/Struts.java | 218 ++++++++++++++++++ .../3-5/src/com/litestruts/StrutsTest.java | 41 ++++ group08/729770920/3-5/src/com/view/View.java | 26 +++ 14 files changed, 1135 insertions(+) create mode 100644 group08/729770920/3-5/res/struts.xml create mode 100644 group08/729770920/3-5/src/com/action/LoginAction.java create mode 100644 group08/729770920/3-5/src/com/array/utils/ArrayUtil.java create mode 100644 group08/729770920/3-5/src/com/array/utils/TestArrayUtil.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/ArrayList.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/BinaryTree.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/Iterator.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/LinkedList.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/List.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/Queue.java create mode 100644 group08/729770920/3-5/src/com/datastructures/basic/Stack.java create mode 100644 group08/729770920/3-5/src/com/litestruts/Struts.java create mode 100644 group08/729770920/3-5/src/com/litestruts/StrutsTest.java create mode 100644 group08/729770920/3-5/src/com/view/View.java diff --git a/group08/729770920/3-5/res/struts.xml b/group08/729770920/3-5/res/struts.xml new file mode 100644 index 0000000000..cf00baf39b --- /dev/null +++ b/group08/729770920/3-5/res/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group08/729770920/3-5/src/com/action/LoginAction.java b/group08/729770920/3-5/src/com/action/LoginAction.java new file mode 100644 index 0000000000..93f9568a6b --- /dev/null +++ b/group08/729770920/3-5/src/com/action/LoginAction.java @@ -0,0 +1,41 @@ +package com.action; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction { + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successfully"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + + public void setPassword(String password){ + this.password = password; + } + + public String getMessage(){ + return this.message; + } +} diff --git a/group08/729770920/3-5/src/com/array/utils/ArrayUtil.java b/group08/729770920/3-5/src/com/array/utils/ArrayUtil.java new file mode 100644 index 0000000000..69923f37bf --- /dev/null +++ b/group08/729770920/3-5/src/com/array/utils/ArrayUtil.java @@ -0,0 +1,202 @@ +package com.array.utils; + +import com.datastructures.basic.List; +import com.datastructures.basic.ArrayList; + +import java.util.Arrays; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public static void reverseArray(int[] origin) { + for (int f = 0, b = origin.length-1, tmp; f < b; ++f, --b) { + tmp = origin[f]; + origin[f] = origin[b]; + origin[b] = tmp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + public static int[] removeZero(int[] oldArray) { + List list = new ArrayList<>(); + for (int i : oldArray) { + if (i != 0) { + list.add(i); + } + } + + return Arrays.stream(list.toArray()).mapToInt(Integer::intValue).toArray(); + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + public static int[] merge(int[] array1, int[] array2){ + List list = new ArrayList<>(); + int first=0, second=0; + + while (first < array1.length && second < array2.length) { + if (array1[first] < array2[second]) { + list.add(array1[first]); + ++first; + } else if (array1[first] > array2[second]) { + list.add(array2[second]); + ++second; + } else { + list.add(array1[first]); + ++first; + ++second; + } + } + + if (first == array1.length && second < array2.length) { + while (second < array2.length) { + list.add(array2[second++]); + } + } else if (first < array1.length && second == array2.length) { + while (first < array1.length) { + list.add(array1[first++]); + } + } + + return Arrays.stream(list.toArray()).mapToInt(Integer::intValue).toArray(); + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public static int[] grow(int [] oldArray, int size){ + if (size < 0) { + throw new RuntimeException("Growing size can not br less than zero: " + size); + } + int[] newArray = new int[oldArray.length + size]; + System.arraycopy(oldArray, 0, newArray, 0, oldArray.length); + return newArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public static int[] fibonacci(int max){ + if (max <= 1) { + return new int[0]; + } + List list = new ArrayList<>(); + list.add(1); + list.add(1); + int current; + while (true) { + current = list.get(list.size()-1) + list.get(list.size()-2); + if (current >= max) { + break; + } + list.add(current); + } + + return Arrays.stream(list.toArray()).mapToInt(Integer::intValue).toArray(); + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public static int[] getPrimes(int max){ + List list = new ArrayList<>(); + for (int n = 2; n < max; ++n) { + if (isPrime(n)) { + list.add(n); + } + } + return Arrays.stream(list.toArray()).mapToInt(Integer::intValue).toArray(); + } + + private static boolean isPrime(int number) { + if (number < 2) { + return false; + } else if (number == 2) { + return true; + } else if ((number&1) == 0) { + return false; + } + for (int n = 3; n * n <= number; n += 2) { + if (number % n == 0) { + return false; + } + } + return true; + } + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public static int[] getPerfectNumbers(int max){ + List list = new ArrayList<>(); + for (int n = 6; n < max; ++n) { + if (isPerfectNumber(n)) { + list.add(n); + } + } + return Arrays.stream(list.toArray()).mapToInt(Integer::intValue).toArray(); + } + + private static boolean isPerfectNumber(int number) { + int tmp = 0; + for (int n = 1; n <= number/2; ++n) { + if (number % n == 0) { + tmp += n; + } + } + return tmp == number; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param separator + * @return + */ + public static String join(int[] array, String separator){ + if (array.length == 0) { + return ""; + } + StringBuilder sb = new StringBuilder(""); + for (int i : array) { + sb.append(i); + sb.append(separator); + } + String dst = sb.toString(); + return dst.substring(0, dst.length()-separator.length()); + } +} diff --git a/group08/729770920/3-5/src/com/array/utils/TestArrayUtil.java b/group08/729770920/3-5/src/com/array/utils/TestArrayUtil.java new file mode 100644 index 0000000000..01caae3b6d --- /dev/null +++ b/group08/729770920/3-5/src/com/array/utils/TestArrayUtil.java @@ -0,0 +1,131 @@ +package com.array.utils; + +import org.junit.Assert; +import org.junit.Test; + +public class TestArrayUtil { + + @Test + public void testReverseArray1() { + int[] array = {1, 2, 3, 4, 5}; + int[] trueAns = {5, 4, 3, 2, 1}; + ArrayUtil.reverseArray(array); + Assert.assertArrayEquals(trueAns, array); + } + + @Test + public void testReverseArray2() { + int[] array = {}; + int[] trueAns = {}; + ArrayUtil.reverseArray(array); + Assert.assertArrayEquals(trueAns, array); + } + + @Test + public void testRemoveZero1() { + int[] origin = {0, 0, 0, 3, 5, 0, 4, 5, 0}; + int[] trueAns = {3, 5, 4, 5}; + Assert.assertArrayEquals(trueAns, ArrayUtil.removeZero(origin)); + } + + @Test + public void testRemoveZero2() { + int[] origin = {}; + int[] trueAns = {}; + Assert.assertArrayEquals(trueAns, ArrayUtil.removeZero(origin)); + } + + @Test + public void testMerge1() { + int[] array1 = {3, 5, 7, 8}; + int[] array2 = {4, 5, 6, 7, 10}; + int[] trueAns = {3, 4, 5, 6, 7, 8, 10}; + Assert.assertArrayEquals(trueAns, ArrayUtil.merge(array1, array2)); + } + + @Test + public void testMerge2() { + int[] array1 = {1, 2, 3, 4}; + int[] array2 = {}; + int[] trueAns = {1, 2, 3, 4}; + Assert.assertArrayEquals(trueAns, ArrayUtil.merge(array1, array2)); + } + + @Test + public void testMerge3() { + int[] array1 = {}; + int[] array2 = {4, 5, 6, 7}; + int[] trueAns = {4, 5, 6, 7}; + Assert.assertArrayEquals(trueAns, ArrayUtil.merge(array1, array2)); + } + + @Test + public void testGrow1() { + int[] origin = {1, 2, 3}; + int[] trueAns = {1, 2, 3, 0, 0, 0}; + Assert.assertArrayEquals(trueAns, ArrayUtil.grow(origin, 3)); + } + + @Test + public void testGrow2() { + int[] origin = {}; + int[] trueAns = {0, 0}; + Assert.assertArrayEquals(trueAns, ArrayUtil.grow(origin, 2)); + } + + @Test + public void testFibonacci1() { + int[] trueAns = {}; + Assert.assertArrayEquals(trueAns, ArrayUtil.fibonacci(1)); + } + + @Test + public void testFibonacci2() { + int[] trueAns = {1, 1, 2, 3, 5, 8, 13, 21, 34}; + Assert.assertArrayEquals(trueAns, ArrayUtil.fibonacci(55)); + } + + @Test + public void getPrimes1() { + int[] trueAns = {2, 3, 5, 7, 11, 13, 17, 19}; + Assert.assertArrayEquals(trueAns, ArrayUtil.getPrimes(23)); + } + + @Test + public void getPrimes2() { + int[] trueAns = {}; + Assert.assertArrayEquals(trueAns, ArrayUtil.getPrimes(2)); + } + + @Test + public void getPerfectNumbers1() { + int[] trueAns = {}; + Assert.assertArrayEquals(trueAns, ArrayUtil.getPerfectNumbers(6)); + } + + @Test + public void getPerfectNumbers2() { + int[] trueAns = {6, 28, 496}; + Assert.assertArrayEquals(trueAns, ArrayUtil.getPerfectNumbers(8128)); + } + + @Test + public void testJoin1() { + int[] array = {}; + Assert.assertEquals("", ArrayUtil.join(array, ", ")); + } + + @Test + public void testJoin2() { + int[] array = {1}; + String trueAns = "1"; + Assert.assertEquals(trueAns, ArrayUtil.join(array, ", ")); + } + + @Test + public void testJoin3() { + int[] array = {1, 2, 3}; + String trueAns = "1, 2, 3"; + Assert.assertEquals(trueAns, ArrayUtil.join(array, ", ")); + } +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/ArrayList.java b/group08/729770920/3-5/src/com/datastructures/basic/ArrayList.java new file mode 100644 index 0000000000..69bfda587c --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/ArrayList.java @@ -0,0 +1,116 @@ +package com.datastructures.basic; + +public class ArrayList implements List { + + private int size; + + private E[] data; + + public void add(E e){ + add(size, e); + } + + public ArrayList() { + clear(); + } + + public ArrayList(int capacity) { + clear(); + ensureCapacity(capacity); + } + + public void add(int index, E e){ + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(Integer.toString(index)); + } + if (data.length == size) { + ensureCapacity(size + (size>>1) + 1); + } + for (int i = size++; i > index; --i) { + data[i] = data[i - 1]; + } + data[index] = e; + } + + public E get(int index){ + return data[index]; + } + + public E remove(int index){ + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(Integer.toString(index)); + } + E copy = data[index]; + --size; + for (int i = index; i < size; ++i) { + data[i] = data[i + 1]; + } + return copy; + } + + public boolean contains(E e) { + for (int i = 0; i < size; ++i) { + if (data[i] == e) { + return true; + } + } + return false; + } + + public void clear() { + size = 0; + data = (E[]) new Object[0]; + } + + public int size(){ + return size; + } + + public boolean isEmpty() { + return size == 0; + } + + public Iterator iterator(){ + return new ArrayListIterator(); + } + + public void ensureCapacity(int capacity) { + E[] newData = (E[]) new Object[capacity]; + for (int i = 0; i < size; ++i) { + newData[i] = data[i]; + } + data = newData; + } + + public E[] toArray() { + trimToSize(); + return data; + } + + public void trimToSize() { + E[] newData = (E[]) new Object[size]; + for (int i = 0; i < size; ++i) { + newData[i] = data[i]; + } + data = newData; + } + + private class ArrayListIterator implements Iterator { + int current = 0; + + public boolean hasNext() { + return current < size; + } + + public E next() { + if (!hasNext()) { + throw new java.util.NoSuchElementException(); + } + return data[current++]; + } + + public void remove() { + ArrayList.this.remove(current); + } + } +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/BinaryTree.java b/group08/729770920/3-5/src/com/datastructures/basic/BinaryTree.java new file mode 100644 index 0000000000..8f7fed8948 --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/BinaryTree.java @@ -0,0 +1,105 @@ +package com.datastructures.basic; + +public class BinaryTree> { + private BinaryTreeNode root = null; + + public BinaryTree() { + } + + public boolean isEmpty() { + return root == null; + } + + public void insert(E e) { + root = insert(root, e); + } + + private BinaryTreeNode insert(BinaryTreeNode node, E e) { + if (node == null) { + node = new BinaryTreeNode<>(e, null, null); + } + int compareResult = ((Comparable) e).compareTo(node.data); + if (compareResult < 0) { + node.left = insert(node.left, e); + } else if (compareResult > 0) { + node.right = insert(node.right, e); + } + return node; + } + + public void clear() { + root = null; + } + + public boolean contains(E e) { + return contains(root, e); + } + + private boolean contains(BinaryTreeNode node, E e) { + if (node == null) { + return false; + } + int compareResult = ((Comparable) e).compareTo(node.data); + if (compareResult < 0) { + return contains(node.left, e); + } else if (compareResult > 0) { + return contains(node.right, e); + } + // matching + return true; + } + + private BinaryTreeNode findMin(BinaryTreeNode node) { + if (node != null) { + while (node.left != null) { + node = node.right; + } + } + return node; + } + + private BinaryTreeNode findMax(BinaryTreeNode node) { + if (node != null) { + while (node.right != null) { + node = node.right; + } + } + return node; + } + + public void remove(E e) { + root = remove(root, e); + } + + private BinaryTreeNode remove(BinaryTreeNode node, E e) { + if (node == null) { + return node; + } + int compareResult = ((Comparable) e).compareTo(node.data); + if (compareResult < 0) { + node.left = remove(node.left, e); + } else if (compareResult > 0) { + node.right = remove(node.right, e); + } + // matching + if (node.left != null && node.right != null) { // two children + node.data = (E) findMax(node.right).data; + node.right = remove(node.right, node.data); + } else { // one child + node = (node.left != null) ? node.left : node.right; + } + return node; + } + + private class BinaryTreeNode { + E data; + BinaryTreeNode left; + BinaryTreeNode right; + + BinaryTreeNode(E e, BinaryTreeNode l, BinaryTreeNode r) { + data = e; + left = l; + right = r; + } + } +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/Iterator.java b/group08/729770920/3-5/src/com/datastructures/basic/Iterator.java new file mode 100644 index 0000000000..7568eeccf2 --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/Iterator.java @@ -0,0 +1,9 @@ +package com.datastructures.basic; + +public interface Iterator { + boolean hasNext(); + + E next(); + + void remove(); +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/LinkedList.java b/group08/729770920/3-5/src/com/datastructures/basic/LinkedList.java new file mode 100644 index 0000000000..cecdafc6f9 --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/LinkedList.java @@ -0,0 +1,168 @@ +package com.datastructures.basic; + +public class LinkedList implements List { + private int size = 0; + private Node head = new Node<>(); + private Node tail = new Node<>(); + + public LinkedList() { + head.next = tail; + tail.prev = head; + } + + public void add(E e) { + addLast(e); + } + + public void add(int index, E e) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(Integer.toString(index)); + } + Node cursor; + if (index < size/2) { + cursor = head; + for (int i = 0, num = index; i < num; ++i) { + cursor = cursor.next; + } + } else { + cursor = tail.prev; + for (int i = 0, num = size-index; i < num; ++i) { + cursor = cursor.prev; + } + } + cursor.next = cursor.next.prev = new Node(e, cursor, cursor.next); + ++size; + } + + public E get(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(Integer.toString(index)); + } + Node cursor; + if (index < size/2) { + cursor = head.next; + for (int i = 0; i < index; ++i) { + cursor = cursor.next; + } + } else { + cursor = tail.prev; + for (int i = 0, num = size-index-1; i < num; ++i) { + cursor = cursor.prev; + } + } + return cursor.data; + } + + public E remove(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(Integer.toString(index)); + } + Node cursor; + if (index < size/2) { + cursor = head.next; + for (int i = 0; i < index; ++i) { + cursor = cursor.next; + } + } else { + cursor = tail.prev; + for (int i = 0, num = size-index-1; i < num; ++i) { + cursor = cursor.prev; + } + } + cursor.prev.next = cursor.next; + cursor.next.prev = cursor.prev; + --size; + return cursor.data; + } + + public int size() { + return size; + } + + public boolean isEmpty() { + return size == 0; + } + + public void addFirst(E e) { + add(0, e); + } + + public void addLast(E e) { + add(size, e); + } + + public E removeFirst() { + return remove(0); + } + + public E removeLast() { + return remove(size-1); + } + + public void clear() { + while (!isEmpty()) { + removeFirst(); + } + } + + public boolean contains(E e) { + Iterator it = this.iterator(); + while (it.hasNext()) { + if (it.next() == e) { + return true; + } + } + return false; + } + + public E[] toArray() { + return null; + } + + public Iterator iterator() { + return new LinkedListIterator(); + } + + private static class Node { + E data = null; + Node prev = null; + Node next = null; + + public Node() { + } + + public Node(E e, Node p, Node n) { + data = e; + prev = p; + next = n; + } + } + + private class LinkedListIterator implements Iterator { + Node currentNode = head.next; + + public boolean hasNext() { + return currentNode != tail; + } + + public E next() { + if (!hasNext()) { + throw new java.util.NoSuchElementException(); + } + E data = currentNode.data; + currentNode = currentNode.next; + return data; + } + + public void remove() { + if (!hasNext()) { + throw new java.util.NoSuchElementException(); + } + Node nextNode = currentNode.next; + currentNode.next.prev = currentNode.prev; + currentNode.prev.next = currentNode.next; + currentNode = nextNode; + --size; + } + } +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/List.java b/group08/729770920/3-5/src/com/datastructures/basic/List.java new file mode 100644 index 0000000000..1fa1b604f9 --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/List.java @@ -0,0 +1,21 @@ +package com.datastructures.basic; + +public interface List { + void add(E e); + + void add(int index, E e); + + void clear(); + + E get(int index); + + E remove(int index); + + int size(); + + boolean contains(E e); + + Iterator iterator(); + + E[] toArray(); +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/Queue.java b/group08/729770920/3-5/src/com/datastructures/basic/Queue.java new file mode 100644 index 0000000000..f5c00f6a3d --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/Queue.java @@ -0,0 +1,21 @@ +package com.datastructures.basic; + +public class Queue { + private LinkedList data = new LinkedList<>(); + + public void enQueue(E e){ + data.addFirst(e); + } + + public E deQueue() { + return data.removeLast(); + } + + public boolean isEmpty() { + return data.size() == 0; + } + + public int size(){ + return data.size(); + } +} diff --git a/group08/729770920/3-5/src/com/datastructures/basic/Stack.java b/group08/729770920/3-5/src/com/datastructures/basic/Stack.java new file mode 100644 index 0000000000..d790ffc3b5 --- /dev/null +++ b/group08/729770920/3-5/src/com/datastructures/basic/Stack.java @@ -0,0 +1,25 @@ +package com.datastructures.basic; + +public class Stack { + private LinkedList data = new LinkedList<>(); + + public void push(E e) { + data.addFirst(e); + } + + public E pop() { + return data.removeFirst(); + } + + public E peek() { + return data.get(0); + } + + public boolean isEmpty() { + return data.size() == 0; + } + + public int size() { + return data.size(); + } +} diff --git a/group08/729770920/3-5/src/com/litestruts/Struts.java b/group08/729770920/3-5/src/com/litestruts/Struts.java new file mode 100644 index 0000000000..25a7581d6c --- /dev/null +++ b/group08/729770920/3-5/src/com/litestruts/Struts.java @@ -0,0 +1,218 @@ +package com.litestruts; + +import com.view.View; +import org.w3c.dom.*; +import org.xml.sax.SAXException; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import java.io.File; +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; +import java.util.NoSuchElementException; + +public class Struts { + + @SuppressWarnings("TryWithIdenticalCatches") + private static Document init() { + try { + File file = new File("res/struts.xml"); + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + return db.parse(file); + } catch (ParserConfigurationException e) { + e.printStackTrace(); + } catch (SAXException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + private static Element findStrutsElement(Document document) { + NodeList nodeList = document.getElementsByTagName("struts"); + if (nodeList.getLength() == 0) { + throw new NoSuchElementException("No tag named struts"); + } + return (Element) nodeList.item(0); + } + + private static Element findElementByName(String actionName) { + Document d = init(); + Element element = findStrutsElement(d); + NodeList nodeList = element.getElementsByTagName("action"); + if (nodeList.getLength() == 0) { + throw new NoSuchElementException("No tag named action"); + } + for (int i = 0; i < nodeList.getLength(); ++i) { + Element e = (Element) nodeList.item(i); + String tmp = e.getAttribute("name"); + if (tmp.equals(actionName)) { + return e; + } + } + return null; + } + + private static String findClassNameByElement(Element actionElement) { + return actionElement.getAttribute("class"); + } + + private static Class findClassByName(String actionClassName) { + try { + return Class.forName(actionClassName); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + return null; + } + + @SuppressWarnings("unchecked TryWithIdenticalCatches") + private static Object createActionObject(Class actionClass) { + try { + Constructor actionClassConstructor = actionClass.getConstructor(); + return actionClassConstructor.newInstance(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + private static String capitalize(String s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + + @SuppressWarnings("unchecked") + private static Method findSetterFromClass(String setterName, Class actionClass) { + try { + Class[] paramTypes = {String.class}; + return actionClass.getDeclaredMethod("set" + capitalize(setterName), paramTypes); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } + return null; + } + + @SuppressWarnings("TryWithIdenticalCatches") + private static void invokeSetter(Object o, Method setter, String param) { + try { + setter.invoke(o, param); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + } + + private static void invokeSetters(Object o, Class c, Map p) { + for (Map.Entry pair : p.entrySet()) { + Method setter = findSetterFromClass(pair.getKey(), c); + invokeSetter(o, setter, pair.getValue()); + } + } + + @SuppressWarnings("unchecked TryWithIdenticalCatches") + private static String invokeExecute(Object o, Class c) { + try { + Method execute = c.getDeclaredMethod("execute"); + return (String) execute.invoke(o); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + return ""; + } + + @SuppressWarnings("TryWithIdenticalCatches") + private static String invokeGetter(Object o, Method getter) { + try { + return (String) getter.invoke(o); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + private static Map invokeGetters(Object o, Class c) { + Map map = new HashMap<>(); + for (Method method : c.getDeclaredMethods()) { + String s = method.getName(); + if (s.substring(0, 3).equals("get")) { + String dataMember = s.substring(3).toLowerCase(); + map.put(dataMember, invokeGetter(o, method)); + } + } + return map; + } + + private static String findJspByResult(String result, Element actionElement) { + NodeList nodeList = actionElement.getElementsByTagName("result"); + for (int i = 0; i < nodeList.getLength(); ++i) { + Element element = (Element) nodeList.item(i); + if (element.getAttribute("name").equals(result)) { + return element.getTextContent(); + } + } + return ""; + } + + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xecute 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + Element actionElement = findElementByName(actionName); + String actionClassName = findClassNameByElement(actionElement); + Class actionClass = findClassByName(actionClassName); + + Object actionObject = createActionObject(actionClass); + + invokeSetters(actionObject, actionClass, parameters); + + String result = invokeExecute(actionObject, actionClass); + + Map viewParams = invokeGetters(actionObject, actionClass); + + View view = new View(); + view.setParameters(viewParams); + view.setJsp(findJspByResult(result, actionElement)); + + return view; + } + +} diff --git a/group08/729770920/3-5/src/com/litestruts/StrutsTest.java b/group08/729770920/3-5/src/com/litestruts/StrutsTest.java new file mode 100644 index 0000000000..bf52a7d8f8 --- /dev/null +++ b/group08/729770920/3-5/src/com/litestruts/StrutsTest.java @@ -0,0 +1,41 @@ +package com.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import com.view.View; +import org.junit.Assert; +import org.junit.Test; + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap<>(); + params.put("name", "test"); + params.put("password", "1234"); + + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successfully", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap<>(); + params.put("name", "test"); + params.put("password", "123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } + +} diff --git a/group08/729770920/3-5/src/com/view/View.java b/group08/729770920/3-5/src/com/view/View.java new file mode 100644 index 0000000000..6dff615933 --- /dev/null +++ b/group08/729770920/3-5/src/com/view/View.java @@ -0,0 +1,26 @@ +package com.view; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + + public Map getParameters() { + return parameters; + } + + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} From 6ca0cd9efb553b9ed66f87a9d58c8158725166db Mon Sep 17 00:00:00 2001 From: vvvandbb Date: Sun, 5 Mar 2017 11:31:31 +0800 Subject: [PATCH 095/646] add 3-5 --- group08/649859235/3-5/articleurl.md | 2 + .../3-5/code/com/vvv/array/ArrayUtil.java | 258 ++++++++++++++++++ .../3-5/code/com/vvv/array/ArrayUtilTest.java | 85 ++++++ .../code/com/vvv/litestruts/LoginAction.java | 40 +++ .../3-5/code/com/vvv/litestruts/Struts.java | 114 ++++++++ .../code/com/vvv/litestruts/StrutsTest.java | 43 +++ .../3-5/code/com/vvv/litestruts/View.java | 23 ++ .../3-5/code/com/vvv/litestruts/struts.xml | 11 + 8 files changed, 576 insertions(+) create mode 100644 group08/649859235/3-5/articleurl.md create mode 100644 group08/649859235/3-5/code/com/vvv/array/ArrayUtil.java create mode 100644 group08/649859235/3-5/code/com/vvv/array/ArrayUtilTest.java create mode 100644 group08/649859235/3-5/code/com/vvv/litestruts/LoginAction.java create mode 100644 group08/649859235/3-5/code/com/vvv/litestruts/Struts.java create mode 100644 group08/649859235/3-5/code/com/vvv/litestruts/StrutsTest.java create mode 100644 group08/649859235/3-5/code/com/vvv/litestruts/View.java create mode 100644 group08/649859235/3-5/code/com/vvv/litestruts/struts.xml diff --git a/group08/649859235/3-5/articleurl.md b/group08/649859235/3-5/articleurl.md new file mode 100644 index 0000000000..0aa3deeddf --- /dev/null +++ b/group08/649859235/3-5/articleurl.md @@ -0,0 +1,2 @@ +3-5鏂囩珷鍦板潃 +http://note.youdao.com/noteshare?id=1ad407f0dec5587138d9af273e491bca&sub=468E975854CE4B8F8CEF4D564E21842F diff --git a/group08/649859235/3-5/code/com/vvv/array/ArrayUtil.java b/group08/649859235/3-5/code/com/vvv/array/ArrayUtil.java new file mode 100644 index 0000000000..ef42eba50b --- /dev/null +++ b/group08/649859235/3-5/code/com/vvv/array/ArrayUtil.java @@ -0,0 +1,258 @@ +package com.vvv.array; + +import java.util.ArrayList; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = + * [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public static void reverseArray(int[] origin) { + if (origin == null) { + return; + } + + int len = origin.length; + for (int i = 0; i < len / 2; i++) { + swap(origin, i, len - i-1); + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + public static int[] removeZero(int[] oldArray) { + if (oldArray != null) { + int[] a = new int[oldArray.length]; + int len = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + a[len] = oldArray[i]; + len++; + } + } + + if (len > 0) { + int[] newArray = new int[len]; + System.arraycopy(a, 0, newArray, 0, len); + return newArray; + } + } + + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = + * [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + public static int[] merge(int[] array1, int[] array2) { + if (array1 != null && array2 == null) { + return array1; + } + + if (array1 == null && array2 != null) { + return array2; + } + + int[] newArray = new int[array1.length + array2.length]; + System.arraycopy(array1, 0, newArray, 0, array1.length); + System.arraycopy(array2, 0, newArray, array1.length, array2.length); + bubbleSort(newArray); + // selectSort(newArray); + return newArray; + } + + private static void bubbleSort(int[] arr) { + for (int i = 0; i < arr.length; i++) { + for (int j = 0; j < arr.length - 1 - i; j++) { + if (arr[j] > arr[j + 1]) { + swap(arr, j, j + 1); + } + } + } + } + +// private static void selectSort(int[] arr) { +// for (int i = 0; i < arr.length; i++) { +// for (int j = i; j < arr.length; j++) { +// if (arr[i] > arr[j]) { +// swap(arr, i, j); +// } +// } +// } +// } + + private static void swap(int array[], int i, int j) { + int temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public static int[] grow(int[] oldArray, int size) { + if (oldArray == null) { + if (size > 0) { + return new int[size]; + } + return null; + } + + if (size <= 0) { + return oldArray; + } + + int[] a = new int[oldArray.length + size]; + System.arraycopy(oldArray, 0, a, 0, oldArray.length); + return a; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 渚嬪锛 max = 15 , + * 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public static int[] fibonacci(int max) { + if (max < 2) + return null; + int index = 2; + ArrayList list = new ArrayList(); + boolean isEnd = false; + list.add(1); + list.add(1); + while (!isEnd) { + int value = list.get(index - 1) + list.get(index - 2); + if (value >= max) { + isEnd = true; + break; + } + list.add(value); + + index++; + } + + return list2Array(list); + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public static int[] getPrimes(int max) { + ArrayList list = new ArrayList(); + int num = 2; + boolean isEnd = false; + while (!isEnd) { + if (num < max) { + if (isPrimeNumber(num)) { + list.add(num); + } + } else { + isEnd = true; + } + num++; + } + + return list2Array(list); + } + + private static int[] list2Array(ArrayList list) { + if (list == null) + return null; + + int[] a = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + a[i] = list.get(i); + } + return a; + } + + public static boolean isPrimeNumber(int num) { + if (num < 2) { + return false; + } + for (int i = 2; i <= Math.sqrt(num); i++) { + if (num % i == 0) { + return false; + } + } + return true; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public static int[] getPerfectNumbers(int max) { + int num = 1; + ArrayList list = new ArrayList(); + boolean isEnd = false; + while (!isEnd) { + if (num < max) { + if (isPerfectNumber(num)) { + list.add(num); + } + } else { + isEnd = true; + } + num++; + } + return list2Array(list); + } + + private static boolean isPerfectNumber(int num) { + int sum = 0; + for (int i = 1; i < num; i++) { + if (num % i == 0) + sum += i; + } + return sum == num; + } + + /** + * 鐢╯eparator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], separator = "-" 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param s + * @return + */ + public static String join(int[] array, String separator) { + if (array != null && array.length>0 && separator != null) { + String str = ""; + for (int i = 0; i < array.length-1; i++) { + str += array[i] + separator; + } + str += array[array.length-1]; + return str; + } + + return null; + } + +} diff --git a/group08/649859235/3-5/code/com/vvv/array/ArrayUtilTest.java b/group08/649859235/3-5/code/com/vvv/array/ArrayUtilTest.java new file mode 100644 index 0000000000..854f896b08 --- /dev/null +++ b/group08/649859235/3-5/code/com/vvv/array/ArrayUtilTest.java @@ -0,0 +1,85 @@ +package com.vvv.array; + +import org.junit.Test; + +public class ArrayUtilTest { +// private int[] arr1 = {}; + private int[] arr2 = {0}; + private int[] arr3 = {1,5,6,7}; + private int[] arr4 = {3,4,5,6,7,8}; + private int[] arrf = {1,-1,0,-2,0,3,-5,8,13}; + + @Test + public void reverseArrayTest(){ + int[] arr = {1,2,1,1,3,4,5,5,4,7,6,7,0,5}; + printArray(arr); + ArrayUtil.reverseArray(arr); + printArray(arr); + } + + @Test + public void removeZeroTest(){ + int[] oldArr={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + oldArr = arrf; + printArray(oldArr); + int[] arr = ArrayUtil.removeZero(oldArr); + printArray(arr); + } + + @Test + public void mergeTest(){ + printArray(arr3); + printArray(arrf); + int[] a = ArrayUtil.merge(arr3, arrf); + printArray(a); + } + + @Test + public void growTest(){ + int len = 5; + int[] retArr = ArrayUtil.grow(arr2, len); + printArray(arr2); + printArray(retArr); + } + + @Test + public void fibonacciTest(){ + int max = 15; + + int[] retArr = ArrayUtil.fibonacci(max); + printArray(retArr); + } + + @Test + public void getPrimesTest(){ + int max = 25; + int[] arr = ArrayUtil.getPrimes(max); + printArray(arr); + } + + @Test + public void getPerfectNumbersTest(){ + int max = 50000; + int[] arr =ArrayUtil.getPerfectNumbers(max); + printArray(arr); + } + + @Test + public void joinTest(){ + String separator = "@"; + System.out.println(ArrayUtil.join(arr4,separator)); + } + + private void printArray(int[] arr){ + if(arr==null) { + System.out.println("array null"); + return; + } + System.out.print("{"); + for(int i=0; i parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + File file = new File("src/com/vvv/litestruts/struts.xml"); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder; + try { + dBuilder = dbFactory.newDocumentBuilder(); + Document doc = (Document) dBuilder.parse(file); + doc.getDocumentElement().normalize(); + NodeList nodeList = doc.getElementsByTagName("action"); + + int nodeLen = nodeList.getLength(); + for (int i = 0; i < nodeLen; i++) { + Element element = (Element) nodeList.item(i); + if (element.getAttribute("name").contentEquals(actionName)) { + Class c = Class.forName(element.getAttribute("class").replace("action", "litestruts")); + Object obj = c.getConstructor().newInstance(); + + Method setName = c.getMethod("setName", String.class); + Method setPwd = c.getMethod("setPassword", String.class); + c.getMethod("getName"); + c.getMethod("getPassword"); + Method getMsg = c.getMethod("getMessage"); + Method execute = c.getMethod("execute"); + + setName.invoke(obj, parameters.get("name")); + setPwd.invoke(obj, parameters.get("password")); + String result = (String)execute.invoke(obj); + String message = (String)getMsg.invoke(obj); + + NodeList resultList = element.getElementsByTagName("result"); + for (int j = 0; j < resultList.getLength(); j++) { + Element resultE = (Element)resultList.item(j); + if (resultE.getAttribute("name").contentEquals(result)) { + HashMap params = new HashMap(); + View retView = new View(); + retView.setJsp(resultE.getTextContent()); + params.put("message", message); + retView.setParameters(params); + + return retView; + } + } + + break; + } + } + + } catch (ParserConfigurationException e) { + e.printStackTrace(); + } catch (SAXException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (SecurityException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (InstantiationException e) { + e.printStackTrace(); + } + + return null; + } + +} diff --git a/group08/649859235/3-5/code/com/vvv/litestruts/StrutsTest.java b/group08/649859235/3-5/code/com/vvv/litestruts/StrutsTest.java new file mode 100644 index 0000000000..f361035326 --- /dev/null +++ b/group08/649859235/3-5/code/com/vvv/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.vvv.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/649859235/3-5/code/com/vvv/litestruts/View.java b/group08/649859235/3-5/code/com/vvv/litestruts/View.java new file mode 100644 index 0000000000..d224a96767 --- /dev/null +++ b/group08/649859235/3-5/code/com/vvv/litestruts/View.java @@ -0,0 +1,23 @@ +package com.vvv.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/649859235/3-5/code/com/vvv/litestruts/struts.xml b/group08/649859235/3-5/code/com/vvv/litestruts/struts.xml new file mode 100644 index 0000000000..d24678bf93 --- /dev/null +++ b/group08/649859235/3-5/code/com/vvv/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 51b29654aabc083bdc554f5f2e75acd164bca257 Mon Sep 17 00:00:00 2001 From: guodongym Date: Sun, 5 Mar 2017 12:45:43 +0800 Subject: [PATCH 096/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/zhaogd/litestruts/struts.xml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml deleted file mode 100644 index a6cfe43e6c..0000000000 --- a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/struts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /jsp/homepage.jsp - /jsp/showLogin.jsp - - - /jsp/welcome.jsp - /jsp/error.jsp - - \ No newline at end of file From 75d687506ce3c332473aeab42ce6c8f740ac7dd8 Mon Sep 17 00:00:00 2001 From: guodongym Date: Sun, 5 Mar 2017 12:46:16 +0800 Subject: [PATCH 097/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group12/377401843/learning/pom.xml | 7 ++ .../main/java/com/zhaogd/array/ArrayUtil.java | 95 +++++++++++++++---- .../com/zhaogd/litestruts/LoginAction.java | 57 +++++------ .../java/com/zhaogd/litestruts/Struts.java | 93 +++++++++++++----- .../com/zhaogd/litestruts/StrutsTest.java | 4 +- .../main/java/com/zhaogd/litestruts/View.java | 11 ++- .../learning/src/main/resources/struts.xml | 11 +++ .../java/com/zhaogd/array/ArrayUtilTest.java | 62 ++++++++++++ 8 files changed, 264 insertions(+), 76 deletions(-) create mode 100644 group12/377401843/learning/src/main/resources/struts.xml create mode 100644 group12/377401843/learning/src/test/java/com/zhaogd/array/ArrayUtilTest.java diff --git a/group12/377401843/learning/pom.xml b/group12/377401843/learning/pom.xml index 1d11205656..f252611284 100644 --- a/group12/377401843/learning/pom.xml +++ b/group12/377401843/learning/pom.xml @@ -13,6 +13,13 @@ junit 4.12 + + + dom4j + dom4j + 1.6.1 + + diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java b/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java index f62f0eceef..64596aa807 100644 --- a/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java +++ b/group12/377401843/learning/src/main/java/com/zhaogd/array/ArrayUtil.java @@ -1,8 +1,7 @@ package com.zhaogd.array; -import java.util.ArrayList; import java.util.Arrays; - +import java.util.HashSet; public class ArrayUtil { @@ -13,13 +12,12 @@ public class ArrayUtil { * @param origin * @return */ - public static void reverseArray(int[] origin) { + public void reverseArray(int[] origin) { for (int i = 0; i < origin.length / 2; i++) { int tmp = origin[i]; origin[i] = origin[origin.length - 1 - i]; origin[origin.length - 1 - i] = tmp; } - System.out.println(Arrays.toString(origin)); } /** @@ -29,14 +27,16 @@ public static void reverseArray(int[] origin) { * @param oldArray * @return */ - public Integer[] removeZero(int[] oldArray) { - ArrayList arrayList = new ArrayList(); + public int[] removeZero(int[] oldArray) { + int[] newArr = new int[oldArray.length]; + int z = 0; for (int i : oldArray) { if (i != 0) { - arrayList.add(i); + newArr[z] = i; + z++; } } - return arrayList.toArray(new Integer[arrayList.size()]); + return Arrays.copyOf(newArr, z); } /** @@ -48,12 +48,21 @@ public Integer[] removeZero(int[] oldArray) { * @return */ public int[] merge(int[] array1, int[] array2) { - int[] array3 = new int[array1.length + array2.length]; - - System.arraycopy(array1, 0, array3, 0, array1.length); - System.arraycopy(array2, 0, array3, array1.length, array2.length); - + HashSet set = new HashSet<>(); + for (Integer i : array1) { + set.add(i); + } + for (Integer i : array2) { + set.add(i); + } + int[] array3 = new int[set.size()]; + int i = 0; + for (int s : set) { + array3[i] = s; + i++; + } Arrays.sort(array3); + return array3; } @@ -67,7 +76,7 @@ public int[] merge(int[] array1, int[] array2) { * @return */ public int[] grow(int[] oldArray, int size) { - return null; + return Arrays.copyOf(oldArray, oldArray.length + size); } /** @@ -78,7 +87,23 @@ public int[] grow(int[] oldArray, int size) { * @return */ public int[] fibonacci(int max) { - return null; + if (max == 1) { + return new int[] {}; + } + int a = 1; + int b = 1; + int count = 2; + for (int i = 1; i < max; i = a + b) { + a = b; + b = i; + count++; + } + int[] array = new int[count-1]; + array[0] = array[1] = 1; + for (int i = 2; i < array.length; i++) { + array[i] = array[i - 2] + array[i - 1]; + } + return array; } /** @@ -88,7 +113,22 @@ public int[] fibonacci(int max) { * @return */ public int[] getPrimes(int max) { - return null; + int[] array = new int[max]; + int z = 0; + for (int i = 2; i < max; i++) { + boolean flag = true; + for (int j = 2; j <= Math.sqrt(i); j++) { + if (i % j == 0) { //濡傛灉鍙栨ā涓0锛屽垯涓哄悎鏁 + flag = false; + break; + } + } + if (flag) { + array[z] = i; + z++; + } + } + return Arrays.copyOf(array, z); } /** @@ -98,7 +138,22 @@ public int[] getPrimes(int max) { * @return */ public int[] getPerfectNumbers(int max) { - return null; + int[] array = new int[max]; + int z = 0; + for (int i = 0; i < max; i++) { + int tmp = 0; + for (int j = 1; j < i / 2 + 1; j++) { + if (i % j == 0) { + tmp += j; + } + } + if (tmp == i) { + array[z] = tmp; + z++; + } + } + + return Arrays.copyOf(array, z); } /** @@ -109,6 +164,10 @@ public int[] getPerfectNumbers(int max) { * @return */ public String join(int[] array, String seperator) { - return null; + String s = ""; + for (int i = 0; i < array.length; i++) { + s += array[i] + seperator; + } + return s.substring(0, s.length() - 1); } } diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java index 17edaa63b1..9011030c54 100644 --- a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/LoginAction.java @@ -2,38 +2,41 @@ /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * * @author liuxin * */ -public class LoginAction{ - private String name ; - private String password; - private String message; +public class LoginAction { + private String name; + private String password; + private String message; - public String getName() { - return name; - } + public String getName() { + return name; + } - public String getPassword() { - return password; - } + public String getPassword() { + return password; + } - public String execute(){ - if("test".equals(name) && "1234".equals(password)){ - this.message = "login successful"; - return "success"; - } - this.message = "login failed,please check your user/pwd"; - return "fail"; - } + public String execute() { + if ("test".equals(name) && "1234".equals(password)) { + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } - public void setName(String name){ - this.name = name; - } - public void setPassword(String password){ - this.password = password; - } - public String getMessage(){ - return this.message; - } + public void setName(String name) { + this.name = name; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getMessage() { + return this.message; + } } diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java index fa2f5eea7c..f9c8afc214 100644 --- a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/Struts.java @@ -1,34 +1,77 @@ package com.zhaogd.litestruts; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; - +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; public class Struts { - public static View runAction(String actionName, Map parameters) { - - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters - - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - */ - - return null; - } + @SuppressWarnings("unchecked") + public static View runAction(String actionName, Map parameters) throws Exception { + + SAXReader reader = new SAXReader(); + Document document = reader.read(Struts.class.getResourceAsStream("/struts.xml")); + Element rootElement = document.getRootElement(); + List elements = rootElement.elements("action"); + + HashMap hashMap = new HashMap(); + for (Element element : elements) { + String name = element.attributeValue("name"); + if (name != null && !"".equals(name) && actionName.equals(name)) { + hashMap.put("actionName", name); + hashMap.put("class", element.attributeValue("class")); + List resultElements = element.elements("result"); + for (Element resultElement : resultElements) { + hashMap.put(resultElement.attributeValue("name"), (String) resultElement.getData()); + } + break; + } + } + + Class c = Class.forName(hashMap.get("class")); + Object o = c.newInstance(); + Set> entrySet = parameters.entrySet(); + for (Entry parameter : entrySet) { + Method method = o.getClass().getMethod("set" + parameter.getKey().substring(0, 1).toUpperCase() + + parameter.getKey().substring(1).toLowerCase(), String.class); + method.invoke(o, parameter.getValue()); + } + + Method exectue = o.getClass().getMethod("execute"); + String invoke = (String) exectue.invoke(o); + + View view = new View(); + view.setJsp(hashMap.get(invoke)); + HashMap p = new HashMap(); + p.put("message", (String) o.getClass().getMethod("getMessage").invoke(o)); + view.setParameters(p); + + /* + * + * 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + * + * 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , + * "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + * + * 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + * + * 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 + * {"message": "鐧诲綍鎴愬姛"} , 鏀惧埌View瀵硅薄鐨刾arameters + * + * 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + * 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + * + */ + + return view; + } } diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java index 41e8313502..1a213157f3 100644 --- a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/StrutsTest.java @@ -13,7 +13,7 @@ public class StrutsTest { @Test - public void testLoginActionSuccess() { + public void testLoginActionSuccess() throws Exception { String actionName = "login"; @@ -29,7 +29,7 @@ public void testLoginActionSuccess() { } @Test - public void testLoginActionFailed() { + public void testLoginActionFailed() throws Exception { String actionName = "login"; Map params = new HashMap(); params.put("name","test"); diff --git a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java index a790924f7d..f5a451e7fc 100644 --- a/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java +++ b/group12/377401843/learning/src/main/java/com/zhaogd/litestruts/View.java @@ -4,19 +4,22 @@ public class View { private String jsp; - private Map parameters; - + private Map parameters; + public String getJsp() { return jsp; } + public View setJsp(String jsp) { this.jsp = jsp; return this; } - public Map getParameters() { + + public Map getParameters() { return parameters; } - public View setParameters(Map parameters) { + + public View setParameters(Map parameters) { this.parameters = parameters; return this; } diff --git a/group12/377401843/learning/src/main/resources/struts.xml b/group12/377401843/learning/src/main/resources/struts.xml new file mode 100644 index 0000000000..8e318d5de1 --- /dev/null +++ b/group12/377401843/learning/src/main/resources/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/377401843/learning/src/test/java/com/zhaogd/array/ArrayUtilTest.java b/group12/377401843/learning/src/test/java/com/zhaogd/array/ArrayUtilTest.java new file mode 100644 index 0000000000..f08eab4b3e --- /dev/null +++ b/group12/377401843/learning/src/test/java/com/zhaogd/array/ArrayUtilTest.java @@ -0,0 +1,62 @@ +package com.zhaogd.array; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ArrayUtilTest { + private ArrayUtil arrayUtil = null; + + @Before + public void setUp() throws Exception { + arrayUtil = new ArrayUtil(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testReverseArray() { + int[] origin = new int[] { 7, 9, 30, 3 }; + arrayUtil.reverseArray(origin); + assertArrayEquals(origin, new int[] { 3, 30, 9, 7 }); + } + + @Test + public void testRemoveZero() { + int oldArr[] = { 1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5 }; + int[] newArr = arrayUtil.removeZero(oldArr); + assertArrayEquals(newArr, new int[] { 1, 3, 4, 5, 6, 6, 5, 4, 7, 6, 7, 5 }); + } + + @Test + public void testMerge() { + int arr1[] = { 3, 5, 7, 8 }; + int arr2[] = { 4, 5, 6, 7 }; + int[] arr3 = arrayUtil.merge(arr1, arr2); + + assertArrayEquals(arr3, new int[] { 3, 4, 5, 6, 7, 8 }); + } + + @Test + public void testGrow() { + int[] arr = { 2, 3, 6 }; + int[] newArr = arrayUtil.grow(arr, 3); + assertArrayEquals(newArr, new int[] { 2, 3, 6, 0, 0, 0 }); + } + + @Test + public void testFibonacci() { + assertArrayEquals(new int[] {}, arrayUtil.fibonacci(1)); + assertArrayEquals(new int[] { 1, 1, 2, 3, 5, 8, 13 }, arrayUtil.fibonacci(15)); + } + + @Test + public void testGetPrimes() { + assertArrayEquals(new int[] { 2, 3, 5, 7, 11, 13, 17, 19 }, arrayUtil.getPrimes(23)); + } + +} From eac15330f716857372e7e0760a872330f39f6063 Mon Sep 17 00:00:00 2001 From: bate999999999 <282742732@qq.com> Date: Sun, 5 Mar 2017 13:00:55 +0800 Subject: [PATCH 098/646] commit --- .gitignore | 25 +++++++++++++++++++++++++ .gitignore.bak | 16 ++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .gitignore.bak diff --git a/.gitignore b/.gitignore index ec55baf87d..ccd4cbfe60 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,28 @@ hs_err_pid* #ide config .metadata .recommenders + + +*.xml +*.iml +.idea +*.iml +rebel.xml +rebel-remote.xml + +.classpath +.project +.setting +.metadata + +target +*.class + +log +*.log +tmp +*.tmp + +.metadata +RemoteSystemsTempFiles +.gitignore \ No newline at end of file diff --git a/.gitignore.bak b/.gitignore.bak new file mode 100644 index 0000000000..ec55baf87d --- /dev/null +++ b/.gitignore.bak @@ -0,0 +1,16 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +#ide config +.metadata +.recommenders From 5bf4816ff71900e61dde567257e25c7dcab23743 Mon Sep 17 00:00:00 2001 From: sheng <1158154002@qq.com> Date: Sun, 5 Mar 2017 18:42:39 +0800 Subject: [PATCH 099/646] 1158154002 test02 --- .../src/test02/array/ArrayUtil.java | 241 ++++++++++++++++++ .../src/test02/litestruts/Action.java | 22 ++ .../src/test02/litestruts/LoginAction.java | 39 +++ .../src/test02/litestruts/Struts.java | 60 +++++ .../src/test02/litestruts/StrutsTest.java | 39 +++ .../src/test02/litestruts/View.java | 23 ++ .../src/test02/litestruts/sax/SAXParser.java | 221 ++++++++++++++++ .../test02/litestruts/sax/SAXParserDemo.java | 76 ++++++ .../litestruts/sax/SAXParserHandler.java | 13 + .../src/test02/litestruts/struts.xml | 11 + .../test02/litestruts/util/StringUtil.java | 13 + 11 files changed, 758 insertions(+) create mode 100644 group17/1158154002/src/test02/array/ArrayUtil.java create mode 100644 group17/1158154002/src/test02/litestruts/Action.java create mode 100644 group17/1158154002/src/test02/litestruts/LoginAction.java create mode 100644 group17/1158154002/src/test02/litestruts/Struts.java create mode 100644 group17/1158154002/src/test02/litestruts/StrutsTest.java create mode 100644 group17/1158154002/src/test02/litestruts/View.java create mode 100644 group17/1158154002/src/test02/litestruts/sax/SAXParser.java create mode 100644 group17/1158154002/src/test02/litestruts/sax/SAXParserDemo.java create mode 100644 group17/1158154002/src/test02/litestruts/sax/SAXParserHandler.java create mode 100644 group17/1158154002/src/test02/litestruts/struts.xml create mode 100644 group17/1158154002/src/test02/litestruts/util/StringUtil.java diff --git a/group17/1158154002/src/test02/array/ArrayUtil.java b/group17/1158154002/src/test02/array/ArrayUtil.java new file mode 100644 index 0000000000..1757a08958 --- /dev/null +++ b/group17/1158154002/src/test02/array/ArrayUtil.java @@ -0,0 +1,241 @@ +package test02.array; + +import java.util.ArrayList; +import java.util.Arrays; + +import com.sun.javafx.image.impl.IntArgb; + +public class ArrayUtil { + + public static void main(String[] args) { +// int[] arr={7, 9, 30, 3, 4}; +// reverseArray(arr); + +// int[] oldArr={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; +// removeZero(oldArr); + +// int[] a1={3, 5, 7,8}; +// int[] a2={4, 5, 6,7}; +// merge(a1,a2); + +// int[] a1={3, 5, 7,8}; +// grow(a1, 3); + +// fibonacci(15); + +// getPrimes(23); + +// getPerfectNumbers(4000); + + int[] a={1,2,3,4}; + join(a, "-"); + } + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public static void reverseArray(int[] origin){ + int[] newArr=new int[origin.length]; + int j=0; + for (int i = origin.length-1; i >=0; i--) { + newArr[j++]=origin[i]; + } + System.out.println(Arrays.toString(newArr)); + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public static int[] removeZero(int[] oldArray){ + ArrayList list=new ArrayList<>(); + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i]!=0) { + list.add(oldArray[i]); + } + } + + int[] newArr=new int[list.size()]; + int j=0; + for (int i : list) { + newArr[j++]=i; + } + System.out.println(Arrays.toString(newArr)); + return newArr; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public static int[] merge(int[] array1, int[] array2){ + ArrayList list=new ArrayList<>(); + for (Integer arr1 : array1) { + list.add(arr1); + } + + for (Integer arr2 : array2) { + if (!list.contains(arr2)) { + list.add(arr2); + } + } + + int[] newArr=new int[list.size()]; + int i=0; + for (int one : list) { + newArr[i++]=one; + } + + for (int j = 0; j < newArr.length-1; j++) { + for (int k = 0; k < newArr.length-1-j; k++) { + + if (newArr[k]>newArr[k+1]) { + int temp=newArr[k]; + newArr[k]=newArr[k+1]; + newArr[k+1]=temp; + } + } + } + System.out.println(Arrays.toString(newArr)); + return newArr; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public static int[] grow(int [] oldArray, int size){ + int[] newArr=new int[oldArray.length+size]; + System.arraycopy(oldArray, 0, newArr, 0, oldArray.length); + System.out.println(Arrays.toString(newArr)); + return newArr; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public static int[] fibonacci(int max){ + if (max>1) { + ArrayList list=new ArrayList<>(); + list.add(1); + list.add(1); + while (list.get(list.size()-1) list = new ArrayList<>(); + + for (int i = 2; i < max; i++) { + int j = 2; + while (j < i) { +// System.out.println("i:"+i+",j:"+j+",i%j:"+(i%j)); + if (i%j==0) { + break; + } + j++; + } + if (j==i) { + list.add(i); + } + } + + int[] newArr = new int[list.size()]; + int i = 0; + for (int item : list) { + newArr[i++] = item; + } + System.out.println(Arrays.toString(newArr)); + + return newArr; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public static int[] getPerfectNumbers(int max){ + ArrayList list = new ArrayList<>(); + for (int i = 1; i < max; i++) { + int j = 1; + int sum=0; + while (j < i) { +// System.out.println("i:"+i+",j:"+j+",i%j:"+(i%j)); + if (i%j==0) { + sum=sum+j; + } + j++; + } + + if (sum==i) { + list.add(i); + } + } + + int[] newArr = new int[list.size()]; + int i = 0; + for (int item : list) { + newArr[i++] = item; + } + System.out.println(Arrays.toString(newArr)); + + return newArr; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public static String join(int[] array, String seperator){ + String result=Arrays.toString(array).replace(" ", "").replace("[", "").replace("]", "").replace(",", seperator); + System.out.println(result); + return result; + } +} diff --git a/group17/1158154002/src/test02/litestruts/Action.java b/group17/1158154002/src/test02/litestruts/Action.java new file mode 100644 index 0000000000..d7a88fac57 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/Action.java @@ -0,0 +1,22 @@ +package test02.litestruts; + +import java.util.HashMap; + +public class Action { + String className; + HashMap resultJspMap; + + public String getClassName() { + return className; + } + public void setClassName(String className) { + this.className = className; + } + public HashMap getResultJspMap() { + return resultJspMap; + } + public void setResultJspMap(HashMap resultJspMap) { + this.resultJspMap = resultJspMap; + } + +} diff --git a/group17/1158154002/src/test02/litestruts/LoginAction.java b/group17/1158154002/src/test02/litestruts/LoginAction.java new file mode 100644 index 0000000000..037c6f6d58 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package test02.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/Struts.java b/group17/1158154002/src/test02/litestruts/Struts.java new file mode 100644 index 0000000000..cb556a5652 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/Struts.java @@ -0,0 +1,60 @@ +package test02.litestruts; + +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import test02.litestruts.sax.SAXParserDemo; +import test02.litestruts.util.StringUtil; + +public class Struts { + + public static View runAction(String actionName, Map parameters){ + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + Action action = SAXParserDemo.run(); + View view=new View(); + try { + Class clazz = Class.forName(action.getClassName()); + Object obj = clazz.newInstance(); + for (String element : parameters.keySet()) { + Method method = clazz.getMethod("set" + StringUtil.captureName(element), String.class); + method.invoke(obj, parameters.get(element)); + } + Method exectue = clazz.getMethod("execute", null); + String result = (String) exectue.invoke(obj, null); + view.setJsp(action.getResultJspMap().get(result)); + + Method getMsg = clazz.getMethod("getMessage", null); + String msg=(String) getMsg.invoke(obj, null); + Map map=new HashMap<>(); + map.put("message", msg); + System.out.println(map); + view.setParameters(map); + + } catch (Exception e) { + e.printStackTrace(); + } + return view; + } + +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/StrutsTest.java b/group17/1158154002/src/test02/litestruts/StrutsTest.java new file mode 100644 index 0000000000..ad3c0f2b80 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/StrutsTest.java @@ -0,0 +1,39 @@ +package test02.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed(){ + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/View.java b/group17/1158154002/src/test02/litestruts/View.java new file mode 100644 index 0000000000..73fc11eb13 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/View.java @@ -0,0 +1,23 @@ +package test02.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group17/1158154002/src/test02/litestruts/sax/SAXParser.java b/group17/1158154002/src/test02/litestruts/sax/SAXParser.java new file mode 100644 index 0000000000..4efcd0b5cb --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/sax/SAXParser.java @@ -0,0 +1,221 @@ +package test02.litestruts.sax; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.HashMap; + +import test02.litestruts.Action; + +public class SAXParser { + private static SAXParser parserInstance = new SAXParser(); + private static SAXParserHandler parserHandler; + private SAXParser(){} // Singleton Pattern, a private constructor + private static SAXParserState state = SAXParserState.OUT_OF_TAG; // initial state + + public static SAXParser getInstance() { + return parserInstance; + } + + public Action parse(String path){ + try { + BufferedReader br = new BufferedReader(new FileReader(path)); + int currentCharCode; + // callback start document + parserHandler.startDocument(); + try { + while((currentCharCode = br.read()) != -1){ + char currentChar = (char)currentCharCode; + handleParser(currentChar); + } + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return parserHandler.endDocument(); + } + + public void setHandler(SAXParserHandler handler){ + parserHandler = handler; + } + + private static void handleParser(char c) { + // This SAX Parser will ignore any line wrap. + if(c == '\n'){ + return; + } + switch (state){ + case OUT_OF_TAG:{ + if(c == '<'){ + if(SAXParsedData.innerText.trim().length() != 0) { + parserHandler.innerText(SAXParsedData.innerText); + } + SAXParsedData.innerText = ""; + SAXParsedData.tagName = ""; + state = SAXParserState.BEGIN_START_OR_END_TAG; + } else if (c == '>') { + state = SAXParserState.SYNTAX_ERROR; + } else { + SAXParsedData.innerText += c; + } + break; + } + case BEGIN_START_OR_END_TAG:{ + if(c == '/') { + SAXParsedData.tagName = ""; + state = SAXParserState.IN_END_TAG; + }else if(c == '?' || c == '!'){ + state = SAXParserState.METADATA; + }else{ + SAXParsedData.tagName += c; + state = SAXParserState.IN_START_TAG; + } + break; + } + case IN_START_TAG:{ + if(c == ' '){ + state = SAXParserState.SPACE_IN_START_TAG; + }else if(c == '>'){ + // callback startElement event; + parserHandler.startElement(SAXParsedData.tagName, SAXParsedData.attributes); + SAXParsedData.clear(); + state = SAXParserState.CLOSE_START_TAG; + }else { + SAXParsedData.tagName += c; + } + break; + } + case SPACE_IN_START_TAG:{ + if(SAXParsedData.tagName.length() > 0){ + if(c != ' '){ + SAXParsedData.attribKey += c; + state = SAXParserState.IN_ATTRIB_KEY; + } + } + break; + } + case IN_ATTRIB_KEY:{ + if(c == '='){ + state = SAXParserState.IN_ATTRIB_EQUAL; + }else{ + SAXParsedData.attribKey += c; + } + break; + } + case IN_ATTRIB_EQUAL:{ + if(c == '"'){ + state = SAXParserState.IN_ATTRIB_VALUE; + } + break; + } + case IN_ATTRIB_VALUE:{ + if(c == '"'){ + SAXParsedData.newAttribute(); + state = SAXParserState.IN_START_TAG; + }else{ + SAXParsedData.attribValue += c; + } + break; + } + case CLOSE_START_TAG:{ + if(c == '<') { + state = SAXParserState.BEGIN_START_OR_END_TAG; + }else{ + SAXParsedData.innerText += c; + state = SAXParserState.OUT_OF_TAG; + } + break; + } + case IN_END_TAG:{ + if(c == '>'){ + // callback endElement event + parserHandler.endElement(SAXParsedData.tagName); + state = SAXParserState.CLOSE_END_TAG; + }else{ + SAXParsedData.tagName += c; + } + break; + } + case CLOSE_END_TAG:{ + if(c == ' '){ + state = SAXParserState.OUT_OF_TAG; + }else if(c == '<'){ + SAXParsedData.tagName = ""; + state = SAXParserState.BEGIN_START_OR_END_TAG; + } + break; + } + case METADATA:{ + if(c == '>'){ + state = SAXParserState.CLOSE_END_TAG; + } + break; + } + case SYNTAX_ERROR:{ + try { + throw new Exception(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + } + + private enum SAXParserState { + // The state when parser meets "<". This is a pending state. + // If the next char is "/", the state will be IN_END_TAG, + // Otherwise, the state will be IN_START_TAG + BEGIN_START_OR_END_TAG, + + // The state when parser is reading between start tag(<...>). + // When parser meets ">", callback "startElement" event + IN_START_TAG, + + // The state when parser is reading between end tag(). + // When parser meets "<", callback "endElement" event + IN_END_TAG, + + // The state when parser meets " ", and is in IN_START_TAG state. + // If the length of tag_name is non-zero, finish parsing tag_name. + // Otherwise, finish parsing a key/value attribute. + SPACE_IN_START_TAG, + IN_ATTRIB_KEY,IN_ATTRIB_EQUAL,IN_ATTRIB_VALUE, + CLOSE_START_TAG,CLOSE_END_TAG, + + // The state when parser is reading any char at the outside of , or between two . This is a pending state. + // Contents between will be recorded, but if the contents consist only spaces, the content will be discarded. + // Otherwise, callback "innerText" event. + OUT_OF_TAG, + + METADATA, SYNTAX_ERROR + } + + private static class SAXParsedData{ + private static String tagName = ""; + private static String attribKey = ""; + private static String attribValue = ""; + private static String innerText = ""; + private static HashMap attributes = new HashMap<>(); + + private static void clear(){ + tagName = ""; + attribKey = ""; + attribValue = ""; + innerText = ""; + attributes.clear(); + } + + private static void newAttribute(){ + attributes.put(attribKey, attribValue); + attribKey = ""; + attribValue = ""; + } + } +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/sax/SAXParserDemo.java b/group17/1158154002/src/test02/litestruts/sax/SAXParserDemo.java new file mode 100644 index 0000000000..88c3056a07 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/sax/SAXParserDemo.java @@ -0,0 +1,76 @@ +package test02.litestruts.sax; + +import java.util.HashMap; + +import test02.litestruts.Action; + +public class SAXParserDemo{ + + public static Action run( ){ + //鍒涘缓瀹炰緥 + SAXParser parser = SAXParser.getInstance(); + //涓鸿В鏋愬櫒璁剧疆濂藉悇涓簨浠剁殑鍥炶皟鍑芥暟 + parser.setHandler(new SAXParserHandler() { + //鍒涘缓濂借嚜瀹氫箟鍙橀噺锛岀敤浠ヨ褰昘ML鏂囨。涓渶瑕佺殑鏁版嵁 + String resultName = ""; + String className = ""; + HashMap resultJspMap = new HashMap<>(); + + boolean foundClass = false; + + //褰撹В鏋愬紑濮嬫椂璋冪敤 + @Override + public void startDocument() { + System.out.println("Start parsing"); + } + + //褰撳畬鎴愪竴涓猉ML寮濮嬫爣绛撅紙渚嬪锛夌殑瑙f瀽鏃惰皟鐢 + @Override + public void startElement(String tagName, HashMap attributes) { + if(tagName.equals("action")){ + if(attributes.get("name").equals("login")){ + className = attributes.get("class"); + foundClass = true; + }else{ + foundClass = false; + } + }else if(tagName.equals("result") && foundClass){ + resultName = attributes.get("name"); + } + } + + //褰撳畬鎴愪竴涓猉ML缁撴潫鏍囩锛堜緥濡锛夌殑瑙f瀽鏃惰皟鐢 + @Override + public void endElement(String tagName) { + + } + + //褰撲竴娈礨ML鏍囩涔嬮棿鐨勫唴瀹硅瑙f瀽瀹屾垚鏃惰皟鐢 + @Override + public void innerText(String innerText) { + if(foundClass){ + String jsp = innerText; + resultJspMap.put(resultName,jsp); + } + } + + @Override + //褰撹В鏋愬櫒璇诲埌XML鏂囨。缁撳熬鏃惰皟鐢 + public Action endDocument() { + + System.out.println(className); + System.out.println(resultJspMap); + System.out.println("End parsing"); + + Action action=new Action(); + action.setClassName(className); + action.setResultJspMap(resultJspMap); + return action; + } + }); + + //璋冪敤姝ゆ柟寮忥紝寮濮嬭В鏋 + return parser.parse("src/test02/litestruts/struts.xml"); + } + +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/sax/SAXParserHandler.java b/group17/1158154002/src/test02/litestruts/sax/SAXParserHandler.java new file mode 100644 index 0000000000..d93bdb0133 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/sax/SAXParserHandler.java @@ -0,0 +1,13 @@ +package test02.litestruts.sax; + +import java.util.HashMap; + +import test02.litestruts.Action; + +public interface SAXParserHandler { + void startDocument(); + void startElement(String tagName, HashMap attributes); + void endElement(String tagName); + Action endDocument(); + void innerText(String innerText); +} \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/struts.xml b/group17/1158154002/src/test02/litestruts/struts.xml new file mode 100644 index 0000000000..238ddf58a2 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group17/1158154002/src/test02/litestruts/util/StringUtil.java b/group17/1158154002/src/test02/litestruts/util/StringUtil.java new file mode 100644 index 0000000000..63bc8f2f74 --- /dev/null +++ b/group17/1158154002/src/test02/litestruts/util/StringUtil.java @@ -0,0 +1,13 @@ +package test02.litestruts.util; + +public class StringUtil { + + //棣栧瓧姣嶅ぇ鍐 + public static String captureName(String name) { + // name = name.substring(0, 1).toUpperCase() + name.substring(1); + // return name; + char[] cs=name.toCharArray(); + cs[0]-=32; + return String.valueOf(cs); + } +} From 28401af571e7c018f0aa185e776fa8976145de4e Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Sun, 5 Mar 2017 20:59:07 +0900 Subject: [PATCH 100/646] =?UTF-8?q?20170305=20=E4=BD=9C=E4=B8=9A=EF=BC=8CA?= =?UTF-8?q?rrayUtil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/litestruts/LoginAction.java | 39 +++ .../com/coderising/litestruts/Struts.java | 34 +++ .../com/coderising/litestruts/StrutsTest.java | 43 +++ .../java/com/coderising/litestruts/View.java | 23 ++ .../java/com/coderising/litestruts/struts.xml | 11 + .../jmr/litestruts/util/ArrayUtil.java | 279 ++++++++++++++++++ .../jmr/litestruts/util/package-info.java | 4 + .../jmr/litestruts/util/ArrayUtilTest.java | 266 +++++++++++++++++ 8 files changed, 699 insertions(+) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..85e2e22de3 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..dd598a3664 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java new file mode 100644 index 0000000000..636d0b1789 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java @@ -0,0 +1,279 @@ +/** + * 闂鐐癸細 娌″啓娉ㄩ噴锛屼唬鐮佹瘮杈冮毦璇汇傚挨鍏 merge鏂规硶銆 + */ +package com.github.eulerlcs.jmr.litestruts.util; + +import java.util.Arrays; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] 濡傛灉 a = + * [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public static void reverseArray(int[] origin) { + if (origin == null || origin.length < 2) { + return; + } + + for (int head = 0, tail = origin.length - 1; head < tail; head++, tail--) { + origin[head] = origin[head] ^ origin[tail]; + origin[tail] = origin[head] ^ origin[tail]; + origin[head] = origin[head] ^ origin[tail]; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public static int[] removeZero(int[] oldArray) { + if (oldArray == null) { + return new int[0]; + } + + int count = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) + count++; + } + + int[] newArray = new int[count]; + int newIndex = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + newArray[newIndex] = oldArray[i]; + newIndex++; + } + } + + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 渚嬪 a1 = + * [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public static int[] merge(int[] array1, int[] array2) { + if (array1 == null || array1.length == 0) { + if (array2 == null || array2.length == 0) { + return new int[0]; + } else { + return Arrays.copyOf(array2, array2.length); + } + } else if (array2 == null || array2.length == 0) { + return Arrays.copyOf(array1, array1.length); + } + + int[] result = new int[array1.length + array2.length]; + int idxResult = 0; + int idx1 = 0; + int idx2 = 0; + + for (; idx1 < array1.length; idx1++) { + if (array1[idx1] < array2[idx2]) { + result[idxResult] = array1[idx1]; + idxResult++; + } else if (array1[idx1] == array2[idx2]) { + result[idxResult] = array1[idx1]; + idxResult++; + idx2++; + } else { + for (; idx2 < array2.length; idx2++) { + if (array2[idx2] < array1[idx1]) { + result[idxResult] = array2[idx2]; + idxResult++; + } else { + if (array2[idx2] == array1[idx1]) { + idx2++; + } + + break; + } + } + + if (idx2 == array2.length) { + break; + } else { + idx1--; + } + } + } + + if (idx1 < array1.length) { + System.arraycopy(array1, idx1, result, idxResult, array1.length - idx1); + idxResult += array1.length - idx1; + } + + if (idx2 < array2.length) { + System.arraycopy(array2, idx2, result, idxResult, array2.length - idx2); + idxResult += array2.length - idx2; + } + + result = removeZero(result); + return result; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param increaseCapacity + * @return + */ + public static int[] grow(int[] oldArray, int increaseCapacity) { + if (oldArray == null || increaseCapacity < 0) { + return new int[0]; + } + + int newCapacity = oldArray.length + increaseCapacity; + + int[] newArray = Arrays.copyOf(oldArray, newCapacity); + + return newArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 渚嬪锛 max = 15 , + * 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public static int[] fibonacci(int max) { + if (max <= 1) { + return new int[0]; + } + + int[] result = new int[10]; + result[0] = 1; + result[1] = 1; + int idx = 2; + int sum = 2; + while (sum < max) { + if (idx >= result.length) { + grow(result, result.length * 2); + } + + result[idx] = sum; + sum = result[idx - 1] + result[idx]; + idx++; + } + + result = removeZero(result); + return result; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public static int[] getPrimes(int max) { + if (max < 2) { + return new int[0]; + } + + int[] all = new int[max]; + int index = 0; + int temp = 0; + + for (int i = 0; i < max; i++) { + all[i] = i; + } + + all[0] = 0; + all[1] = 0; + index = 2; + + // 绛涙硶 + loops: for (; index < max;) { + for (int i = 2;; i++) { + temp = index * i; + if (temp >= max) { + break; + } + all[temp] = 0; + } + + for (int i = index + 1; i < max; i++) { + if (all[i] != 0) { + index = i; + continue loops; + } + } + + break; + } + + int[] result = removeZero(all); + return result; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public static long[] getPerfectNumbers(long max) { + long[] perfect = new long[49];// 鍒2016骞1鏈堜负姝紝鍏卞彂鐜颁簡49涓畬鍏ㄦ暟 + int idx = 0; + long sum = 1; + long sqrt = 0; + + for (long n = 2; n < max; n++) { + sum = 1; + sqrt = (long) Math.sqrt(n); + for (long i = 2; i <= sqrt; i++) { + if (n % i == 0) + sum += i + n / i; + } + + if (sum == n) { + perfect[idx] = n; + idx++; + } + } + + // return removeZero(perfect); + return perfect; + } + + /** + * 鐢╯eparator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 渚嬪array= [3,8,9], separator = "-" 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param separator + * @return + */ + public static String join(int[] array, String separator) { + if (array == null || array.length == 0) { + return ""; + } + + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < array.length - 1; i++) { + sb.append(array[i] + separator); + } + sb.append(String.valueOf(array[array.length - 1])); + + return sb.toString(); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java new file mode 100644 index 0000000000..6797c45b67 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java @@ -0,0 +1,4 @@ +/** + * + */ +package com.github.eulerlcs.jmr.litestruts.util; \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java new file mode 100644 index 0000000000..b2957d01b7 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java @@ -0,0 +1,266 @@ +/** + * 闂鐐癸細 娌℃湁鍏ㄥ垎鏀鐩栥傚彧绠鍗曠殑娴嬩簡鍏抽敭鎴栬呭叧蹇冪殑case + */ +package com.github.eulerlcs.jmr.litestruts.util; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +public class ArrayUtilTest { + + @Test + public void reverseArray_null() { + int[] actuals = null; + int[] expecteds = null; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void reverseArray_0() { + int[] actuals = {}; + int[] expecteds = {}; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void reverseArray_1() { + int[] actuals = { 2 }; + int[] expecteds = { 2 }; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void reverseArray_2() { + int[] actuals = { 7, 9 }; + int[] expecteds = { 9, 7 }; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void reverseArray_4() { + int[] actuals = { 7, 9, 30, 3 }; + int[] expecteds = { 3, 30, 9, 7 }; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void reverseArray_5() { + int[] actuals = { 7, 9, 30, 3, 4 }; + int[] expecteds = { 4, 3, 30, 9, 7 }; + + ArrayUtil.reverseArray(actuals); + + assertArrayEquals(actuals, expecteds); + } + + @Test + public void removeZero_null() { + int oldArr[] = null; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.removeZero(oldArr); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void removeZero_0() { + int oldArr[] = {}; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.removeZero(oldArr); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void removeZero_1() { + int oldArr[] = { 0 }; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.removeZero(oldArr); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void removeZero_2() { + int oldArr[] = { 3, 5 }; + int[] expecteds = { 3, 5 }; + + int[] newArr = ArrayUtil.removeZero(oldArr); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void removeZero_3() { + int oldArr[] = { 1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5 }; + int[] expecteds = { 1, 3, 4, 5, 6, 6, 5, 4, 7, 6, 7, 5 }; + + int[] newArr = ArrayUtil.removeZero(oldArr); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void merge_1() { + int[] a1 = { 3, 5, 7, 8 }; + int[] a2 = { 4, 5, 6, 7 }; + int[] expecteds = { 3, 4, 5, 6, 7, 8 }; + + int[] newArr = ArrayUtil.merge(a1, a2); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void merge_2() { + int[] a1 = { 4, 5, 6, 7 }; + int[] a2 = { 3, 5, 7, 8 }; + int[] expecteds = { 3, 4, 5, 6, 7, 8 }; + + int[] newArr = ArrayUtil.merge(a1, a2); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void grow_1() { + int[] oldArray = { 2, 3, 6 }; + int increaseCapacity = 3; + int[] expecteds = { 2, 3, 6, 0, 0, 0 }; + + int[] newArr = ArrayUtil.grow(oldArray, increaseCapacity); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void fibonacci_1() { + int max = 1; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.fibonacci(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void fibonacci_2() { + int max = 2; + int[] expecteds = { 1, 1 }; + + int[] newArr = ArrayUtil.fibonacci(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void fibonacci_15() { + int max = 15; + int[] expecteds = { 1, 1, 2, 3, 5, 8, 13 }; + + int[] newArr = ArrayUtil.fibonacci(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_1() { + int max = 1; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_2() { + int max = 2; + int[] expecteds = {}; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_3() { + int max = 3; + int[] expecteds = { 2 }; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_4() { + int max = 4; + int[] expecteds = { 2, 3 }; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_23() { + int max = 23; + int[] expecteds = { 2, 3, 5, 7, 11, 13, 17, 19 }; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPrimes_24() { + int max = 24; + int[] expecteds = { 2, 3, 5, 7, 11, 13, 17, 19, 23 }; + + int[] newArr = ArrayUtil.getPrimes(max); + + assertArrayEquals(newArr, expecteds); + } + + @Test + public void getPerfectNumbers_max() { + long max = Long.MAX_VALUE; + max = 100000; + long[] expecteds = { 6, 28, 496, 8128, 33550336, 8589869056L, 137438691328L, 2305843008139952128L }; + + long[] newArr = ArrayUtil.getPerfectNumbers(max); + + assertEquals(newArr[3], expecteds[3]); + } + + @Test + public void join_0() { + int[] array = { 3, 8, 9 }; + String separator = "-"; + String expected = "3-8-9"; + + String actual = ArrayUtil.join(array, separator); + assertEquals(expected, actual); + } +} From 34686e9452c62efc7dc64a698812bbb273414e5e Mon Sep 17 00:00:00 2001 From: unknown <鍙茬> Date: Sun, 5 Mar 2017 20:42:51 +0800 Subject: [PATCH 101/646] =?UTF-8?q?=E5=8F=B2=E7=A3=8A2017.3.5=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/782476895/20170305/ArrayUtil.java | 314 ++++++++++++++++++ .../20170305/struts/LoginAction.java | 41 +++ group08/782476895/20170305/struts/Struts.java | 290 ++++++++++++++++ .../782476895/20170305/struts/StrutsTest.java | 47 +++ group08/782476895/20170305/struts/View.java | 29 ++ group08/782476895/20170305/struts/struts.xml | 11 + ...\347\273\223\350\256\260\345\275\225.docx" | Bin 0 -> 7926 bytes 7 files changed, 732 insertions(+) create mode 100644 group08/782476895/20170305/ArrayUtil.java create mode 100644 group08/782476895/20170305/struts/LoginAction.java create mode 100644 group08/782476895/20170305/struts/Struts.java create mode 100644 group08/782476895/20170305/struts/StrutsTest.java create mode 100644 group08/782476895/20170305/struts/View.java create mode 100644 group08/782476895/20170305/struts/struts.xml create mode 100644 "group08/782476895/20170305/\345\205\263\344\272\216\346\226\260\350\277\233\345\205\245\346\270\270\346\210\217\350\241\214\344\270\232\347\232\204\344\270\200\344\272\233\345\274\200\345\217\221\346\200\273\347\273\223\350\256\260\345\275\225.docx" diff --git a/group08/782476895/20170305/ArrayUtil.java b/group08/782476895/20170305/ArrayUtil.java new file mode 100644 index 0000000000..cb6a182034 --- /dev/null +++ b/group08/782476895/20170305/ArrayUtil.java @@ -0,0 +1,314 @@ +package com.sl.test20170304.arrayutil; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.Test; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int low = 0; + int high = origin.length - 1; + while(low < high){ + int temp = 0; + temp = origin[low]; + origin[low] = origin[high]; + origin[high] = temp; + low++; + high--; + } + } + + @Test + public void test1(){ + int[] arr = {7, 9 , 30, 3}; + reverseArray(arr); + System.out.println(Arrays.toString(arr)); + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int[] arr = new int[oldArray.length]; + int num = 0; + for(int i = 0;i < oldArray.length;i++){ + if(oldArray[i] != 0){ + arr[num] = oldArray[i]; + num++; + } + } + int[] newArray = Arrays.copyOf(arr, num); + return newArray; + } + + @Test + public void test2(){ + int oldArr[] = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int[] newArray = removeZero(oldArr); + System.out.println(Arrays.toString(newArray)); + } + + + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int len1 = array1.length; + int len2 = array2.length; + + int[] arr = new int[len1 + len2]; + int len = 0; + int i = 0; + int j = 0; + int min = 0; + while(i < len1 && j< len2){ + if(array1[i] == array2[j]){ + min = array1[i]; + arr[len] = min; + i++; + j++; + len++; + continue; + } + + if(array1[i] > array2[j]){ + min = array2[j]; + arr[len] = min; + j++; + len++; + continue; + } + + if(array1[i] < array2[j]){ + min = array1[i]; + arr[len] = min; + i++; + len++; + continue; + } + } + + if(i > j){ + for(int k = j;k < len2;k++){ + arr[len] = array2[k]; + len++; + } + } + + if(i < j){ + for(int k = i;k < len1;k++){ + arr[len] = array1[k]; + len++; + } + } + + int[] newArray = Arrays.copyOf(arr, len); + return newArray; + } + + + @Test + public void test3(){ + int[] a1 = {3, 7, 9,10,34,78,123}; + int[] a2 = {4, 5, 6,7,56,34,345,2432,545345345}; + int[] newArray = merge(a1, a2); + System.out.println(Arrays.toString(newArray)); + } + + + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + int[] newArray = Arrays.copyOf(oldArray, oldArray.length + size); + return newArray; + } + + + @Test + public void test4(){ + int[] oldArray = {2,3,6}; + int[] newArray = grow(oldArray,3); + System.out.println(Arrays.toString(newArray)); + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + + int[] arr = new int[100]; + int len = 2; + int f1 = 1; + int f2 = 1; + int f3 = f1 + f2; + + if(max == 1){ + return new int[0]; + } + + arr[0] = f1; + arr[1] = f2; + + while(f3 <= max){ + arr[len] = f3; + len++; + f1 = f2; + f2 = f3; + f3 = f1 + f2; + } + int[] newArray = Arrays.copyOf(arr, len); + return newArray; + } + + @Test + public void test5(){ + int[] newArray = fibonacci(100); + System.out.println(Arrays.toString(newArray)); + } + + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + int[] arr = new int[max]; + int len = 0; + for(int i = 0;i <= max;i++){ + if(i == 0 || i == 1){ + continue; + } + if(isPrime(i)){ + arr[len] = i; + len++; + } + } + int[] newArray = Arrays.copyOf(arr, len); + return newArray; + } + + private boolean isPrime(int n){ + for(int i=2;i<=n/2;i++){ + if(n%i == 0) + return false; + } + return true; + } + + @Test + public void test6(){ + int max = 100; + int[] newArray = getPrimes(max); + System.out.println(Arrays.toString(newArray)); + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + int[] arr = new int[max]; + int len = 0; + for(int i = 0;i <= max;i++){ + if(i == 0 || i == 1){ + continue; + } + if(isPerfectNumber(i)){ + arr[len] = i; + len++; + } + } + int[] newArray = Arrays.copyOf(arr, len); + return newArray; + } + + + private boolean isPerfectNumber(int num){ + List list = new ArrayList(); + int sum = 0; + for(int i = 1;i < num;i++){ + if(num % i == 0){ + list.add(i); + } + } + + for(int j : list){ + sum += j; + } + + return sum == num ? true : false; + } + + + @Test + public void test7(){ + int max = 100000; + int[] newArray = getPerfectNumbers(max); + System.out.println(Arrays.toString(newArray)); + } + + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + StringBuilder sb = new StringBuilder(); + for(int num : array){ + sb.append(num).append(seperator); + } + + String str = sb.toString(); + str = str.substring(0, str.lastIndexOf(seperator)); + return str; + } + + @Test + public void test8(){ + int[] arr = {1,2,5,6,78,34,332,4452,4342,3,435,233}; + System.out.println(join(arr,"-")); + } + + +} diff --git a/group08/782476895/20170305/struts/LoginAction.java b/group08/782476895/20170305/struts/LoginAction.java new file mode 100644 index 0000000000..0582aed036 --- /dev/null +++ b/group08/782476895/20170305/struts/LoginAction.java @@ -0,0 +1,41 @@ +package com.sl.test20170304.struts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group08/782476895/20170305/struts/Struts.java b/group08/782476895/20170305/struts/Struts.java new file mode 100644 index 0000000000..fba74e2ff7 --- /dev/null +++ b/group08/782476895/20170305/struts/Struts.java @@ -0,0 +1,290 @@ +package com.sl.test20170304.struts; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.junit.Test; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + SAXReader reader = new SAXReader(); + Object viewObj = null; + try { + + Document document = reader.read(new File("E://java寮鍙戠幆澧" + + "//java瀛︿範璧勬枡//java//java program//Coding2017//src//" + + "com//sl//test20170304//struts//struts.xml")); + Element node = document.getRootElement(); + List actionList = node.elements("action"); + + Element temp = null; + + for(Element action : actionList){ + Attribute nameAttr = action.attribute("name"); + if(nameAttr.getText().equals(actionName)){ + temp = action; + break; + } + } + + Class actionClass = Class.forName(temp.attribute("class").getText()); + Object actionObj = actionClass.newInstance(); + Method[] actionMethods = actionClass.getDeclaredMethods(); + Field[] actionFields = actionClass.getDeclaredFields(); + + for(Field field : actionFields){ + try{ + String key = field.getName(); + String value = parameters.get(key); + String filedSetName = parSetName(key); + Method fieldSetMethod = actionClass.getMethod(filedSetName, field.getType()); + fieldSetMethod.invoke(actionObj, value); + }catch(Exception e){ + continue; + } + } + String tempResult = null; + + for(Method method : actionMethods){ + if("execute".equals(method.getName())){ + tempResult = method.invoke(actionObj).toString(); + } + } + System.out.println(tempResult); + + Map params = new HashMap(); + + for(Field field : actionFields){ + try{ + String key = field.getName(); + String value = null; + String filedGetName = parGetName(key); + Method filedGetMethod = actionClass.getMethod(filedGetName, new Class[] {}); + value = filedGetMethod.invoke(actionObj,new Object[] {}).toString(); + System.out.println(value); + params.put(key, value); + }catch(Exception e){ + continue; + } + } + + List results = temp.elements("result"); + String resultVal = null; + for(Element result: results){ + if(tempResult.equals(result.attribute("name").getText())){ + resultVal = result.getStringValue(); + break; + } + } + + Class viewClass = View.class; + viewObj = viewClass.newInstance(); + Field[] viewFields = viewClass.getDeclaredFields(); + + for(Field field : viewFields){ + try{ + String fieldName = field.getName(); + String fieldType = field.getType().getSimpleName(); + String filedSetName = parSetName(fieldName); + Method fieldSetMethod = viewClass.getMethod(filedSetName, field.getType()); + if("Map".equalsIgnoreCase(fieldType)){ + fieldSetMethod.invoke(viewObj, params); + }else if("String".equalsIgnoreCase(fieldType)){ + fieldSetMethod.invoke(viewObj, resultVal); + } + + }catch(Exception e){ + continue; + } + } + + + System.out.println(viewObj); + + + } catch (Exception e) { + e.printStackTrace(); + } + + return (View)viewObj; + } + + + @Test + public void test(){ + SAXReader reader = new SAXReader(); + try { + Map parameters = new HashMap(); + parameters.put("name","test"); + parameters.put("password","1234"); + String actionName = "login"; + Document document = reader.read(new File("E://java寮鍙戠幆澧" + + "//java瀛︿範璧勬枡//java//java program//Coding2017//src//" + + "com//sl//test20170304//struts//struts.xml")); + Element node = document.getRootElement(); + List actionList = node.elements("action"); + + Element temp = null; + + for(Element action : actionList){ + Attribute nameAttr = action.attribute("name"); + if(nameAttr.getText().equals(actionName)){ + temp = action; + break; + } + } + + Class actionClass = Class.forName(temp.attribute("class").getText()); + Object actionObj = actionClass.newInstance(); + Method[] actionMethods = actionClass.getDeclaredMethods(); + Field[] actionFields = actionClass.getDeclaredFields(); + + for(Field field : actionFields){ + try{ + String key = field.getName(); + String value = parameters.get(key); + String filedSetName = parSetName(key); + Method fieldSetMethod = actionClass.getMethod(filedSetName, field.getType()); + fieldSetMethod.invoke(actionObj, value); + }catch(Exception e){ + continue; + } + } + String tempResult = null; + + for(Method method : actionMethods){ + if("execute".equals(method.getName())){ + tempResult = method.invoke(actionObj).toString(); + } + } + System.out.println(tempResult); + + Map params = new HashMap(); + + for(Field field : actionFields){ + try{ + String key = field.getName(); + String value = null; + String filedGetName = parGetName(key); + Method filedGetMethod = actionClass.getMethod(filedGetName, new Class[] {}); + value = filedGetMethod.invoke(actionObj,new Object[] {}).toString(); + System.out.println(value); + params.put(key, value); + }catch(Exception e){ + continue; + } + } + + List results = temp.elements("result"); + String resultVal = null; + for(Element result: results){ + if(tempResult.equals(result.attribute("name").getText())){ + resultVal = result.getStringValue(); + break; + } + } + + Class viewClass = View.class; + Object viewObj = viewClass.newInstance(); + Field[] viewFields = viewClass.getDeclaredFields(); + + for(Field field : viewFields){ + try{ + String fieldName = field.getName(); + String fieldType = field.getType().getSimpleName(); + String filedSetName = parSetName(fieldName); + Method fieldSetMethod = viewClass.getMethod(filedSetName, field.getType()); + if("Map".equalsIgnoreCase(fieldType)){ + fieldSetMethod.invoke(viewObj, params); + }else if("String".equalsIgnoreCase(fieldType)){ + fieldSetMethod.invoke(viewObj, resultVal); + } + + }catch(Exception e){ + continue; + } + } + + + System.out.println(viewObj); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + + /** + * 鎷兼帴鍦ㄦ煇灞炴х殑 set鏂规硶 + * + * @param fieldName + * @return String + */ + public static String parSetName(String fieldName) { + if (null == fieldName || "".equals(fieldName)) { + return null; + } + int startIndex = 0; + if (fieldName.charAt(0) == '_') + startIndex = 1; + return "set" + + fieldName.substring(startIndex, startIndex + 1).toUpperCase() + + fieldName.substring(startIndex + 1); + } + + /** + * 鎷兼帴鍦ㄦ煇灞炴х殑 get鏂规硶 + * + * @param fieldName + * @return String + */ + public static String parGetName(String fieldName) { + if (null == fieldName || "".equals(fieldName)) { + return null; + } + int startIndex = 0; + if (fieldName.charAt(0) == '_') + startIndex = 1; + return "get" + + fieldName.substring(startIndex, startIndex + 1).toUpperCase() + + fieldName.substring(startIndex + 1); + } + +} diff --git a/group08/782476895/20170305/struts/StrutsTest.java b/group08/782476895/20170305/struts/StrutsTest.java new file mode 100644 index 0000000000..21976de680 --- /dev/null +++ b/group08/782476895/20170305/struts/StrutsTest.java @@ -0,0 +1,47 @@ +package com.sl.test20170304.struts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/782476895/20170305/struts/View.java b/group08/782476895/20170305/struts/View.java new file mode 100644 index 0000000000..0118a50c18 --- /dev/null +++ b/group08/782476895/20170305/struts/View.java @@ -0,0 +1,29 @@ +package com.sl.test20170304.struts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } + @Override + public String toString() { + return "View [jsp=" + jsp + ", parameters=" + parameters + "]"; + } + + +} diff --git a/group08/782476895/20170305/struts/struts.xml b/group08/782476895/20170305/struts/struts.xml new file mode 100644 index 0000000000..60d2e496aa --- /dev/null +++ b/group08/782476895/20170305/struts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git "a/group08/782476895/20170305/\345\205\263\344\272\216\346\226\260\350\277\233\345\205\245\346\270\270\346\210\217\350\241\214\344\270\232\347\232\204\344\270\200\344\272\233\345\274\200\345\217\221\346\200\273\347\273\223\350\256\260\345\275\225.docx" "b/group08/782476895/20170305/\345\205\263\344\272\216\346\226\260\350\277\233\345\205\245\346\270\270\346\210\217\350\241\214\344\270\232\347\232\204\344\270\200\344\272\233\345\274\200\345\217\221\346\200\273\347\273\223\350\256\260\345\275\225.docx" new file mode 100644 index 0000000000000000000000000000000000000000..8e5241f7927ebc8fe977a3496a36572bfe3379fe GIT binary patch literal 7926 zcmbVx1yo#HvNjeVxVu||HUxKTTpM@y;O+!>CpZL`5G=TBkl+r%JxFlZ*W5cZH*?oN z^S||~SDo&2_Wr7B*V(;R)&3M^pkc5e;NjsRGz(0nA$}7?@Na!bQ)?#x)62Cyp-UQ? z1uf**CxZFfwjLW;UQ!vd@be=nRmL)P)V^$! zdkn0a9AZSC>8`Qe+V)9fE3_(1eos6lei%~AFQao=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Jw5Sth$2mx4Fn6nNek$10B`kG9M D5+Ekj literal 0 HcmV?d00001 From efff331e303134021eb056354382f64b2fb17694 Mon Sep 17 00:00:00 2001 From: BlankKelly Date: Sun, 5 Mar 2017 21:18:03 +0800 Subject: [PATCH 102/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/coderising/array/ArrayUtil.java | 223 ++++++++++ .../com/coderising/litestruts/Struts.java | 116 ++++++ .../litestruts/action/LoginAction.java | 42 ++ .../litestruts/action/LogoutAction.java | 10 + .../builder/StrutsConfigBuilder.java | 79 ++++ .../litestruts/conf/StrutsConfiguration.java | 39 ++ .../exception/BuilderException.java | 25 ++ .../exception/LiteStrutsException.java | 25 ++ .../coderising/litestruts/model/Response.java | 60 +++ .../com/coderising/litestruts/model/View.java | 32 ++ .../parser/xml/GenericTokenParser.java | 58 +++ .../litestruts/parser/xml/PropertyParser.java | 36 ++ .../litestruts/parser/xml/TokenHandler.java | 10 + .../litestruts/parser/xml/XNode.java | 394 ++++++++++++++++++ .../litestruts/parser/xml/XPathParser.java | 265 ++++++++++++ .../coderising/litestruts/util/ArrayUtil.java | 26 ++ .../coderising/litestruts/util/ClassUtil.java | 45 ++ .../03-05/src/main/resources/struts.xml | 12 + .../com/coderising/array/ArrayUtilTest.java | 92 ++++ .../com/coderising/litestruts/StrutsTest.java | 40 ++ .../parser/xml/XPathParserTest.java | 45 ++ .../03-05/src/test/resources/nodelet_test.xml | 13 + .../03-05/src/test/resources/struts.xml | 12 + 23 files changed, 1699 insertions(+) create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/array/ArrayUtil.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/Struts.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LoginAction.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LogoutAction.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/builder/StrutsConfigBuilder.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/conf/StrutsConfiguration.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/BuilderException.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/LiteStrutsException.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/Response.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/View.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/GenericTokenParser.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/PropertyParser.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/TokenHandler.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XNode.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XPathParser.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ArrayUtil.java create mode 100644 group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ClassUtil.java create mode 100644 group08/769638826/03-05/src/main/resources/struts.xml create mode 100644 group08/769638826/03-05/src/test/java/com/coderising/array/ArrayUtilTest.java create mode 100644 group08/769638826/03-05/src/test/java/com/coderising/litestruts/StrutsTest.java create mode 100644 group08/769638826/03-05/src/test/java/com/coderising/litestruts/parser/xml/XPathParserTest.java create mode 100644 group08/769638826/03-05/src/test/resources/nodelet_test.xml create mode 100644 group08/769638826/03-05/src/test/resources/struts.xml diff --git a/group08/769638826/03-05/src/main/java/com/coderising/array/ArrayUtil.java b/group08/769638826/03-05/src/main/java/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..a334fef06d --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/array/ArrayUtil.java @@ -0,0 +1,223 @@ +package com.coderising.array; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +/** + * Created by huitailang on 17/3/3. + * 鏁扮粍宸ュ叿绫 + */ +public class ArrayUtil { + public static final int[] EMPTY_ARRAY = {}; + + public static void reverseArray(int[] origin) { + for (int i = 0; i < origin.length / 2; i++) { + int tmp = 0; + tmp = origin[i]; + origin[i] = origin[origin.length - i - 1]; + origin[origin.length - i - 1] = tmp; + } + } + + public static int[] removeZero(int[] oldArray) { + + int count = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + count++; + } + } + + int[] noZeroArray = new int[count]; + + count = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + noZeroArray[count++] = oldArray[i]; + } + } + + return noZeroArray; + } + + public static int[] merge(int[] array1, int[] array2) { + //1.鍚堝苟 + int[] mergedArray = new int[array1.length + array2.length]; + System.arraycopy(array1, 0, mergedArray, 0, array1.length); + System.arraycopy(array2, 0, mergedArray, array1.length, array2.length); + + //2.鎺掑簭 + Arrays.sort(mergedArray); + + + //3.鍘婚噸 + Integer[] tmpArray = removeDuplicate(mergedArray); + System.out.println(Arrays.toString(tmpArray)); + int[] resultArray = new int[tmpArray.length]; + for (int i = 0; i < tmpArray.length; i++) { + resultArray[i] = tmpArray[i]; + } + + return resultArray; + } + + private static Integer[] removeDuplicate(int[] origin) { + ArrayList arrayList = new ArrayList(); + + for (int i = 0; i < origin.length; i++) { + boolean repeat = false; + for (int j = 0; j < arrayList.size(); j++) { + if (origin[i] == arrayList.get(j)) { + repeat = true; + break; + } + } + + if (!repeat) { + arrayList.add(origin[i]); + } + } + + return arrayList.toArray(new Integer[]{}); + } + + public static int[] grow(int[] oldArray, int size) { + int[] newArray = new int[oldArray.length + size]; + int[] zeroArray = new int[size]; + System.arraycopy(oldArray, 0, newArray, 0, oldArray.length); + return newArray; + } + + public static int[] fibonacci(int max) { + if (max == 1) { + return EMPTY_ARRAY; + } + + ArrayList arrayList = new ArrayList(); + + int n = 1; + while (true) { + int ret = 0; + if ((ret = fibonacci0(n)) > max) { + break; + } else { + arrayList.add(ret); + } + + n++; + } + + int[] array = new int[arrayList.size()]; + int i = 0; + for (Iterator iterator = arrayList.iterator(); iterator.hasNext(); ) { + Integer value = iterator.next(); + array[i++] = value; + } + + return array; + } + + private static int fibonacci0(int n) { + if (n <= 2) { + return 1; + } else { + return fibonacci0(n - 1) + fibonacci0(n - 2); + } + } + + public static int[] getPrimes(int max) { + ArrayList primesList = new ArrayList(); + + for (int i = 0; i < max; i++) { + if (isPrime(i)) { + primesList.add(i); + } + } + + int[] primeArray = new int[primesList.size()]; + int i = 0; + for (Iterator iterator = primesList.iterator(); iterator.hasNext(); ) { + Integer prime = iterator.next(); + primeArray[i++] = prime; + } + + return primeArray; + } + + private static boolean isPrime(int a) { + boolean flag = true; + + if (a < 2) {// 绱犳暟涓嶅皬浜2 + return false; + } else { + for (int i = 2; i <= Math.sqrt(a); i++) { + if (a % i == 0) {// 鑻ヨ兘琚暣闄わ紝鍒欒鏄庝笉鏄礌鏁帮紝杩斿洖false + flag = false; + break;// 璺冲嚭寰幆 + } + } + } + return flag; + } + + public static int[] getPerfectNumbers(int max){ + ArrayList arrayList = new ArrayList(); + + for(int i = 0; i < max; i++){ + if(isPerfectNumber(i)){ + arrayList.add(i); + } + } + + int[] array = new int[arrayList.size()]; + int i = 0; + for(Iterator iterator = arrayList.iterator(); iterator.hasNext(); ){ + int perfectNumber = iterator.next(); + array[i++] = perfectNumber; + } + + return array; + } + + public static boolean isPerfectNumber(int n) { + int sum = 0; + for (int i = 1; i < n; i++) { + if (n % i == 0) { + sum = sum + i; + } + } + if (sum == n) { + return true; + } else + return false; + } + + public static String join(int[] array, String seperator){ + StringBuilder sb = new StringBuilder(); + + for(int i = 0; i < array.length; i++){ + sb.append(array[i]); + sb.append(seperator); + } + + return sb.toString().substring(0, sb.toString().length() - 1); + } + + public static T[] convertListToArray(List list){ + Object[] array = new Object[list.size()]; + + int i = 0; + for(Iterator iterator = list.iterator(); iterator.hasNext(); ){ + T value = iterator.next(); + array[i] = (Object)value; + } + + return (T[])array; + } + + public static void main(String[] args) { + System.out.println(fibonacci0(4)); + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/Struts.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..7d8f7512b9 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/Struts.java @@ -0,0 +1,116 @@ +package com.coderising.litestruts; + +import com.coderising.litestruts.builder.StrutsConfigBuilder; +import com.coderising.litestruts.conf.StrutsConfiguration; +import com.coderising.litestruts.exception.LiteStrutsException; +import com.coderising.litestruts.model.Response; +import com.coderising.litestruts.model.View; +import com.coderising.litestruts.util.ClassUtil; + +import java.io.InputStream; +import java.lang.reflect.Method; +import java.util.*; + +/** + * Created by huitailang on 17/3/4. + * 鏍稿績绫 + */ +public class Struts { + private static final String DEFAULT_HANDLER_METHOD = "exectue"; + + private static StrutsConfiguration configuration; + private static InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("struts.xml"); + private static StrutsConfigBuilder builder = new StrutsConfigBuilder(inputStream); + + static { + configuration = builder.parse(); + } + + public static View runAction(String actionName, Map parameters) { + String actionHandler = getActionHandler(actionName); + + try { + if (actionHandler == null) { + throw new LiteStrutsException("璇锋眰涓" + actionName + "鐨刟ction娌℃湁鎵惧埌瀵瑰簲鐨刟ction澶勭悊鍣"); + } + + Class actionHandlerClass = Class.forName(actionName); + Object actionHandlerInstance = actionHandlerClass.newInstance(); + //鏍规嵁璇锋眰鍙傛暟锛屽垵濮嬪寲action澶勭悊鍣 + Iterator> iterator = parameters.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry parameter = iterator.next(); + String fieldName = parameter.getKey(); + String fieldValue = parameter.getValue(); + + Method method = actionHandlerClass.getDeclaredMethod(ClassUtil.setter(fieldName), String.class); + method.invoke(actionHandlerInstance, fieldValue); + } + + //鑾峰彇澶勭悊鍝嶅簲鐨刪andler鏂规硶 + Method handlerMethod = actionHandlerClass.getDeclaredMethod(DEFAULT_HANDLER_METHOD, Void.class); + Object handlerResult = handlerMethod.invoke(actionHandlerInstance, null); + + //鑾峰彇action澶勭悊鍣ㄦ墍鏈夌殑getter鏂规硶 + Method[] getterMethods = ClassUtil.getGetterMethod(actionHandlerClass); + + + //缁勮鍝嶅簲缁撴灉 + + } catch (Exception e) { + throw new LiteStrutsException("澶勭悊action涓" + actionName + "鐨勮姹傚嚭閿欙細", e); + } + + return null; + } + + private static String getActionHandler(String actionName) { + Iterator> iterator = configuration.getActionMap().iterator(); + String actionHandler = null; + + while (iterator.hasNext()) { + Map map = iterator.next(); + if (map.get(actionName) != null) { + actionHandler = map.get(actionName); + break; + } + } + + return actionHandler; + } + + private static View getView(String actionHandler, String responseCode) { + Iterator>> iterator = configuration.getResponseMap().iterator(); + Set resultSet = null; + View view = new View(); + + while (iterator.hasNext()) { + Map> map = iterator.next(); + if (map.get(actionHandler) != null) { + resultSet = map.get(actionHandler); + break; + } + } + + if (resultSet != null && resultSet.size() > 0) { + for (Iterator iterator1 = resultSet.iterator(); iterator1.hasNext(); ) { + Response response = iterator1.next(); + if (response.getCode().equals(responseCode)) { + view.setJsp(response.getViewPath()); + } + } + } + + return view; + } + + public Map responseParameters(Object obj, Method[] getterMethods){ + Map map = new HashMap<>(); + + for(int i = 0 ; i < getterMethods.length; i++){ +// Method method = + } + + return null; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LoginAction.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LoginAction.java new file mode 100644 index 0000000000..d9010ea27b --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LoginAction.java @@ -0,0 +1,42 @@ +package com.coderising.litestruts.action; + +/** + * Created by huitailang on 17/3/4. + * @author zhangkun + * @date 2017骞03鏈05鏃17:45:26 + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨 + */ +public class LoginAction { + private String name; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if ("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed, please check your user/pwd"; + return "fail"; + } + + public void setName(String name) { + this.name = name; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getMessage() { + return message; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LogoutAction.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LogoutAction.java new file mode 100644 index 0000000000..d46da43e14 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/action/LogoutAction.java @@ -0,0 +1,10 @@ +package com.coderising.litestruts.action; + +/** + * Created by huitailang on 17/3/4. + * @author zhangkun + * @date 2017骞03鏈05鏃17:45:40 + * 鐢ㄦ埛閫鍑篈ction + */ +public class LogoutAction { +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/builder/StrutsConfigBuilder.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/builder/StrutsConfigBuilder.java new file mode 100644 index 0000000000..79561f7a6c --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/builder/StrutsConfigBuilder.java @@ -0,0 +1,79 @@ +package com.coderising.litestruts.builder; + +import com.coderising.litestruts.conf.StrutsConfiguration; +import com.coderising.litestruts.exception.BuilderException; +import com.coderising.litestruts.model.Response; +import com.coderising.litestruts.parser.xml.XNode; +import com.coderising.litestruts.parser.xml.XPathParser; + +import java.io.InputStream; +import java.util.*; + +/** + * Created by huitailang on 17/3/5. + * @author zhangkun + * @date 2017骞03鏈05鏃17:45:54 + * litestruts閰嶇疆鏋勫缓鍣 + */ +public class StrutsConfigBuilder { + private XPathParser parser; + private boolean parsed; + + public StrutsConfigBuilder(String xml){ + this(new XPathParser(xml, false)); + } + + public StrutsConfigBuilder(InputStream inputStream) { + this(new XPathParser(inputStream)); + } + + private StrutsConfigBuilder(XPathParser parser) { + this.parser = parser; + this.parsed = false; + } + + public StrutsConfiguration parse() { + if (parsed) { + throw new BuilderException("Each StrutsConfigBuilder can only be used once."); + } + this.parsed = true; + StrutsConfiguration configuration = new StrutsConfiguration(); + + try { + //鑾峰彇action涓暟 + int actionSize = parser.evalNodes("/struts/*").size(); + Collection> actionMap = new HashSet<>(); + Collection>> responseMap = new HashSet<>(); + + for (int i = 0; i < actionSize; i++) { + XNode actionNode = parser.evalNodes("/struts/*").get(i); + String actionName = actionNode.evalString("/struts/action/@name"); + String actionClass = actionNode.evalString("/struts/action/@class"); + Map action = new HashMap<>(); + action.put(actionName, actionClass); + actionMap.add(action); + + int resultSize = actionNode.evalNodes("/*").size(); + + Map> actionResponse = new HashMap<>(); + Set responseSet = new HashSet<>(); + for (int j = 0; j < resultSize; j++) { + XNode resultNode = actionNode.evalNodes("/*").get(j); + String resultCode = resultNode.evalString("/struts/action/result/@name"); + String resultViewPath = resultNode.evalString("/struts/action/result"); + Response response = new Response(resultCode, resultViewPath); + responseSet.add(response); + } + actionResponse.put(actionClass, responseSet); + responseMap.add(actionResponse); + } + + configuration.setActionMap(actionMap); + configuration.setResponseMap(responseMap); + } catch (Exception e) { + throw new BuilderException("Error parsing LiteStruts Configuration. Cause: " + e, e); + } + + return configuration; + } +} \ No newline at end of file diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/conf/StrutsConfiguration.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/conf/StrutsConfiguration.java new file mode 100644 index 0000000000..3ef120ffe0 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/conf/StrutsConfiguration.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts.conf; + +import com.coderising.litestruts.model.Response; + +import java.util.*; + +/** + * Created by huitailang on 17/3/4. + * @author zhangkun + * @date 2017骞03鏈05鏃17:46:09 + * LiteStruts鍏ㄥ眬閰嶇疆 + */ +public class StrutsConfiguration { + /** + * 璇锋眰action鍒板搴斿鐞嗙被鐨勬槧灏 + */ + private Collection> actionMap = new HashSet>(); + + /** + * 璇锋眰澶勭悊绫绘墍鏈夊搷搴旂粨鏋滈泦鍚 + */ + private Collection>> responseMap = new HashSet>>(); + + public Collection> getActionMap() { + return actionMap; + } + + public void setActionMap(Collection> actionMap) { + this.actionMap = actionMap; + } + + public Collection>> getResponseMap() { + return responseMap; + } + + public void setResponseMap(Collection>> responseMap) { + this.responseMap = responseMap; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/BuilderException.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/BuilderException.java new file mode 100644 index 0000000000..b90c127077 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/BuilderException.java @@ -0,0 +1,25 @@ +package com.coderising.litestruts.exception; + +/** + * Created by huitailang on 17/3/5. + * @author zhangkun + * @date 2017骞03鏈05鏃17:46:19 + * 鏋勫缓XML Document鎶涘嚭寮傚父 + */ +public class BuilderException extends RuntimeException { + public BuilderException(){ + super(); + } + + public BuilderException(String message){ + super(message); + } + + public BuilderException(String message, Throwable cause){ + super(message, cause); + } + + public BuilderException(Throwable cause){ + super(cause); + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/LiteStrutsException.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/LiteStrutsException.java new file mode 100644 index 0000000000..302c2c6a3a --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/exception/LiteStrutsException.java @@ -0,0 +1,25 @@ +package com.coderising.litestruts.exception; + +/** + * Created by huitailang on 17/3/5. + * @author zhangkun + * @date 2017骞03鏈05鏃17:46:28 + * LiteStrutsException + */ +public class LiteStrutsException extends RuntimeException{ + public LiteStrutsException(){ + super(); + } + + public LiteStrutsException(String message){ + super(message); + } + + public LiteStrutsException(String message, Throwable cause){ + super(message, cause); + } + + public LiteStrutsException(Throwable cause){ + super(cause); + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/Response.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/Response.java new file mode 100644 index 0000000000..099914c969 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/Response.java @@ -0,0 +1,60 @@ +package com.coderising.litestruts.model; + +/** + * Created by huitailang on 17/3/5. + * @author zhangkun + * @date 2017骞03鏈05鏃17:46:49 + * 鍝嶅簲缁撴灉 + */ +public class Response { + private String code; + private String viewPath; + + public Response(String code, String viewPath) { + this.code = code; + this.viewPath = viewPath; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getViewPath() { + return viewPath; + } + + public void setViewPath(String viewPath) { + this.viewPath = viewPath; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Response response = (Response) o; + + if (!code.equals(response.code)) return false; + return viewPath.equals(response.viewPath); + + } + + @Override + public int hashCode() { + int result = code.hashCode(); + result = 31 * result + viewPath.hashCode(); + return result; + } + + @Override + public String toString() { + return "Response{" + + "code='" + code + '\'' + + ", viewPath='" + viewPath + '\'' + + '}'; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/View.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/View.java new file mode 100644 index 0000000000..d9473b2f4f --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/model/View.java @@ -0,0 +1,32 @@ +package com.coderising.litestruts.model; + +import java.util.Map; + +/** + * Created by huitailang on 17/3/4. + * @author zhangkun + * @date 2017骞03鏈05鏃17:47:05 + * 瑙嗗浘绫 + */ +public class View { + private String jsp;//璇锋眰鍝嶅簲jsp椤甸潰 + private Map parameters;//鍝嶅簲鏁版嵁model + + public String getJsp() { + return jsp; + } + + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + + public Map getParameters() { + return parameters; + } + + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/GenericTokenParser.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/GenericTokenParser.java new file mode 100644 index 0000000000..750a572fd6 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/GenericTokenParser.java @@ -0,0 +1,58 @@ +package com.coderising.litestruts.parser.xml; + +/** + * Created by huitailang on 17/3/5. + * 鏅氳鍙疯В鏋愬櫒锛屽鐞#{}鍜${}鍙傛暟 + */ +public class GenericTokenParser { + //鏈変竴涓紑濮嬪拰缁撴潫璁板彿 + private final String openToken; + private final String closeToken; + //璁板彿澶勭悊鍣 + private final TokenHandler handler; + + public GenericTokenParser(String openToken, String closeToken, TokenHandler handler) { + this.openToken = openToken; + this.closeToken = closeToken; + this.handler = handler; + } + + public String parse(String text) { + StringBuilder builder = new StringBuilder(); + if (text != null && text.length() > 0) { + char[] src = text.toCharArray(); + int offset = 0; + int start = text.indexOf(openToken, offset); + //#{favouriteSection,jdbcType=VARCHAR} + //杩欓噷鏄惊鐜В鏋愬弬鏁帮紝鍙傝僄enericTokenParserTest,姣斿鍙互瑙f瀽${first_name} ${initial} ${last_name} reporting.杩欐牱鐨勫瓧绗︿覆,閲岄潰鏈3涓 ${} + while (start > -1) { + //鍒ゆ柇涓涓 ${ 鍓嶉潰鏄惁鏄弽鏂滄潬锛岃繖涓昏緫鍦ㄨ佺増鐨刴ybatis涓紙濡3.1.0锛夋槸娌℃湁鐨 + if (start > 0 && src[start - 1] == '\\') { + // the variable is escaped. remove the backslash. + //鏂扮増宸茬粡娌℃湁璋冪敤substring浜嗭紝鏀逛负璋冪敤濡備笅鐨刼ffset鏂瑰紡锛屾彁楂樹簡鏁堢巼 + //issue #760 + builder.append(src, offset, start - offset - 1).append(openToken); + offset = start + openToken.length(); + } else { + int end = text.indexOf(closeToken, start); + if (end == -1) { + builder.append(src, offset, src.length - offset); + offset = src.length; + } else { + builder.append(src, offset, start - offset); + offset = start + openToken.length(); + String content = new String(src, offset, end - offset); + //寰楀埌涓瀵瑰ぇ鎷彿閲岀殑瀛楃涓插悗锛岃皟鐢╤andler.handleToken,姣斿鏇挎崲鍙橀噺杩欑鍔熻兘 + builder.append(handler.handleToken(content)); + offset = end + closeToken.length(); + } + } + start = text.indexOf(openToken, offset); + } + if (offset < src.length) { + builder.append(src, offset, src.length - offset); + } + } + return builder.toString(); + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/PropertyParser.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/PropertyParser.java new file mode 100644 index 0000000000..a9266bb497 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/PropertyParser.java @@ -0,0 +1,36 @@ +package com.coderising.litestruts.parser.xml; + +import java.util.Properties; + +/** + * Created by huitailang on 17/3/5. + * 灞炴цВ鏋愬櫒 + */ +public class PropertyParser { + private PropertyParser() { + // Prevent Instantiation + } + + public static String parse(String string, Properties variables) { + VariableTokenHandler handler = new VariableTokenHandler(variables); + GenericTokenParser parser = new GenericTokenParser("${", "}", handler); + return parser.parse(string); + } + + //灏辨槸涓涓猰ap锛岀敤鐩稿簲鐨剉alue鏇挎崲key + private static class VariableTokenHandler implements TokenHandler { + private Properties variables; + + public VariableTokenHandler(Properties variables) { + this.variables = variables; + } + + @Override + public String handleToken(String content) { + if (variables != null && variables.containsKey(content)) { + return variables.getProperty(content); + } + return "${" + content + "}"; + } + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/TokenHandler.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/TokenHandler.java new file mode 100644 index 0000000000..4f5cadbe6f --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/TokenHandler.java @@ -0,0 +1,10 @@ +package com.coderising.litestruts.parser.xml; + +/** + * Created by huitailang on 17/3/5. + * 璁板彿澶勭悊鍣 + */ +public interface TokenHandler { + //澶勭悊璁板彿 + String handleToken(String content); +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XNode.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XNode.java new file mode 100644 index 0000000000..0ed3b7b5a6 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XNode.java @@ -0,0 +1,394 @@ +package com.coderising.litestruts.parser.xml; + +import org.w3c.dom.*; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * Created by huitailang on 17/3/5. + * 瀵筼rg.w3c.dom.Node鐨勫寘瑁 + */ +public class XNode { + //org.w3c.dom.Node + private Node node; + //浠ヤ笅閮芥槸棰勫厛鎶婁俊鎭兘瑙f瀽濂斤紝鏀惧埌map绛夋暟鎹粨鏋勪腑锛堝唴瀛樹腑锛 + private String name; + private String body; + private Properties attributes; + private Properties variables; + //XPathParser鏂逛究xpath瑙f瀽 + private XPathParser xpathParser; + + //鍦ㄦ瀯閫犳椂灏辨妸涓浜涗俊鎭紙灞炴э紝body锛夊叏閮ㄨВ鏋愬ソ锛屼互渚挎垜浠洿鎺ラ氳繃getter鍑芥暟鍙栧緱 + public XNode(XPathParser xpathParser, Node node, Properties variables) { + this.xpathParser = xpathParser; + this.node = node; + this.name = node.getNodeName(); + this.variables = variables; + this.attributes = parseAttributes(node); + this.body = parseBody(node); + } + + public XNode newXNode(Node node) { + return new XNode(xpathParser, node, variables); + } + + public XNode getParent() { + //璋冪敤Node.getParentNode,濡傛灉鍙栧埌锛屽寘瑁呬竴涓嬶紝杩斿洖XNode + Node parent = node.getParentNode(); + if (parent == null || !(parent instanceof Element)) { + return null; + } else { + return new XNode(xpathParser, parent, variables); + } + } + + //鍙栧緱瀹屽叏鐨刾ath (a/b/c) + public String getPath() { + //寰幆渚濇鍙栧緱鑺傜偣鐨勭埗鑺傜偣锛岀劧鍚庡掑簭鎵撳嵃,涔熷彲浠ョ敤涓涓爢鏍堝疄鐜 + StringBuilder builder = new StringBuilder(); + Node current = node; + while (current != null && current instanceof Element) { + if (current != node) { + builder.insert(0, "/"); + } + builder.insert(0, current.getNodeName()); + current = current.getParentNode(); + } + return builder.toString(); + } + + //鍙栧緱鏍囩ず绗 ("resultMap[authorResult]") + //XMLMapperBuilder.resultMapElement璋冪敤 +// +// +// +// +// +// +// + public String getValueBasedIdentifier() { + StringBuilder builder = new StringBuilder(); + XNode current = this; + while (current != null) { + if (current != this) { + builder.insert(0, "_"); + } + //鍏堟嬁id锛屾嬁涓嶅埌鍐嶆嬁value,鍐嶆嬁涓嶅埌鎷縫roperty + String value = current.getStringAttribute("id", + current.getStringAttribute("value", + current.getStringAttribute("property", null))); + if (value != null) { + value = value.replace('.', '_'); + builder.insert(0, "]"); + builder.insert(0, + value); + builder.insert(0, "["); + } + builder.insert(0, current.getName()); + current = current.getParent(); + } + return builder.toString(); + } + + //浠ヤ笅鏂规硶閮芥槸鎶奨PathParser鐨勬柟娉曞啀閲嶅涓閬 + public String evalString(String expression) { + return xpathParser.evalString(node, expression); + } + + public Boolean evalBoolean(String expression) { + return xpathParser.evalBoolean(node, expression); + } + + public Double evalDouble(String expression) { + return xpathParser.evalDouble(node, expression); + } + + public List evalNodes(String expression) { + return xpathParser.evalNodes(node, expression); + } + + public XNode evalNode(String expression) { + return xpathParser.evalNode(node, expression); + } + + public Node getNode() { + return node; + } + + public String getName() { + return name; + } + + //浠ヤ笅鏄竴浜沢etBody鐨勬柟娉 + public String getStringBody() { + return getStringBody(null); + } + + public String getStringBody(String def) { + if (body == null) { + return def; + } else { + return body; + } + } + + public Boolean getBooleanBody() { + return getBooleanBody(null); + } + + public Boolean getBooleanBody(Boolean def) { + if (body == null) { + return def; + } else { + return Boolean.valueOf(body); + } + } + + public Integer getIntBody() { + return getIntBody(null); + } + + public Integer getIntBody(Integer def) { + if (body == null) { + return def; + } else { + return Integer.parseInt(body); + } + } + + public Long getLongBody() { + return getLongBody(null); + } + + public Long getLongBody(Long def) { + if (body == null) { + return def; + } else { + return Long.parseLong(body); + } + } + + public Double getDoubleBody() { + return getDoubleBody(null); + } + + public Double getDoubleBody(Double def) { + if (body == null) { + return def; + } else { + return Double.parseDouble(body); + } + } + + public Float getFloatBody() { + return getFloatBody(null); + } + + public Float getFloatBody(Float def) { + if (body == null) { + return def; + } else { + return Float.parseFloat(body); + } + } + + //浠ヤ笅鏄竴浜沢etAttribute鐨勬柟娉 + public > T getEnumAttribute(Class enumType, String name) { + return getEnumAttribute(enumType, name, null); + } + + public > T getEnumAttribute(Class enumType, String name, T def) { + String value = getStringAttribute(name); + if (value == null) { + return def; + } else { + return Enum.valueOf(enumType, value); + } + } + + public String getStringAttribute(String name) { + return getStringAttribute(name, null); + } + + public String getStringAttribute(String name, String def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return value; + } + } + + public Boolean getBooleanAttribute(String name) { + return getBooleanAttribute(name, null); + } + + public Boolean getBooleanAttribute(String name, Boolean def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return Boolean.valueOf(value); + } + } + + public Integer getIntAttribute(String name) { + return getIntAttribute(name, null); + } + + public Integer getIntAttribute(String name, Integer def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return Integer.parseInt(value); + } + } + + public Long getLongAttribute(String name) { + return getLongAttribute(name, null); + } + + public Long getLongAttribute(String name, Long def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return Long.parseLong(value); + } + } + + public Double getDoubleAttribute(String name) { + return getDoubleAttribute(name, null); + } + + public Double getDoubleAttribute(String name, Double def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return Double.parseDouble(value); + } + } + + public Float getFloatAttribute(String name) { + return getFloatAttribute(name, null); + } + + public Float getFloatAttribute(String name, Float def) { + String value = attributes.getProperty(name); + if (value == null) { + return def; + } else { + return Float.parseFloat(value); + } + } + + //寰楀埌瀛╁瓙锛屽師鐞嗘槸璋冪敤Node.getChildNodes + public List getChildren() { + List children = new ArrayList(); + NodeList nodeList = node.getChildNodes(); + if (nodeList != null) { + for (int i = 0, n = nodeList.getLength(); i < n; i++) { + Node node = nodeList.item(i); + if (node.getNodeType() == Node.ELEMENT_NODE) { + children.add(new XNode(xpathParser, node, variables)); + } + } + } + return children; + } + + //寰楀埌瀛╁瓙锛岃繑鍥濸roperties锛屽瀛愮殑鏍煎紡鑲畾閮芥湁name,value灞炴 + public Properties getChildrenAsProperties() { + Properties properties = new Properties(); + for (XNode child : getChildren()) { + String name = child.getStringAttribute("name"); + String value = child.getStringAttribute("value"); + if (name != null && value != null) { + properties.setProperty(name, value); + } + } + return properties; + } + + //鎵撳嵃淇℃伅锛屼负浜嗚皟璇曠敤 + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("<"); + builder.append(name); + for (Map.Entry entry : attributes.entrySet()) { + builder.append(" "); + builder.append(entry.getKey()); + builder.append("=\""); + builder.append(entry.getValue()); + builder.append("\""); + } + List children = getChildren(); + if (!children.isEmpty()) { + builder.append(">\n"); + for (XNode node : children) { + //閫掑綊鍙栧緱瀛╁瓙鐨則oString + builder.append(node.toString()); + } + builder.append(""); + } else if (body != null) { + builder.append(">"); + builder.append(body); + builder.append(""); + } else { + builder.append("/>"); + } + builder.append("\n"); + return builder.toString(); + } + + //浠ヤ笅2涓柟娉曞湪鏋勯犳椂灏辫В鏋 + private Properties parseAttributes(Node n) { + Properties attributes = new Properties(); + NamedNodeMap attributeNodes = n.getAttributes(); + if (attributeNodes != null) { + for (int i = 0; i < attributeNodes.getLength(); i++) { + Node attribute = attributeNodes.item(i); + String value = PropertyParser.parse(attribute.getNodeValue(), variables); + attributes.put(attribute.getNodeName(), value); + } + } + return attributes; + } + + private String parseBody(Node node) { + //鍙栦笉鍒癰ody锛屽惊鐜彇瀛╁瓙鐨刡ody锛屽彧瑕佸彇鍒扮涓涓紝绔嬪嵆杩斿洖 + String data = getBodyData(node); + if (data == null) { + NodeList children = node.getChildNodes(); + for (int i = 0; i < children.getLength(); i++) { + Node child = children.item(i); + data = getBodyData(child); + if (data != null) { + break; + } + } + } + return data; + } + + private String getBodyData(Node child) { + if (child.getNodeType() == Node.CDATA_SECTION_NODE + || child.getNodeType() == Node.TEXT_NODE) { + String data = ((CharacterData) child).getData(); + data = PropertyParser.parse(data, variables); + return data; + } + return null; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XPathParser.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XPathParser.java new file mode 100644 index 0000000000..3397e0e227 --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/parser/xml/XPathParser.java @@ -0,0 +1,265 @@ +package com.coderising.litestruts.parser.xml; + +import com.coderising.litestruts.exception.BuilderException; + +import java.io.InputStream; +import java.io.Reader; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import javax.xml.namespace.QName; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathFactory; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.EntityResolver; +import org.xml.sax.ErrorHandler; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +/** + * Created by huitailang on 17/3/5. + * XPath瑙f瀽鍣 + */ +public class XPathParser { + private Document document; + private boolean validation; + private EntityResolver entityResolver; + private Properties variables; + private XPath xpath; + + public XPathParser(Reader reader) { + commonConstructor(false, null, null); + this.document = createDocument(new InputSource(reader)); + } + + public XPathParser(InputStream inputStream) { + commonConstructor(false, null, null); + this.document = createDocument(new InputSource(inputStream)); + } + + public XPathParser(Document document) { + commonConstructor(false, null, null); + this.document = document; + } + + //5~8,浼犲叆鏄惁闇瑕侀獙璇佸弬鏁 + public XPathParser(String xml, boolean validation) { + commonConstructor(validation, null, null); + this.document = createDocument(new InputSource(new StringReader(xml))); + } + + public XPathParser(Reader reader, boolean validation) { + commonConstructor(validation, null, null); + this.document = createDocument(new InputSource(reader)); + } + + public XPathParser(InputStream inputStream, boolean validation) { + commonConstructor(validation, null, null); + this.document = createDocument(new InputSource(inputStream)); + } + + public XPathParser(Document document, boolean validation) { + commonConstructor(validation, null, null); + this.document = document; + } + + //9~12,浼犲叆鏄惁闇瑕侀獙璇佸弬鏁,Properties + public XPathParser(String xml, boolean validation, Properties variables) { + commonConstructor(validation, variables, null); + this.document = createDocument(new InputSource(new StringReader(xml))); + } + + public XPathParser(Reader reader, boolean validation, Properties variables) { + commonConstructor(validation, variables, null); + this.document = createDocument(new InputSource(reader)); + } + + public XPathParser(InputStream inputStream, boolean validation, Properties variables) { + commonConstructor(validation, variables, null); + this.document = createDocument(new InputSource(inputStream)); + } + + public XPathParser(Document document, boolean validation, Properties variables) { + commonConstructor(validation, variables, null); + this.document = document; + } + + //13~16,浼犲叆鏄惁闇瑕侀獙璇佸弬鏁,Properties,EntityResolver + public XPathParser(String xml, boolean validation, Properties variables, EntityResolver entityResolver) { + commonConstructor(validation, variables, entityResolver); + this.document = createDocument(new InputSource(new StringReader(xml))); + } + + public XPathParser(Reader reader, boolean validation, Properties variables, EntityResolver entityResolver) { + commonConstructor(validation, variables, entityResolver); + this.document = createDocument(new InputSource(reader)); + } + + public XPathParser(InputStream inputStream, boolean validation, Properties variables, EntityResolver entityResolver) { + commonConstructor(validation, variables, entityResolver); + this.document = createDocument(new InputSource(inputStream)); + } + + public XPathParser(Document document, boolean validation, Properties variables, EntityResolver entityResolver) { + commonConstructor(validation, variables, entityResolver); + this.document = document; + } + + //17.璁剧疆Properties + public void setVariables(Properties variables) { + this.variables = variables; + } + + public String evalString(String expression) { + return evalString(document, expression); + } + + public String evalString(Object root, String expression) { + //1.鍏堢敤xpath瑙f瀽 + String result = (String) evaluate(expression, root, XPathConstants.STRING); + //2.鍐嶈皟鐢≒ropertyParser鍘昏В鏋,涔熷氨鏄浛鎹 ${} 杩欑鏍煎紡鐨勫瓧绗︿覆 + result = PropertyParser.parse(result, variables); + return result; + } + + public Boolean evalBoolean(String expression) { + return evalBoolean(document, expression); + } + + public Boolean evalBoolean(Object root, String expression) { + return (Boolean) evaluate(expression, root, XPathConstants.BOOLEAN); + } + + public Short evalShort(String expression) { + return evalShort(document, expression); + } + + public Short evalShort(Object root, String expression) { + return Short.valueOf(evalString(root, expression)); + } + + public Integer evalInteger(String expression) { + return evalInteger(document, expression); + } + + public Integer evalInteger(Object root, String expression) { + return Integer.valueOf(evalString(root, expression)); + } + + public Long evalLong(String expression) { + return evalLong(document, expression); + } + + public Long evalLong(Object root, String expression) { + return Long.valueOf(evalString(root, expression)); + } + + public Float evalFloat(String expression) { + return evalFloat(document, expression); + } + + //??杩欓噷鏈夌偣鐤戦棶锛屼负浣旻loat鐢╡valString,Double鐢╡valuate XPathConstants.NUMBER + public Float evalFloat(Object root, String expression) { + return Float.valueOf(evalString(root, expression)); + } + + public Double evalDouble(String expression) { + return evalDouble(document, expression); + } + + public Double evalDouble(Object root, String expression) { + return (Double) evaluate(expression, root, XPathConstants.NUMBER); + } + + public List evalNodes(String expression) { + return evalNodes(document, expression); + } + + //杩斿洖鑺傜偣List + public List evalNodes(Object root, String expression) { + List xnodes = new ArrayList(); + NodeList nodes = (NodeList) evaluate(expression, root, XPathConstants.NODESET); + for (int i = 0; i < nodes.getLength(); i++) { + xnodes.add(new XNode(this, nodes.item(i), variables)); + } + return xnodes; + } + + public XNode evalNode(String expression) { + return evalNode(document, expression); + } + + //杩斿洖鑺傜偣 + public XNode evalNode(Object root, String expression) { + Node node = (Node) evaluate(expression, root, XPathConstants.NODE); + if (node == null) { + return null; + } + return new XNode(this, node, variables); + } + + private Object evaluate(String expression, Object root, QName returnType) { + try { + //鏈缁堝悎娴佸埌杩欏効锛岀洿鎺ヨ皟鐢╔Path.evaluate + return xpath.evaluate(expression, root, returnType); + } catch (Exception e) { + throw new BuilderException("Error evaluating XPath. Cause: " + e, e); + } + } + + + private Document createDocument(InputSource inputSource) { + try { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setValidating(validation); + + //鍚嶇О绌洪棿 + factory.setNamespaceAware(false); + //蹇界暐娉ㄩ噴 + factory.setIgnoringComments(true); + //蹇界暐绌虹櫧 + factory.setIgnoringElementContentWhitespace(false); + //CDATA鑺傜偣杞崲涓篢ext鑺傜偣 + factory.setCoalescing(false); + //鎵╁睍瀹炰綋搴旂敤 + factory.setExpandEntityReferences(true); + + DocumentBuilder builder = factory.newDocumentBuilder(); + builder.setEntityResolver(entityResolver); + builder.setErrorHandler(new ErrorHandler() { + public void warning(SAXParseException exception) throws SAXException { + throw exception; + } + + public void error(SAXParseException exception) throws SAXException { + throw exception; + } + + public void fatalError(SAXParseException exception) throws SAXException { + + } + }); + + return builder.parse(inputSource); + } catch (Exception e) { + throw new BuilderException("Error creating document instance. Cause: " + e, e); + } + } + + private void commonConstructor(boolean validation, Properties variables, EntityResolver entityResolver) { + this.validation = validation; + this.entityResolver = entityResolver; + this.variables = variables; + XPathFactory factory = XPathFactory.newInstance(); + this.xpath = factory.newXPath(); + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ArrayUtil.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ArrayUtil.java new file mode 100644 index 0000000000..6624542fde --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ArrayUtil.java @@ -0,0 +1,26 @@ +package com.coderising.litestruts.util; + +import java.util.Collection; +import java.util.Iterator; + +/** + * Created by huitailang on 17/3/5. + * @author zhangkun + * @date 2017骞03鏈05鏃17:45:06 + * array鎿嶄綔宸ュ叿绫 + */ +public final class ArrayUtil { + @SuppressWarnings("unchecked") + public static T[] convertCollectionToArray(Collection collection){ + Iterator iterator = collection.iterator(); + Object[] array = new Object[collection.size()]; + int i = 0; + + while (iterator.hasNext()){ + T value = iterator.next(); + array[i++] = (Object)value; + } + + return (T[])array; + } +} diff --git a/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ClassUtil.java b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ClassUtil.java new file mode 100644 index 0000000000..36a4821bdb --- /dev/null +++ b/group08/769638826/03-05/src/main/java/com/coderising/litestruts/util/ClassUtil.java @@ -0,0 +1,45 @@ +package com.coderising.litestruts.util; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +/** + * Created by huitailang on 17/3/5. + * + * @author zhangkun + * @date 2017骞03鏈05鏃17:56:35 + * Class鎿嶄綔鐪嬬浉鍏冲伐鍏风被 + */ +public final class ClassUtil { + public static final String DEFAULT_HANDLER_METHOD = "exectue"; + public static final String GETTER_METHOD_PREFIX = "get"; + public static final String SETTER_METHOD_PREFIX = "set"; + + public static String setter(String fieldName) { + return SETTER_METHOD_PREFIX + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + } + + public static String getter(String fieldName) { + return GETTER_METHOD_PREFIX + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + } + + public static String extractFieldName(Method method) { + return method.getName().substring(GETTER_METHOD_PREFIX.length(), GETTER_METHOD_PREFIX.length() + 1) + + method.getName().substring(GETTER_METHOD_PREFIX.length() + 1); + } + + public static Method[] getGetterMethod(Class clazz) { + Method[] methods = clazz.getDeclaredMethods(); + List methodList = new ArrayList<>(); + + for (int i = 0; i < methods.length; i++) { + Method method = methods[i]; + if (method.getName().startsWith(GETTER_METHOD_PREFIX)) { + methodList.add(method); + } + } + + return ArrayUtil.convertCollectionToArray(methodList); + } +} diff --git a/group08/769638826/03-05/src/main/resources/struts.xml b/group08/769638826/03-05/src/main/resources/struts.xml new file mode 100644 index 0000000000..82e20ceb22 --- /dev/null +++ b/group08/769638826/03-05/src/main/resources/struts.xml @@ -0,0 +1,12 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group08/769638826/03-05/src/test/java/com/coderising/array/ArrayUtilTest.java b/group08/769638826/03-05/src/test/java/com/coderising/array/ArrayUtilTest.java new file mode 100644 index 0000000000..47c2bdefc6 --- /dev/null +++ b/group08/769638826/03-05/src/test/java/com/coderising/array/ArrayUtilTest.java @@ -0,0 +1,92 @@ +package com.coderising.array; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Arrays; + +/** + * Created by huitailang on 17/3/3. + * 宸ュ叿绫绘祴璇 + */ +public class ArrayUtilTest { + @Test + public void testReverseArray() { + int[] origin = {7, 9, 30, 3}; + int[] newArray = {3, 30, 9, 7}; + + ArrayUtil.reverseArray(origin); + + print(origin); + + Assert.assertArrayEquals(newArray, origin); + } + + @Test + public void testRemoveZero() { + int[] oldArray = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; + int[] expectdArray = {1, 3, 4, 5, 6, 6, 5, 4, 7, 6, 7, 5}; + + print(ArrayUtil.removeZero(oldArray)); + + Assert.assertArrayEquals(expectdArray, ArrayUtil.removeZero(oldArray)); + } + + @Test + public void testMerge() { + int[] array1 = {3, 5, 7, 8}; + int[] array2 = {4, 5, 6, 7}; + int[] expectedArray = {3, 4, 5, 6, 7, 8}; + + System.out.println(Arrays.toString(ArrayUtil.merge(array1, array2))); + + Assert.assertArrayEquals(expectedArray, ArrayUtil.merge(array1, array2)); + } + + @Test + public void testGrow() { + int[] oldArray = {2, 3, 6}; + int[] expectedArray = {2, 3, 6, 0, 0, 0}; + Assert.assertArrayEquals(expectedArray, ArrayUtil.grow(oldArray, 3)); + } + + @Test + public void testFibonacci() { + int[] expectedArray = {1, 1, 2, 3, 5, 8, 13}; + + print(ArrayUtil.fibonacci(13)); + + Assert.assertArrayEquals(expectedArray, ArrayUtil.fibonacci(13)); + } + + @Test + public void testGetPrimes() { + int[] expectedArray = {2, 3, 5, 7, 11, 13, 17, 19}; + Assert.assertArrayEquals(expectedArray, ArrayUtil.getPrimes(23)); + } + + @Test + public void testIsPerfectNumber() { + Assert.assertTrue(ArrayUtil.isPerfectNumber(6)); + } + + @Test + public void testGetPerfectNumbers() { + print(ArrayUtil.getPerfectNumbers(15)); + } + + @Test + public void testJoin() { + int[] origin = {3, 8, 9}; + String seperator = "-"; + String str = "3-8-9"; + + Assert.assertEquals(str, ArrayUtil.join(origin, seperator)); + } + + private void print(int[] array) { + for (int i = 0; i < array.length; i++) { + System.out.println(array[i]); + } + } +} diff --git a/group08/769638826/03-05/src/test/java/com/coderising/litestruts/StrutsTest.java b/group08/769638826/03-05/src/test/java/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..6dad7315ac --- /dev/null +++ b/group08/769638826/03-05/src/test/java/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,40 @@ +package com.coderising.litestruts; + +import com.coderising.litestruts.model.View; +import org.junit.Assert; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by huitailang on 17/3/4. + * litestruts娴嬭瘯 + */ +public class StrutsTest { + @Test + public void testLoginActionSuccess() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "1234"); + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "123456"); + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group08/769638826/03-05/src/test/java/com/coderising/litestruts/parser/xml/XPathParserTest.java b/group08/769638826/03-05/src/test/java/com/coderising/litestruts/parser/xml/XPathParserTest.java new file mode 100644 index 0000000000..a8045a9e49 --- /dev/null +++ b/group08/769638826/03-05/src/test/java/com/coderising/litestruts/parser/xml/XPathParserTest.java @@ -0,0 +1,45 @@ +package com.coderising.litestruts.parser.xml; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +import java.io.InputStream; + +/** + * Created by huitailang on 17/3/5. + * Xpath瑙f瀽娴嬭瘯 + */ +public class XPathParserTest { + @Test + public void shouldTestXPathParserMethods() throws Exception { + InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("nodelet_test.xml"); + XPathParser parser = new XPathParser(inputStream, false, null, null); + assertEquals((Long) 1970l, parser.evalLong("/employee/birth_date/year")); + assertEquals((short) 6, (short) parser.evalShort("/employee/birth_date/month")); + assertEquals((Integer) 15, parser.evalInteger("/employee/birth_date/day")); + assertEquals((Float) 5.8f, parser.evalFloat("/employee/height")); + assertEquals((Double) 5.8d, parser.evalDouble("/employee/height")); + assertEquals("${id_var}", parser.evalString("/employee/@id")); + assertEquals(Boolean.TRUE, parser.evalBoolean("/employee/active")); + assertEquals("${id_var}", parser.evalNode("/employee/@id").toString().trim()); + assertEquals(7, parser.evalNodes("/employee/*").size()); + XNode node = parser.evalNode("/employee/height"); + assertEquals("employee/height", node.getPath()); + assertEquals("employee[${id_var}]_height", node.getValueBasedIdentifier()); + } + + @Test + public void testXPathParserMethods(){ + InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("struts.xml"); + XPathParser parser = new XPathParser(inputStream, false, null, null); + assertEquals(2, parser.evalNodes("/struts/*").size()); + XNode node0 = parser.evalNodes("/struts/*").get(0); + assertEquals("login", node0.evalString("/struts/action/@name")); + assertEquals("com.coderising.litestruts.action.LoginAction", node0.evalString("/struts/action/@class")); + XNode subNode0 = node0.evalNodes("/*").get(0); + assertEquals("success", subNode0.evalString("/struts/action/result/@name")); + assertEquals("/jsp/homepage.jsp", subNode0.evalString("/struts/action/result")); + } +} diff --git a/group08/769638826/03-05/src/test/resources/nodelet_test.xml b/group08/769638826/03-05/src/test/resources/nodelet_test.xml new file mode 100644 index 0000000000..1aef7790aa --- /dev/null +++ b/group08/769638826/03-05/src/test/resources/nodelet_test.xml @@ -0,0 +1,13 @@ + + + Jim + Smith + + 1970 + 6 + 15 + + 5.8 + 200 + true + \ No newline at end of file diff --git a/group08/769638826/03-05/src/test/resources/struts.xml b/group08/769638826/03-05/src/test/resources/struts.xml new file mode 100644 index 0000000000..82e20ceb22 --- /dev/null +++ b/group08/769638826/03-05/src/test/resources/struts.xml @@ -0,0 +1,12 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From ce8b11925b80d902ab78d78de14bc23d8c41a16e Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Sun, 5 Mar 2017 21:27:44 +0800 Subject: [PATCH 103/646] change some bugs --- group12/247565311/week2/ArrayUtil.java | 6 +++--- group12/247565311/week2/Struts.java | 7 ------- group12/247565311/week2/StrutsTest.java | 2 -- group12/247565311/week2/View.java | 3 +++ liuxin/src/com/coderising/litestruts/Struts.java | 1 + 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/group12/247565311/week2/ArrayUtil.java b/group12/247565311/week2/ArrayUtil.java index ba88dd147c..b76726b7b5 100644 --- a/group12/247565311/week2/ArrayUtil.java +++ b/group12/247565311/week2/ArrayUtil.java @@ -11,9 +11,9 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin){ // time :O(n) - int leno = origin.length,temp=0; + int leno = origin.length; for(int i=0;i parameters) { + /* 0. 璇诲彇閰嶇疆鏂囦欢struts.xml From 98f0c0cafde61ca1a8d482b2283341d2f790fd14 Mon Sep 17 00:00:00 2001 From: Hipple <1159828430@qq.com> Date: Sun, 5 Mar 2017 21:51:35 +0800 Subject: [PATCH 104/646] liteStruts --- group18/1159828430/20170226/.classpath | 9 + group18/1159828430/20170226/.gitignore | 1 + group18/1159828430/20170226/.project | 17 ++ .../src/com/coding/array/ArrayUtil.java | 232 ++++++++++++++++++ .../src/com/coding/array/ArrayUtilTest.java | 80 ++++++ .../com/coding/litestruts/LoginAction.java | 38 +++ .../src/com/coding/litestruts/Struts.java | 84 +++++++ .../src/com/coding/litestruts/StrutsTest.java | 43 ++++ .../src/com/coding/litestruts/View.java | 27 ++ .../src/com/coding/litestruts/struts.xml | 11 + 10 files changed, 542 insertions(+) create mode 100644 group18/1159828430/20170226/.classpath create mode 100644 group18/1159828430/20170226/.gitignore create mode 100644 group18/1159828430/20170226/.project create mode 100644 group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java create mode 100644 group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java create mode 100644 group18/1159828430/20170226/src/com/coding/litestruts/LoginAction.java create mode 100644 group18/1159828430/20170226/src/com/coding/litestruts/Struts.java create mode 100644 group18/1159828430/20170226/src/com/coding/litestruts/StrutsTest.java create mode 100644 group18/1159828430/20170226/src/com/coding/litestruts/View.java create mode 100644 group18/1159828430/20170226/src/com/coding/litestruts/struts.xml diff --git a/group18/1159828430/20170226/.classpath b/group18/1159828430/20170226/.classpath new file mode 100644 index 0000000000..2dcf9f7eab --- /dev/null +++ b/group18/1159828430/20170226/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/group18/1159828430/20170226/.gitignore b/group18/1159828430/20170226/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group18/1159828430/20170226/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group18/1159828430/20170226/.project b/group18/1159828430/20170226/.project new file mode 100644 index 0000000000..30be1e8fb2 --- /dev/null +++ b/group18/1159828430/20170226/.project @@ -0,0 +1,17 @@ + + + 20170226 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java b/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java new file mode 100644 index 0000000000..3440cbbb71 --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java @@ -0,0 +1,232 @@ +package com.coding.array; + +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * @author Scholar + * @Time锛2017骞2鏈27鏃 涓嬪崍8:46:07 + * @version 1.0 + */ +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + * @return + */ + public static int[] reverseArray(int[] origin){ + for (int i = 0; i < origin.length/2; i++) { + int temp = origin[i]; + origin[i] = origin[origin.length-i-1]; + origin[origin.length-i-1] = temp; + } + return origin; + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public static int[] removeZero(int[] oldArray){ + //姝e父鏂瑰紡 + /*List list = new ArrayList(); + for (int i : oldArray) + if (i != 0) + list.add(i); + + int[] newArray = new int[list.size()]; + for (int i = 0; i < newArray.length; i++) { + newArray[i] = list.get(i); + }*/ + //jdk1.8 + IntStream intStream = Arrays.stream(oldArray); + int[] newArray = intStream.filter(i -> i != 0).toArray(); + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public static int[] merge(int[] array1, int[] array2){ + int[] newArray= new int[array1.length + array2.length]; + System.arraycopy(array1, 0, newArray, 0, array1.length); + System.arraycopy(array2, 0, newArray, array1.length, array2.length); + + //Arrays.sort(newArray);//蹇熸帓搴 + + //鍐掓场鎺掑簭 + /*for(int i=0;i newArray[j]){ + int temp = newArray[i]; + newArray[i] = newArray[j]; + newArray[j] = temp; + } + } + }*/ + + //閫夋嫨鎺掑簭 + /*for (int i = 0; i < newArray.length - 1; i++) { + int min = i; + for (int j = i + 1; j < newArray.length; j++) { + if (newArray[min] > newArray[j]) { + min = j; + } + } + if (min != i) { + int temp = newArray[i]; + newArray[i] = newArray[min]; + newArray[min] = temp; + } + }*/ + + //鎻掑叆鎺掑簭 + for (int i = 1; i < newArray.length; i++) { + for (int j = i; j > 0; j--) { + if (newArray[j] < newArray[j - 1]) { + int temp = newArray[j - 1]; + newArray[j - 1] = newArray[j]; + newArray[j] = temp; + } else + break; + } + } + return newArray; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public static int[] grow(int [] oldArray, int size){ + oldArray = Arrays.copyOf(oldArray, oldArray.length + size); + return oldArray; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static int[] fibonacci(int max){ + List list = new ArrayList(); + if (max == 1) { + int[] newArr = null; + return newArr; + } else { + for (int i = 0; i <= max; i++) { + int value = fibonacciSequence(i); + if (value < max) { + list.add(value); + } else { + break; + } + } + } + int[] newArray = list.stream().mapToInt(i -> i).toArray(); + return newArray; + } + + private static int fibonacciSequence(int n){ + if(n < 2){ + return 1; + }else{ + return fibonacciSequence(n-1) + fibonacciSequence(n-2); + } + } + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + @SuppressWarnings("unused") + public static int[] getPrimes(int max){ + List list = new ArrayList(); + for (int i = 2; i < max; i++) { + list.add(i); + for (int j = 2; j <= Math.sqrt(i); j++) { + if (i % j == 0){ + Integer temp = i; + list.remove(temp); + break; + } + } + } + + int[] newArray = list.stream().mapToInt(i -> i).toArray(); + return newArray; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public static int[] getPerfectNumbers(int max){ + List list = new ArrayList(); + int[] newArray = null; + if (!(max < 6)) {//绗竴涓畬鏁颁负6 + for (int i = 6; i < max; i++) { + int sum = 0; + for (int j = 1; j <= i/2; j++) { + if (i % j == 0) { + sum += j; + } + } + if (sum == i) { + list.add(i); + } + System.out.println(i); + } + newArray = list.stream().mapToInt(i -> i).toArray(); + } + return newArray; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public static String join(int[] array, String seperator){ + StringBuilder str = new StringBuilder(); + for (int i = 0; i < array.length; i++) { + str.append(array[i]); + if(i != array.length - 1){ + str.append(seperator); + } + } + return str.toString(); + } + +} + diff --git a/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java b/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java new file mode 100644 index 0000000000..a07658d0ca --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java @@ -0,0 +1,80 @@ +package com.coding.array; + +import static org.junit.Assert.*; + +import java.util.Arrays; +import java.util.stream.IntStream; +import java.util.stream.Stream; + +import org.junit.Test; + +/** + * @author Scholar + * @Time锛2017骞3鏈4鏃 涓婂崍9:12:27 + * @version 1.0 + */ +public class ArrayUtilTest { + + @Test + public void testReverseArray(){ + int[] oldArr = {7, 9 , 30, 3}; + int[] newArr = ArrayUtil.reverseArray(oldArr); + int[] resultArr = {3, 30 , 9, 7}; + assertArrayEquals(resultArr, newArr); + + } + + @Test + public void testRemoveZero() { + int[] oldArr = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int[] newArr = ArrayUtil.removeZero(oldArr); + int[] resultArr = {1,3,4,5,6,6,5,4,7,6,7,5}; + assertArrayEquals(resultArr, newArr); + } + + @Test + public void testMerge() { + int[] a1 = {3,5,7,8}; + int[] a2 = {4, 5, 6,7}; + int[] newArr = ArrayUtil.merge(a1, a2); + Arrays.stream(newArr).forEach(i -> System.out.println(i)); + } + + @Test + public void testGrow() { + int[] oldArr = {2,3,6}; + int[] newArr = ArrayUtil.grow(oldArr, 3); + int[] resultArr = {2,3,6,0,0,0}; + assertArrayEquals(resultArr, newArr); + } + + @Test + public void testFibonacci() { + int[] newArr = ArrayUtil.fibonacci(15); + int[] resultArr = {1, 1, 2, 3, 5, 8, 13}; + assertArrayEquals(resultArr, newArr); + } + + @Test + public void testGetPrimes() { + int[] newArr = ArrayUtil.getPrimes(23); + int[] resultArr = {2,3,5,7,11,13,17,19}; + assertArrayEquals(resultArr, newArr); + } + + @Test + public void testGetPerfectNumbers() { + int[] newArr = ArrayUtil.getPerfectNumbers(500); + int[] resultArr = {6, 28, 496}; + assertArrayEquals(resultArr, newArr); + } + + @Test + public void testJoin() { + int[] oldArr = {3,8,9}; + String resultStr = ArrayUtil.join(oldArr, "-"); + String str = "3-8-9"; + assertEquals(str, resultStr); + } + +} diff --git a/group18/1159828430/20170226/src/com/coding/litestruts/LoginAction.java b/group18/1159828430/20170226/src/com/coding/litestruts/LoginAction.java new file mode 100644 index 0000000000..308a0c17fd --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/litestruts/LoginAction.java @@ -0,0 +1,38 @@ +package com.coding.litestruts; +/** + * @author Scholar + * @Time锛2017骞2鏈27鏃 涓嬪崍8:50:23 + * @version 1.0 + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group18/1159828430/20170226/src/com/coding/litestruts/Struts.java b/group18/1159828430/20170226/src/com/coding/litestruts/Struts.java new file mode 100644 index 0000000000..92a485db1b --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/litestruts/Struts.java @@ -0,0 +1,84 @@ +package com.coding.litestruts; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +/** + * @author Scholar + * @Time锛2017骞2鏈27鏃 涓嬪崍8:49:47 + * @version 1.0 + */ +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + try {//澶氳浠g爜闇瑕乼ry catch鏃讹紝濡備綍鍚堢悊浣跨敤try cath鍜宼hrow Exception锛 + Element actionElement = getElement("action", actionName); + //瀹炰緥鍖朼ction骞惰缃弬鏁 + String actionAdress = actionElement.attribute("class").getText(); + Class actionClass = Class.forName(actionAdress); + Object actionObj = actionClass.newInstance(); + for (Entry entry : parameters.entrySet()) { + Method setMethod = actionClass.getMethod("set"+initStr(entry.getKey()), String.class); + setMethod.invoke(actionObj, entry.getValue()); + } + + //鎵цexecute + Method executeMethod = actionClass.getMethod("execute"); + //Type returnType = m.getGenericReturnType();//鑾峰彇杩斿洖鍊肩被鍨 + String returnValue = (String)executeMethod.invoke(actionObj);//杩欓噷濡備綍鏍规嵁杩斿洖绫诲瀷鏉ュ姩鎬佹帴鏀舵柟娉曠殑杩斿洖鍊硷紵 + + //鑾峰彇杩斿洖鍊兼斁鍒皏iew + Map params = new HashMap(); + Field[] fields = actionClass.getDeclaredFields(); + for (Field field : fields) { + Method m = actionClass.getMethod("get"+initStr(field.getName())); + params.put(field.getName(), (String) m.invoke(actionObj)); + } + Class viewClass = View.class; + Object viewObj = viewClass.newInstance(); + Field paramField = viewClass.getDeclaredField("parameters"); + paramField.setAccessible(true); + paramField.set(viewObj, params); + + //灏嗗搴攔esult鐨勫艰祴鍊肩粰view骞惰繑鍥瀡iew瀵硅薄 + Element resultElement = getElement("result", returnValue); + String jsp = resultElement.getStringValue(); + Method setJsp = viewClass.getMethod("setJsp", String.class); + return (View)setJsp.invoke(viewObj, jsp); + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + //DOM4J缁撳悎XPATH瑙f瀽XML,鍙栧緱鐩稿簲鐨勮妭鐐 + private static Element getElement(String node, String name){ + Document document; + Element element = null; + try { + File file = new File("src/com/coding/litestruts/struts.xml"); + SAXReader reader = new SAXReader(); + document = reader.read(file); + element = (Element) document.selectSingleNode("//"+ node + "[@name='" + name + "']"); + } catch (Exception e) { + System.out.println("璇诲彇XML澶辫触"); + } + return element; + } + + // 灏嗗崟璇嶇殑棣栧瓧姣嶅ぇ鍐 + public static String initStr(String old){ + String str = old.substring(0,1).toUpperCase() + old.substring(1) ; + return str ; + } +} \ No newline at end of file diff --git a/group18/1159828430/20170226/src/com/coding/litestruts/StrutsTest.java b/group18/1159828430/20170226/src/com/coding/litestruts/StrutsTest.java new file mode 100644 index 0000000000..4bf614bbbc --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coding.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +/** + * @author Scholar + * @Time锛2017骞2鏈27鏃 涓嬪崍8:51:23 + * @version 1.0 + */ +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group18/1159828430/20170226/src/com/coding/litestruts/View.java b/group18/1159828430/20170226/src/com/coding/litestruts/View.java new file mode 100644 index 0000000000..3c7175350a --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/litestruts/View.java @@ -0,0 +1,27 @@ +package com.coding.litestruts; + +import java.util.Map; +/** + * @author Scholar + * @Time锛2017骞2鏈27鏃 涓嬪崍8:49:10 + * @version 1.0 + */ +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git a/group18/1159828430/20170226/src/com/coding/litestruts/struts.xml b/group18/1159828430/20170226/src/com/coding/litestruts/struts.xml new file mode 100644 index 0000000000..60f2bc6c41 --- /dev/null +++ b/group18/1159828430/20170226/src/com/coding/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 211f2809ab913e1fc636db3bc1ca8936263b8c20 Mon Sep 17 00:00:00 2001 From: Hipple <1159828430@qq.com> Date: Sun, 5 Mar 2017 22:14:34 +0800 Subject: [PATCH 105/646] update Merge --- .../src/com/coding/array/ArrayUtil.java | 66 +++++++------------ .../src/com/coding/array/ArrayUtilTest.java | 3 +- 2 files changed, 27 insertions(+), 42 deletions(-) diff --git a/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java b/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java index 3440cbbb71..c634a3a0b6 100644 --- a/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java +++ b/group18/1159828430/20170226/src/com/coding/array/ArrayUtil.java @@ -65,49 +65,33 @@ public static int[] removeZero(int[] oldArray){ */ public static int[] merge(int[] array1, int[] array2){ - int[] newArray= new int[array1.length + array2.length]; - System.arraycopy(array1, 0, newArray, 0, array1.length); - System.arraycopy(array2, 0, newArray, array1.length, array2.length); - - //Arrays.sort(newArray);//蹇熸帓搴 - - //鍐掓场鎺掑簭 - /*for(int i=0;i newArray[j]){ - int temp = newArray[i]; - newArray[i] = newArray[j]; - newArray[j] = temp; - } - } - }*/ - - //閫夋嫨鎺掑簭 - /*for (int i = 0; i < newArray.length - 1; i++) { - int min = i; - for (int j = i + 1; j < newArray.length; j++) { - if (newArray[min] > newArray[j]) { - min = j; - } - } - if (min != i) { - int temp = newArray[i]; - newArray[i] = newArray[min]; - newArray[min] = temp; - } - }*/ - - //鎻掑叆鎺掑簭 - for (int i = 1; i < newArray.length; i++) { - for (int j = i; j > 0; j--) { - if (newArray[j] < newArray[j - 1]) { - int temp = newArray[j - 1]; - newArray[j - 1] = newArray[j]; - newArray[j] = temp; - } else - break; + int lena = array1.length; + int lenb = array2.length; + int[] newArray = new int[lena + lenb]; + int i = 0, j = 0, k = 0;// 鍒嗗埆浠h〃鏁扮粍a ,b , c 鐨勭储寮 + + while (i < array1.length && j < array2.length) + if (array1[i] <= array2[j]) { + if (k == 0 || newArray[k - 1] != array1[i]) // 鍘婚噸澶 + newArray[k++] = array1[i]; + i++; + } else { + if (k == 0 || newArray[k - 1] != array2[j]) // 鍘婚噸澶 + newArray[k++] = array2[j]; + j++; } + + while (i < array1.length) { + if (k == 0 || newArray[k - 1] != array1[i]) // 鍘婚噸澶 + newArray[k++] = array1[i]; + i++; + } + while (j < array2.length) { + if (k == 0 || newArray[k - 1] != array2[j]) // 鍘婚噸澶 + newArray[k++] = array2[j]; + j++; } + newArray = removeZero(newArray); return newArray; } /** diff --git a/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java b/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java index a07658d0ca..575c02540c 100644 --- a/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java +++ b/group18/1159828430/20170226/src/com/coding/array/ArrayUtilTest.java @@ -37,7 +37,8 @@ public void testMerge() { int[] a1 = {3,5,7,8}; int[] a2 = {4, 5, 6,7}; int[] newArr = ArrayUtil.merge(a1, a2); - Arrays.stream(newArr).forEach(i -> System.out.println(i)); + int[] resultArr = {3,4,5,6,7,8}; + assertArrayEquals(resultArr, newArr); } @Test From 16be33e3daa8fd3fb8332d8bfe6aedd7df19991e Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sun, 5 Mar 2017 22:19:56 +0800 Subject: [PATCH 106/646] upload homework for 3-5 (article part) --- ...207\347\274\226\344\273\243\347\240\201.pdf" | Bin 0 -> 68224 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "group08/619057560/3-5/article/\347\250\213\345\272\217\347\232\204\350\277\220\350\241\214\345\222\214\346\261\207\347\274\226\344\273\243\347\240\201.pdf" diff --git "a/group08/619057560/3-5/article/\347\250\213\345\272\217\347\232\204\350\277\220\350\241\214\345\222\214\346\261\207\347\274\226\344\273\243\347\240\201.pdf" "b/group08/619057560/3-5/article/\347\250\213\345\272\217\347\232\204\350\277\220\350\241\214\345\222\214\346\261\207\347\274\226\344\273\243\347\240\201.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..1161c526416313a480468199a63435c6eaf53bc1 GIT binary patch literal 68224 zcmeFZbzEJ`vM!q7ZowUbySux)ySuv++}%C6I|PT|?m>eG3GQwWvXZ^mUU!{)w%qgH ze)qTegE{7yJw|s|bya;;-BpA#0z#CuRP+#pJzHm6`-SHpCwlrI7;tHDt@X?xI5=>r zB@C^M9ZYZ;UvA0aQVW?{I2hW!d|K!_7z!BbTN@bSa&bY}JJ=cOT0*$Ityfo%!(>MC zI@ZpX#0}SJsdlYz{mG+2gZue2!KBrToa$)Xh>}VZL6--oe3v zYPIP=`hflF-MdWF&T#M%*WQ)P1?_q6`7mW}NT-LC)0>X0sP3-Pw)Z8d9-v7Ls7+yZ!WFg^etiQoT4hYEV|eh~~QkmdPt% z_;9GsTqYLnD#nfmu7h&p$4GMzhmY2e5B7rwZXYD_`75)WjF{7l^I1$QZp0H!?KL2B zR58~a$ICS|%$$-UkIqhTgN6@|G9wU^dH{^2f>-VcFz7|t9$j1xc!aF+_5BVL%A)ZG zx79=AWH!F{3?3DxQQaa;)v)!tbUY|=SKUAGZIDnV2|ve*lDgA#zGrr$j=Z9vb{c1V zENo;sVDw7Tz=_1QSzA$av(gL4@f#n92Y2!|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0800 Subject: [PATCH 107/646] add jar --- .../1159828430/20170226/lib/dom4j-1.6.1.jar | Bin 0 -> 313898 bytes .../20170226/lib/jaxen-1.1-beta-6.jar | Bin 0 -> 244330 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 group18/1159828430/20170226/lib/dom4j-1.6.1.jar create mode 100644 group18/1159828430/20170226/lib/jaxen-1.1-beta-6.jar diff --git a/group18/1159828430/20170226/lib/dom4j-1.6.1.jar b/group18/1159828430/20170226/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c8c4dbb92d6c23a7fbb2813eb721eb4cce91750c GIT binary patch literal 313898 zcma&O1DIvovNf2fv~AnAD{Whqw(UyWwr$(CZQFL&x%YM7KCj<9{cnGJkF~xLF(YQg zj2UaoNdo_X1o-P_Vqe4fuMhwA0`ccvT3AVdMqEaOPVNs3836px-T1%3kpJH>X#p8= z5n)9oT4|BUm`UqCdia3rqz~A4pxPG;xK_Y3K%p`Tr4THQ!Sfx`TB3S6R}btjWOlpE zS7+k}3{DHv;nA?ZDfi@`x{n3u?NN-@^xKF+G--I|;0jW}1o1MY#le}oz8T2zos}r(pMpP!hetKh1Qbzp7GXj@m4tM9phXVG3S2MY=Afx@x07BDGl)Gz}aMmfjk* zHhIMKGHH4OLcZVS{B8k{Tzi)DQ8+FIH-sW2x3GYrmL$T|HseF zxt^>3|1sF!$?~6sL;D+ve}QfF93749|4D`Le>=#*#mxGjM)B|D9qo<&iO=7`PL5`l z{~+n#dAR-|Zu$@CzmKDk%At;!@7U@J=4!M6qG+c4*~RVzyG&x|GQTc{!O?4^46b!T=u^yIZ;tt7D)h^ zXCAIe8?EYZLcWahy0L7 zv1B(nyw26c2FLM+$MnV5=kqxm02H00mOn;t6m)P!6t)UG_rhsQ8PWj)9-f2Rd`*>} zAihdnp{8wGSC4+~u5zVBewUr8-IBYo-tsd~@xq5d( z(cyw;5jniuX2}W=63B4lv*u&mrB_@brV(PGi2734oWlz?G0_)VF$KL#F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>X)L1dbKdz^@A6rWoDV;vhTP_gI&6-`jf2ANSuXU6ccl6NjQ-G!>(hdxdOQRX{n z`ZU6hO#tEp{d!xDnFBBs{7D=EPW?m=bPx0=xHvigZR}K~`7q-$R35uI43#qX3v(z= zJhFUOTo3EKqjyQ7UVjNf6m7L9q}0TVNDA@WIMQ>HT20`s=y`lO@b0aX7GOmvgDyR2OwbM9Kh4%3pb*ofABJEY5h8qlby<6zu= zZ7y3(Kb;8eN(Yh~~~j7~@ecb7tIh zsINyy`-^Al^ib^Nr+=zE_1)8Gl)I@*hh=!vI<1|kFL4$_T=e<|21HLMcLK@F(+s)6 znwCj@RWQoDtxw0CxV)9ppcpHZ`f^xwNN@=j8ELFE!TcwkQs0S*>XgTXDH+$JsBeEm ziT-AEM20tO(rT3YQZ#7tlqa3sxtW@X+#yE`p}q|Z-M}?}D+37baxC@zK+7rOU_(tu z*vtOM9LSwOfBGEi+q7uKq`u4r)n3{Trs&aK%gm-*s83HuJ6a<cWV?y1i%K@IRUh?*7P&Fs)RYLjAT oo=~55fG!C<51;zyXacGeP)zh$Asn-?G{8SR>hPBXQ{jL92Z7#4hyVZp literal 0 HcmV?d00001 From 4656c624a3b1b1ba1404617d9548f1e54f45b2c8 Mon Sep 17 00:00:00 2001 From: James <1310368322@qq.com> Date: Mon, 6 Mar 2017 11:37:43 +0800 Subject: [PATCH 114/646] second homework --- .../ArrayList.java | 0 .../ArrayUtil.java | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+) rename group11/1310368322/GitHub/src/{ => Day_2017_2_26_FirstHomework}/ArrayList.java (100%) create mode 100644 group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java diff --git a/group11/1310368322/GitHub/src/ArrayList.java b/group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java similarity index 100% rename from group11/1310368322/GitHub/src/ArrayList.java rename to group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java diff --git a/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java b/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java new file mode 100644 index 0000000000..81bc431679 --- /dev/null +++ b/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java @@ -0,0 +1,83 @@ +package day_2017_2_26_SecondHomework; + +import java.util.Arrays; + +import javax.management.RuntimeErrorException; + +public class ArrayUtil { + + /* * + * 给定一个整形数组 a ,对该数组的值进行置换 + * 例如: a = [7, 9, 30, 3], 置换后为 [3, 30, 9, 7] + * */ + + /*public ArrayUtil(int[] a2) { + this.a = a2; + }*/ + public void reverseArray(int [] a){ + if(null == a){ + System.out.println("空指针----"); + return; + } + int temp; + int last = a.length-1; + for (int i = 0; i < a.length/2; i++) { + temp = a[i]; + a[i] = a[last]; + a[last--] = temp; + } + } + public void print(int [] a){ + if(null == a){ + System.out.println("空指针----"); + return; + } + for (int i = 0; i < a.length; i++) { + System.out.print(a[i] + " "); + } + System.out.println(); + } + + /* * + * 现在有如下的一个数组, int oldArr[] = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 要求将以上数组中的值为 0 的项去掉,将不为 0 的值存入一个新的数组,生成的新数组为: + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + public int [] removeZero(int [] oldArray){ + if(null == oldArray){ + return null; + } + int count = 0; + int oldArrayLength = oldArray.length; + for(int i = 0; i < oldArrayLength;){ + if(oldArray[i]==0){ + for(int j = i; j < oldArrayLength -1; j++){ + oldArray[j] = oldArray[j+1]; + } + oldArrayLength--; + count++; + }else{ + i++; + } + } + int [] target = new int[oldArray.length-count]; + System.arraycopy(oldArray, 0, target, 0, oldArray.length-count); + return target; + } + + + + + + + + + + + + + + +} From 7af7f85a0b7244b65342eab9a6fb38d6766fbbb4 Mon Sep 17 00:00:00 2001 From: James <1310368322@qq.com> Date: Mon, 6 Mar 2017 11:55:22 +0800 Subject: [PATCH 115/646] new --- group11/1310368322/src/ArrayList.java | 98 ++++++++++++++++++ group11/1310368322/src/LinkedList.java | 113 +++++++++++++++++++++ group11/1310368322/test/ArrayUtilTest.java | 101 ++++++++++++++++++ 3 files changed, 312 insertions(+) create mode 100644 group11/1310368322/src/ArrayList.java create mode 100644 group11/1310368322/src/LinkedList.java create mode 100644 group11/1310368322/test/ArrayUtilTest.java diff --git a/group11/1310368322/src/ArrayList.java b/group11/1310368322/src/ArrayList.java new file mode 100644 index 0000000000..b5024f1dfb --- /dev/null +++ b/group11/1310368322/src/ArrayList.java @@ -0,0 +1,98 @@ +package Day_2017_2_26_FirstHomework; + +public class ArrayList { + + private static final int DEFAULT_SIZE = 10; + private static final int MAX_VALUE = 2147483647; + private Object[] elementData = new Object[DEFAULT_SIZE]; + private Exception Exception; + private int size = 0; + + public ArrayList(){ + this(DEFAULT_SIZE); + } + public ArrayList(int defaultSize) { + rangCheckForConstructor(defaultSize); + elementData = new Object[defaultSize]; + } + + + private void rangCheckForConstructor(int defaultSize) { + if(defaultSize<0 || defaultSize>MAX_VALUE){ + throw new IndexOutOfBoundsException("数值不合理"); + } + + } + + public void add(Object o){ + ensureCapacity(); + for(int i = 0; i < elementData.length; i++){ + if(null == elementData[i]){ + elementData[i] = o; + break; + } + } + size++; + } + private void ensureCapacity() { + if(size>elementData.length){ + elementData = ArrayList.grow(elementData, 10); + } + } + public void add(int index, Object o){ + rangeCheckForAdd(index); + ensureCapacity(); + int k = -1; + for(int i = index; i < elementData.length; i++){ + if(null==elementData[i]){ + k = i-1; + break; + } + } + for(int i = k; i >= index;i--){ + elementData[i+1] = elementData[i]; + } + elementData[index] = o; + size++; + } + private void rangeCheckForAdd(int index) { + if(index < 0 || index > this.size){// add 的元素只能在 [0,size](可以给size位置插元素,但不可以给size后插元素) + throw new IndexOutOfBoundsException("下标越界"); + } + + } + public Object get(int index){ + return elementData[index]; + } + + public Object remove(int index){ + while(true){ + elementData[index] = elementData[index+++1]; + if(elementData[index]==null){ + break; + } + } + size--; + return null; + } + public int size(){ + return -1; + } + public void getElementData(){ + for(int i = 0; i < elementData.length; i++){ + System.out.println(elementData[i]); + + } + } + public static Object[] grow(Object[] elementData2, int size){ + Object []target = new Object[elementData2.length+size]; + System.arraycopy(elementData2, 0, target, 0, elementData2.length); + return target; + } + + public static void main(String[] args) { + ArrayList a = new ArrayList(); + a.getElementData(); + System.out.println(a.size); + } +} diff --git a/group11/1310368322/src/LinkedList.java b/group11/1310368322/src/LinkedList.java new file mode 100644 index 0000000000..488f2a22a6 --- /dev/null +++ b/group11/1310368322/src/LinkedList.java @@ -0,0 +1,113 @@ +package Day_2017_2_26_FirstHomework; + +public class LinkedList{ + private Node head; + static int size = 0; + public void add(Object o){ + if(null == head){ + head = new Node(); + head.data = o; + head.next = null; + }else{ + Node p = head; + while(null != p.next){ + p = p.next; + } + Node newNode = new Node(); + newNode.data = o; + p.next = newNode; + newNode.next =null; + } + size++; + } + public int size(){ + return size; + } + public void add(int index,Object o){ + if(index < 0){ + throw new RuntimeException("下标不能为负数"); + } + if(index == 0){ + addFirst(o); + size++; + return; + } + if(index > size){ + throw new RuntimeException(""); + } + int i = 0; + Node p = head; + Node q = null; + + while(i!=index){ + q = p; + p = p.next; + i++; + } + Node r = new Node(); + r.data = o; + r.next =null; + q.next = r; + r.next = p; + size++; + return; + } + + public Object get(int index){ + int i = 0; + Node p = head; + while(i != index){ + p = p.next; + i++; + } + return p.data; + } + public Object remove(int index){ + if(index < 0){ + throw new RuntimeException("下标不能为负数"); + } + if(index == 1){ + size--; + return head.data; + } + int i = 0; + Node p = head; + Node q = null; + while(i != index){ + q = p; + p = p.next; + i++; + } + q.next = p.next; + size--; + return p.data; + } + public void addFirst(Object o){ + Node p = new Node(); + p.next = head; + p.data = o; + head = p; + size++; + } + public Object removeFirst(){ + head = head.next; + size--; + return null; + } + public static class Node{ + Object data; + Node next; + } + + public static void main(String[] args) { + LinkedList linkedList = new LinkedList(); + linkedList.add("a"); + linkedList.add("b"); + linkedList.add("c"); + linkedList.add("d"); + linkedList.add(5, "f"); + System.out.println(linkedList.get(5)); + System.out.println(linkedList.size()); + } + +} \ No newline at end of file diff --git a/group11/1310368322/test/ArrayUtilTest.java b/group11/1310368322/test/ArrayUtilTest.java new file mode 100644 index 0000000000..aaf3a80e7e --- /dev/null +++ b/group11/1310368322/test/ArrayUtilTest.java @@ -0,0 +1,101 @@ +package day_2017_2_26_SecondHomework; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ArrayUtilTest { + ArrayUtil arrayUtil; + + @Before + public void setUp() throws Exception { + arrayUtil = new ArrayUtil(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testReverseArray_a() { + int [] actuals = {}; + int [] expected = {}; + arrayUtil.reverseArray(actuals); + Assert.assertArrayEquals(expected, actuals); + } + @Test + public void testReverseArray_b() { + int [] actuals = null; + int [] expected = null; + arrayUtil.reverseArray(actuals); + Assert.assertArrayEquals(expected, actuals); + } + @Test + public void testReverseArray_c() { + int [] actuals = {1,2,3,4}; + int [] expected = {4,3,2,1}; + arrayUtil.reverseArray(actuals); + Assert.assertArrayEquals(expected, actuals); + } + + + @Test + public void testRemoveZero_1(){ + int [] actuals = null; + int [] expected = null; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + @Test + public void testRemoveZero_2(){ + int [] actuals = {}; + int [] expected = {}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + @Test + public void testRemoveZero_3(){ + int [] actuals = {0,0,0,0,0,0}; + int [] expected = {}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + @Test + public void testRemoveZero_4(){ + int [] actuals = {1,2,3,4,5,6}; + int [] expected = {1,2,3,4,5,6}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + @Test + public void testRemoveZero_5(){ + int [] actuals = {1,2,0,0,5,6}; + int [] expected = {1,2,5,6}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + @Test + public void testRemoveZero_6(){ + int [] actuals = {0,0,4,2}; + int [] expected = {4,2}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + }@Test + public void testRemoveZero_7(){ + int [] actuals = {4,2,0,0,0}; + int [] expected = {4,2}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + public void testRemoveZero_8(){ + int [] actuals = {0,0,4,0,0,2,0,0,0}; + int [] expected = {4,2}; + int [] actual = arrayUtil.removeZero(actuals); + Assert.assertArrayEquals(expected, actual); + } + + +} From c7f3d11a592e37a418ffcf5d1934b686c4d09a29 Mon Sep 17 00:00:00 2001 From: James <1310368322@qq.com> Date: Mon, 6 Mar 2017 12:11:32 +0800 Subject: [PATCH 116/646] second --- group11/1310368322/src/ArrayUtil.java | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 group11/1310368322/src/ArrayUtil.java diff --git a/group11/1310368322/src/ArrayUtil.java b/group11/1310368322/src/ArrayUtil.java new file mode 100644 index 0000000000..81bc431679 --- /dev/null +++ b/group11/1310368322/src/ArrayUtil.java @@ -0,0 +1,83 @@ +package day_2017_2_26_SecondHomework; + +import java.util.Arrays; + +import javax.management.RuntimeErrorException; + +public class ArrayUtil { + + /* * + * 给定一个整形数组 a ,对该数组的值进行置换 + * 例如: a = [7, 9, 30, 3], 置换后为 [3, 30, 9, 7] + * */ + + /*public ArrayUtil(int[] a2) { + this.a = a2; + }*/ + public void reverseArray(int [] a){ + if(null == a){ + System.out.println("空指针----"); + return; + } + int temp; + int last = a.length-1; + for (int i = 0; i < a.length/2; i++) { + temp = a[i]; + a[i] = a[last]; + a[last--] = temp; + } + } + public void print(int [] a){ + if(null == a){ + System.out.println("空指针----"); + return; + } + for (int i = 0; i < a.length; i++) { + System.out.print(a[i] + " "); + } + System.out.println(); + } + + /* * + * 现在有如下的一个数组, int oldArr[] = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 要求将以上数组中的值为 0 的项去掉,将不为 0 的值存入一个新的数组,生成的新数组为: + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + public int [] removeZero(int [] oldArray){ + if(null == oldArray){ + return null; + } + int count = 0; + int oldArrayLength = oldArray.length; + for(int i = 0; i < oldArrayLength;){ + if(oldArray[i]==0){ + for(int j = i; j < oldArrayLength -1; j++){ + oldArray[j] = oldArray[j+1]; + } + oldArrayLength--; + count++; + }else{ + i++; + } + } + int [] target = new int[oldArray.length-count]; + System.arraycopy(oldArray, 0, target, 0, oldArray.length-count); + return target; + } + + + + + + + + + + + + + + +} From 30392a892e28ab4d2378ce79156a8d6d6545cda1 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Mon, 6 Mar 2017 13:30:50 +0800 Subject: [PATCH 117/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0Readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/1144989424/Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/group08/1144989424/Readme.md b/group08/1144989424/Readme.md index 3a515bb88b..a05cf76885 100644 --- a/group08/1144989424/Readme.md +++ b/group08/1144989424/Readme.md @@ -1,3 +1,5 @@ ### 鐩綍璇存槑 涓汉鐩綍锛屼粬浜哄嬁鍔 + +[鍗氬鍦板潃](http://blog.csdn.net/qq1332479771) \ No newline at end of file From 87d2cfef839eeca434ef57bcf7207bbfd36d6aa9 Mon Sep 17 00:00:00 2001 From: James <1310368322@qq.com> Date: Mon, 6 Mar 2017 14:33:56 +0800 Subject: [PATCH 118/646] remove GitHub --- group11/1310368322/GitHub/.gitignore | 1 - .../ArrayList.java | 79 ------------------ .../ArrayUtil.java | 83 ------------------- group11/1310368322/GitHub/src/testGitHub.java | 7 -- 4 files changed, 170 deletions(-) delete mode 100644 group11/1310368322/GitHub/.gitignore delete mode 100644 group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java delete mode 100644 group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java delete mode 100644 group11/1310368322/GitHub/src/testGitHub.java diff --git a/group11/1310368322/GitHub/.gitignore b/group11/1310368322/GitHub/.gitignore deleted file mode 100644 index 5e56e040ec..0000000000 --- a/group11/1310368322/GitHub/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java b/group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java deleted file mode 100644 index 68b42b1c03..0000000000 --- a/group11/1310368322/GitHub/src/Day_2017_2_26_FirstHomework/ArrayList.java +++ /dev/null @@ -1,79 +0,0 @@ -package Day_2017_2_20_DateStructure; - -public class ArrayList { - - - private int size = 0; - - private Object[] elementData = new Object[10]; - - private Exception Exception; - - public void add(Object o){ - if(size>elementData.length){ - elementData = ArrayList.grow(elementData, 10); - } - for(int i = 0; i < elementData.length; i++){ - if(null == elementData[i]){ - elementData[i] = o; - break; - } - } - size++; - } - public void add(int index, Object o){ - if(size>elementData.length){ - elementData = ArrayList.grow(elementData, 10); - } - if(index<0){ - System.out.println("您插入的位置有误"); - } - int k = -1; - for(int i = index; i < elementData.length; i++){ - if(null==elementData[i]){ - k = i-1; - break; - } - } - for(int i = k; i >= index;i--){ - elementData[i+1] = elementData[i]; - } - elementData[index] = o; - size++; - } - public Object get(int index){ - return elementData[index]; - } - - public Object remove(int index){ - while(true){ - elementData[index] = elementData[index+++1]; - if(elementData[index]==null){ - break; - } - } - size--; - return null; - } - public int size(){ - return -1; - } - public void getElementData(){ - for(int i = 0; i < elementData.length; i++){ - System.out.println(elementData[i]); - - } - } - public static Object[] grow(Object[] elementData2, int size){ - Object []target = new Object[elementData2.length+size]; - System.arraycopy(elementData2, 0, target, 0, elementData2.length); - return target; - } - - public static void main(String[] args) { - ArrayList a = new ArrayList(); - a.add("a"); - a.getElementData(); - System.out.println(a.size); - } -} diff --git a/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java b/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java deleted file mode 100644 index 81bc431679..0000000000 --- a/group11/1310368322/GitHub/src/day_2017_2_26_SecondHomework/ArrayUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -package day_2017_2_26_SecondHomework; - -import java.util.Arrays; - -import javax.management.RuntimeErrorException; - -public class ArrayUtil { - - /* * - * 给定一个整形数组 a ,对该数组的值进行置换 - * 例如: a = [7, 9, 30, 3], 置换后为 [3, 30, 9, 7] - * */ - - /*public ArrayUtil(int[] a2) { - this.a = a2; - }*/ - public void reverseArray(int [] a){ - if(null == a){ - System.out.println("空指针----"); - return; - } - int temp; - int last = a.length-1; - for (int i = 0; i < a.length/2; i++) { - temp = a[i]; - a[i] = a[last]; - a[last--] = temp; - } - } - public void print(int [] a){ - if(null == a){ - System.out.println("空指针----"); - return; - } - for (int i = 0; i < a.length; i++) { - System.out.print(a[i] + " "); - } - System.out.println(); - } - - /* * - * 现在有如下的一个数组, int oldArr[] = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} - * 要求将以上数组中的值为 0 的项去掉,将不为 0 的值存入一个新的数组,生成的新数组为: - * {1,3,4,5,6,6,5,4,7,6,7,5} - * @param oldArray - * @return - */ - public int [] removeZero(int [] oldArray){ - if(null == oldArray){ - return null; - } - int count = 0; - int oldArrayLength = oldArray.length; - for(int i = 0; i < oldArrayLength;){ - if(oldArray[i]==0){ - for(int j = i; j < oldArrayLength -1; j++){ - oldArray[j] = oldArray[j+1]; - } - oldArrayLength--; - count++; - }else{ - i++; - } - } - int [] target = new int[oldArray.length-count]; - System.arraycopy(oldArray, 0, target, 0, oldArray.length-count); - return target; - } - - - - - - - - - - - - - - -} diff --git a/group11/1310368322/GitHub/src/testGitHub.java b/group11/1310368322/GitHub/src/testGitHub.java deleted file mode 100644 index af74e99b53..0000000000 --- a/group11/1310368322/GitHub/src/testGitHub.java +++ /dev/null @@ -1,7 +0,0 @@ - -public class testGitHub { - private void mian() { - System.out.print("Hello GitHub"); - } - -} From 85203ebc30490781280fd312d530c082df84ac9e Mon Sep 17 00:00:00 2001 From: Haochen Date: Mon, 6 Mar 2017 15:27:48 +0800 Subject: [PATCH 119/646] add linkedlist algorithm --- .../src/datastructure/basic/LinkedList.java | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/group01/895457260/code/src/datastructure/basic/LinkedList.java b/group01/895457260/code/src/datastructure/basic/LinkedList.java index 174044c546..b59e72c90a 100644 --- a/group01/895457260/code/src/datastructure/basic/LinkedList.java +++ b/group01/895457260/code/src/datastructure/basic/LinkedList.java @@ -1,6 +1,9 @@ package datastructure.basic; import datastructure.exception.EmptyListException; +import javafx.util.Pair; + +import java.util.Objects; public class LinkedList implements List { @@ -129,4 +132,177 @@ private void removeNode(Node node, Node pre) { node.next = null; size--; } + + //娓呯┖鏁存潯閾撅紝杩斿洖閾句腑缁撶偣鏁伴噺 + private int clearLink(Node start) { + int count = 0; + while (start != null) { + Node node = start; + start = start.next; + node.data = null; + node.next = null; + count++; + } + return count; + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Stack stack = new Stack(); + for (Node node = head.next; node != null; node = node.next) { + stack.push(node); + } + head.next = (Node) stack.peek(); + while (stack.size() > 1) { + Node top = (Node) stack.pop(); + top.next = (Node) stack.peek(); + } + ((Node) stack.peek()).next = null; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int half = size() / 2; + if (half > 1) { + Node first = head.next; + + Node preHalf = findNode(half - 1); + head.next = preHalf.next; + preHalf.next = null; + size -= clearLink(first); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + Node preI = findNode(i - 1); + Node removeTo = findNode(i + length - 1); + head.next = removeTo.next; + removeTo.next = null; + size -= clearLink(preI); + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public Object[] getElements(LinkedList list){ + Object[] result = new Object[list.size()]; + int count = 0; + + + Node nodeI = head.next; + Node nodeJ = list.head.next; + for (int i = 0; i < size() && count < result.length; ++i) { + if (i == (int) nodeJ.data) { + result[count] = nodeI; + count++; + nodeI = nodeI.next; + nodeJ = nodeJ.next; + } else { + nodeI = nodeI.next; + } + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + Node pre = head; + Node node = list.head.next; + while (pre.next != null && node != null) { + if ((int) pre.next.data < (int) node.data) { + pre = pre.next; + } else if ((int) pre.next.data > (int) node.data) { + node = node.next; + } else { + removeNode(pre.next, pre); + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + Node node = head; + while (node.next != null) { + if (Objects.equals(node.data, node.next.data)) { + removeNode(node.next, node); + } else { + node = node.next; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + Node node = head; + while (node.next != null) { + int value = (int) node.next.data; + if (value <= min) { // 杩樻湭杩涘叆鑼冨洿 + node = node.next; + } else if (value >= max) { // 瓒呭嚭鑼冨洿锛屽仠姝㈤亶鍘 + break; + } else { // 鍦ㄨ寖鍥村唴锛屽垹闄や箣 + removeNode(node.next, node); + } + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection(LinkedList list){ + LinkedList result = new LinkedList(); + Node inThis = head.next; + Node node = list.head.next; + int[] temp = new int[Math.min(size(), list.size())]; + int count = 0; + while (inThis != null && node != null) { + int compare = (int) inThis.data - (int) node.data; + if (compare < 0) { + inThis = inThis.next; + } else if (compare > 0) { + node = node.next; + } else { + temp[count++] = (int) node.data; + inThis = inThis.next; + node = node.next; + } + } + for (int i = count; i >= 0; --i) { + result.addFirst(temp[i]); + } + return result; + } } From 05ff7a1544ce9798d6513d3d1843ff64ff36de9c Mon Sep 17 00:00:00 2001 From: zhaohongxin Date: Mon, 6 Mar 2017 17:41:01 +0800 Subject: [PATCH 120/646] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 20 + .../coderising/download/FileDownloader.java | 73 ++++ .../download/FileDownloaderTest.java | 59 +++ .../coderising/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++ .../download/impl/ConnectionManagerImpl.java | 15 + .../src/com/coding/basic/LinkedList.java | 374 +++++++++++------- 10 files changed, 462 insertions(+), 149 deletions(-) create mode 100644 group05/1094051862/test01/src/com/coderising/download/DownloadThread.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/FileDownloader.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/api/Connection.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/api/ConnectionException.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/api/DownloadListener.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java b/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..1456314140 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java b/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..f5d7999eb4 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java b/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..8171ee5763 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group05/1094051862/test01/src/com/coderising/download/api/Connection.java b/group05/1094051862/test01/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..9710e270e1 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group05/1094051862/test01/src/com/coderising/download/api/ConnectionException.java b/group05/1094051862/test01/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group05/1094051862/test01/src/com/coderising/download/api/ConnectionManager.java b/group05/1094051862/test01/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group05/1094051862/test01/src/com/coderising/download/api/DownloadListener.java b/group05/1094051862/test01/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..32f03efdc7 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..046f7c49a4 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group05/1094051862/test01/src/com/coding/basic/LinkedList.java b/group05/1094051862/test01/src/com/coding/basic/LinkedList.java index 4ef910fc16..aca68838c7 100644 --- a/group05/1094051862/test01/src/com/coding/basic/LinkedList.java +++ b/group05/1094051862/test01/src/com/coding/basic/LinkedList.java @@ -1,149 +1,225 @@ -package com.coding.basic; - -public class LinkedList implements List { - - private Node head; - private Node last; - private int size = 0; - - public void add(Object o){ - if (head == null) { - head = new Node(o, null); - size ++; - return; - } - Node n = new Node(o, null); - if (last == null) { - last = n; - head.next = last; - } - last.next = n; - last = n; - size ++; - } - public void add(int index , Object o){ - if (index < 0 || index > size) { - System.out.println("linkedList.add: index < 0 || index > size"); - return; - } - if (index == size) { - add(o); - return; - } - if (index == 0) { - addFirst(o); - return; - } - Node pre = head; - for (int i = 1; i < index; i++) { - pre = pre.next; - } - Node post = pre.next; - Node n = new Node(o,post); - pre.next = n; - size ++; - } - public Object get(int index){ - if (index == 0) { - return head.data; - } - Node n = head; - for (int i = 1; i <= index; i++) { - n = n.next; - } - return n.data; - } - public Object remove(int index){ - if (index < 0 || index >= size) { - System.out.println("remove :index < 0 || index >= size"); - return null; - } - if (index == 0) { - return removeFirst(); - } - if (index == size - 1) { - return removeLast(); - } - Node pre = head; - for (int i = 1; i < index; i++) { - pre = pre.next; - } - Node n = pre.next; - Node post = n.next; - n.next = null; - pre.next = post; - size --; - return n.data; - } - - public int size(){ - return size; - } - - public void addFirst(Object o){ - Node n = new Node(o,head); - head = n; - size ++; - return; - } - public void addLast(Object o){ - Node n = new Node(o,null); - last.next = n; - last = n; - size ++; - return; - } - public Object removeFirst(){ - Object o = head.data; - Node n = head.next; - head.next = null; - head = n; - size --; - return o; - } - public Object removeLast(){ - Node preLast = head; - for (int i = 1; i < size; i++) { - preLast = preLast.next; - } - preLast.next = null; - Object o = last.data; - last = preLast; - size --; - return o; - } - public Iterator iterator(){ - return new Iterator() { - int cusor = 0; - Node current = head; - @Override - public Object next() { - if (!hasNext()) { - System.out.println("next : !hasNext"); - return null; - } - Object o = current.data; - current = current.next; - cusor ++; - return o; - } - - @Override - public boolean hasNext() { - return cusor < size; - } - }; - } - - - private static class Node { - - Object data; - Node next; - - public Node (Object data, Node next) { - this.data = data; - this.next = next; - } - } -} +package com.coding.basic; + +public class LinkedList implements List { + + private Node head; + private Node last; + private int size = 0; + + public void add(Object o){ + if (head == null) { + head = new Node(o, null); + size ++; + return; + } + Node n = new Node(o, null); + if (last == null) { + last = n; + head.next = last; + } + last.next = n; + last = n; + size ++; + } + public void add(int index , Object o){ + if (index < 0 || index > size) { + System.out.println("linkedList.add: index < 0 || index > size"); + return; + } + if (index == size) { + add(o); + return; + } + if (index == 0) { + addFirst(o); + return; + } + Node pre = head; + for (int i = 1; i < index; i++) { + pre = pre.next; + } + Node post = pre.next; + Node n = new Node(o,post); + pre.next = n; + size ++; + } + public Object get(int index){ + if (index == 0) { + return head.data; + } + Node n = head; + for (int i = 1; i <= index; i++) { + n = n.next; + } + return n.data; + } + public Object remove(int index){ + if (index < 0 || index >= size) { + System.out.println("remove :index < 0 || index >= size"); + return null; + } + if (index == 0) { + return removeFirst(); + } + if (index == size - 1) { + return removeLast(); + } + Node pre = head; + for (int i = 1; i < index; i++) { + pre = pre.next; + } + Node n = pre.next; + Node post = n.next; + n.next = null; + pre.next = post; + size --; + return n.data; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + Node n = new Node(o,head); + head = n; + size ++; + return; + } + public void addLast(Object o){ + Node n = new Node(o,null); + last.next = n; + last = n; + size ++; + return; + } + public Object removeFirst(){ + Object o = head.data; + Node n = head.next; + head.next = null; + head = n; + size --; + return o; + } + public Object removeLast(){ + Node preLast = head; + for (int i = 1; i < size; i++) { + preLast = preLast.next; + } + preLast.next = null; + Object o = last.data; + last = preLast; + size --; + return o; + } + public Iterator iterator(){ + return new Iterator() { + int cusor = 0; + Node current = head; + @Override + public Object next() { + if (!hasNext()) { + System.out.println("next : !hasNext"); + return null; + } + Object o = current.data; + current = current.next; + cusor ++; + return o; + } + + @Override + public boolean hasNext() { + return cusor < size; + } + }; + } + + + private static class Node { + + Object data; + Node next; + + public Node (Object data, Node next) { + this.data = data; + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} From 4b40da8c2250eb8fab4cf9b485d07efb1a5afc70 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 6 Mar 2017 18:04:38 +0800 Subject: [PATCH 121/646] =?UTF-8?q?3-05=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 20 + .../coderising/download/FileDownloader.java | 72 ++++ .../coderising/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++ .../download/impl/ConnectionManagerImpl.java | 15 + .../src/com/coding/basic/LinkedList.java | 381 +++++++++++------- .../download/FileDownloaderTest.java | 60 +++ .../test/com/coding/basic/LinkedListTest.java | 299 +++++++++----- 11 files changed, 672 insertions(+), 245 deletions(-) create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..d71540b497 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..2a61b81ad8 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,72 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..249da5d667 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionManager.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..32f03efdc7 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..1281dfaa9e --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java index 460298ff56..6d914f619e 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java @@ -1,137 +1,246 @@ -package com.coding.basic; - -import java.util.NoSuchElementException; - -public class LinkedList implements List { - - private Node head; - - private int size = 0; - - public void add(Object o){ - - Node addNode = new Node(); - addNode.data = o; - if(size==0){ - head = addNode; - }else{ - //鑾峰彇鏈鍚庝竴涓妭鐐 - Node lastNode = getPointNode(size-1); - lastNode.next = addNode; - } - size++; - } - public void add(int index , Object o){ - - Node addNode = new Node(); - addNode.data = o; - if(index == 0){ - addFirst(o); - return; - } - if(index == size){ - Node lastNode = getPointNode(size-1); - lastNode.next = addNode; - }else{ - Node pointNode = getPointNode(index); - Node prePointNode = getPointNode(index-1); - prePointNode.next = addNode; - addNode.next = pointNode; - } - size ++; - } - public Object get(int index){ - - Node node = getPointNode(index); - return node.data; - } - - public Object remove(int index){ - - Node pointNode = getPointNode(index); - Node nextPointNode = getPointNode(index+1); - if(index ==0){ - head = nextPointNode; - }else{ - Node prePointNode = getPointNode(index-1); - prePointNode.next = nextPointNode; - } - size --; - return pointNode.data; - } - - public int size(){ - return size; - } - - public void addFirst(Object o){ - - Node secondNode = head; - head = new Node(); - head.data = o; - if(size>0){ - head.next = secondNode; - } - size ++; - } - - public void addLast(Object o){ - add(o); - } - - public Object removeFirst(){ - - return remove(0); - } - - public Object removeLast(){ - - return remove(size-1); - } - public Iterator iterator(){ - return new Itr(); - } - - private class Itr implements Iterator{ - - int cursor; - @Override - public boolean hasNext() { - return cursor != LinkedList.this.size; - } - - @Override - public Object next() { - - int i = this.cursor; - if (i >= LinkedList.this.size){ - throw new NoSuchElementException(); - } - this.cursor = (i + 1); - return LinkedList.this.get(i); - } - - } - - /** - * 鑾峰彇鎸囧畾鐨勮妭鐐 - * @return - */ - private Node getPointNode(int index){ - - if(index>size){ - throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size+""); - } - Node node = head; - for (int i = 0; i < index; i++) { - node = node.next; - } - return node; - } - - private static class Node{ - Object data; - Node next; - - } +package com.coding.basic; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private Node head; + + private int size = 0; + + public void add(Object o){ + + Node addNode = new Node(); + addNode.data = o; + if(size==0){ + head = addNode; + }else{ + //鑾峰彇鏈鍚庝竴涓妭鐐 + Node lastNode = getPointNode(size-1); + lastNode.next = addNode; + } + size++; + } + public void add(int index , Object o){ + + Node addNode = new Node(); + addNode.data = o; + if(index == 0){ //娣诲姞澶寸粨鐐 + addFirst(o); + }else if(index == size){//娣诲姞灏捐妭鐐 + addLast(o); + }else{//鍦ㄦ姇鑺傜偣涓庡熬閮ㄦ坊鍔犺妭鐐 + Node prePointNode = getPointNode(index-1); + Node pointNode = prePointNode.next; + prePointNode.next = addNode; + addNode.next = pointNode; + size ++; + } + } + public Object get(int index){ + + Node node = getPointNode(index); + return node.data; + } + + public Object remove(int index){ + + Node pointNode = getPointNode(index); + Node nextPointNode = pointNode.next; + if(index ==0){ + head = nextPointNode; + }else{ + Node prePointNode = getPointNode(index-1); + prePointNode.next = nextPointNode; + } + size --; + return pointNode.data; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + + Node secondNode = head; + head = new Node(); + head.data = o; + if(size>0){ + head.next = secondNode; + } + size ++; + } + + public void addLast(Object o){ + add(o); + } + + public Object removeFirst(){ + + return remove(0); + } + + public Object removeLast(){ + + return remove(size-1); + } + public Iterator iterator(){ + return new Itr(); + } + + private class Itr implements Iterator{ + + int cursor; + @Override + public boolean hasNext() { + return cursor != LinkedList.this.size; + } + + @Override + public Object next() { + + int i = this.cursor; + if (i >= LinkedList.this.size){ + throw new NoSuchElementException(); + } + this.cursor = (i + 1); + return LinkedList.this.get(i); + } + + } + + /** + * 鑾峰彇鎸囧畾鐨勮妭鐐 + * @return + */ + private Node getPointNode(int index){ + + if(index<0||index>size){ + throw new IndexOutOfBoundsException("Index: "+index+",Size:"+size+""); + } + Node node = head; + for (int i = 0; i < index; i++) { + node = node.next; + } + return node; + } + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + //缂撳瓨鍘熼摼琛ㄦ暟鎹 + Stack stack = new Stack(); + Node node = head; + for (int i = 0; i < size; i++) { + stack.push(node.data); + node = node.next; + } + //閲嶆柊璧嬪 + node = head; + for (int i = 0; i < size; i++) { + node.data = stack.pop(); + node = node.next; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf(){ + int newSize = size/2; + head = getPointNode(newSize); + size = size%2>0?newSize+1:newSize; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + if(i==0){ + if(length101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + int[] array = new int[list.size()]; + for (int i = 0; i < array.length; i++) { + array[i] = (int)getPointNode((int)list.get(i)).data; + } + return array; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * @param list + */ + + public void subtract(LinkedList list){ + + for (int i = 0; i < list.size(); i++) { + //LinkedList.this.remove(index); + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..32bab332dd --- /dev/null +++ b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,60 @@ +package test.com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.FileDownloader; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group12/2258659044/zj-2017/src/test/com/coding/basic/LinkedListTest.java b/group12/2258659044/zj-2017/src/test/com/coding/basic/LinkedListTest.java index 3a5ff822ad..2aef09741a 100644 --- a/group12/2258659044/zj-2017/src/test/com/coding/basic/LinkedListTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coding/basic/LinkedListTest.java @@ -1,109 +1,190 @@ -package test.com.coding.basic; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import com.coding.basic.Iterator; -import com.coding.basic.LinkedList; - -public class LinkedListTest { - - LinkedList ls ; - @Before - public void setup() { - ls = new LinkedList(); - } - - /** - * 娴嬭瘯涓涓弬鏁扮殑add鏂规硶 - * ArrayList褰撴暟鎹秴杩10鏃惰繘琛岀涓娆℃墿瀹 - */ - @Test - public void add(){ - - ls.add(3); - ls.add("a"); - for (int i = 0; i < 10; i++) { - ls.add(i); - } - Assert.assertEquals(ls.size(), 12); - Assert.assertEquals(ls.get(1), "a"); - } - - /** - * 涓や釜鍙傛暟鐨刟dd鏂规硶 - */ - @Test//(expected = IndexOutOfBoundsException.class) - public void add4ToPramter(){ - - ls.add(0, 0); - ls.add(1,1); - ls.add(2, 2); - ls.add(3,3); - for (int i = 0; i < 10; i++) { - ls.add(3,i); - } - Assert.assertEquals(ls.size(), 14); - Assert.assertEquals(ls.get(3), 9); - Assert.assertEquals(ls.get(13), 3); - //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 - //ls.add(15, "a"); - } - - /** - * get(i) - */ - @Test//(expected = IndexOutOfBoundsException.class) - public void get(){ - - for (int i = 0; i < 10; i++) { - ls.add(i); - } - - Assert.assertEquals(ls.get(9), 9); - //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 - //ls.get(12); - } - - @Test - public void remove(){ - - for (int i = 0; i < 10; i++) { - ls.add(i); - } - Assert.assertEquals(ls.remove(5),5); - Assert.assertEquals(ls.size(),9); - Assert.assertEquals(ls.remove(8),9); - Assert.assertEquals(ls.size(),8); - } - - @Test - public void size(){ - - Assert.assertEquals(ls.size(),0); - ls.add("a"); - Assert.assertEquals(ls.size(),1); - ls.add(0,0); - Assert.assertEquals(ls.size(),2); - ls.remove(0); - Assert.assertEquals(ls.size(),1); - - } - - @Test//(expected = NoSuchElementException.class) - public void iterator(){ - - for (int i = 0; i < 10; i++) { - ls.add(i); - } - Iterator it = ls.iterator(); - Assert.assertEquals(it.hasNext(),true); - for (int i = 0; i < 10; i++) { - it.next(); - } - Assert.assertEquals(it.hasNext(),false); - //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 - //it.next(); - } -} +package test.com.coding.basic; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.coding.basic.Iterator; +import com.coding.basic.LinkedList; + +public class LinkedListTest { + + LinkedList ls ; + @Before + public void setup() { + ls = new LinkedList(); + } + + /** + * 娴嬭瘯涓涓弬鏁扮殑add鏂规硶 + * ArrayList褰撴暟鎹秴杩10鏃惰繘琛岀涓娆℃墿瀹 + */ + @Test + public void add(){ + + ls.add(3); + ls.add("a"); + for (int i = 0; i < 10; i++) { + ls.add(i); + } + Assert.assertEquals(ls.size(), 12); + Assert.assertEquals(ls.get(1), "a"); + } + + /** + * 涓や釜鍙傛暟鐨刟dd鏂规硶 + */ + @Test//(expected = IndexOutOfBoundsException.class) + public void add4ToPramter(){ + + ls.add(0, 0); + ls.add(1,1); + ls.add(2, 2); + ls.add(3,3); + for (int i = 0; i < 10; i++) { + ls.add(3,i); + } + Assert.assertEquals(ls.size(), 14); + Assert.assertEquals(ls.get(3), 9); + Assert.assertEquals(ls.get(13), 3); + //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 + //ls.add(15, "a"); + } + + /** + * get(i) + */ + @Test//(expected = IndexOutOfBoundsException.class) + public void get(){ + + for (int i = 0; i < 10; i++) { + ls.add(i); + } + + Assert.assertEquals(ls.get(9), 9); + //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 + //ls.get(12); + } + + @Test + public void remove(){ + + for (int i = 0; i < 10; i++) { + ls.add(i); + } + Assert.assertEquals(ls.remove(5),5); + Assert.assertEquals(ls.size(),9); + Assert.assertEquals(ls.remove(8),9); + Assert.assertEquals(ls.size(),8); + } + + @Test + public void size(){ + + Assert.assertEquals(ls.size(),0); + ls.add("a"); + Assert.assertEquals(ls.size(),1); + ls.add(0,0); + Assert.assertEquals(ls.size(),2); + ls.remove(0); + Assert.assertEquals(ls.size(),1); + + } + + @Test//(expected = NoSuchElementException.class) + public void iterator(){ + + for (int i = 0; i < 10; i++) { + ls.add(i); + } + Iterator it = ls.iterator(); + Assert.assertEquals(it.hasNext(),true); + for (int i = 0; i < 10; i++) { + it.next(); + } + Assert.assertEquals(it.hasNext(),false); + //鎵撳紑涓嬮潰鎿嶄綔鎶涘嚭寮傚父 + //it.next(); + } + + @Test + public void testReverse(){ + + ls.add(3); + ls.add(7); + ls.add(10); + ls.add(8); + ls.reverse(); + int[] expected = {8,10,7,3}; + for (int i = 0; i < ls.size(); i++) { + Assert.assertEquals(expected[i], ls.get(i)); + } + } + + public void testRemoveFirstHalf(){ + + ls.add(2); + ls.add(5); + ls.add(7); + ls.add(8); + ls.add(10); + int[] expected = {7,8,10}; + ls.removeFirstHalf(); + for (int i = 0; i < ls.size(); i++) { + Assert.assertEquals(ls.get(i), expected[i]); + } + + } + + @Test + public void testRemove(){ + ls.add(2); + ls.add(5); + ls.add(7); + ls.add(8); + ls.add(10); + + ls.remove(0, 1); + int[] expected = {5,7,8,10}; + exceptResult(ls,expected); + + ls.remove(3,1); + int[] expected1 = {5,7,8}; + exceptResult(ls,expected1); + + ls.add(9); + ls.remove(2,8); + int[] expected2 = {5,7}; + exceptResult(ls,expected2); + + ls.remove(0,9); + int[] expected3 = {}; + exceptResult(ls,expected3); + + } + + @Test + public void testGetElements(){ + ls.add(11);ls.add(101); + ls.add(201);ls.add(301); + ls.add(401);ls.add(501); + ls.add(601);ls.add(701); + LinkedList list = new LinkedList(); + list.add(1);list.add(3); + list.add(4);list.add(6); + int[] exceptArr = {101,301,401,601}; + int[] actual= ls.getElements(list); + for (int i = 0; i < actual.length; i++) { + Assert.assertEquals(exceptArr[i],actual[i]); + } + Assert.assertEquals(exceptArr.length,actual.length); + } + + private void exceptResult(LinkedList ls,int[] exceptArr){ + + Assert.assertEquals(ls.size(), exceptArr.length); + for (int i = 0; i < exceptArr.length; i++) { + Assert.assertEquals(exceptArr[i],ls.get(i)); + } + } +} From fc505d49839aff1701923b621a9c13b486ee245d Mon Sep 17 00:00:00 2001 From: Great Date: Mon, 6 Mar 2017 18:21:54 +0800 Subject: [PATCH 122/646] delete 108621969 dir --- .../2-26/com/coding/basic/ArrayList.java | 119 ------------ .../2-26/com/coding/basic/BinaryTreeNode.java | 56 ------ .../2-26/com/coding/basic/Iterator.java | 9 - .../2-26/com/coding/basic/LinkedList.java | 174 ------------------ .../108621969/2-26/com/coding/basic/List.java | 12 -- .../2-26/com/coding/basic/Queue.java | 33 ---- .../2-26/com/coding/basic/Stack.java | 40 ---- group08/108621969/README.md | 7 - .../article/Comp-Units-Relations(2-16).md | 14 -- 9 files changed, 464 deletions(-) delete mode 100644 group08/108621969/2-26/com/coding/basic/ArrayList.java delete mode 100644 group08/108621969/2-26/com/coding/basic/BinaryTreeNode.java delete mode 100644 group08/108621969/2-26/com/coding/basic/Iterator.java delete mode 100644 group08/108621969/2-26/com/coding/basic/LinkedList.java delete mode 100644 group08/108621969/2-26/com/coding/basic/List.java delete mode 100644 group08/108621969/2-26/com/coding/basic/Queue.java delete mode 100644 group08/108621969/2-26/com/coding/basic/Stack.java delete mode 100644 group08/108621969/README.md delete mode 100644 group08/108621969/article/Comp-Units-Relations(2-16).md diff --git a/group08/108621969/2-26/com/coding/basic/ArrayList.java b/group08/108621969/2-26/com/coding/basic/ArrayList.java deleted file mode 100644 index a06488acb9..0000000000 --- a/group08/108621969/2-26/com/coding/basic/ArrayList.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.coding.basic; - -import java.util.Arrays; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public class ArrayList implements List { - private int size = 0; - private Object[] elementData = new Object[100]; - - @Override - public void add(Object o) { - if(isFull()) { - elementData = expandArray(elementData); - } - elementData[size++] = o; - } - - @Override - public void add(int index, Object o) { - ifOutOfBounds(index); - if(isFull()) { - elementData = expandArray(elementData); - } - System.arraycopy(elementData,index,elementData,index+1,size++); - elementData[index] = o; - } - - @Override - public Object get(int index) { - ifOutOfBounds(index); - return elementData[index]; - } - - @Override - public Object remove(int index) { - ifOutOfBounds(index); - Object delData = elementData[index]; - System.arraycopy(elementData,index+1,elementData,index,size-index); - size--; - return index; - } - - @Override - public int size() { - return size; - } - - @Override - public String toString() { - String str = ""; - for(int i=0; i<=size-1; i++){ - str += elementData[i] + " "; - } - return str; - } - - private boolean isFull() { - if(size >= elementData.length-1){ - return true; - } - return false; - } - - public boolean isEmpty() { - if(size == 0) { - return true; - } - return false; - } - - private void ifOutOfBounds(int index) { - if(index >= size || index < 0) { - throw new IndexOutOfBoundsException(); - } - } - - private Object[] expandArray(Object[] arr) { - return Arrays.copyOf(arr, arr.length+10); - } - - public Iterator iterator = new ArrayListIterator(this); - - private class ArrayListIterator implements Iterator{ - - private ArrayList arrList; - int position = 0,length; - - private ArrayListIterator(ArrayList arrList){ - this.arrList = arrList; - this.length = arrList.size(); - } - - @Override - public boolean hasNext() { - return position < length; - } - - @Override - public Object next() { - return arrList.get(position++); - } - - } - - public static void main(String[] args) { - ArrayList arr = new ArrayList(); - arr.add(1); - arr.add(2); - arr.add(3); - arr.add(1,4); - arr.remove(2); - System.out.println(arr.toString()); - System.out.println(arr.size()); - System.out.println(arr.iterator.next()); - System.out.println(arr.iterator.next()); - } -} diff --git a/group08/108621969/2-26/com/coding/basic/BinaryTreeNode.java b/group08/108621969/2-26/com/coding/basic/BinaryTreeNode.java deleted file mode 100644 index f86efd62f5..0000000000 --- a/group08/108621969/2-26/com/coding/basic/BinaryTreeNode.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.coding.basic; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public class BinaryTreeNode { - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public BinaryTreeNode(Object o) { - this.data = o; - this.left = null; - this.right = null; - } - - public int getData() { - return (int) data; - } - - public void setData(Object data) { - this.data = data; - } - - public BinaryTreeNode getLeft() { - return left; - } - - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - - public BinaryTreeNode getRight() { - return right; - } - - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o) { - BinaryTreeNode newNode = new BinaryTreeNode(o); - insertInto(this, newNode); - return this; - } - - private void insertInto(BinaryTreeNode tree, BinaryTreeNode o) { - if (o.getData() <= tree.getData()) { - if (tree.getLeft() != null) insertInto(tree.getLeft(), o); - else tree.setLeft(o); - } else { - if (tree.getRight() != null) insertInto(tree.getRight(), o); - else tree.setRight(o); - } - } -} diff --git a/group08/108621969/2-26/com/coding/basic/Iterator.java b/group08/108621969/2-26/com/coding/basic/Iterator.java deleted file mode 100644 index ae5e36f464..0000000000 --- a/group08/108621969/2-26/com/coding/basic/Iterator.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.coding.basic; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public interface Iterator { - public boolean hasNext(); - public Object next(); -} diff --git a/group08/108621969/2-26/com/coding/basic/LinkedList.java b/group08/108621969/2-26/com/coding/basic/LinkedList.java deleted file mode 100644 index dadf8caeaf..0000000000 --- a/group08/108621969/2-26/com/coding/basic/LinkedList.java +++ /dev/null @@ -1,174 +0,0 @@ -package com.coding.basic; - -import java.util.Objects; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public class LinkedList implements List { - private Node head = null,tail = null; - private int size=0; - private LinkedListIterator iterator = null; - - @Override - public void add(Object o) { - Node newNode = new Node(o); - if(tail == null) { - head = tail = newNode; - }else { - tail.next = newNode; - tail = newNode; - } - size++; - } - - @Override - public void add(int index, Object o) { - ifOutOfBounds(index); - Node temp = head,previousNode = head; - Node newNode = new Node(o); - if(index == 0) { - newNode.next = head; - head = newNode; - return ; - } - while(index-- > 0) { - previousNode = temp; - temp = temp.next; - } - previousNode.next = newNode; - newNode.next = temp; - size++; - } - - @Override - public Object get(int index) { - ifOutOfBounds(index); - Node temp = head; - while(index-- > 0) { - temp = temp.next; - } - return temp; - } - - @Override - public Object remove(int index) { - ifOutOfBounds(index); - Node temp = head,previousNode = head; - if(head == tail) { - head = tail = null; - return temp; - } - while(index-- > 0) { - previousNode = temp; - temp = temp.next; - } - if(tail == temp) { - tail = previousNode; - } - previousNode.next = temp.next; - size--; - return temp; - } - - @Override - public int size() { - return size; - } - - public void addFirst(Object o) { - add(0,o); - } - - public void addLast(Object o) { - add(o); - } - - public Object removeFirst() { - return remove(0); - } - - public Object removeLast() { - return remove(size()-1); - } - - public LinkedListIterator Iterator() { - if(iterator ==null) { - iterator = new LinkedListIterator(this); - } - return iterator; - } - - private void ifOutOfBounds(int index) { - if(index >= size || index < 0) { - throw new IndexOutOfBoundsException(); - } - } - - private boolean isEmpty() { - return size==0; - } - - public String toString() { - String str = ""; - Node temp = head; - while(temp!=tail) { - str = str + temp.data + " "; - temp = temp.next; - } - return str + tail.data; - } - - private static class Node { - Object data; - Node next; - public Node(Object o) { - this.data = o; - this.next = null; - } - } - - private class LinkedListIterator implements Iterator { - private LinkedList linkedList = null; - private Node currentNode = null; - - public LinkedListIterator(LinkedList linkedList) { - this.linkedList = linkedList; - this.currentNode = this.linkedList.head; - } - - @Override - public boolean hasNext() { - if(linkedList.isEmpty()) return false; - return currentNode.next != null; - } - - @Override - public Object next() { - Object data = currentNode.data; - if(hasNext()) { - currentNode = currentNode.next; - } - return data; - } - } - - public static void main(String[] args) { - LinkedList arr = new LinkedList(); - arr.add(1); - arr.add(2); - arr.add(3); - arr.add(5); - arr.add(1,4); - arr.remove(2); - arr.removeLast(); - arr.addFirst(5); - System.out.println(arr.toString()); - System.out.println(arr.size()); - System.out.println(arr.Iterator().hasNext()); - System.out.println(arr.Iterator().next()); - System.out.println(arr.Iterator().next()); - System.out.println(arr.Iterator().next()); - System.out.println(arr.Iterator().next()); - } -} diff --git a/group08/108621969/2-26/com/coding/basic/List.java b/group08/108621969/2-26/com/coding/basic/List.java deleted file mode 100644 index 30a4b4e7cb..0000000000 --- a/group08/108621969/2-26/com/coding/basic/List.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.coding.basic; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group08/108621969/2-26/com/coding/basic/Queue.java b/group08/108621969/2-26/com/coding/basic/Queue.java deleted file mode 100644 index fd087cbd9b..0000000000 --- a/group08/108621969/2-26/com/coding/basic/Queue.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.coding.basic; - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public class Queue { - private ArrayList elementData = new ArrayList(); - - public void enQueue(Object o) { - elementData.add(0, o); - } - - public Object deQueue() { - return elementData.remove(elementData.size() - 1); - } - - public boolean isEmpty() { - return elementData.isEmpty(); - } - - public int size() { - return elementData.size(); - } - - public static void main(String[] args) { - Queue queue = new Queue(); - queue.enQueue(1); - queue.enQueue(2); - queue.enQueue(3); - System.out.println(queue.deQueue()); - System.out.println(queue.toString()); - } -} diff --git a/group08/108621969/2-26/com/coding/basic/Stack.java b/group08/108621969/2-26/com/coding/basic/Stack.java deleted file mode 100644 index d600d86fe5..0000000000 --- a/group08/108621969/2-26/com/coding/basic/Stack.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.coding.basic; - -import java.util.ArrayList; - - -/** - * Created by zhangjiatao on 2017/2/25. - */ -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o) { - elementData.add(elementData.size(), o); - } - - public Object pop() { - return elementData.remove(elementData.size() - 1); - } - - public Object peek() { - return elementData.get(elementData.size() - 1); - } - - public boolean isEmpty() { - return elementData.isEmpty(); - } - - public int size() { - return elementData.size(); - } - - public static void main(String[] args) { - Stack stack = new Stack(); - stack.push(1); - stack.push(2); - stack.push(3); - System.out.println(stack.pop()); - System.out.println(stack.toString()); - } -} diff --git a/group08/108621969/README.md b/group08/108621969/README.md deleted file mode 100644 index 413f53e93a..0000000000 --- a/group08/108621969/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# About Me -1. 濮撳悕: 寮犲姞娑 -2. 鎬у埆: 鐢 -3. 鐘舵: 瀹炰範 -4. 骞撮緞: 22 -5. 鑱屼笟: web鍓嶇 -6. 鍧愭爣: 涓婃捣娴︿笢 diff --git a/group08/108621969/article/Comp-Units-Relations(2-16).md b/group08/108621969/article/Comp-Units-Relations(2-16).md deleted file mode 100644 index b3fdcbb61b..0000000000 --- a/group08/108621969/article/Comp-Units-Relations(2-16).md +++ /dev/null @@ -1,14 +0,0 @@ -# CPU -鐢卞瘎瀛樺櫒銆佽繍绠楀櫒銆佹帶鍒跺櫒缁勬垚 -杩樻湁涓绾х紦瀛樸佷簩绾х紦瀛樼瓑 -# 鍐呭瓨 -鎴戜滑鎵璇寸殑鍐呭瓨閮芥槸绯荤粺鍐呭瓨锛屾槸SDRAM锛屽姩鎬侀殢鏈哄瓨鍌ㄥ櫒 -閫熷害蹇閲忓皬 -# 纭洏 -瀹归噺澶ч熷害鎱 -# 鎸囦护 -绋嬪簭鍦ㄨ绠楁満涓鍒嗚В涓轰竴鏉℃潯鐨勬寚浠 -# 鍏崇郴 -绋嬪簭鏂囦欢鍦ㄧ‖鐩樹腑锛屽綋璋冪敤鏃讹紝浠庣‖鐩樿浇鍏ュ唴瀛橈紝 -鎺у埗鍣ㄤ粠鍐呭瓨涓鍙栫▼搴忕殑绗竴鏉℃寚浠わ紝鎸囦护閫氱煡杩愮畻鍣ㄨ鍙栧唴瀛樹腑鐨勬暟鎹殑鍦板潃锛 -杩愮畻鍣ㄧ粨鍚堝瘎瀛樺櫒璁$畻鍑虹粨鏋滐紝璇诲彇涓嬩竴鏉℃寚浠わ紝鐩村埌鎸囦护缁撴潫銆 From 7a1344c8e32730b544ecf926cc82190a2ad0da05 Mon Sep 17 00:00:00 2001 From: 592146505 <592146505@qq.com> Date: Mon, 6 Mar 2017 18:54:23 +0800 Subject: [PATCH 123/646] =?UTF-8?q?=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/org/wsc/coderising}/array/ArrayUtil.java | 2 +- .../src/org/wsc/coderising}/array/ArrayUtilTest.java | 2 +- .../src/org/wsc/coderising}/litestruts/Action.java | 2 +- .../src/org/wsc/coderising}/litestruts/LoginAction.java | 2 +- .../src/org/wsc/coderising}/litestruts/Struts.java | 6 +++--- .../src/org/wsc/coderising}/litestruts/StrutsTest.java | 2 +- .../src/org/wsc/coderising}/litestruts/View.java | 2 +- .../src/org/wsc/coderising/litestruts}/struts.xml | 0 .../org/wsc/coderising}/litestruts/util/DocumentUtil.java | 2 +- .../wsc/coding/basic}/exception/NullElementException.java | 2 +- .../coding/basic}/exception/RepeatingElementException.java | 2 +- .../src/org/wsc/coding/basic}/list/ArrayList.java | 2 +- .../src/org/wsc/coding/basic}/list/Iterator.java | 2 +- .../src/org/wsc/coding/basic}/list/LinkedList.java | 2 +- .../src/org/wsc/coding/basic}/list/List.java | 2 +- .../src/org/wsc/coding/basic}/list/Queue.java | 2 +- .../src/org/wsc/coding/basic}/stack/Stack.java | 4 ++-- .../src/org/wsc/coding/basic}/tree_node/BinaryTreeNode.java | 6 +++--- 18 files changed, 22 insertions(+), 22 deletions(-) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/array/ArrayUtil.java (99%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/array/ArrayUtilTest.java (98%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/Action.java (87%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/LoginAction.java (95%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/Struts.java (96%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/StrutsTest.java (96%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/View.java (91%) rename group20/592146505/{coderising/src => 592146505Learning/src/org/wsc/coderising/litestruts}/struts.xml (100%) rename group20/592146505/{coderising/src/org/wsc => 592146505Learning/src/org/wsc/coderising}/litestruts/util/DocumentUtil.java (97%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/exception/NullElementException.java (90%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/exception/RepeatingElementException.java (90%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/list/ArrayList.java (99%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/list/Iterator.java (86%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/list/LinkedList.java (99%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/list/List.java (97%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/list/Queue.java (92%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/stack/Stack.java (77%) rename group20/592146505/{data _structure/src/org/wsc => 592146505Learning/src/org/wsc/coding/basic}/tree_node/BinaryTreeNode.java (95%) diff --git a/group20/592146505/coderising/src/org/wsc/array/ArrayUtil.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtil.java similarity index 99% rename from group20/592146505/coderising/src/org/wsc/array/ArrayUtil.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtil.java index 7bba1bb77b..3caef64d35 100644 --- a/group20/592146505/coderising/src/org/wsc/array/ArrayUtil.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtil.java @@ -1,4 +1,4 @@ -package org.wsc.array; +package org.wsc.coderising.array; public class ArrayUtil { /** diff --git a/group20/592146505/coderising/src/org/wsc/array/ArrayUtilTest.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtilTest.java similarity index 98% rename from group20/592146505/coderising/src/org/wsc/array/ArrayUtilTest.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtilTest.java index 009dec2938..e459aa175f 100644 --- a/group20/592146505/coderising/src/org/wsc/array/ArrayUtilTest.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/array/ArrayUtilTest.java @@ -1,4 +1,4 @@ -package org.wsc.array; +package org.wsc.coderising.array; import static org.junit.Assert.*; diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/Action.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Action.java similarity index 87% rename from group20/592146505/coderising/src/org/wsc/litestruts/Action.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Action.java index 083519bac6..87d08cf4cd 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/Action.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Action.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts; +package org.wsc.coderising.litestruts; import java.util.Set; diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/LoginAction.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/LoginAction.java similarity index 95% rename from group20/592146505/coderising/src/org/wsc/litestruts/LoginAction.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/LoginAction.java index bb23f5eebb..47abe6d963 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/LoginAction.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/LoginAction.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts; +package org.wsc.coderising.litestruts; /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/Struts.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Struts.java similarity index 96% rename from group20/592146505/coderising/src/org/wsc/litestruts/Struts.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Struts.java index 30a418979f..33f7804096 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/Struts.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/Struts.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts; +package org.wsc.coderising.litestruts; import java.io.IOException; import java.lang.reflect.Field; @@ -14,7 +14,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import org.wsc.litestruts.util.DocumentUtil; +import org.wsc.coderising.litestruts.util.DocumentUtil; import org.xml.sax.SAXException; public class Struts { @@ -24,7 +24,7 @@ public class Struts { /* 0. 璇诲彇閰嶇疆鏂囦欢struts.xml */ DOCUMENT_UTIL = DocumentUtil.newInstance(); try { - document = DOCUMENT_UTIL.getDocument("src/struts.xml"); + document = DOCUMENT_UTIL.getDocument("src/org/wsc/litestruts/struts.xml"); } catch (ParserConfigurationException | SAXException | IOException e) { e.printStackTrace(); } diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/StrutsTest.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/StrutsTest.java similarity index 96% rename from group20/592146505/coderising/src/org/wsc/litestruts/StrutsTest.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/StrutsTest.java index 8101e95fe3..bcc10d1e8e 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/StrutsTest.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/StrutsTest.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts; +package org.wsc.coderising.litestruts; import java.util.HashMap; import java.util.Map; diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/View.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/View.java similarity index 91% rename from group20/592146505/coderising/src/org/wsc/litestruts/View.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/View.java index f21906d1a5..c2722f8c2a 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/View.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/View.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts; +package org.wsc.coderising.litestruts; import java.util.Map; diff --git a/group20/592146505/coderising/src/struts.xml b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/struts.xml similarity index 100% rename from group20/592146505/coderising/src/struts.xml rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/struts.xml diff --git a/group20/592146505/coderising/src/org/wsc/litestruts/util/DocumentUtil.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/util/DocumentUtil.java similarity index 97% rename from group20/592146505/coderising/src/org/wsc/litestruts/util/DocumentUtil.java rename to group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/util/DocumentUtil.java index 9125b244cd..4effa19ab8 100644 --- a/group20/592146505/coderising/src/org/wsc/litestruts/util/DocumentUtil.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/litestruts/util/DocumentUtil.java @@ -1,4 +1,4 @@ -package org.wsc.litestruts.util; +package org.wsc.coderising.litestruts.util; import java.io.File; import java.io.IOException; diff --git a/group20/592146505/data _structure/src/org/wsc/exception/NullElementException.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/NullElementException.java similarity index 90% rename from group20/592146505/data _structure/src/org/wsc/exception/NullElementException.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/NullElementException.java index aa7763ef00..1bafd61d7e 100644 --- a/group20/592146505/data _structure/src/org/wsc/exception/NullElementException.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/NullElementException.java @@ -1,4 +1,4 @@ -package org.wsc.exception; +package org.wsc.coding.basic.exception; /** * diff --git a/group20/592146505/data _structure/src/org/wsc/exception/RepeatingElementException.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/RepeatingElementException.java similarity index 90% rename from group20/592146505/data _structure/src/org/wsc/exception/RepeatingElementException.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/RepeatingElementException.java index a5b66c54a1..63c9172364 100644 --- a/group20/592146505/data _structure/src/org/wsc/exception/RepeatingElementException.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/exception/RepeatingElementException.java @@ -1,4 +1,4 @@ -package org.wsc.exception; +package org.wsc.coding.basic.exception; /** * diff --git a/group20/592146505/data _structure/src/org/wsc/list/ArrayList.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java similarity index 99% rename from group20/592146505/data _structure/src/org/wsc/list/ArrayList.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java index 28b8db4132..761b3aac59 100644 --- a/group20/592146505/data _structure/src/org/wsc/list/ArrayList.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java @@ -1,4 +1,4 @@ -package org.wsc.list; +package org.wsc.coding.basic.list; import java.util.Arrays; import java.util.ConcurrentModificationException; diff --git a/group20/592146505/data _structure/src/org/wsc/list/Iterator.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Iterator.java similarity index 86% rename from group20/592146505/data _structure/src/org/wsc/list/Iterator.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Iterator.java index 59590bbf7e..92d1909c35 100644 --- a/group20/592146505/data _structure/src/org/wsc/list/Iterator.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Iterator.java @@ -1,4 +1,4 @@ -package org.wsc.list; +package org.wsc.coding.basic.list; public interface Iterator { /** diff --git a/group20/592146505/data _structure/src/org/wsc/list/LinkedList.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/LinkedList.java similarity index 99% rename from group20/592146505/data _structure/src/org/wsc/list/LinkedList.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/LinkedList.java index b909cfeabc..bcccddfbc1 100644 --- a/group20/592146505/data _structure/src/org/wsc/list/LinkedList.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/LinkedList.java @@ -1,4 +1,4 @@ -package org.wsc.list; +package org.wsc.coding.basic.list; import java.util.ConcurrentModificationException; import java.util.NoSuchElementException; diff --git a/group20/592146505/data _structure/src/org/wsc/list/List.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/List.java similarity index 97% rename from group20/592146505/data _structure/src/org/wsc/list/List.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/List.java index 2fd90c6395..bab268a048 100644 --- a/group20/592146505/data _structure/src/org/wsc/list/List.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/List.java @@ -1,4 +1,4 @@ -package org.wsc.list; +package org.wsc.coding.basic.list; /** * List鎺ュ彛 diff --git a/group20/592146505/data _structure/src/org/wsc/list/Queue.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Queue.java similarity index 92% rename from group20/592146505/data _structure/src/org/wsc/list/Queue.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Queue.java index 2087335e58..fb5c83c757 100644 --- a/group20/592146505/data _structure/src/org/wsc/list/Queue.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/Queue.java @@ -1,4 +1,4 @@ -package org.wsc.list; +package org.wsc.coding.basic.list; /** * diff --git a/group20/592146505/data _structure/src/org/wsc/stack/Stack.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/stack/Stack.java similarity index 77% rename from group20/592146505/data _structure/src/org/wsc/stack/Stack.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/stack/Stack.java index 96b931ca07..09f83c98b6 100644 --- a/group20/592146505/data _structure/src/org/wsc/stack/Stack.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/stack/Stack.java @@ -1,6 +1,6 @@ -package org.wsc.stack; +package org.wsc.coding.basic.stack; -import org.wsc.list.ArrayList; +import org.wsc.coding.basic.list.ArrayList; public class Stack { private ArrayList elementData = new ArrayList(); diff --git a/group20/592146505/data _structure/src/org/wsc/tree_node/BinaryTreeNode.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/tree_node/BinaryTreeNode.java similarity index 95% rename from group20/592146505/data _structure/src/org/wsc/tree_node/BinaryTreeNode.java rename to group20/592146505/592146505Learning/src/org/wsc/coding/basic/tree_node/BinaryTreeNode.java index b68784541d..eb77f74070 100644 --- a/group20/592146505/data _structure/src/org/wsc/tree_node/BinaryTreeNode.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/tree_node/BinaryTreeNode.java @@ -1,7 +1,7 @@ -package org.wsc.tree_node; +package org.wsc.coding.basic.tree_node; -import org.wsc.exception.NullElementException; -import org.wsc.exception.RepeatingElementException; +import org.wsc.coding.basic.exception.NullElementException; +import org.wsc.coding.basic.exception.RepeatingElementException; /** * BinaryTreeNode 浜屽弶鏍戠粨鏋 From 80d95a46b671ab5162714a5aa25b3d41beeb2329 Mon Sep 17 00:00:00 2001 From: Haochen Date: Mon, 6 Mar 2017 19:08:53 +0800 Subject: [PATCH 124/646] add multi-thread downloading --- .../895457260/code/src/download/Config.java | 12 ++ .../code/src/download/DownloadThread.java | 99 ++++++++++ .../code/src/download/FileDownloader.java | 180 ++++++++++++++++++ .../code/src/download/FileDownloaderTest.java | 61 ++++++ .../code/src/download/api/Connection.java | 23 +++ .../src/download/api/ConnectionException.java | 3 + .../src/download/api/ConnectionManager.java | 10 + .../src/download/api/DownloadException.java | 7 + .../src/download/api/DownloadListener.java | 5 + .../src/download/impl/ConnectionImpl.java | 48 +++++ .../download/impl/ConnectionManagerImpl.java | 12 ++ 11 files changed, 460 insertions(+) create mode 100644 group01/895457260/code/src/download/Config.java create mode 100644 group01/895457260/code/src/download/DownloadThread.java create mode 100644 group01/895457260/code/src/download/FileDownloader.java create mode 100644 group01/895457260/code/src/download/FileDownloaderTest.java create mode 100644 group01/895457260/code/src/download/api/Connection.java create mode 100644 group01/895457260/code/src/download/api/ConnectionException.java create mode 100644 group01/895457260/code/src/download/api/ConnectionManager.java create mode 100644 group01/895457260/code/src/download/api/DownloadException.java create mode 100644 group01/895457260/code/src/download/api/DownloadListener.java create mode 100644 group01/895457260/code/src/download/impl/ConnectionImpl.java create mode 100644 group01/895457260/code/src/download/impl/ConnectionManagerImpl.java diff --git a/group01/895457260/code/src/download/Config.java b/group01/895457260/code/src/download/Config.java new file mode 100644 index 0000000000..adbf32f40f --- /dev/null +++ b/group01/895457260/code/src/download/Config.java @@ -0,0 +1,12 @@ +package download; + +import java.io.File; + +/** + * Created by Haochen on 2017/3/6. + * TODO: + */ +public class Config { + public static File targetDirectory = new File("download/"); + public static File tempDirectory = new File(targetDirectory, "temp/"); +} diff --git a/group01/895457260/code/src/download/DownloadThread.java b/group01/895457260/code/src/download/DownloadThread.java new file mode 100644 index 0000000000..2ec27810d7 --- /dev/null +++ b/group01/895457260/code/src/download/DownloadThread.java @@ -0,0 +1,99 @@ +package download; + +import download.api.Connection; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +public class DownloadThread extends Thread { + Connection conn; + int startPos; + int endPos; + + File targetFile; + OnCompleteListener onComplete; + OnFailListener onFail; + + public DownloadThread(Connection conn, int startPos, int endPos, File targetFile, + OnCompleteListener onComplete, OnFailListener onFail) { + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.targetFile = targetFile; + this.onComplete = onComplete; + this.onFail = onFail; + } + + @Override + public void run() { + boolean success = false; + int maxFailCount = 5; + int failCount = 0; + while (!success) { + FileOutputStream fos = null; + try { + fos = new FileOutputStream(targetFile); + tryDownload(fos); + success = true; + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + if (failCount < maxFailCount) { + failCount++; + try { + recreateFile(fos, targetFile); + } catch (IOException e1) { + e1.printStackTrace(); + } + } else { + break; + } + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + if (onComplete != null) { + if (success) { + onComplete.onComplete(); + } else { + onFail.onFail(); + } + } + } + + private void recreateFile(FileOutputStream old, File file) throws IOException { + if (old != null) { + old.close(); + } + file.delete(); + file.createNewFile(); + } + + private void tryDownload(FileOutputStream fos) throws IOException { + int bufSize = 1024; + int from = startPos; + while (from < endPos) { + int to = Math.min(from + bufSize, endPos); + byte[] buf = conn.read(from, to); + from = to; + fos.write(buf); + fos.flush(); + } + } + + public interface OnCompleteListener { + void onComplete(); + } + public interface OnFailListener { + void onFail(); + } +} diff --git a/group01/895457260/code/src/download/FileDownloader.java b/group01/895457260/code/src/download/FileDownloader.java new file mode 100644 index 0000000000..38a1b6940b --- /dev/null +++ b/group01/895457260/code/src/download/FileDownloader.java @@ -0,0 +1,180 @@ +package download; + +import download.api.*; + +import java.io.*; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Date; + + +public class FileDownloader { + String url; + DownloadListener listener; + ConnectionManager manager; + + public FileDownloader(String url) { + this.url = url; + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + if (!Config.targetDirectory.exists()) { + Config.targetDirectory.mkdir(); + } + if (!Config.tempDirectory.exists()) { + Config.tempDirectory.mkdir(); + } + + int threadCount = 4; + File[] tempFiles = new File[threadCount]; + Connection[] connections = new Connection[threadCount]; + boolean[] threadComplete = new boolean[threadCount]; + for (int i = 0; i < threadCount; ++i) { + File targetFile = new File(Config.tempDirectory, + new Date().getTime() + "_" + i); + tempFiles[i] = targetFile; + + Connection conn = null; + try { + conn = manager.open(this.url); + } catch (ConnectionException e) { + e.printStackTrace(); + } + + if (conn != null) { + connections[i] = conn; + int length = conn.getContentLength(); + int startPos = (int) (1.0 * length / threadCount * i); + int endPos = i == threadCount - 1 ? length : (int) (1.0 * length / threadCount * (i + 1)); + System.out.println(i + " start: " + startPos + " end: " + endPos); + final int index = i; + new DownloadThread(conn, startPos, endPos, targetFile, + () -> threadComplete[index] = true, () -> { + try { + downloadError(connections); + } catch (DownloadException e) { + e.printStackTrace(); + } + }).start(); + } + } + + // 绛夊緟涓嬭浇瀹屾垚 + while (true) { + boolean complete = true; + for (boolean b : threadComplete) { + complete = complete && b; + } + if (complete) { + break; + } else { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + + // 鍚堝苟涓存椂鏂囦欢 + String[] split = url.replaceAll("/+", "/").split("/"); + File saveFile = new File(Config.targetDirectory, split[split.length - 1]); + FileOutputStream fos = null; + try { + fos = new FileOutputStream(saveFile); + for (File tempFile : tempFiles) { + write(tempFile, fos); + tempFile.delete(); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + for (Connection c : connections) { + if (c != null) { + c.close(); + } + } + } + + if (listener != null) { + listener.notifyFinished(); + } + } + + + private void downloadError(Connection[] connections) throws DownloadException { + for (Connection c : connections) { + c.close(); + } + throw new DownloadException(); + } + + private void write(File inputFile, OutputStream os) { + FileInputStream fis = null; + int bufSize = 1024; + byte[] buf = new byte[bufSize]; + int n; + try { + fis = new FileInputStream(inputFile); + while ((n = fis.read(buf)) != -1) { + os.write(buf, 0, n); + os.flush(); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (fis != null) { + try { + fis.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager manager){ + this.manager = manager; + } + + public DownloadListener getListener(){ + return this.listener; + } + + public static void main(String[] args) { + try { + URL url = new URL("file:///E:/Video/download/88993.mp4"); + System.out.println(url.getProtocol() + " " + url.getHost() + " " + url.getPort() + + " " + url.getPath() + " " + url.getFile()); + URLConnection c = url.openConnection(); + System.out.println(c.getContentLength()); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group01/895457260/code/src/download/FileDownloaderTest.java b/group01/895457260/code/src/download/FileDownloaderTest.java new file mode 100644 index 0000000000..f8a715ac2a --- /dev/null +++ b/group01/895457260/code/src/download/FileDownloaderTest.java @@ -0,0 +1,61 @@ +package download; + +import download.FileDownloader; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import download.api.ConnectionManager; +import download.api.DownloadListener; +import download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + +// String url = "http://localhost:8080/test.jpg"; + String url = "file:///E:/Video/download/88993.mp4"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group01/895457260/code/src/download/api/Connection.java b/group01/895457260/code/src/download/api/Connection.java new file mode 100644 index 0000000000..48f6946eb5 --- /dev/null +++ b/group01/895457260/code/src/download/api/Connection.java @@ -0,0 +1,23 @@ +package download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + void close(); +} diff --git a/group01/895457260/code/src/download/api/ConnectionException.java b/group01/895457260/code/src/download/api/ConnectionException.java new file mode 100644 index 0000000000..c0454093fe --- /dev/null +++ b/group01/895457260/code/src/download/api/ConnectionException.java @@ -0,0 +1,3 @@ +package download.api; + +public class ConnectionException extends Exception {} diff --git a/group01/895457260/code/src/download/api/ConnectionManager.java b/group01/895457260/code/src/download/api/ConnectionManager.java new file mode 100644 index 0000000000..e8ef315639 --- /dev/null +++ b/group01/895457260/code/src/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + Connection open(String url) throws ConnectionException; +} diff --git a/group01/895457260/code/src/download/api/DownloadException.java b/group01/895457260/code/src/download/api/DownloadException.java new file mode 100644 index 0000000000..ed5ad90782 --- /dev/null +++ b/group01/895457260/code/src/download/api/DownloadException.java @@ -0,0 +1,7 @@ +package download.api; + +/** + * Created by Haochen on 2017/3/6. + * TODO: + */ +public class DownloadException extends Exception {} diff --git a/group01/895457260/code/src/download/api/DownloadListener.java b/group01/895457260/code/src/download/api/DownloadListener.java new file mode 100644 index 0000000000..ed81e70b7c --- /dev/null +++ b/group01/895457260/code/src/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package download.api; + +public interface DownloadListener { + void notifyFinished(); +} diff --git a/group01/895457260/code/src/download/impl/ConnectionImpl.java b/group01/895457260/code/src/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..78ca55198a --- /dev/null +++ b/group01/895457260/code/src/download/impl/ConnectionImpl.java @@ -0,0 +1,48 @@ +package download.impl; + +import java.io.*; +import java.net.URL; +import java.net.URLConnection; + +import download.api.Connection; +import download.api.ConnectionException; + +public class ConnectionImpl implements Connection { + private URLConnection connection; + private InputStream inputStream; + + ConnectionImpl(String url) throws ConnectionException { + try { + connection = new URL(url).openConnection(); + inputStream = connection.getInputStream(); + inputStream.mark(connection.getContentLength()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + inputStream.reset(); + inputStream.skip(startPos); + byte[] bytes = new byte[endPos - startPos]; + int n = inputStream.read(bytes); + return n == -1 ? new byte[0] : bytes; + } + + @Override + public int getContentLength() { + return connection.getContentLength(); + } + + @Override + public void close() { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} diff --git a/group01/895457260/code/src/download/impl/ConnectionManagerImpl.java b/group01/895457260/code/src/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..be17fa9110 --- /dev/null +++ b/group01/895457260/code/src/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,12 @@ +package download.impl; + +import download.api.Connection; +import download.api.ConnectionException; +import download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + @Override + public Connection open(String url) throws ConnectionException { + return new ConnectionImpl(url); + } +} From 0d371d19f4f48ce28913688a5697e01739d52b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Mon, 6 Mar 2017 19:15:23 +0800 Subject: [PATCH 125/646] =?UTF-8?q?=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group08/1425809544/03-05/array/ArrayUtil.java | 257 ++++++++++++++++++ .../1425809544/03-05/array/ArrayUtilTest.java | 99 +++++++ .../03-05/\345\215\232\345\256\242.txt" | 3 + 3 files changed, 359 insertions(+) create mode 100644 group08/1425809544/03-05/array/ArrayUtil.java create mode 100644 group08/1425809544/03-05/array/ArrayUtilTest.java create mode 100644 "group08/1425809544/03-05/\345\215\232\345\256\242.txt" diff --git a/group08/1425809544/03-05/array/ArrayUtil.java b/group08/1425809544/03-05/array/ArrayUtil.java new file mode 100644 index 0000000000..f370e38dd4 --- /dev/null +++ b/group08/1425809544/03-05/array/ArrayUtil.java @@ -0,0 +1,257 @@ +package com.util_1; + +import java.util.*; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + * 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + * 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * + * @param origin + * @return + */ + public void reverseArray(int[] origin) { + int[] oldArr = origin; + int newLength = oldArr.length; + int[] newArr = new int[newLength]; + for (int i = 0; i < newLength; i++) { + newArr[newLength - i - 1] = oldArr[i]; + } + for (int s : newArr) { + System.out.println(s); + } + + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray) { + int[] oldArr = oldArray; + int oldLength = oldArr.length; + int[] newArr = new int[oldLength]; + int index = 0; + int zeroCount = 0; + for (int i = 0; i < oldLength; i++) { + if (oldArr[i] == 0) { + zeroCount++; + } else { + newArr[index++] = oldArr[i]; + } + } + int[] newArrs = Arrays.copyOf(newArr, index); + return newArrs; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2) { + int newLength = array1.length + array2.length; + int[] newArr = new int[newLength]; + int index = 0; + for (int i = 0; i < array1.length; i++) { + newArr[index++] = array1[i]; + } + for (int i = 0; i < array2.length; i++) { + newArr[index++] = array2[i]; + } + //鍐掓场鎺掑簭 + for (int i = 0; i < newArr.length; i++) { + for (int j = i + 1; j < newArr.length; j++) { + if (newArr[i] > newArr[j]) { + int temp = newArr[i]; + newArr[i] = newArr[j]; + newArr[j] = temp; + } + } + } + //鏁扮粍鍘婚噸 + boolean[] b = new boolean[newArr.length]; + int counts = newArr.length; + for (int i = 0; i < newArr.length; i++) { + for (int j = i + 1; j < newArr.length; j++) { + if (newArr[i] == newArr[j] && b[i] == false) { + b[j] = true; + counts--; + } + } + } + int[] result = new int[counts]; + int j = 0; + for (int i = 0; i < newArr.length; i++) { + if (b[i] == false) { + result[j] = newArr[i]; + j++; + } + } + return result; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * + * @param oldArray + * @param size + * @return + */ + public int[] grow(int[] oldArray, int size) { + int oldLength = oldArray.length; + int newLength = oldLength + size; + int[] result = Arrays.copyOf(oldArray, newLength); + return result; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * + * @param max + * @return + */ + public int[] fibonacci(int max) { + int a = 1, b = 1, c = 2; + int[] arr = new int[max + 1]; + int i = 2; + if (max == 1) { + return Arrays.copyOf(arr, 0); + } else if (max <= 0) { + throw new IllegalArgumentException("涓嶈兘杈撳叆<=0鐨勫弬鏁帮細" + max); + } else { + arr[0] = 1; + arr[1] = 1; + do { + c = a + b; + a = b; + b = c; + arr[i++] = c; + } while (c < max); + } + + if (arr[i - 1] >= max) { + return Arrays.copyOf(arr, i - 1); + } + return Arrays.copyOf(arr, i); + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * + * @param max + * @return + */ + public int[] getPrimes(int max) { + + class IsPrime { + // 鍒ゆ柇鏌愭暣鏁版槸鍚︿负绱犳暟 + public boolean isPrimes(int n) { + if (n < 2) { + return false; + } + for (int i = 2; i * i <= n; i++) { + if (n % i == 0) { + return false; + } + } + return true; + + } + } + List list = new ArrayList(); + IsPrime isPrime = new IsPrime(); + for (int i = 2; i < max; i++) { + if (isPrime.isPrimes(i)) { + list.add(i); + } + } + + int[] arr = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + arr[i] = (int) list.get(i); + } + + return arr; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * + * @param max + * @return + */ + public int[] getPerfectNumbers(int max) { + //淇濆瓨姣忕粍鐨勫垎瑙e洜瀛 + List list = new ArrayList(); + List pm = new ArrayList(); + int sum = 0; + //闄ゆ暟 + for (int i = 2; i < max; i++) { + //琚櫎鏁 + sum=0; + for (int j = 1; j < i / 2 + 1; j++) { + if (i % j == 0) { + list.add(j); + sum += j; + } + } + + if (sum == i) { + pm.add(i); + } + + list.clear(); + } + + int[] pmaArr = new int[pm.size()]; + for (int i = 0; i < pm.size(); i++) { + pmaArr[i] = (int) pm.get(i); + } + return pmaArr; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * + * @param array + * @param + * @return + */ + + public String join(int[] array, String seperator) { + + String s = new String(); + for (int i = 0; i < array.length; i++) { + if (i < array.length - 1) { + s += array[i] + seperator; + } else { + s += array[i]; + } + } + return s; + } + + +} diff --git a/group08/1425809544/03-05/array/ArrayUtilTest.java b/group08/1425809544/03-05/array/ArrayUtilTest.java new file mode 100644 index 0000000000..ad348045f9 --- /dev/null +++ b/group08/1425809544/03-05/array/ArrayUtilTest.java @@ -0,0 +1,99 @@ +package com.util_1; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Created by 14258 on 2017/2/28. + */ +public class ArrayUtilTest { + ArrayUtil arrayUtil = new ArrayUtil(); + + @Before + public void setUp() throws Exception { + + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void testReverseArray() throws Exception { + + int[] testArr = {7, 9, 30, 3}; + + arrayUtil.reverseArray(testArr); + } + + @Test + public void testRemoveZero() throws Exception { + int oldArr[] = {1, 3, 4, 5, 0, 0, 6, 6, 0, 5, 4, 7, 6, 7, 0, 5}; + int[] newArr = arrayUtil.removeZero(oldArr); + for (int s : newArr) { + System.out.println(s); + } + + } + + @Test + public void testMerge() throws Exception { + int[] a1 = {3, 5, 7}; + int[] a2 = {4, 5, 6, 7}; + int[] newArr = arrayUtil.merge(a1, a2); + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testGrow() throws Exception { + int[] oldArray = {2, 3, 6}; + + int[] newArr = arrayUtil.grow(oldArray, 3); + + for (int s : newArr) { + System.out.println(s); + } + } + + @Test + public void testFibonacci() throws Exception { + + int[] newArr = arrayUtil.fibonacci(16); + System.out.print("["); + for (int i : newArr) { + System.out.print(i+","); + } + System.out.print("]"); + } + + @Test + public void testGetPrimes() throws Exception { + int[] prime = arrayUtil.getPrimes(23); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testGetPerfectNumbers() throws Exception { + int[] prime = arrayUtil.getPerfectNumbers(10000); + + for (int i :prime){ + System.out.print(i+" "); + } + } + + @Test + public void testJoin() throws Exception { + int[] array = {3, 8, 9}; + String s = arrayUtil.join(array, "-"); + System.out.println(s); + } +} \ No newline at end of file diff --git "a/group08/1425809544/03-05/\345\215\232\345\256\242.txt" "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" new file mode 100644 index 0000000000..7f6c37fb0a --- /dev/null +++ "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" @@ -0,0 +1,3 @@ +测试 + +[计算机存储器结构](http://note.youdao.com/noteshare?id=a2da59b294d277d0e828f4f566015014&sub=04848681007A4C4A8649A411729AEADC) \ No newline at end of file From 8548781cf625985a099292bd32c2117a8f9c117a Mon Sep 17 00:00:00 2001 From: 592146505 <592146505@qq.com> Date: Mon, 6 Mar 2017 19:15:44 +0800 Subject: [PATCH 126/646] =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=99=A8=E6=8E=A5=E5=8F=A3=EF=BC=88=E6=9C=AA=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 30 +++++++ .../coderising/download/FileDownloader.java | 80 +++++++++++++++++++ .../download/FileDownloaderTest.java | 53 ++++++++++++ .../coderising/download/api/Connection.java | 36 +++++++++ .../download/api/ConnectionException.java | 37 +++++++++ .../download/api/ConnectionManager.java | 20 +++++ .../download/api/DownloadListener.java | 17 ++++ .../download/impl/ConnectionImpl.java | 35 ++++++++ .../download/impl/ConnectionManagerImpl.java | 23 ++++++ 9 files changed, 331 insertions(+) create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/DownloadListener.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java create mode 100644 group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..1a39d7d741 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java @@ -0,0 +1,30 @@ +package org.wsc.coderising.download; + +import org.wsc.coderising.download.api.Connection; + +/** + * 涓嬭浇杩涚▼ + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:03:41 + * @version v1.0 + * + */ +public class DownloadThread extends Thread{ + + /** 杩炴帴 */ + Connection conn; + /** 寮濮嬪 */ + int startPos; + /** 缁撴潫澶 */ + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..99c6097409 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java @@ -0,0 +1,80 @@ +package org.wsc.coderising.download; + +import org.wsc.coderising.download.api.Connection; +import org.wsc.coderising.download.api.ConnectionException; +import org.wsc.coderising.download.api.ConnectionManager; +import org.wsc.coderising.download.api.DownloadListener; + +/** + * 鏂囦欢涓嬭浇鍣 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:04:44 + * @version v1.0 + * + */ +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..3815c9698b --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java @@ -0,0 +1,53 @@ +package org.wsc.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.wsc.coderising.download.api.ConnectionManager; +import org.wsc.coderising.download.api.DownloadListener; +import org.wsc.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + // 璧勬簮浣嶇疆 + String url = "http://localhost:8080/test.jpg"; + // 鍒涘缓璧勬簮涓嬭浇鍣ㄥ疄渚 + FileDownloader downloader = new FileDownloader(url); + // 鍒涘缓杩炴帴绠$悊瀹炰緥 + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + // 鐢熸垚鍥炶皟鍑芥暟 + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + // 寮濮嬩笅杞 + downloader.execute(); + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } + +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java new file mode 100644 index 0000000000..5c7c3bf6b5 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java @@ -0,0 +1,36 @@ +package org.wsc.coderising.download.api; + +import java.io.IOException; + +/** + * 杩炴帴鎺ュ彛 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:00:53 + * @version v1.0 + * + */ +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos + * 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos + * 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..a3c794ef97 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java @@ -0,0 +1,37 @@ +package org.wsc.coderising.download.api; + +/** + * + * 杩炴帴寮傚父绫 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗6:59:41 + * @version v1.0 + * + */ +public class ConnectionException extends Exception { + + private static final long serialVersionUID = -249834831447340792L; + + private ConnectionException() { + super(); + } + + private ConnectionException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + private ConnectionException(String message, Throwable cause) { + super(message, cause); + } + + private ConnectionException(String message) { + super(message); + } + + private ConnectionException(Throwable cause) { + super(cause); + } + +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..8d9eea4cc2 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java @@ -0,0 +1,20 @@ +package org.wsc.coderising.download.api; + +/** + * + * 绠$悊杩炴帴鎺ュ彛 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:02:30 + * @version v1.0 + * + */ +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/DownloadListener.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..5d785032d0 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/DownloadListener.java @@ -0,0 +1,17 @@ +package org.wsc.coderising.download.api; + +/** + * + * 涓嬭浇鐩戝惉鎺ュ彛 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:02:58 + * @version v1.0 + * + */ +public interface DownloadListener { + /** + * 閫氱煡涓嬭浇瀹屾垚鍥炶皟鍑芥暟 + */ + public void notifyFinished(); +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..6b52b77f5d --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,35 @@ +package org.wsc.coderising.download.impl; + +import java.io.IOException; + +import org.wsc.coderising.download.api.Connection; + +/** + * + * 杩炴帴绫 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:10:13 + * @version v1.0 + * + */ +public class ConnectionImpl implements Connection { + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + } + +} diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..cf516fa0e7 --- /dev/null +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,23 @@ +package org.wsc.coderising.download.impl; + +import org.wsc.coderising.download.api.Connection; +import org.wsc.coderising.download.api.ConnectionException; +import org.wsc.coderising.download.api.ConnectionManager; + +/** + * 杩炴帴绠$悊绫 + * + * @author Administrator + * @date 2017骞3鏈6鏃ヤ笅鍗7:11:50 + * @version v1.0 + * + */ +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} From 0d8273b8ec0eb15bb29644d341d4e54f2b7b9eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Mon, 6 Mar 2017 19:18:23 +0800 Subject: [PATCH 127/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "group08/1425809544/03-05/\345\215\232\345\256\242.txt" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/group08/1425809544/03-05/\345\215\232\345\256\242.txt" "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" index 7f6c37fb0a..3a59045ae7 100644 --- "a/group08/1425809544/03-05/\345\215\232\345\256\242.txt" +++ "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" @@ -1,3 +1,3 @@ 测试 -[计算机存储器结构](http://note.youdao.com/noteshare?id=a2da59b294d277d0e828f4f566015014&sub=04848681007A4C4A8649A411729AEADC) \ No newline at end of file +[计算机存储器结构](http://blog.csdn.net/qq_25385555/article/month/2017/03) \ No newline at end of file From 9d2820a38e560cb6f1a31f5b8040d8e77194d77b Mon Sep 17 00:00:00 2001 From: Great Date: Mon, 6 Mar 2017 19:24:07 +0800 Subject: [PATCH 128/646] 875325254 3-05 homework --- .../src/main/java/action/LoginAction.java | 33 +++++++++++ .../3-05/src/main/java/dao/BaseDAO.java | 24 ++++++++ .../3-05/src/main/java/dao/UserDAO.java | 29 ++++++++++ .../3-05/src/main/java/dao/impl/IUserDAO.java | 10 ++++ .../3-05/src/main/java/pojo/User.hbm.xml | 18 ++++++ .../3-05/src/main/java/pojo/User.java | 56 +++++++++++++++++++ .../src/main/resources/applicationContext.xml | 31 ++++++++++ .../3-05/src/main/resources/struts.xml | 15 +++++ .../3-05/src/main/webapp/WEB-INF/web.xml | 21 +++++++ .../875325254/3-05/src/main/webapp/error.jsp | 16 ++++++ .../875325254/3-05/src/main/webapp/index.jsp | 21 +++++++ .../3-05/src/main/webapp/welcome.jsp | 17 ++++++ 12 files changed, 291 insertions(+) create mode 100644 group08/875325254/3-05/src/main/java/action/LoginAction.java create mode 100644 group08/875325254/3-05/src/main/java/dao/BaseDAO.java create mode 100644 group08/875325254/3-05/src/main/java/dao/UserDAO.java create mode 100644 group08/875325254/3-05/src/main/java/dao/impl/IUserDAO.java create mode 100644 group08/875325254/3-05/src/main/java/pojo/User.hbm.xml create mode 100644 group08/875325254/3-05/src/main/java/pojo/User.java create mode 100644 group08/875325254/3-05/src/main/resources/applicationContext.xml create mode 100644 group08/875325254/3-05/src/main/resources/struts.xml create mode 100644 group08/875325254/3-05/src/main/webapp/WEB-INF/web.xml create mode 100644 group08/875325254/3-05/src/main/webapp/error.jsp create mode 100644 group08/875325254/3-05/src/main/webapp/index.jsp create mode 100644 group08/875325254/3-05/src/main/webapp/welcome.jsp diff --git a/group08/875325254/3-05/src/main/java/action/LoginAction.java b/group08/875325254/3-05/src/main/java/action/LoginAction.java new file mode 100644 index 0000000000..7085222dd4 --- /dev/null +++ b/group08/875325254/3-05/src/main/java/action/LoginAction.java @@ -0,0 +1,33 @@ +package action; + +import com.opensymphony.xwork2.ActionSupport; +import dao.impl.IUserDAO; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; +import pojo.User; + +/** + * Created by Great on 2017/2/7. + */ +public class LoginAction extends ActionSupport { + private User user; + + @Override + public String execute() throws Exception { + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); + IUserDAO userDAO = (IUserDAO) applicationContext.getBean("userDAO"); + if (userDAO.validateUser(user.getUsername(), user.getPassword()) != null) { + return SUCCESS; + } else { + return ERROR; + } + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } +} diff --git a/group08/875325254/3-05/src/main/java/dao/BaseDAO.java b/group08/875325254/3-05/src/main/java/dao/BaseDAO.java new file mode 100644 index 0000000000..783be03a88 --- /dev/null +++ b/group08/875325254/3-05/src/main/java/dao/BaseDAO.java @@ -0,0 +1,24 @@ +package dao; + +import org.hibernate.Session; +import org.hibernate.SessionFactory; + +/** + * Created by Great on 2017/2/13. + */ +public class BaseDAO { + private SessionFactory sessionFactory; + + public SessionFactory getSessionFactory() { + return sessionFactory; + } + + public void setSessionFactory(SessionFactory sessionFactory) { + this.sessionFactory = sessionFactory; + } + + public Session getSession() { + Session session = sessionFactory.openSession(); + return session; + } +} diff --git a/group08/875325254/3-05/src/main/java/dao/UserDAO.java b/group08/875325254/3-05/src/main/java/dao/UserDAO.java new file mode 100644 index 0000000000..29bb9d6a69 --- /dev/null +++ b/group08/875325254/3-05/src/main/java/dao/UserDAO.java @@ -0,0 +1,29 @@ +package dao; + +import dao.impl.IUserDAO; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.cfg.Configuration; +import org.hibernate.query.Query; +import pojo.User; + +import java.util.List; + +/** + * Created by Great on 2017/2/7. + */ +public class UserDAO extends BaseDAO implements IUserDAO { + public User validateUser(String username, String password) { + String hql = "from User u where u.username = ? and u.password = ?"; + Session session = getSession(); + Query query = session.createQuery(hql); + query.setParameter(0, username); + query.setParameter(1, password); + List users = query.list(); + session.close(); + if (users.size() != 0) { + return (User) users.get(0); + } + return null; + } +} diff --git a/group08/875325254/3-05/src/main/java/dao/impl/IUserDAO.java b/group08/875325254/3-05/src/main/java/dao/impl/IUserDAO.java new file mode 100644 index 0000000000..16d267383c --- /dev/null +++ b/group08/875325254/3-05/src/main/java/dao/impl/IUserDAO.java @@ -0,0 +1,10 @@ +package dao.impl; + +import pojo.User; + +/** + * Created by Great on 2017/2/7. + */ +public interface IUserDAO { + public User validateUser(String username, String password); +} diff --git a/group08/875325254/3-05/src/main/java/pojo/User.hbm.xml b/group08/875325254/3-05/src/main/java/pojo/User.hbm.xml new file mode 100644 index 0000000000..761aa3e300 --- /dev/null +++ b/group08/875325254/3-05/src/main/java/pojo/User.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group08/875325254/3-05/src/main/java/pojo/User.java b/group08/875325254/3-05/src/main/java/pojo/User.java new file mode 100644 index 0000000000..0ff9e7e249 --- /dev/null +++ b/group08/875325254/3-05/src/main/java/pojo/User.java @@ -0,0 +1,56 @@ +package pojo; + +/** + * Created by Great on 2017/2/8. + */ +public class User { + private int id; + private String username; + private String password; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + User users = (User) o; + + if (id != users.id) return false; + if (username != null ? !username.equals(users.username) : users.username != null) return false; + if (password != null ? !password.equals(users.password) : users.password != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = id; + result = 31 * result + (username != null ? username.hashCode() : 0); + result = 31 * result + (password != null ? password.hashCode() : 0); + return result; + } +} diff --git a/group08/875325254/3-05/src/main/resources/applicationContext.xml b/group08/875325254/3-05/src/main/resources/applicationContext.xml new file mode 100644 index 0000000000..847314c4b5 --- /dev/null +++ b/group08/875325254/3-05/src/main/resources/applicationContext.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + org.hibernate.dialect.SQLServerDialect + + + + + + pojo/User.hbm.xml + + + + + + + + + \ No newline at end of file diff --git a/group08/875325254/3-05/src/main/resources/struts.xml b/group08/875325254/3-05/src/main/resources/struts.xml new file mode 100644 index 0000000000..52d79d8277 --- /dev/null +++ b/group08/875325254/3-05/src/main/resources/struts.xml @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/group08/875325254/3-05/src/main/webapp/WEB-INF/web.xml b/group08/875325254/3-05/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..059e5ceb30 --- /dev/null +++ b/group08/875325254/3-05/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,21 @@ + + + + struts2 + org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter + + + struts2 + /* + + + org.springframework.web.context.ContextLoaderListener + + + contextConfigLocation + /WEB-INF/classes/applicationContext.xml + + \ No newline at end of file diff --git a/group08/875325254/3-05/src/main/webapp/error.jsp b/group08/875325254/3-05/src/main/webapp/error.jsp new file mode 100644 index 0000000000..3a381d807e --- /dev/null +++ b/group08/875325254/3-05/src/main/webapp/error.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Great + Date: 2017/2/7 + Time: 20:22 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Error + + +Error!
+ + diff --git a/group08/875325254/3-05/src/main/webapp/index.jsp b/group08/875325254/3-05/src/main/webapp/index.jsp new file mode 100644 index 0000000000..06106d35e3 --- /dev/null +++ b/group08/875325254/3-05/src/main/webapp/index.jsp @@ -0,0 +1,21 @@ +<%-- + Created by IntelliJ IDEA. + User: Great + Date: 2017/2/7 + Time: 18:29 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Login + + +

+ Login
+ Username: + Password: + + + + diff --git a/group08/875325254/3-05/src/main/webapp/welcome.jsp b/group08/875325254/3-05/src/main/webapp/welcome.jsp new file mode 100644 index 0000000000..9893630135 --- /dev/null +++ b/group08/875325254/3-05/src/main/webapp/welcome.jsp @@ -0,0 +1,17 @@ +<%-- + Created by IntelliJ IDEA. + User: Great + Date: 2017/2/7 + Time: 20:21 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + welcome + + +,welcome! + + From cf483e9f06475c14c843789332d270b763df7f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Mon, 6 Mar 2017 19:46:54 +0800 Subject: [PATCH 129/646] =?UTF-8?q?Update=20=E5=8D=9A=E5=AE=A2.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "group08/1425809544/03-05/\345\215\232\345\256\242.txt" | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git "a/group08/1425809544/03-05/\345\215\232\345\256\242.txt" "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" index 3a59045ae7..e365de2073 100644 --- "a/group08/1425809544/03-05/\345\215\232\345\256\242.txt" +++ "b/group08/1425809544/03-05/\345\215\232\345\256\242.txt" @@ -1,3 +1 @@ -测试 - -[计算机存储器结构](http://blog.csdn.net/qq_25385555/article/month/2017/03) \ No newline at end of file +[璁$畻鏈哄瓨鍌ㄧ粨鏋刔(http://blog.csdn.net/qq_25385555/article/month/2017/03) From ab4310bfa0509f6c9824e82ad9ea6c88f69845b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=98=B3=E9=98=B3?= <1425809544@qq.com> Date: Mon, 6 Mar 2017 19:49:26 +0800 Subject: [PATCH 130/646] Update 1425809544.md --- group08/1425809544/1425809544.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/group08/1425809544/1425809544.md b/group08/1425809544/1425809544.md index 392a86ba1a..326924a615 100644 --- a/group08/1425809544/1425809544.md +++ b/group08/1425809544/1425809544.md @@ -1,3 +1,3 @@ -娴嬭瘯 - -[璁$畻鏈哄瓨鍌ㄥ櫒缁撴瀯](http://note.youdao.com/noteshare?id=a2da59b294d277d0e828f4f566015014&sub=04848681007A4C4A8649A411729AEADC) \ No newline at end of file +## 鍗氬 +- [鏂囩珷閾炬帴-java闆嗗悎 瀹瑰櫒 绠鍗曟杩癩(http://blog.csdn.net/qq_25385555/article/month/2017/02) +- [鏂囩珷閾炬帴-璁$畻鏈哄瓨鍌ㄥ櫒缁撴瀯](http://blog.csdn.net/qq_25385555/article/month/2017/03) From bf9669bc3b70cc5d6d0c551f853dd99af2281cce Mon Sep 17 00:00:00 2001 From: lenovo2512009 <610673813@qq.com> Date: Mon, 6 Mar 2017 22:04:52 +0800 Subject: [PATCH 131/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=20=E5=92=8C=E7=AC=AC=E4=BA=8C=E6=AC=A1=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group09/610673813/.classpath | 8 ++ group09/610673813/.gitignore | 1 + group09/610673813/.project | 17 +++ .../src/coding/week01/ArrayList.java | 71 +++++++++++ .../src/coding/week01/BinaryTreeNode.java | 32 +++++ .../610673813/src/coding/week01/Iterator.java | 7 ++ .../src/coding/week01/LinkedList.java | 104 ++++++++++++++++ group09/610673813/src/coding/week01/List.java | 9 ++ .../610673813/src/coding/week01/Queue.java | 35 ++++++ .../610673813/src/coding/week01/Stack.java | 39 ++++++ .../src/coding/week02/LoginAction.java | 34 ++++++ .../610673813/src/coding/week02/ReadXml.java | 70 +++++++++++ .../610673813/src/coding/week02/Struts.java | 115 ++++++++++++++++++ .../src/coding/week02/StrutsTest.java | 40 ++++++ group09/610673813/src/coding/week02/View.java | 28 +++++ 15 files changed, 610 insertions(+) create mode 100644 group09/610673813/.classpath create mode 100644 group09/610673813/.gitignore create mode 100644 group09/610673813/.project create mode 100644 group09/610673813/src/coding/week01/ArrayList.java create mode 100644 group09/610673813/src/coding/week01/BinaryTreeNode.java create mode 100644 group09/610673813/src/coding/week01/Iterator.java create mode 100644 group09/610673813/src/coding/week01/LinkedList.java create mode 100644 group09/610673813/src/coding/week01/List.java create mode 100644 group09/610673813/src/coding/week01/Queue.java create mode 100644 group09/610673813/src/coding/week01/Stack.java create mode 100644 group09/610673813/src/coding/week02/LoginAction.java create mode 100644 group09/610673813/src/coding/week02/ReadXml.java create mode 100644 group09/610673813/src/coding/week02/Struts.java create mode 100644 group09/610673813/src/coding/week02/StrutsTest.java create mode 100644 group09/610673813/src/coding/week02/View.java diff --git a/group09/610673813/.classpath b/group09/610673813/.classpath new file mode 100644 index 0000000000..3f48e879d0 --- /dev/null +++ b/group09/610673813/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/group09/610673813/.gitignore b/group09/610673813/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/group09/610673813/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/group09/610673813/.project b/group09/610673813/.project new file mode 100644 index 0000000000..a6666f301e --- /dev/null +++ b/group09/610673813/.project @@ -0,0 +1,17 @@ + + + coding + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group09/610673813/src/coding/week01/ArrayList.java b/group09/610673813/src/coding/week01/ArrayList.java new file mode 100644 index 0000000000..f157c7bb55 --- /dev/null +++ b/group09/610673813/src/coding/week01/ArrayList.java @@ -0,0 +1,71 @@ +package coding.week01; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[2]; + + public void add(Object o){ + int len = elementData.length; + if(size >= len){ + Object[] new_elmentData = new Object[len*2]; + System.arraycopy(elementData, 0, new_elmentData, 0, size); + elementData = new_elmentData; + } + elementData[size] = o; + size ++; + } + public void add(int index, Object o){ + if(index >= size){ + throw new RuntimeException("涓嬫爣瓒婄晫"); + } + Object[] new_elementData = new Object[size+1]; + System.arraycopy(elementData, 0, new_elementData, 0, index); + System.arraycopy(elementData, index, new_elementData, index+1, size-index); + new_elementData[index] = o; + elementData = new_elementData; + size++; + } + + public Object get(int index){ + if(index >= size){ + throw new RuntimeException("涓嬫爣瓒婄晫"); + } + return elementData[index]; + } + + public Object remove(int index){ + if(index >= size){ + throw new RuntimeException("涓嬫爣瓒婄晫"); + } + Object oldElement = elementData[index]; + if((index+1) != size){ + System.arraycopy(elementData, index+1, elementData, index, size-index-1); + } + elementData[size-1] = null; + size --; + return oldElement; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return null; + } + + @Override + public String toString() { + String s = "{"; + for (int i = 0; i < size; i++) { + if(i == (size -1)){ + s += elementData[i] + "}"; + }else{ + s += elementData[i]+","; + } + } + return s; + } +} diff --git a/group09/610673813/src/coding/week01/BinaryTreeNode.java b/group09/610673813/src/coding/week01/BinaryTreeNode.java new file mode 100644 index 0000000000..da86e61d8f --- /dev/null +++ b/group09/610673813/src/coding/week01/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package coding.week01; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group09/610673813/src/coding/week01/Iterator.java b/group09/610673813/src/coding/week01/Iterator.java new file mode 100644 index 0000000000..a9b96bf891 --- /dev/null +++ b/group09/610673813/src/coding/week01/Iterator.java @@ -0,0 +1,7 @@ +package coding.week01; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group09/610673813/src/coding/week01/LinkedList.java b/group09/610673813/src/coding/week01/LinkedList.java new file mode 100644 index 0000000000..5e9ef79aea --- /dev/null +++ b/group09/610673813/src/coding/week01/LinkedList.java @@ -0,0 +1,104 @@ +package coding.week01; + +public class LinkedList implements List { + + private Node head; + private int size; + + public LinkedList(){ + head = new Node(new Object(),null,null); + } + + public void add(Object o){ + Node last = head; + for (int i = 0; i < size; i++) { + last = last.next; + } + Node newNode = new Node(o,null,last); + last.next = newNode; + size++; + } + public void add(int index , Object o){ + Node oldNode = getNode(index); + Node newNode = new Node(o, oldNode, oldNode.prev); + oldNode.prev.next = newNode; + oldNode.prev = newNode; + size ++; + } + public Object get(int index){ + Node node = getNode(index); + return node.data; + } + + private Node getNode(int index){ + Node n = head.next; + for (int i = 0; i < index; i++) { + n = n.next; + } + return n; + } + + public Object remove(int index){ + Node node = getNode(index); + Object o =node.data; + Node prevNode = node.prev; + Node nextNode = node.next; + prevNode.next = nextNode; + nextNode.prev = prevNode; + node.next = node.prev =null; + node.data = null; + size --; + return o; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + add(0,o); + } + public void addLast(Object o){ + add(o); + } + public Object removeFirst(){ + Object o = remove(0); + return o; + } + public Object removeLast(){ + Object o = remove(size); + return o; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + Node prev; + + public Node(Object o,Node next,Node prev){ + this.data = o; + this.next = next; + this.prev = prev; + } + } + + @Override + public String toString() { + String s = "{"; + Node n = head; + for (int i = 0; i < size; i++) { + n = n.next; + if(i == (size -1)){ + s += n.data; + }else{ + s += n.data + ","; + } + } + s += "}"; + return s; + } +} diff --git a/group09/610673813/src/coding/week01/List.java b/group09/610673813/src/coding/week01/List.java new file mode 100644 index 0000000000..01ade190ab --- /dev/null +++ b/group09/610673813/src/coding/week01/List.java @@ -0,0 +1,9 @@ +package coding.week01; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group09/610673813/src/coding/week01/Queue.java b/group09/610673813/src/coding/week01/Queue.java new file mode 100644 index 0000000000..39b413b5fe --- /dev/null +++ b/group09/610673813/src/coding/week01/Queue.java @@ -0,0 +1,35 @@ +package coding.week01; + +public class Queue { + private LinkedList list = new LinkedList(); + + public void enQueue(Object o){ + list.add(o); + } + + public Object deQueue(){ + if(isEmpty()){ + throw new RuntimeException("宸蹭负绌"); + } + Object o = list.get(0); + list.remove(0); + return o; + } + + public boolean isEmpty(){ + if(size() == 0){ + return true; + }else{ + return false; + } + } + + public int size(){ + return list.size(); + } + + @Override + public String toString() { + return list.toString(); + } +} diff --git a/group09/610673813/src/coding/week01/Stack.java b/group09/610673813/src/coding/week01/Stack.java new file mode 100644 index 0000000000..040c878602 --- /dev/null +++ b/group09/610673813/src/coding/week01/Stack.java @@ -0,0 +1,39 @@ +package coding.week01; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + if(isEmpty()){ + throw new RuntimeException("宸蹭负绌"); + } + Object o = elementData.get(elementData.size()-1); + elementData.remove(elementData.size()-1); + return o; + } + + public Object peek(){ + Object o = elementData.get(elementData.size()-1); + return o; + } + public boolean isEmpty(){ + int size = elementData.size(); + if(size == 0){ + return true; + }else{ + return false; + } + } + public int size(){ + return elementData.size(); + } + + @Override + public String toString() { + return elementData.toString(); + } +} diff --git a/group09/610673813/src/coding/week02/LoginAction.java b/group09/610673813/src/coding/week02/LoginAction.java new file mode 100644 index 0000000000..896bc8c8cb --- /dev/null +++ b/group09/610673813/src/coding/week02/LoginAction.java @@ -0,0 +1,34 @@ +package coding.week02; + +public class LoginAction { + + private String name; + private String passWord; + private String message; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getPassWord() { + return passWord; + } + public void setPassWord(String passWord) { + this.passWord = passWord; + } + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + public String execute(){ + if ("test".equals(name) && "1234".equals(passWord)) { + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } +} diff --git a/group09/610673813/src/coding/week02/ReadXml.java b/group09/610673813/src/coding/week02/ReadXml.java new file mode 100644 index 0000000000..2a3441da99 --- /dev/null +++ b/group09/610673813/src/coding/week02/ReadXml.java @@ -0,0 +1,70 @@ +package coding.week02; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +public class ReadXml { + + private Document document = null; + private HashMap hashMap; + + public ReadXml(String filename) { + try { + document = new SAXReader().read((filename)); + hashMap = new HashMap(); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public String parseXml(String actionName) { + + // List actions = document.selectNodes("//struts/action"); + String className = null; + Element root = document.getRootElement(); + List actions = root.elements("action"); + if (actions.isEmpty()) { + return null; + } + for (Iterator iter = actions.iterator(); iter.hasNext();) { + Element element = (Element) iter.next(); + Attribute attr1 = element.attribute("name"); + if (attr1.getValue().equals(actionName)) { + Attribute attr2 = element.attribute("class"); + className = attr2.getValue(); + for (Iterator iterator = element.elementIterator(); iterator + .hasNext();) { + Element childElement = (Element) iterator.next(); + Attribute childAttribute = childElement.attribute("name"); + hashMap.put(childAttribute.getValue(), + childElement.getText()); + } + } + + } + return className; + } + + public String getJsp(String result) { + if (result == null) { + return null; + } + String string_jsp = null; + if (!hashMap.isEmpty()) { + for (String string : hashMap.keySet()) { + if (result.equals(string)) { + string_jsp = hashMap.get(string); + } + } + } + return string_jsp; + } +} diff --git a/group09/610673813/src/coding/week02/Struts.java b/group09/610673813/src/coding/week02/Struts.java new file mode 100644 index 0000000000..96cfe18a24 --- /dev/null +++ b/group09/610673813/src/coding/week02/Struts.java @@ -0,0 +1,115 @@ +package coding.week02; + +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +public class Struts { + + private static final String NAME = "name"; + private static final String PASSWORD = "password"; + private static String excuteString; + private static Object object = null; + private static Class actionClass = null; + + + + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + @SuppressWarnings("unchecked") + public static View runAction(String actionName, + Map parameters) { + + View view = new View(); + ReadXml readXml = new ReadXml("E:\\struts.xml"); + String classNameString = readXml.parseXml(actionName); + object = initAction(classNameString); + + excuteMethod(parameters); + + view.setParameterMap(setMapParameter()); + String jspResult = readXml.getJsp(excuteString); + view.setJsp(jspResult); + + return view; + } + + public static Object initAction(String classNameString) { +// System.out.println(classNameString); + try { + actionClass = Class.forName(classNameString); + } catch (ClassNotFoundException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + Object newObject = null; + try { + newObject = actionClass.newInstance(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return newObject; + } + + public static void excuteMethod(Map parameters) { + + try { + Method methodOfName = actionClass + .getMethod("setName", String.class); + methodOfName.invoke(object, parameters.get(NAME)); + // + Method methodOfPassword = actionClass.getMethod("setPassWord", + String.class); + methodOfPassword.invoke(object, parameters.get(PASSWORD)); + + Method excuteMethod = actionClass.getMethod("execute"); + excuteString = (String) excuteMethod.invoke(object); + + } catch (Exception e) { + // TODO: handle exception + } + } + + public static Map setMapParameter() { + + Method[] getterMethods = actionClass.getMethods(); + HashMap hashMap = new HashMap<>(); + + for (int i = 0; i < getterMethods.length; i++) { + String getterName = getterMethods[i].getName(); + if (getterName.startsWith("get")) { + try { + String value = (String) getterMethods[i].invoke(object); + hashMap.put(getterName.substring(3).toLowerCase(), value); + //System.out.println("----" + getterName.substring(2)); + } catch (Exception e) { + // TODO: handle exception + } + + } + } + return hashMap; + } +} diff --git a/group09/610673813/src/coding/week02/StrutsTest.java b/group09/610673813/src/coding/week02/StrutsTest.java new file mode 100644 index 0000000000..53c8509e4b --- /dev/null +++ b/group09/610673813/src/coding/week02/StrutsTest.java @@ -0,0 +1,40 @@ +package coding.week02; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //锟斤拷锟斤拷锟皆わ拷锟侥诧拷一锟斤拷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } + +} diff --git a/group09/610673813/src/coding/week02/View.java b/group09/610673813/src/coding/week02/View.java new file mode 100644 index 0000000000..01504286e6 --- /dev/null +++ b/group09/610673813/src/coding/week02/View.java @@ -0,0 +1,28 @@ +package coding.week02; + +import java.util.Map; + +public class View { + + private String jsp; + private Map parameter; + + public String getJsp() { + return jsp; + } + + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + + public Map getParameters() { + return parameter; + } + + public View setParameterMap(Map parameter) { + this.parameter = parameter; + return this; + } + +} From 2437b6c7e75a7e0f7322ffbe5ac86710a34ac330 Mon Sep 17 00:00:00 2001 From: lenovo2512009 <610673813@qq.com> Date: Mon, 6 Mar 2017 22:20:56 +0800 Subject: [PATCH 132/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group09/610673813/src/coding/week02/ReadXml.java | 2 -- group09/610673813/src/coding/week02/Struts.java | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/group09/610673813/src/coding/week02/ReadXml.java b/group09/610673813/src/coding/week02/ReadXml.java index 2a3441da99..8215840d4d 100644 --- a/group09/610673813/src/coding/week02/ReadXml.java +++ b/group09/610673813/src/coding/week02/ReadXml.java @@ -20,14 +20,12 @@ public ReadXml(String filename) { document = new SAXReader().read((filename)); hashMap = new HashMap(); } catch (DocumentException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } public String parseXml(String actionName) { - // List actions = document.selectNodes("//struts/action"); String className = null; Element root = document.getRootElement(); List actions = root.elements("action"); diff --git a/group09/610673813/src/coding/week02/Struts.java b/group09/610673813/src/coding/week02/Struts.java index 96cfe18a24..f5cd7859e1 100644 --- a/group09/610673813/src/coding/week02/Struts.java +++ b/group09/610673813/src/coding/week02/Struts.java @@ -57,17 +57,14 @@ public static Object initAction(String classNameString) { try { actionClass = Class.forName(classNameString); } catch (ClassNotFoundException e1) { - // TODO Auto-generated catch block e1.printStackTrace(); } Object newObject = null; try { newObject = actionClass.newInstance(); } catch (InstantiationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return newObject; @@ -88,7 +85,7 @@ public static void excuteMethod(Map parameters) { excuteString = (String) excuteMethod.invoke(object); } catch (Exception e) { - // TODO: handle exception + } } @@ -103,9 +100,7 @@ public static Map setMapParameter() { try { String value = (String) getterMethods[i].invoke(object); hashMap.put(getterName.substring(3).toLowerCase(), value); - //System.out.println("----" + getterName.substring(2)); } catch (Exception e) { - // TODO: handle exception } } From 222095e5c2e6ff38b4207f156382d9c0d4cdc989 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Mon, 6 Mar 2017 22:33:42 +0800 Subject: [PATCH 133/646] =?UTF-8?q?=E9=93=BE=E8=A1=A8=E4=B9=A0=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/LinkedList.java | 33 +++++++-- .../test/com/coding/basic/LinkedListTest.java | 68 +++++++++++++++++++ 2 files changed, 97 insertions(+), 4 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java index 6d914f619e..1071c17eeb 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java @@ -211,9 +211,12 @@ public int[] getElements(LinkedList list){ */ public void subtract(LinkedList list){ - - for (int i = 0; i < list.size(); i++) { - //LinkedList.this.remove(index); + for (int i = 0; i < size; i++) { + for (int j = 0; j < list.size(); j++) { + if(get(i).equals(list.get(j))){ + remove(i); + } + } } } @@ -223,6 +226,12 @@ public void subtract(LinkedList list){ */ public void removeDuplicateValues(){ + for (int i = 0; i < size-1; i++) { + if(get(i).equals(get(i+1))){ + remove(i); + i --; + } + } } /** @@ -233,6 +242,13 @@ public void removeDuplicateValues(){ */ public void removeRange(int min, int max){ + for (int i = 0; i < size; i++) { + if((int)get(i)>min&&(int)get(i) Date: Tue, 7 Mar 2017 00:05:46 +0900 Subject: [PATCH 134/646] 20170305 homework - add lite struts --- .../data/xmlparser/app-config.xml | 12 ++ .../coderising/litestruts/LoginAction.java | 39 ---- .../com/coderising/litestruts/Struts.java | 34 --- .../com/coderising/litestruts/StrutsTest.java | 43 ---- .../challenge/xmlparser/jaxb/AppConfig.java | 29 +++ .../jmr/challenge/xmlparser/jaxb/Driver.java | 20 ++ .../jmr/challenge/xmlparser/jaxb/Hello.java | 22 ++ .../challenge/xmlparser/jaxb/HelloFile.java | 14 ++ .../challenge/xmlparser/jaxb/JaxbParser.java | 22 ++ .../jmr/challenge/xmlparser/sax/Driver.java | 19 ++ .../xmlparser/sax/HelloSaxParser.java | 42 ++++ .../data}/struts.xml | 4 +- .../jmr/litestruts/action/LoginAction.java | 30 +++ .../jmr/litestruts/action/LogoutAction.java | 30 +++ .../eulerlcs/jmr/litestruts/core/Struts.java | 200 ++++++++++++++++++ .../eulerlcs/jmr/litestruts/core}/View.java | 13 +- .../jmr/litestruts/degister/StrutsAction.java | 22 ++ .../degister/StrutsActionResult.java | 13 ++ .../degister/StrutsActionRulerSet.java | 30 +++ .../jmr/litestruts/degister/StrutsConfig.java | 15 ++ .../litestruts/degister/StrutsDigester.java | 13 ++ .../jmr/litestruts/core/StrutsTest.java | 38 ++++ .../jmr/litestruts/util/ArrayUtilTest.java | 2 +- 23 files changed, 582 insertions(+), 124 deletions(-) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/xmlparser/app-config.xml delete mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java delete mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java delete mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/AppConfig.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Driver.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Hello.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/HelloFile.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/JaxbParser.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/Driver.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/HelloSaxParser.java rename group09/41689722.eulerlcs/2.code/{jmr-11-challenge/src/main/java/com/coderising/litestruts => jmr-61-170305-litestruts/data}/struts.xml (62%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LoginAction.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LogoutAction.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/Struts.java rename group09/41689722.eulerlcs/2.code/{jmr-11-challenge/src/main/java/com/coderising/litestruts => jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core}/View.java (55%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsAction.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionResult.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionRulerSet.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsConfig.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsDigester.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/core/StrutsTest.java diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/xmlparser/app-config.xml b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/xmlparser/app-config.xml new file mode 100644 index 0000000000..e989327e9d --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/data/xmlparser/app-config.xml @@ -0,0 +1,12 @@ + + + a + b + c + d + e + f + g + h + i + diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java deleted file mode 100644 index dcdbe226ed..0000000000 --- a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/LoginAction.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.coderising.litestruts; - -/** - * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 - * @author liuxin - * - */ -public class LoginAction{ - private String name ; - private String password; - private String message; - - public String getName() { - return name; - } - - public String getPassword() { - return password; - } - - public String execute(){ - if("test".equals(name) && "1234".equals(password)){ - this.message = "login successful"; - return "success"; - } - this.message = "login failed,please check your user/pwd"; - return "fail"; - } - - public void setName(String name){ - this.name = name; - } - public void setPassword(String password){ - this.password = password; - } - public String getMessage(){ - return this.message; - } -} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java deleted file mode 100644 index 85e2e22de3..0000000000 --- a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/Struts.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.coderising.litestruts; - -import java.util.Map; - - - -public class Struts { - - public static View runAction(String actionName, Map parameters) { - - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters - - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - */ - - return null; - } - -} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java deleted file mode 100644 index b8c81faf3c..0000000000 --- a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/StrutsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.coderising.litestruts; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Assert; -import org.junit.Test; - - - - - -public class StrutsTest { - - @Test - public void testLoginActionSuccess() { - - String actionName = "login"; - - Map params = new HashMap(); - params.put("name","test"); - params.put("password","1234"); - - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); - Assert.assertEquals("login successful", view.getParameters().get("message")); - } - - @Test - public void testLoginActionFailed() { - String actionName = "login"; - Map params = new HashMap(); - params.put("name","test"); - params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); - Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); - } -} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/AppConfig.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/AppConfig.java new file mode 100644 index 0000000000..c50bce4a15 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/AppConfig.java @@ -0,0 +1,29 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.jaxb; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import lombok.Getter; + +@Getter +@XmlRootElement(name = "app-config") +public class AppConfig { + @XmlElement(name = "input-path") + private String inputPath; + @XmlElement(name = "input-look-subfolder") + private boolean inputLookSubfolder; + @XmlElement(name = "input-encode") + private String inputEncode; + @XmlElement(name = "output-path") + private String outputPath; + @XmlElement(name = "output-by-package-tree") + private boolean outputByPackageTree; + @XmlElement(name = "output-prefix") + private String outputPrefix; + @XmlElement(name = "output-subfix") + private String outputSubfix; + @XmlElement(name = "output-encode") + private String outputEncode; + @XmlElement(name = "output-package-name") + private String outputPackageName; +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Driver.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Driver.java new file mode 100644 index 0000000000..15c5686e2e --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Driver.java @@ -0,0 +1,20 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.jaxb; + +import java.io.File; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Driver { + private final static Logger log = LoggerFactory.getLogger(Driver.class); + + public static void main(String[] args) { + File xml = new File("data//xmlparser", "hello.xml"); + Hello hello = JaxbParser.loadAppConfig(xml, Hello.class); + log.debug("hello.value=[{}]", hello.getValue()); + + xml = new File("data//xmlparser", "app-config.xml"); + AppConfig appConfig = JaxbParser.loadAppConfig(xml, AppConfig.class); + log.debug("process-args.InputPath=[{}] ", appConfig.getInputPath()); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Hello.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Hello.java new file mode 100644 index 0000000000..5bad90241e --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/Hello.java @@ -0,0 +1,22 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.jaxb; + +import java.util.List; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import com.github.eulerlcs.jmr.challenge.xmlparser.digester.entity.HelloFile; + +import lombok.Getter; + +@Getter +@XmlRootElement(name = "files") +public class Hello { + @XmlAttribute + private String project; + @XmlAttribute + private String value; + @XmlElement(name = "file") + private List files; +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/HelloFile.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/HelloFile.java new file mode 100644 index 0000000000..c5bdd127f1 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/HelloFile.java @@ -0,0 +1,14 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.jaxb; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlValue; + +import lombok.Getter; + +@Getter +public class HelloFile { + @XmlAttribute(name = "dir") + private String path; + @XmlValue + private String name; +} \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/JaxbParser.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/JaxbParser.java new file mode 100644 index 0000000000..720f524426 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/jaxb/JaxbParser.java @@ -0,0 +1,22 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.jaxb; + +import java.io.File; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Unmarshaller; + +/* jaxb: Java Architecture for XML Binding */ +public class JaxbParser { + @SuppressWarnings("unchecked") + public static E loadAppConfig(File xml, Class clazz) { + E entity = null; + try { + JAXBContext jc = JAXBContext.newInstance(clazz); + Unmarshaller u = jc.createUnmarshaller(); + entity = (E) u.unmarshal(xml); + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/Driver.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/Driver.java new file mode 100644 index 0000000000..d15739c5c9 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/Driver.java @@ -0,0 +1,19 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.sax; + +import java.io.File; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +public class Driver { + public static void main(String[] args) { + SAXParserFactory factory = SAXParserFactory.newInstance(); + File xml = new File("data//xmlparser", "hello.xml"); + try { + SAXParser parser = factory.newSAXParser(); + parser.parse(xml, new HelloSaxParser()); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/HelloSaxParser.java b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/HelloSaxParser.java new file mode 100644 index 0000000000..26cc926b11 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/github/eulerlcs/jmr/challenge/xmlparser/sax/HelloSaxParser.java @@ -0,0 +1,42 @@ +package com.github.eulerlcs.jmr.challenge.xmlparser.sax; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/* sax: simple api for xml */ +public class HelloSaxParser extends DefaultHandler { + protected static Logger log = LoggerFactory.getLogger(HelloSaxParser.class); + + @Override + public void startDocument() throws SAXException { + super.startDocument(); + log.debug("sax startDocument"); + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + super.startElement(uri, localName, qName, attributes); + log.debug("sax startElement qName: [{}]", qName); + } + + @Override + public void characters(char[] ch, int start, int length) throws SAXException { + super.characters(ch, start, length); + log.debug("sax characters: [{}]", new String(ch, start, length)); + } + + @Override + public void endElement(String uri, String localName, String qName) throws SAXException { + super.endElement(uri, localName, qName); + log.debug("sax endElement qName: [{}]", qName); + } + + @Override + public void endDocument() throws SAXException { + super.endDocument(); + log.debug("sax endDocument"); + } +} \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/struts.xml similarity index 62% rename from group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml rename to group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/struts.xml index dd598a3664..a7a77b73df 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/struts.xml +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/struts.xml @@ -1,10 +1,10 @@ - + /jsp/homepage.jsp /jsp/showLogin.jsp - + /jsp/welcome.jsp /jsp/error.jsp diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LoginAction.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LoginAction.java new file mode 100644 index 0000000000..4d9af132ac --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LoginAction.java @@ -0,0 +1,30 @@ +package com.github.eulerlcs.jmr.litestruts.action; + +import lombok.Getter; +import lombok.Setter; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * + * @author liuxin + * + */ +public class LoginAction { + @Setter + @Getter + private String name; + @Setter + @Getter + private String password; + @Getter + private String message; + + public String execute() { + if ("test".equals(name) && "1234".equals(password)) { + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LogoutAction.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LogoutAction.java new file mode 100644 index 0000000000..119e74e3e9 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/action/LogoutAction.java @@ -0,0 +1,30 @@ +package com.github.eulerlcs.jmr.litestruts.action; + +import lombok.Getter; +import lombok.Setter; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * + * @author liuxin + * + */ +public class LogoutAction { + @Setter + @Getter + private String name; + @Setter + @Getter + private String password; + @Getter + private String message; + + public String execute() { + if ("test".equals(name) && "1234".equals(password)) { + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "error"; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/Struts.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/Struts.java new file mode 100644 index 0000000000..459abaae99 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/Struts.java @@ -0,0 +1,200 @@ +package com.github.eulerlcs.jmr.litestruts.core; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.digester.Digester; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.SAXException; + +import com.github.eulerlcs.jmr.litestruts.degister.StrutsConfig; +import com.github.eulerlcs.jmr.litestruts.degister.StrutsDigester; + +/** + *
    + *
  • 璇诲彇閰嶇疆鏂囦欢struts.xml
  • + *
  • 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , + * "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶
  • + *
  • 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success"
  • + *
  • 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 + * {"message": "鐧诲綍鎴愬姛"} , 鏀惧埌View瀵硅薄鐨刾arameters
  • + *
  • 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓
  • + *
+ */ +public class Struts { + private final static Logger log = LoggerFactory.getLogger(Struts.class); + private static StrutsConfig config = null; + + public static View runAction(String actionName, Map parameters) { + /* + * 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + * + * 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , + * "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + * + * 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + * + * 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 + * {"message": "鐧诲綍鎴愬姛"} , 鏀惧埌View瀵硅薄鐨刾arameters + * + * 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + * 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + * + */ + + // 0. + getConfig(); + + // 1.1. + Object object = createInstance(actionName); + if (object == null) { + return null; + } + // 1.2. + if (!prepareParameters(object, parameters)) { + return null; + } + // 2. + String viewId = execute(object); + if (viewId == null) { + return null; + } + // 3. + View view = biuldView(object); + if (view == null) { + return null; + } + + // 4. + String uri = config.getActionMap().get(actionName).getResults().get(viewId).getUrl(); + view.setJsp(uri); + + return view; + } + + private static StrutsConfig getConfig() { + if (config != null) { + return config; + } + + Digester d = StrutsDigester.newInstance(); + try { + File file = new File("data", "struts.xml"); + config = (StrutsConfig) d.parse(file); + } catch (IOException | SAXException e) { + log.error("getConfig", e); + System.exit(1); + } + + return config; + } + + private static Object createInstance(String actionName) { + if (actionName == null) { + return null; + } + + String className = config.getActionMap().get(actionName).getClazz(); + Object object = null; + try { + Class clazz = Class.forName(className); + object = clazz.newInstance(); + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { + log.error("createInstance", e); + } + + return object; + } + + private static boolean prepareParameters(Object object, Map parameters) { + if (parameters == null || parameters.size() == 0) { + return true; + } + + Class clazz = object.getClass(); + Method setter = null; + + try { + for (String key : parameters.keySet()) { + setter = clazz.getMethod(biuldSetterName(key), String.class); + setter.setAccessible(true); + setter.invoke(object, parameters.get(key)); + } + } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + log.error("prepareParameters", e); + return false; + } + + return true; + } + + private static String biuldSetterName(String name) { + String setterName = "set"; + setterName += name.substring(0, 1).toUpperCase() + name.substring(1); + return setterName; + + } + + private static String debiuldGetterName(String getterName) { + if (getterName == null || getterName.length() <= 3) { + return null; + } + if (!getterName.substring(0, 3).equals("get")) { + return null; + } + + String name = getterName.substring(3, 4).toLowerCase() + getterName.substring(4); + return name; + } + + private static String execute(Object object) { + final String METHOD_EXECUTE = "execute"; + String viewId = null; + + Class clazz = object.getClass(); + try { + Method method = clazz.getMethod(METHOD_EXECUTE); + viewId = (String) method.invoke(object); + } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + log.error("execute", e); + return viewId; + } + + return viewId; + } + + private static View biuldView(Object object) { + View view = new View(); + Map parameters = new HashMap<>(); + + Class clazz = object.getClass(); + Method[] methods; + try { + methods = clazz.getMethods(); + for (Method method : methods) { + String name = debiuldGetterName(method.getName()); + if (name == null) { + continue; + } + Object value = method.invoke(object); + parameters.put(name, value); + } + + view.setParameters(parameters); + } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + log.error("biuldResult", e); + return null; + } + + return view; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/View.java similarity index 55% rename from group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java rename to group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/View.java index 07df2a5dab..0aa18d5f54 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-11-challenge/src/main/java/com/coderising/litestruts/View.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/core/View.java @@ -1,22 +1,25 @@ -package com.coderising.litestruts; +package com.github.eulerlcs.jmr.litestruts.core; import java.util.Map; public class View { private String jsp; - private Map parameters; - + private Map parameters; + public String getJsp() { return jsp; } + public View setJsp(String jsp) { this.jsp = jsp; return this; } - public Map getParameters() { + + public Map getParameters() { return parameters; } - public View setParameters(Map parameters) { + + public View setParameters(Map parameters) { this.parameters = parameters; return this; } diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsAction.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsAction.java new file mode 100644 index 0000000000..336f594241 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsAction.java @@ -0,0 +1,22 @@ +package com.github.eulerlcs.jmr.litestruts.degister; + +import java.util.HashMap; +import java.util.Map; + +import lombok.Getter; +import lombok.Setter; + +public class StrutsAction { + @Getter + @Setter + private String name; + @Getter + @Setter + private String clazz; + @Getter + private Map results = new HashMap<>(); + + public void addResult(StrutsActionResult result) { + results.put(result.getName(), result); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionResult.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionResult.java new file mode 100644 index 0000000000..64247d4aba --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionResult.java @@ -0,0 +1,13 @@ +package com.github.eulerlcs.jmr.litestruts.degister; + +import lombok.Getter; +import lombok.Setter; + +public class StrutsActionResult { + @Getter + @Setter + private String name; + @Getter + @Setter + private String url; +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionRulerSet.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionRulerSet.java new file mode 100644 index 0000000000..567f4c7ef1 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsActionRulerSet.java @@ -0,0 +1,30 @@ +package com.github.eulerlcs.jmr.litestruts.degister; + +import org.apache.commons.digester.Digester; +import org.apache.commons.digester.RuleSetBase; + +final class StrutsActionRulerSet extends RuleSetBase { + protected String prefix = null; + + public StrutsActionRulerSet() { + this(""); + } + + public StrutsActionRulerSet(String prefix) { + super(); + this.namespaceURI = null; + this.prefix = prefix; + } + + @Override + public void addRuleInstances(Digester digester) { + digester.addObjectCreate(prefix + "action", StrutsAction.class); + digester.addSetProperties(prefix + "action"); + digester.addSetProperties(prefix + "action", "class", "clazz"); + digester.addSetNext(prefix + "action", "addAction"); + digester.addObjectCreate(prefix + "action/result", StrutsActionResult.class); + digester.addSetProperties(prefix + "action/result"); + digester.addBeanPropertySetter(prefix + "action/result", "url"); + digester.addSetNext(prefix + "action/result", "addResult"); + } +} \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsConfig.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsConfig.java new file mode 100644 index 0000000000..b2005c9700 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsConfig.java @@ -0,0 +1,15 @@ +package com.github.eulerlcs.jmr.litestruts.degister; + +import java.util.HashMap; +import java.util.Map; + +import lombok.Getter; + +public class StrutsConfig { + @Getter + private Map actionMap = new HashMap<>(); + + public void addAction(StrutsAction action) { + actionMap.put(action.getName(), action); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsDigester.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsDigester.java new file mode 100644 index 0000000000..f466c8cb10 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/degister/StrutsDigester.java @@ -0,0 +1,13 @@ +package com.github.eulerlcs.jmr.litestruts.degister; + +import org.apache.commons.digester.Digester; + +public class StrutsDigester { + public static Digester newInstance() { + Digester d = new Digester(); + d.addObjectCreate("struts", StrutsConfig.class); + d.addSetProperties("struts"); + d.addRuleSet(new StrutsActionRulerSet("struts/")); + return d; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/core/StrutsTest.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/core/StrutsTest.java new file mode 100644 index 0000000000..b2fa989915 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/core/StrutsTest.java @@ -0,0 +1,38 @@ +package com.github.eulerlcs.jmr.litestruts.core; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "1234"); + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "123456"); // 瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName, params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java index b2957d01b7..4b7ac08767 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java @@ -246,7 +246,7 @@ public void getPrimes_24() { @Test public void getPerfectNumbers_max() { long max = Long.MAX_VALUE; - max = 100000; + max = 10000; long[] expecteds = { 6, 28, 496, 8128, 33550336, 8589869056L, 137438691328L, 2305843008139952128L }; long[] newArr = ArrayUtil.getPerfectNumbers(max); From 2bfe482a6bdfb9df1160365d4cb40a65e6a0876e Mon Sep 17 00:00:00 2001 From: northSmall <604322962@qq.com> Date: Mon, 6 Mar 2017 23:16:14 +0800 Subject: [PATCH 135/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/coding/array/ArrayUtil.java | 124 ++++++++++++++++++ .../com/coding/litestruts/LoginAction.java | 39 ++++++ .../java/com/coding/litestruts/Struts.java | 119 +++++++++++++++++ .../com/coding/litestruts/StrutsTest.java | 43 ++++++ .../main/java/com/coding/litestruts/View.java | 23 ++++ .../java/com/coding/litestruts/struts.xml | 11 ++ 6 files changed, 359 insertions(+) create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/array/ArrayUtil.java create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/litestruts/LoginAction.java create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/litestruts/Struts.java create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/litestruts/StrutsTest.java create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/litestruts/View.java create mode 100644 group19/604322962/learning2017/src/main/java/com/coding/litestruts/struts.xml diff --git a/group19/604322962/learning2017/src/main/java/com/coding/array/ArrayUtil.java b/group19/604322962/learning2017/src/main/java/com/coding/array/ArrayUtil.java new file mode 100644 index 0000000000..c6a75498b9 --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/array/ArrayUtil.java @@ -0,0 +1,124 @@ +package com.coding.array; + +import org.junit.Test; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int length = origin.length; + for (int i = 0; i < origin.length; i++) { + if (i < length>>1) { + int behind = origin[length-1-i]; + origin[length-1-i] = origin[i]; + origin[i] = behind; + } + } + } + + @Test + public void testReverserArray(){ + int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int[] b = removeZero(oldArr); + for (int c: + b) { + System.out.println(c); + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int[] newArray = new int[oldArray.length]; + int j = 0; + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + newArray[j++] = oldArray[i]; + } + } + int[] tempArray = new int[j]; + System.arraycopy(newArray,0,tempArray,0,j); + return tempArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group19/604322962/learning2017/src/main/java/com/coding/litestruts/LoginAction.java b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/LoginAction.java new file mode 100644 index 0000000000..39354518df --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coding.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group19/604322962/learning2017/src/main/java/com/coding/litestruts/Struts.java b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/Struts.java new file mode 100644 index 0000000000..b73b7b9aa2 --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/Struts.java @@ -0,0 +1,119 @@ +package com.coding.litestruts; + +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.junit.Test; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + String pathName = "D:\\Program Files\\GitRepository\\coding2017-1\\group19\\604322962\\learning2017" + + "\\src\\main\\java\\com\\coding\\litestruts\\struts.xml"; + try { + String className = getClassByActionName(pathName, actionName); + Class clazz = Class.forName(className); + Object obj = clazz.newInstance(); + for ( Map.Entry entry : parameters.entrySet()) { + String key = (String)entry.getKey(); + String methodName = "set"+key.substring(0,1).toUpperCase()+key.substring(1,key.length()); + Method setMethod = clazz.getMethod(methodName, String.class);//鑾峰彇set鏂规硶 + setMethod.invoke(obj,entry.getValue());//璋冪敤set鏂规硶锛岃鍊 + } + Method execute = clazz.getMethod("execute"); + String returnValue = (String)execute.invoke(obj);//鑾峰彇杩斿洖鍊 + + Method[] methods = clazz.getDeclaredMethods(); + Map resultMap = new HashMap(); + for (Method method : methods) { + if (method.getName().startsWith("get")){ + //鍒ゆ柇褰撴柟娉曞悕浠et寮澶,骞朵笖浠et鍚庣殑瀛楃涓蹭负鏂规硶鍚嶇殑鏂规硶瀛樺湪鏃 + String fieldNameUpper = method.getName().substring(3,method.getName().length()); + String fieldName = fieldNameUpper.substring(0,1).toLowerCase()+fieldNameUpper. + substring(1,fieldNameUpper.length()); + Field field = clazz.getDeclaredField(fieldName); + if ( null != field) { + method.invoke(obj); + field.setAccessible(true);//璁剧疆灞炴ц闂睘鎬 + resultMap.put(fieldName, field.get(obj)); + } + } + } + View view = new View(); + view.setParameters(resultMap); + String jsp = getResultByActionName(pathName, actionName, returnValue); + view.setJsp(jsp); + return view; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 鑾峰彇鏂囦欢鐨刣ocument瀵硅薄锛岀劧鍚庤幏鍙栧搴旂殑鏍硅妭鐐 + * @author chenleixing + */ + private static String getClassByActionName(String pathName, String actionName) throws Exception{ + Element root = getRootElement(pathName); + List elements = root.elements("action"); + for (Element e : elements) { + if (e.attribute("name").getValue().equals(actionName)) + return e.attribute("class").getValue(); + } + return null; + } + + private static String getResultByActionName(String pathName, String actionName, String result) throws Exception { + Element root = getRootElement(pathName); + List elements = root.elements("action"); + for (Element e : elements) { + if (e.attribute("name").getValue().equals(actionName)) { + List elementList = e.elements("result"); + for (Element subE : elementList) { + if (subE.attribute("name").getValue().equals(result)) { + return subE.getTextTrim(); + } + } + } + } + return null; + } + + private static Element getRootElement(String pathName) throws Exception{ + SAXReader sax=new SAXReader();//鍒涘缓涓涓猄AXReader瀵硅薄 + File xmlFile=new File(pathName);//鏍规嵁鎸囧畾鐨勮矾寰勫垱寤篺ile瀵硅薄 + Document document=sax.read(xmlFile);//鑾峰彇document瀵硅薄,濡傛灉鏂囨。鏃犺妭鐐癸紝鍒欎細鎶涘嚭Exception鎻愬墠缁撴潫 + Element root=document.getRootElement();//鑾峰彇鏍硅妭鐐 + return root; + } +} diff --git a/group19/604322962/learning2017/src/main/java/com/coding/litestruts/StrutsTest.java b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/StrutsTest.java new file mode 100644 index 0000000000..e3a5a79185 --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coding.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group19/604322962/learning2017/src/main/java/com/coding/litestruts/View.java b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/View.java new file mode 100644 index 0000000000..b6e795aa4a --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coding.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group19/604322962/learning2017/src/main/java/com/coding/litestruts/struts.xml b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/struts.xml new file mode 100644 index 0000000000..f160e540f8 --- /dev/null +++ b/group19/604322962/learning2017/src/main/java/com/coding/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From b2461469e1d247b0ced5c7d5be6b6c9fc8165766 Mon Sep 17 00:00:00 2001 From: "kaitao.li" Date: Mon, 6 Mar 2017 23:27:25 +0800 Subject: [PATCH 136/646] week3 init --- .../java/com/coding2017/week3/LinkedList.java | 126 ++++++++++++++++++ .../week3/download/DownloadThread.java | 21 +++ .../week3/download/FileDownloader.java | 66 +++++++++ .../week3/download/api/Connection.java | 26 ++++ .../download/api/ConnectionException.java | 5 + .../week3/download/api/ConnectionManager.java | 11 ++ .../week3/download/api/DownloadListener.java | 5 + .../week3/download/impl/ConnectionImpl.java | 26 ++++ .../download/impl/ConnectionManagerImpl.java | 13 ++ .../week3/download/FileDownloaderTest.java | 58 ++++++++ 10 files changed, 357 insertions(+) create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java create mode 100644 group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java create mode 100644 group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java new file mode 100644 index 0000000000..59c399af25 --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java @@ -0,0 +1,126 @@ +package com.coding2017.week3; + +import com.coding2017.basic.Iterator; +import com.coding2017.basic.List; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o) { + + } + + public void add(int index, Object o) { + + } + + public Object get(int index) { + return null; + } + + public Object remove(int index) { + return null; + } + + public int size() { + return -1; + } + + public void addFirst(Object o) { + + } + + public void addLast(Object o) { + + } + + public Object removeFirst() { + return null; + } + + public Object removeLast() { + return null; + } + + public Iterator iterator() { + return null; + } + + private static class Node { + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public static int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java new file mode 100644 index 0000000000..8afb4927fa --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java @@ -0,0 +1,21 @@ +package com.coding2017.week3.download; + +import com.coding2017.week3.download.api.Connection; + +public class DownloadThread extends Thread { + + Connection conn; + int startPos; + int endPos; + + public DownloadThread(Connection conn, int startPos, int endPos) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + public void run() { + + } +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java new file mode 100644 index 0000000000..4368396d98 --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java @@ -0,0 +1,66 @@ +package com.coding2017.week3.download; + +import com.coding2017.week3.download.api.Connection; +import com.coding2017.week3.download.api.ConnectionException; +import com.coding2017.week3.download.api.ConnectionManager; +import com.coding2017.week3.download.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn, 0, length - 1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java new file mode 100644 index 0000000000..d559af18dd --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java @@ -0,0 +1,26 @@ +package com.coding2017.week3.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java new file mode 100644 index 0000000000..24605a473c --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coding2017.week3.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java new file mode 100644 index 0000000000..19ee0fec0d --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package com.coding2017.week3.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java new file mode 100644 index 0000000000..ffffa4941f --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coding2017.week3.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..d61a739a74 --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java @@ -0,0 +1,26 @@ +package com.coding2017.week3.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + } + +} diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..38dead89ff --- /dev/null +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,13 @@ +package com.coding2017.week3.download.impl; + +import com.coding2017.week3.download.api.Connection; +import com.coding2017.week3.download.api.ConnectionException; +import com.coding2017.week3.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + return null; + } +} diff --git a/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java b/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java new file mode 100644 index 0000000000..aa55278a60 --- /dev/null +++ b/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java @@ -0,0 +1,58 @@ +package com.coding2017.week3.download; + +import com.coding2017.week3.download.api.ConnectionManager; +import com.coding2017.week3.download.api.DownloadListener; +import com.coding2017.week3.download.impl.ConnectionManagerImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} From ecafb62bacf99c75b0c7af64ec957dedd356a20d Mon Sep 17 00:00:00 2001 From: Dev_yang <501294009@qq.com> Date: Mon, 6 Mar 2017 23:31:39 +0800 Subject: [PATCH 137/646] commit first --- .../JavaProject/.idea/uiDesigner.xml | 124 ++++++++++++++++++ .../501294009/JavaProject/module1/README.md | 1 + group11/501294009/JavaProject/module1/pom.xml | 25 ++++ .../501294009/JavaProject/module2/README.md | 15 +++ group11/501294009/JavaProject/module2/pom.xml | 47 +++++++ .../src/main/java/com/yang/LoginAction.java | 39 ++++++ .../src/main/java/com/yang/Struts.java | 124 ++++++++++++++++++ .../src/main/java/com/yang/StrutsTest.java | 43 ++++++ .../module2/src/main/java/com/yang/View.java | 27 ++++ .../src/main/java/com/yang/bean/Action.java | 58 ++++++++ .../src/main/java/com/yang/bean/Result.java | 40 ++++++ .../src/main/java/com/yang/bean/Struts.java | 34 +++++ .../module2/src/main/resources/struts.xml | 11 ++ 13 files changed, 588 insertions(+) create mode 100644 group11/501294009/JavaProject/.idea/uiDesigner.xml create mode 100644 group11/501294009/JavaProject/module1/README.md create mode 100644 group11/501294009/JavaProject/module1/pom.xml create mode 100644 group11/501294009/JavaProject/module2/README.md create mode 100644 group11/501294009/JavaProject/module2/pom.xml create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/LoginAction.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/Struts.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/StrutsTest.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/View.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Action.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Result.java create mode 100644 group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Struts.java create mode 100644 group11/501294009/JavaProject/module2/src/main/resources/struts.xml diff --git a/group11/501294009/JavaProject/.idea/uiDesigner.xml b/group11/501294009/JavaProject/.idea/uiDesigner.xml new file mode 100644 index 0000000000..e96534fb27 --- /dev/null +++ b/group11/501294009/JavaProject/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group11/501294009/JavaProject/module1/README.md b/group11/501294009/JavaProject/module1/README.md new file mode 100644 index 0000000000..933a3ef67e --- /dev/null +++ b/group11/501294009/JavaProject/module1/README.md @@ -0,0 +1 @@ +module1 is achieve ArrayList, LinkedList, Queue, Stack BinaryTree 鍜孖terator \ No newline at end of file diff --git a/group11/501294009/JavaProject/module1/pom.xml b/group11/501294009/JavaProject/module1/pom.xml new file mode 100644 index 0000000000..98bfd43a2c --- /dev/null +++ b/group11/501294009/JavaProject/module1/pom.xml @@ -0,0 +1,25 @@ + + 4.0.0 + + com.yang + module1 + 1.0-SNAPSHOT + jar + + module1 + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + diff --git a/group11/501294009/JavaProject/module2/README.md b/group11/501294009/JavaProject/module2/README.md new file mode 100644 index 0000000000..9bf528719a --- /dev/null +++ b/group11/501294009/JavaProject/module2/README.md @@ -0,0 +1,15 @@ +0. 璇诲彇閰嶇疆鏂囦欢struts.xml + +1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 +鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 +("name"="test" , "password"="1234") , +閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + +2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + +3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, +閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , +鏀惧埌View瀵硅薄鐨刾arameters + +4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 +鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 diff --git a/group11/501294009/JavaProject/module2/pom.xml b/group11/501294009/JavaProject/module2/pom.xml new file mode 100644 index 0000000000..aee6c06186 --- /dev/null +++ b/group11/501294009/JavaProject/module2/pom.xml @@ -0,0 +1,47 @@ + + 4.0.0 + + com.yang + module2 + 1.0-SNAPSHOT + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + jar + + module2 + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + junit + junit + RELEASE + + + junit + junit + RELEASE + + + diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/LoginAction.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/LoginAction.java new file mode 100644 index 0000000000..377ae9c629 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/LoginAction.java @@ -0,0 +1,39 @@ +package com.yang; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} \ No newline at end of file diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/Struts.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/Struts.java new file mode 100644 index 0000000000..c28148d584 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/Struts.java @@ -0,0 +1,124 @@ +package com.yang; + +import com.yang.bean.Action; +import com.yang.bean.Result; +import org.junit.Test; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/* + +0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 +鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 +("name"="test" , "password"="1234") , +閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + +2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + +3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, +閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , +鏀惧埌View瀵硅薄鐨刾arameters + +4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 +鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + +*/ +public class Struts { + + private static View view; + + public static View runAction(String actionName, Map parameters) { + view = null; + + try { + com.yang.bean.Struts struts = (com.yang.bean.Struts) getBean(com.yang.bean.Struts.class, "struts.xml"); + + List actions = struts.getActions(); + actions.forEach((Action action) -> { + try { + renderView(actionName, parameters, action); + } catch (Exception e) { + e.printStackTrace(); + } + + + }); + + } catch (Exception e) { + e.printStackTrace(); + } + + return view; + } + + private static void renderView(String actionName, Map parameters, Action action) throws Exception { + if (!action.getName().equalsIgnoreCase(actionName)) { + return;//same as continue + } + String packageName = action.getPackageName(); + Class aClass; + aClass = Class.forName(packageName); + Object instance = aClass.newInstance(); + + Method[] methods = aClass.getDeclaredMethods(); + Map methodMap = new HashMap(); + for (Method method : methods) { + method.setAccessible(true); + methodMap.put(method.getName(), method); + } + + invokeMethod("setName", parameters.get("name"), instance, methodMap); + invokeMethod("setPassword", parameters.get("password"), instance, methodMap); + String jsp = invokeMethod("execute", null, instance, methodMap); + + String message = invokeMethod("getMessage", null, instance, methodMap); + + Map params = new HashMap(); + params.put("message", message); + view = new View(); + view.setParameters(params); + List results = action.getResults(); + results.forEach(temp -> { + if (temp.getName().equalsIgnoreCase(jsp)) { + view.setJsp(temp.getValue()); + } + + }); + } + + + + private static Object getBean(Class clz, String fileName) throws JAXBException { + JAXBContext context = JAXBContext.newInstance(clz); + Unmarshaller unmarshaller = context.createUnmarshaller(); + InputStream inputStream = Struts.class.getClassLoader().getResourceAsStream(fileName); + return unmarshaller.unmarshal(inputStream); + } + + + private static String invokeMethod(String methodName, String param, Object instance, Map map) throws IllegalAccessException, InvocationTargetException { + Method setNameMethod = map.get(methodName); + String invoke = null; + if (setNameMethod != null) { + if (param == null) { + invoke = (String) setNameMethod.invoke(instance); + return invoke; + } + invoke = (String) setNameMethod.invoke(instance, param); + } + + + return invoke; + } + +} \ No newline at end of file diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/StrutsTest.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/StrutsTest.java new file mode 100644 index 0000000000..68f204e252 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/StrutsTest.java @@ -0,0 +1,43 @@ +package com.yang; + +import junit.framework.Assert; +import org.junit.Test; +import java.util.HashMap; +import java.util.Map; + + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/View.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/View.java new file mode 100644 index 0000000000..e443b9c759 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/View.java @@ -0,0 +1,27 @@ +package com.yang; + +import java.util.Map; + +/** + * Created by Dev_yang on 2017/3/5. + */ +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + + public void setJsp(String jsp) { + this.jsp = jsp; + } + + public Map getParameters() { + return parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } +} diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Action.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Action.java new file mode 100644 index 0000000000..f79864106a --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Action.java @@ -0,0 +1,58 @@ +package com.yang.bean; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import java.io.Serializable; +import java.util.List; + +/** + * Created by Dev_yang on 2017/3/5. + */ +public class Action implements Serializable{ + + private List results; + + private String name; + + private String packageName; + + + @XmlElement(name = "result") + public List getResults() { + return results; + } + + public void setResults(List results) { + this.results = results; + } + + + @XmlAttribute(name="name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @XmlAttribute(name = "class") + public String getPackageName() { + return packageName; + } + + public void setPackageName(String packageName) { + this.packageName = packageName; + } + + + @Override + public String toString() { + return "Action{" + + "results=" + results + + ", name='" + name + '\'' + + ", packageName='" + packageName + '\'' + + '}'; + } +} diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Result.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Result.java new file mode 100644 index 0000000000..9dd66cac04 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Result.java @@ -0,0 +1,40 @@ +package com.yang.bean; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlValue; +import java.io.Serializable; + +/** + * Created by Dev_yang on 2017/3/5. + */ +public class Result implements Serializable{ + + private String name; + private String value; + + @XmlAttribute(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlValue + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public String toString() { + return "Result{" + + "name='" + name + '\'' + + ", value='" + value + '\'' + + '}'; + } +} diff --git a/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Struts.java b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Struts.java new file mode 100644 index 0000000000..ad16ccc057 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/java/com/yang/bean/Struts.java @@ -0,0 +1,34 @@ + +package com.yang.bean; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.io.Serializable; +import java.util.List; + + + +@XmlRootElement(name = "struts") +public class Struts implements Serializable{ + + private List actions; + + + @XmlElement(name = "action") + public List getActions() { + return actions; + } + + + public void setActions(List actions) { + this.actions = actions; + } + + + @Override + public String toString() { + return "Struts{" + + "actions=" + actions + + '}'; + } +} diff --git a/group11/501294009/JavaProject/module2/src/main/resources/struts.xml b/group11/501294009/JavaProject/module2/src/main/resources/struts.xml new file mode 100644 index 0000000000..9c989a77e3 --- /dev/null +++ b/group11/501294009/JavaProject/module2/src/main/resources/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From f2759c18c4fd9c8ca5a6fa7e43b20b7dbe88f12f Mon Sep 17 00:00:00 2001 From: eulerlcs Date: Tue, 7 Mar 2017 00:45:43 +0900 Subject: [PATCH 138/646] init 20170312 homework --- .../2.code/jmr-01-aggregator/pom.xml | 1 + .../{util => algorithm}/ArrayUtil.java | 2 +- .../jmr/litestruts/util/package-info.java | 4 - .../jmr/litestruts/util/ArrayUtilTest.java | 2 + .../data/.gitkeep | 0 .../jmr-61-170312-multiThreadDownload/pom.xml | 39 ++++++ .../eulerlcs/jmr/multiDL/DownloadThread.java | 20 +++ .../eulerlcs/jmr/multiDL/FileDownloader.java | 64 +++++++++ .../jmr/multiDL/algorithm/Iterator.java | 7 + .../jmr/multiDL/algorithm/LinkedList.java | 122 ++++++++++++++++++ .../eulerlcs/jmr/multiDL/algorithm/List.java | 9 ++ .../eulerlcs/jmr/multiDL/api/Connection.java | 28 ++++ .../jmr/multiDL/api/ConnectionException.java | 5 + .../jmr/multiDL/api/ConnectionManager.java | 11 ++ .../jmr/multiDL/api/DownloadListener.java | 5 + .../jmr/multiDL/impl/ConnectionImpl.java | 25 ++++ .../multiDL/impl/ConnectionManagerImpl.java | 14 ++ .../src/main/resources/log4j.xml | 16 +++ .../jmr/multiDL/FileDownloaderTest.java | 53 ++++++++ .../src/test/resources/.gitkeep | 0 20 files changed, 422 insertions(+), 5 deletions(-) rename group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/{util => algorithm}/ArrayUtil.java (99%) delete mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java rename group09/41689722.eulerlcs/2.code/{jmr-61-170305-litestruts => jmr-61-170312-multiThreadDownload}/data/.gitkeep (100%) create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/pom.xml create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/DownloadThread.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/FileDownloader.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/Iterator.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/LinkedList.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/List.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/Connection.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionException.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionManager.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/DownloadListener.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionImpl.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionManagerImpl.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/resources/log4j.xml create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/java/com/github/eulerlcs/jmr/multiDL/FileDownloaderTest.java create mode 100644 group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/resources/.gitkeep diff --git a/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml index be065e6a95..b04166b31c 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml +++ b/group09/41689722.eulerlcs/2.code/jmr-01-aggregator/pom.xml @@ -12,5 +12,6 @@ ../jmr-11-challenge ../jmr-61-170226-collection ../jmr-61-170305-litestruts + ../jmr-61-170312-multiThreadDownload \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/algorithm/ArrayUtil.java similarity index 99% rename from group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java rename to group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/algorithm/ArrayUtil.java index 636d0b1789..36894f6e5b 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtil.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/algorithm/ArrayUtil.java @@ -1,7 +1,7 @@ /** * 闂鐐癸細 娌″啓娉ㄩ噴锛屼唬鐮佹瘮杈冮毦璇汇傚挨鍏 merge鏂规硶銆 */ -package com.github.eulerlcs.jmr.litestruts.util; +package com.github.eulerlcs.jmr.litestruts.algorithm; import java.util.Arrays; diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java deleted file mode 100644 index 6797c45b67..0000000000 --- a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/main/java/com/github/eulerlcs/jmr/litestruts/util/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * - */ -package com.github.eulerlcs.jmr.litestruts.util; \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java index 4b7ac08767..5e88599842 100644 --- a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/src/test/java/com/github/eulerlcs/jmr/litestruts/util/ArrayUtilTest.java @@ -8,6 +8,8 @@ import org.junit.Test; +import com.github.eulerlcs.jmr.litestruts.algorithm.ArrayUtil; + public class ArrayUtilTest { @Test diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/data/.gitkeep similarity index 100% rename from group09/41689722.eulerlcs/2.code/jmr-61-170305-litestruts/data/.gitkeep rename to group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/data/.gitkeep diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/pom.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/pom.xml new file mode 100644 index 0000000000..8f300f8306 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/pom.xml @@ -0,0 +1,39 @@ + + 4.0.0 + + com.github.eulerlcs + jmr-02-parent + 0.0.1-SNAPSHOT + ../jmr-02-parent/pom.xml + + jmr-61-170312-multiThreadDownload + eulerlcs master java road - download file by multiple thread + + + + commons-digester + commons-digester + + + org.projectlombok + lombok + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + junit + junit + + + com.github.stefanbirkner + system-rules + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/DownloadThread.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/DownloadThread.java new file mode 100644 index 0000000000..b3fb699944 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/DownloadThread.java @@ -0,0 +1,20 @@ +package com.github.eulerlcs.jmr.multiDL; + +import com.github.eulerlcs.jmr.multiDL.api.Connection; + +public class DownloadThread extends Thread { + Connection conn; + int startPos; + int endPos; + + public DownloadThread(Connection conn, int startPos, int endPos) { + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + @Override + public void run() { + + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/FileDownloader.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/FileDownloader.java new file mode 100644 index 0000000000..fca00437d7 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/FileDownloader.java @@ -0,0 +1,64 @@ +package com.github.eulerlcs.jmr.multiDL; + +import com.github.eulerlcs.jmr.multiDL.api.Connection; +import com.github.eulerlcs.jmr.multiDL.api.ConnectionException; +import com.github.eulerlcs.jmr.multiDL.api.ConnectionManager; +import com.github.eulerlcs.jmr.multiDL.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + public FileDownloader(String _url) { + this.url = _url; + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn, 0, length - 1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/Iterator.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/Iterator.java new file mode 100644 index 0000000000..2d937d0c53 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/Iterator.java @@ -0,0 +1,7 @@ +package com.github.eulerlcs.jmr.multiDL.algorithm; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/LinkedList.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/LinkedList.java new file mode 100644 index 0000000000..fdae519c0a --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/LinkedList.java @@ -0,0 +1,122 @@ +package com.github.eulerlcs.jmr.multiDL.algorithm; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/List.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/List.java new file mode 100644 index 0000000000..ad07c355b4 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/algorithm/List.java @@ -0,0 +1,9 @@ +package com.github.eulerlcs.jmr.multiDL.algorithm; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/Connection.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/Connection.java new file mode 100644 index 0000000000..d0037a877b --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/Connection.java @@ -0,0 +1,28 @@ +package com.github.eulerlcs.jmr.multiDL.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos + * 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos + * 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionException.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionException.java new file mode 100644 index 0000000000..92bf290f8e --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.github.eulerlcs.jmr.multiDL.api; + +public class ConnectionException extends Exception { + private static final long serialVersionUID = 1L; +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionManager.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionManager.java new file mode 100644 index 0000000000..a350054dd4 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package com.github.eulerlcs.jmr.multiDL.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/DownloadListener.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/DownloadListener.java new file mode 100644 index 0000000000..a2dc179298 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.github.eulerlcs.jmr.multiDL.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionImpl.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionImpl.java new file mode 100644 index 0000000000..613c692750 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionImpl.java @@ -0,0 +1,25 @@ +package com.github.eulerlcs.jmr.multiDL.impl; + +import java.io.IOException; + +import com.github.eulerlcs.jmr.multiDL.api.Connection; + +public class ConnectionImpl implements Connection { + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionManagerImpl.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..d50036b8c8 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/java/com/github/eulerlcs/jmr/multiDL/impl/ConnectionManagerImpl.java @@ -0,0 +1,14 @@ +package com.github.eulerlcs.jmr.multiDL.impl; + +import com.github.eulerlcs.jmr.multiDL.api.Connection; +import com.github.eulerlcs.jmr.multiDL.api.ConnectionException; +import com.github.eulerlcs.jmr.multiDL.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/resources/log4j.xml b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/resources/log4j.xml new file mode 100644 index 0000000000..831b8d9ce3 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/main/resources/log4j.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/java/com/github/eulerlcs/jmr/multiDL/FileDownloaderTest.java b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/java/com/github/eulerlcs/jmr/multiDL/FileDownloaderTest.java new file mode 100644 index 0000000000..cfb3274124 --- /dev/null +++ b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/java/com/github/eulerlcs/jmr/multiDL/FileDownloaderTest.java @@ -0,0 +1,53 @@ +package com.github.eulerlcs.jmr.multiDL; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.github.eulerlcs.jmr.multiDL.api.ConnectionManager; +import com.github.eulerlcs.jmr.multiDL.api.DownloadListener; +import com.github.eulerlcs.jmr.multiDL.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + System.out.println("涓嬭浇瀹屾垚锛"); + } +} diff --git a/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/resources/.gitkeep b/group09/41689722.eulerlcs/2.code/jmr-61-170312-multiThreadDownload/src/test/resources/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From ec4aa08fe5b4a3878c722fb9193d1d42d15d44a3 Mon Sep 17 00:00:00 2001 From: Dev_yang <501294009@qq.com> Date: Mon, 6 Mar 2017 23:46:49 +0800 Subject: [PATCH 139/646] delete .idea folder --- .../JavaProject/.idea/uiDesigner.xml | 124 ------------------ 1 file changed, 124 deletions(-) delete mode 100644 group11/501294009/JavaProject/.idea/uiDesigner.xml diff --git a/group11/501294009/JavaProject/.idea/uiDesigner.xml b/group11/501294009/JavaProject/.idea/uiDesigner.xml deleted file mode 100644 index e96534fb27..0000000000 --- a/group11/501294009/JavaProject/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 872929a3889561bfc4a747dac4d797a25531d870 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Tue, 7 Mar 2017 07:13:46 +0800 Subject: [PATCH 140/646] 1 --- .../basic/collection/concrete/LinkedList.java | 128 ++++++++++++++++- .../basic/test/collection/LinkedListTest.java | 24 +++- .../coderising/download/DownloadThread.java | 20 +++ .../coderising/download/FileDownloader.java | 131 ++++++++++++++++++ .../download/FileDownloaderTest.java | 59 ++++++++ .../coderising/download/api/Connection.java | 23 +++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 13 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 55 ++++++++ .../download/impl/ConnectionManagerImpl.java | 49 +++++++ .../download/impl/NoFreeSourceException.java | 10 ++ group12/382266293/src/test.java | 128 +++++++++++++++-- 13 files changed, 640 insertions(+), 10 deletions(-) create mode 100644 group12/382266293/src/com/coderising/download/DownloadThread.java create mode 100644 group12/382266293/src/com/coderising/download/FileDownloader.java create mode 100644 group12/382266293/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group12/382266293/src/com/coderising/download/api/Connection.java create mode 100644 group12/382266293/src/com/coderising/download/api/ConnectionException.java create mode 100644 group12/382266293/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group12/382266293/src/com/coderising/download/api/DownloadListener.java create mode 100644 group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group12/382266293/src/com/coderising/download/impl/NoFreeSourceException.java diff --git a/group12/382266293/coding/basic/collection/concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java index cb3d87684d..adcbd9df6e 100644 --- a/group12/382266293/coding/basic/collection/concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -1,7 +1,8 @@ package collection.concrete; import java.util.NoSuchElementException; - +import static util.TestUtil.*; +import static util.Print.*; import collection.AbstractList; import collection.Iterator; @@ -16,6 +17,131 @@ public LinkedList() { this.size = 0; } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + + @SuppressWarnings("unchecked") + public void reverse(){ + if(head == null){ + return; + } + Node pre = head; + Node cur = head.next; + Node next; + while (cur != null) { + next = cur.next; + cur.next = pre; + pre = cur; + cur = next; + } + head.next = null; + head = pre; + + } + + + public static void main(String args[]) { + LinkedList myLL = new LinkedList(); + addIntWithNatureOrder(myLL,5); + myLL.reverse(); + println(myLL); + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int deleteIndex = size/2; + clearAndSetNewHead(deleteIndex); + } + + private void clearAndSetNewHead(int deleteIndex) { + Node x = head; + for (int i = 0; i < deleteIndex; i++) { + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == deleteIndex-1) + head = next; + } + } + + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + checkIndex(i); + checkIndex(length-i); + } + + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } + + + + + + @Override public void add(E e) { addLast(e); diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest.java b/group12/382266293/coding/basic/test/collection/LinkedListTest.java index 5a2d7213af..bcf2f9a05e 100644 --- a/group12/382266293/coding/basic/test/collection/LinkedListTest.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest.java @@ -28,6 +28,9 @@ public void setUp() throws Exception { public void tearDown() throws Exception { myLL = null; } + + + @Test public void testLinkedList() { @@ -38,6 +41,26 @@ public void testLinkedList() { } + + @Test + public void testReverse() { + addString(myLL,5); + myLL.reverse(); + println(myLL); + + } + + + @Test + public void testRemoveFirstHalf() { + addString(myLL,5); + myLL.removeFirstHalf(); + assertEquals(3,myLL.size()); + assertEquals("2",myLL.get(0)); + assertEquals("3",myLL.get(1)); + assertEquals("4",myLL.get(2)); + } + @Test public void testAddE() { myLL.add("s"); @@ -50,7 +73,6 @@ public void testAddStringE() { String a; addString(myLL,30); - println(myLL.get(0)); // for (int i = 0 ; i < 29; i++) { // a = "" + i; diff --git a/group12/382266293/src/com/coderising/download/DownloadThread.java b/group12/382266293/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..1456314140 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group12/382266293/src/com/coderising/download/FileDownloader.java b/group12/382266293/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..f8702be4b2 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,131 @@ +package com.coderising.download; + +import java.io.FileOutputStream; +import java.io.IOException; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + private static final int MIN_CONNECTIONS = 3; + private static final int MAX_CONNECTIONS = 10; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + int length = conn.getContentLength(); + String dest = ""; + createTempFile(dest,length); + int connNum = calculateConnects(length); + DownloadThread[] threadPool = new DownloadThread[connNum]; + int beginPos = 0; + int endPos = -1; + int bath_size = length/connNum; + for (int i = 0; i < connNum; i++) { + beginPos = endPos + 1; + endPos = beginPos + bath_size; + if (i == connNum - 1) { + endPos = length - 1; + } + DownloadThread dt = new DownloadThread(conn,beginPos,endPos); + threadPool[i] = dt; + dt.start(); + } + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + + private int calculateConnects(int length) { + int conns = length/1024/1024; + if (conns < MIN_CONNECTIONS) { + return MIN_CONNECTIONS; + } else if (conns > MAX_CONNECTIONS) { + return MAX_CONNECTIONS; + } else { + return conns; + } + } + + + private static void createTempFile(String dest, int len){ + FileOutputStream temp = null; + try { + temp = new FileOutputStream(dest); + int length = len; + byte[] buffer = new byte[1024]; + long times = length / 1024; + int left = (int) (length % 1024); + for (int i = 0; i < times; i++) { + temp.write(buffer); + } + temp.write(buffer, 0, left); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + temp.flush(); + temp.flush(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..8171ee5763 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group12/382266293/src/com/coderising/download/api/Connection.java b/group12/382266293/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..9710e270e1 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group12/382266293/src/com/coderising/download/api/ConnectionException.java b/group12/382266293/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group12/382266293/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group12/382266293/src/com/coderising/download/api/ConnectionManager.java b/group12/382266293/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..c732657bcb --- /dev/null +++ b/group12/382266293/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,13 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + + final int MAX_CONNECTION_SIZE = 10; + + public Connection open(String url) throws ConnectionException; +} diff --git a/group12/382266293/src/com/coderising/download/api/DownloadListener.java b/group12/382266293/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..fff7d830fe --- /dev/null +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,55 @@ +package com.coderising.download.impl; + +import static util.Print.println; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionManager; + +import sun.net.www.protocol.http.HttpURLConnection; + +public class ConnectionImpl implements Connection{ + + private ConnectionManager cm; + private static int buffer_size = 1024; + + public ConnectionImpl(ConnectionManager cm) { + this.cm = cm; + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + FileOutputStream out = null; + InputStream in = null; + HttpURLConnection conn = null; + try { + in = conn.getInputStream(); + byte[] buffer = new byte[1024]; + int len = 0; + while( (len = in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + println("Read buffer Complete!"); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..bea080edac --- /dev/null +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,49 @@ +package com.coderising.download.impl; + +import java.io.IOException; +import java.net.URL; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +import sun.net.www.protocol.http.HttpURLConnection; + +public class ConnectionManagerImpl implements ConnectionManager { + + private int connections = 0; + private String url; + + public ConnectionManagerImpl() { + this.connections = 0; + } + + @Override + public Connection open(String url) throws ConnectionException { + this.url = url; + checkConnectionSize(); + URL address = null; + HttpURLConnection conn = null; + try { + address = new URL(url); + conn = (HttpURLConnection) address.openConnection(); + connections++; + return (Connection) conn; + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + private void checkConnectionSize() { + if (connections > MAX_CONNECTION_SIZE) + try { + throw new NoFreeSourceException("No free connections available."); + } catch (NoFreeSourceException e) { + e.printStackTrace(); + } + + } + +} + diff --git a/group12/382266293/src/com/coderising/download/impl/NoFreeSourceException.java b/group12/382266293/src/com/coderising/download/impl/NoFreeSourceException.java new file mode 100644 index 0000000000..f2f68c3aa0 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/impl/NoFreeSourceException.java @@ -0,0 +1,10 @@ +package com.coderising.download.impl; + +public class NoFreeSourceException extends Exception { + + + public NoFreeSourceException(String string) { + super(string); + } + +} diff --git a/group12/382266293/src/test.java b/group12/382266293/src/test.java index e4e7fead2d..ea1c6646cd 100644 --- a/group12/382266293/src/test.java +++ b/group12/382266293/src/test.java @@ -1,14 +1,126 @@ -import java.util.ArrayList; -import java.util.Queue; -import java.util.Stack; -import java.util.concurrent.PriorityBlockingQueue; -import static util.Print.*; +import static util.Print.println; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.FileNameMap; +import java.net.URL; +import java.net.URLDecoder; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import sun.net.www.protocol.http.HttpURLConnection; public class test { - public static void main(String[] args) { - Queue queue = new PriorityBlockingQueue(); - println(queue.poll()); + public static String url = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; + public static String url2 = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; + public static String downloadLocation = "C:\\"; + public static String tempName = ""; + public static String fileName = ""; + + LinkedList a; + + private static void createTempFile1(String from) { + long length = 0; + URL url = null; + HttpURLConnection conn = null; + try { + url = new URL(from); + conn = (HttpURLConnection)url.openConnection(); + String file = conn.getURL().getFile(); + fileName = file.substring(file.lastIndexOf('/')+1); + tempName = fileName.substring(0, fileName.lastIndexOf('.')+1) + "lyj"; + length = conn.getContentLength(); + conn.disconnect(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + conn.disconnect(); + } + tempName = downloadLocation + tempName; + fileName = downloadLocation + fileName; + bufferFile(tempName,length); + } + + public static void bufferFile(String name, long len) { + + FileOutputStream temp = null; + try { + temp = new FileOutputStream(name); + long length = len; + byte[] buffer = new byte[1024]; + long times = length / 1024; + int left = (int) (length % 1024); + for (int i = 0; i < times; i++) { + temp.write(buffer); + } + temp.write(buffer, 0, left); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + temp.flush(); + temp.flush(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + + public static void download(String src) { + createTempFile1(src); + + URL url = null; + HttpURLConnection conn = null; + FileOutputStream out = null; + InputStream in = null; + try { + url = new URL(src); + conn = (HttpURLConnection)url.openConnection(); + in = conn.getInputStream(); + out = new FileOutputStream(tempName); + byte[] buffer = new byte[1024]; + int len = 0; + while( (len = in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + conn.disconnect(); + println(fileName); + println(rename(tempName)); + println("Download Complete!"); + } catch (IOException e) { + e.printStackTrace(); + } finally { + conn.disconnect(); + } + + } + + public static boolean rename(String temp) { + File file=new File(temp); + File f1=new File(fileName); + if( file.exists() ) { + file.renameTo(f1); + file = f1; + System.out.println("鏂囦欢閲嶅懡鍚嶄负锛"+f1.getName()); + return true; + } + return false; + } + + + public static void main(String[] args) throws IOException { + + download(url2); } From ae94ef26b3faffcc966e42a92cfffbe1202833be Mon Sep 17 00:00:00 2001 From: wizardzhang <282287610@qq.com> Date: Tue, 7 Mar 2017 07:46:50 +0800 Subject: [PATCH 141/646] init --- group27/282287610/src/learn/test.java | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 group27/282287610/src/learn/test.java diff --git a/group27/282287610/src/learn/test.java b/group27/282287610/src/learn/test.java new file mode 100644 index 0000000000..58ba327953 --- /dev/null +++ b/group27/282287610/src/learn/test.java @@ -0,0 +1,5 @@ +package learn; + +public class test { + +} From 3bb403c01b9d852cacc9bf20357a0128d19bdcdb Mon Sep 17 00:00:00 2001 From: baiyang Date: Tue, 7 Mar 2017 09:38:14 +0800 Subject: [PATCH 142/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A-=E7=99=BD=E6=9D=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group27/772642286/basic/ArrayList.java | 80 +++++++ group27/772642286/basic/BinaryTreeNode.java | 55 +++++ group27/772642286/basic/Iterator.java | 7 + group27/772642286/basic/LinkedList.java | 208 ++++++++++++++++++ group27/772642286/basic/List.java | 9 + group27/772642286/basic/Queue.java | 21 ++ group27/772642286/basic/Stack.java | 23 ++ group27/772642286/test/ArrayListTest.java | 55 +++++ .../772642286/test/BinaryTreeNodeTest.java | 6 + group27/772642286/test/LinkedListTest.java | 52 +++++ group27/772642286/test/QueueTest.java | 45 ++++ group27/772642286/test/StackTest.java | 58 +++++ 12 files changed, 619 insertions(+) create mode 100644 group27/772642286/basic/ArrayList.java create mode 100644 group27/772642286/basic/BinaryTreeNode.java create mode 100644 group27/772642286/basic/Iterator.java create mode 100644 group27/772642286/basic/LinkedList.java create mode 100644 group27/772642286/basic/List.java create mode 100644 group27/772642286/basic/Queue.java create mode 100644 group27/772642286/basic/Stack.java create mode 100644 group27/772642286/test/ArrayListTest.java create mode 100644 group27/772642286/test/BinaryTreeNodeTest.java create mode 100644 group27/772642286/test/LinkedListTest.java create mode 100644 group27/772642286/test/QueueTest.java create mode 100644 group27/772642286/test/StackTest.java diff --git a/group27/772642286/basic/ArrayList.java b/group27/772642286/basic/ArrayList.java new file mode 100644 index 0000000000..108eb02ff4 --- /dev/null +++ b/group27/772642286/basic/ArrayList.java @@ -0,0 +1,80 @@ +package week01.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + add(size , o); + } + public void add(int index, Object o){ + if(index<0||index > size){ + throw new ArrayIndexOutOfBoundsException(index); + } + size++; + if(size>=elementData.length){ + expand(); + } + for(int i = size -1 ;i> index; i--){ + elementData[i] = elementData[i-1]; + } + elementData[index] = o; + } + + public Object get(int index){ + if(index<0||index>=size){ + throw new ArrayIndexOutOfBoundsException(index); + } + return elementData[index]; + } + + public Object remove(int index){ + if(index<0||index>=size){ + throw new ArrayIndexOutOfBoundsException(index); + } + Object o = elementData[index]; + for(int i = index ;i< size - 1; i++){ + elementData[i] = elementData[i+1]; + } + elementData[size - 1] = null; + size--; + return o; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new ArrayListIterator(); + } + + class ArrayListIterator implements Iterator{ + + int count = 0; + @Override + public boolean hasNext() { + count++; + if(size<= count){ + return false; + } + return true; + } + + @Override + public Object next() { + return elementData[count]; + } + + } + + + private void expand(){ + elementData = Arrays.copyOf(elementData, elementData.length*2); + } + +} diff --git a/group27/772642286/basic/BinaryTreeNode.java b/group27/772642286/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..75a9327421 --- /dev/null +++ b/group27/772642286/basic/BinaryTreeNode.java @@ -0,0 +1,55 @@ +package week01.basic; + +public class BinaryTreeNode { + + private T data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(T data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(T o){ + return insert(this,o); + } + + + public BinaryTreeNode insert(BinaryTreeNode root,T o){ + if(o.compareTo(root) >= 0){ + if(root.left == null){ + BinaryTreeNode binaryTreeNode = new BinaryTreeNode(); + root.left = binaryTreeNode; + binaryTreeNode.data = o; + return binaryTreeNode; + } + return insert(root.left, o); + } + else{ + if (root.right == null) { + BinaryTreeNode binaryTreeNode = new BinaryTreeNode(); + root.right = binaryTreeNode; + binaryTreeNode.data = o; + return binaryTreeNode; + } + return insert(root.right, o); + } + } + + +} diff --git a/group27/772642286/basic/Iterator.java b/group27/772642286/basic/Iterator.java new file mode 100644 index 0000000000..305ed43120 --- /dev/null +++ b/group27/772642286/basic/Iterator.java @@ -0,0 +1,7 @@ +package week01.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group27/772642286/basic/LinkedList.java b/group27/772642286/basic/LinkedList.java new file mode 100644 index 0000000000..98cf2d651b --- /dev/null +++ b/group27/772642286/basic/LinkedList.java @@ -0,0 +1,208 @@ +package week01.basic; + +import java.util.Objects; + +public class LinkedList implements List { + + private Node head; + + private Node tail; + + private int size; + + public void add(Object o){ + Node node = new Node(); + node.data = o; + if(Objects.isNull(head)){ + head = node; + tail = head; + size++; + return ; + } + tail.next = node; + tail = node; + size++; + } + + public void add(int index , Object o){ + if(index<0 || index >size){ + throw new ArrayIndexOutOfBoundsException(index); + } + if(Objects.isNull(head)||index==size){ + add(o); + return; + } + + Node headNode = getNode(index - 1); + Node temp = headNode.next; + Node node = new Node(); + node.data = o; + node.next = temp; + headNode.next = node; + size++; + } + + + public Object get(int index){ + if(index< 0 || index >= size){ + throw new ArrayIndexOutOfBoundsException(index); + } + + return getNode(index).data; + } + + private Node getNode(int index){ + + + int count = 0; + Node headNode = head; + while(count< index){ + headNode = headNode.next; + count++; + } + return headNode; + } + + public Object remove(int index){ + if(index< 0 || index >= size){ + throw new ArrayIndexOutOfBoundsException(index); + } + + if(index==0){ + Node node = head; + head = head.next; + size --; + return node.data; + } + + Node headNode = getNode(index - 1); + Node node = headNode.next; + head.next = node.next; + size --; + return node.data; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + add(0, o); + } + public void addLast(Object o){ + add(size,o); + } + public Object removeFirst(){ + return remove(0); + } + public Object removeLast(){ + return remove(size); + } + public Iterator iterator(){ + return new LinkedListIterator(); + } + + class LinkedListIterator implements Iterator{ + + private Node currentNode; + + @Override + public boolean hasNext() { + if(currentNode==null){ + currentNode = head; + }else{ + currentNode = currentNode.next; + } + return Objects.nonNull(currentNode); + } + + @Override + public Object next() { + return currentNode.data; + } + + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/772642286/basic/List.java b/group27/772642286/basic/List.java new file mode 100644 index 0000000000..912285e171 --- /dev/null +++ b/group27/772642286/basic/List.java @@ -0,0 +1,9 @@ +package week01.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/772642286/basic/Queue.java b/group27/772642286/basic/Queue.java new file mode 100644 index 0000000000..320280635f --- /dev/null +++ b/group27/772642286/basic/Queue.java @@ -0,0 +1,21 @@ +package week01.basic; + +public class Queue { + private LinkedList elementData = new LinkedList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + return elementData.remove(elementData.size()); + } + + public boolean isEmpty(){ + return elementData.size() == 0; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group27/772642286/basic/Stack.java b/group27/772642286/basic/Stack.java new file mode 100644 index 0000000000..0e6901c0ce --- /dev/null +++ b/group27/772642286/basic/Stack.java @@ -0,0 +1,23 @@ +package week01.basic; + +public class Stack { + private LinkedList elementData = new LinkedList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(0); + } + + public Object peek(){ + return elementData.get(0); + } + public boolean isEmpty(){ + return elementData.size() == 0; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group27/772642286/test/ArrayListTest.java b/group27/772642286/test/ArrayListTest.java new file mode 100644 index 0000000000..e8409a7d40 --- /dev/null +++ b/group27/772642286/test/ArrayListTest.java @@ -0,0 +1,55 @@ +package week01.test; + + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.basic.ArrayList; +import week01.basic.Iterator; + + +public class ArrayListTest { + ArrayList list = null; + + @Before + public void init(){ + list = new ArrayList(); + for(int i=1;i<=500;i++){ + list.add(i); + } + } + + @Test + public void addTest(){ + Assert.assertEquals(500, list.size()); + for(int i=1;i<=list.size();i++){ + Assert.assertEquals(i, list.get(i-1)); + } + } + + @Test + public void addIndexTest(){ + list.add(250, 3333); + Assert.assertEquals(3333, list.get(250)); + Assert.assertEquals(500, list.get(500)); + } + + @Test + public void removeIndexTest(){ + list.remove(250); + Assert.assertEquals(499, list.size()); + Assert.assertEquals(252, list.get(250)); + Assert.assertEquals(500, list.get(498)); + } + + @Test + public void iteratorTest(){ + Iterator iterator = list.iterator(); + int count = 1; + while(iterator.hasNext()){ + Assert.assertEquals(++count, iterator.next()); + } + } + +} diff --git a/group27/772642286/test/BinaryTreeNodeTest.java b/group27/772642286/test/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..c0e12d2eb5 --- /dev/null +++ b/group27/772642286/test/BinaryTreeNodeTest.java @@ -0,0 +1,6 @@ +package week01.test; + +public class BinaryTreeNodeTest { + + +} diff --git a/group27/772642286/test/LinkedListTest.java b/group27/772642286/test/LinkedListTest.java new file mode 100644 index 0000000000..cae56aad19 --- /dev/null +++ b/group27/772642286/test/LinkedListTest.java @@ -0,0 +1,52 @@ +package week01.test; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.basic.Iterator; +import week01.basic.LinkedList; + +public class LinkedListTest { + LinkedList list = null; + + @Before + public void init(){ + list = new LinkedList(); + for(int i=1;i<=500;i++){ + list.add(i); + } + } + + @Test + public void addTest(){ + Assert.assertEquals(500, list.size()); + for(int i=1;i<=list.size();i++){ + Assert.assertEquals(i, list.get(i-1)); + } + } + + @Test + public void addIndexTest(){ + list.add(250, 3333); + Assert.assertEquals(3333, list.get(250)); + Assert.assertEquals(500, list.get(500)); + } + + @Test + public void removeIndexTest(){ + list.remove(250); + Assert.assertEquals(499, list.size()); + Assert.assertEquals(252, list.get(250)); + Assert.assertEquals(500, list.get(498)); + } + + @Test + public void iteratorTest(){ + Iterator iterator = list.iterator(); + int count = 0; + while(iterator.hasNext()){ + Assert.assertEquals(++count, iterator.next()); + } + } +} diff --git a/group27/772642286/test/QueueTest.java b/group27/772642286/test/QueueTest.java new file mode 100644 index 0000000000..14008f51b2 --- /dev/null +++ b/group27/772642286/test/QueueTest.java @@ -0,0 +1,45 @@ +package week01.test; + +import org.junit.Assert; +import org.junit.Before; + +import week01.basic.Queue; + +public class QueueTest { + + private Queue queue; + + @Before + public void init(){ + queue = new Queue(); + for(int i=1;i<=500;i++){ + queue.enQueue(i); + } + } + + public void enQueueTest(){ + Assert.assertEquals(500, queue.size()); + } + + public void deQueue(){ + for(int i=500;i>=1 ;i--){ + Assert.assertEquals(i, queue.deQueue()); + } + + } + + public void isEmpty(){ + Assert.assertEquals(false, queue.isEmpty()); + for(int i=500;i>=1 ;i--){ + Assert.assertEquals(i, queue.deQueue()); + } + Assert.assertEquals(true, queue.isEmpty()); + } + + public void size(){ + for(int i=499;i>0 ;i--){ + queue.deQueue(); + Assert.assertEquals(i, queue.size()); + } + } +} diff --git a/group27/772642286/test/StackTest.java b/group27/772642286/test/StackTest.java new file mode 100644 index 0000000000..40f0928a14 --- /dev/null +++ b/group27/772642286/test/StackTest.java @@ -0,0 +1,58 @@ +package week01.test; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.basic.Stack; + +public class StackTest { + + private Stack stack; + + @Before + public void init(){ + stack = new Stack(); + for(int i=1;i<=500;i++){ + stack.push(i); + } + } + + @Test + public void pushTest(){ + Assert.assertEquals(500, stack.size()); + } + + @Test + public void popTest(){ + for(int i=1;i<=500 ;i++){ + Assert.assertEquals(i, stack.pop()); + } + } + + @Test + public void peekTest(){ + Assert.assertEquals(1, stack.peek()); + Assert.assertEquals(1, stack.peek()); + Assert.assertEquals(1, stack.pop()); + Assert.assertEquals(2, stack.peek()); + Assert.assertEquals(2, stack.peek()); + } + + @Test + public void isEmpty(){ + Assert.assertEquals(false, stack.isEmpty()); + for(int i=1;i<=500 ;i++){ + Assert.assertEquals(i, stack.pop()); + } + Assert.assertEquals(true, stack.isEmpty()); + } + + @Test + public void size(){ + for(int i=499;i>0 ;i--){ + stack.pop(); + Assert.assertEquals(i, stack.size()); + } + } +} From 6ffbca89b3a892b7252f8d780c26b4fa70c7e84c Mon Sep 17 00:00:00 2001 From: Korben_CHY Date: Tue, 7 Mar 2017 09:54:45 +0800 Subject: [PATCH 143/646] add single linked list by Korben --- .../coding/basic/list/KDoubleLinkedList.java | 175 ++++++++++++++++++ .../korben/coding/basic/list/KLinkedList.java | 98 ++++++++-- .../korben/coding/basic/list/KListTest.java | 3 + 3 files changed, 258 insertions(+), 18 deletions(-) create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java new file mode 100644 index 0000000000..276428beca --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java @@ -0,0 +1,175 @@ +package org.korben.coding.basic.list; + +import java.util.Objects; + +/** + * Korben's LinkedList + * + * Created by Korben on 18/02/2017. + */ +public class KDoubleLinkedList implements KList { + + private int size; + + private Node head; + + private Node last; + + public KDoubleLinkedList() { + this.head = new Node<>(null); + } + + @Override + public int size() { + return this.size; + } + + @Override + public boolean isEmpty() { + return this.size == 0; + } + + @Override + public boolean contains(Object o) { + Node node = this.head; + while (node.next != null) { + node = node.next; + if (Objects.equals(node.data, o)) { + return true; + } + } + return false; + } + + @Override + public Object[] toArray() { + return new Object[0]; + } + + @Override + public boolean add(T o) { + if (this.last == null) { + this.last = new Node<>(o); + this.last.pre = this.head; + this.head.next = this.last; + } else { + Node oldLast = this.last; + this.last = new Node<>(o); + this.last.pre = oldLast; + oldLast.next = this.last; + } + this.size++; + return true; + } + + @Override + public boolean remove(T o) { + Node node = this.head; + while (node.next != null) { + node = node.next; + if (Objects.equals(node.data, o)) { + node.pre.next = node.next; + if (node.next != null) { + node.next.pre = node.pre; + } + this.size--; + return true; + } + } + return false; + } + + @Override + public void clear() { + this.head.next = null; + this.last = null; + + this.size = 0; + } + + @Override + public T get(int index) { + return getNode(index).data; + } + + @Override + public T set(int index, T element) { + Node node = getNode(index); + node.data = element; + return element; + } + + @Override + public void add(int index, T element) { + if (index <= 0 || index >= this.size) { + throw new IndexOutOfBoundsException(); + } + Node node = this.head; + for (int i = 0; i <= index; i++) { + node = node.next; + } + Node pre = node.pre; + Node newNode = new Node<>(element); + pre.next = newNode; + newNode.pre = pre; + newNode.next = node; + node.pre = newNode; + + this.size++; + } + + @Override + public T remove(int index) { + Node node = getNode(index); + Node pre = node.pre; + Node next = node.next; + pre.next = next; + if (next != null) { + next.pre = pre; + } + + this.size--; + return node.data; + } + + @Override + public int indexOf(T o) { + Node node = this.head; + int index = 0; + while (node.next != null) { + node = node.next; + if (Objects.equals(node.data, o)) { + return index; + } + index++; + } + return -1; + } + + @Override + public KIterator iterator() { + throw new IllegalStateException("鏂规硶鏈疄鐜"); + } + + private Node getNode(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + + Node node = this.head; + for (int i = 0; i <= index; i++) { + node = node.next; + } + return node; + } + + private static class Node { + T data; + Node pre; + Node next; + + Node(T data) { + this.data = data; + } + } +} diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java index 2ca4452981..e3ae1bb4d1 100644 --- a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java @@ -43,19 +43,17 @@ public boolean contains(Object o) { @Override public Object[] toArray() { - return new Object[0]; + throw new IllegalStateException("鏂规硶鏈疄鐜"); } @Override public boolean add(T o) { if (this.last == null) { this.last = new Node<>(o); - this.last.pre = this.head; this.head.next = this.last; } else { Node oldLast = this.last; this.last = new Node<>(o); - this.last.pre = oldLast; oldLast.next = this.last; } this.size++; @@ -65,13 +63,12 @@ public boolean add(T o) { @Override public boolean remove(T o) { Node node = this.head; + Node preNode; while (node.next != null) { + preNode = node; node = node.next; if (Objects.equals(node.data, o)) { - node.pre.next = node.next; - if (node.next != null) { - node.next.pre = node.pre; - } + preNode.next = node.next; this.size--; return true; } @@ -101,30 +98,39 @@ public T set(int index, T element) { @Override public void add(int index, T element) { + if (index < 0 || index >= this.size) { + throw new IndexOutOfBoundsException(); + } + Node node = this.head; + Node preNode = node; for (int i = 0; i <= index; i++) { + preNode = node; node = node.next; } - Node pre = node.pre; + Node newNode = new Node<>(element); - pre.next = newNode; - newNode.pre = pre; newNode.next = node; - node.pre = newNode; + preNode.next = newNode; this.size++; } @Override public T remove(int index) { - Node node = getNode(index); - Node pre = node.pre; - Node next = node.next; - pre.next = next; - if (next != null) { - next.pre = pre; + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + + Node node = this.head; + Node preNode = this.head; + + for (int i = 0; i <= index; i++) { + preNode = node; + node = node.next; } + preNode.next = node.next; this.size--; return node.data; } @@ -160,9 +166,65 @@ private Node getNode(int index) { return node; } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + */ + public void remove(int i, int length) { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + */ + + public void subtract(KLinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + */ + public KLinkedList intersection(KLinkedList list) { + return null; + } + private static class Node { T data; - Node pre; Node next; Node(T data) { diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KListTest.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KListTest.java index 2c6febecc3..d789318174 100644 --- a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KListTest.java +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KListTest.java @@ -24,6 +24,9 @@ public void init() { // 娴嬭瘯KLinkedList list = new KLinkedList<>(); + //// 娴嬭瘯KDoubleLinkedList + //list = new KDoubleLinkedList<>(); + initTestSize = 5; for (int i = 0; i < initTestSize; i++) { From 81f492ca1e1ea375a1b0a7b784ae2f9421f0e850 Mon Sep 17 00:00:00 2001 From: Guang Zhao Date: Tue, 7 Mar 2017 10:08:38 +0800 Subject: [PATCH 144/646] =?UTF-8?q?425044891=E7=BB=84=E5=91=98=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BB=A3=E7=A0=81=E7=9B=AE=E5=BD=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group27/425044891/src/coding/JustForCommit.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 group27/425044891/src/coding/JustForCommit.java diff --git a/group27/425044891/src/coding/JustForCommit.java b/group27/425044891/src/coding/JustForCommit.java new file mode 100644 index 0000000000..693856cfe6 --- /dev/null +++ b/group27/425044891/src/coding/JustForCommit.java @@ -0,0 +1,10 @@ +package coding; + +public class JustForCommit { + + + public static void main(String[] args) { + System.out.println("JustForCommit..."); + } + +} From 1674f7c71fac1a88e10977e937918d7fdbb45fd3 Mon Sep 17 00:00:00 2001 From: lishuaibushuai Date: Tue, 7 Mar 2017 11:14:55 +0800 Subject: [PATCH 145/646] add arrayutil add arrayutil --- group14/972386549/.classpath | 6 + group14/972386549/.gitignore | 1 + group14/972386549/.project | 17 ++ .../src/com/codeing/Utils/ArrayUtil.java | 149 ++++++++++++++++++ .../src/com/codeing/basic/ArrayList.java | 12 ++ .../src/com/codeing/basic/BinaryTree.java | 5 + .../src/com/codeing/basic/LinkList.java | 5 + .../972386549/src/com/codeing/basic/List.java | 5 + .../src/com/codeing/basic/Queue.java | 5 + .../src/com/codeing/basic/Stack.java | 5 + 10 files changed, 210 insertions(+) create mode 100644 group14/972386549/.classpath create mode 100644 group14/972386549/.gitignore create mode 100644 group14/972386549/.project create mode 100644 group14/972386549/src/com/codeing/Utils/ArrayUtil.java create mode 100644 group14/972386549/src/com/codeing/basic/ArrayList.java create mode 100644 group14/972386549/src/com/codeing/basic/BinaryTree.java create mode 100644 group14/972386549/src/com/codeing/basic/LinkList.java create mode 100644 group14/972386549/src/com/codeing/basic/List.java create mode 100644 group14/972386549/src/com/codeing/basic/Queue.java create mode 100644 group14/972386549/src/com/codeing/basic/Stack.java diff --git a/group14/972386549/.classpath b/group14/972386549/.classpath new file mode 100644 index 0000000000..fb5011632c --- /dev/null +++ b/group14/972386549/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group14/972386549/.gitignore b/group14/972386549/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group14/972386549/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group14/972386549/.project b/group14/972386549/.project new file mode 100644 index 0000000000..b82f80f507 --- /dev/null +++ b/group14/972386549/.project @@ -0,0 +1,17 @@ + + + 972386549 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group14/972386549/src/com/codeing/Utils/ArrayUtil.java b/group14/972386549/src/com/codeing/Utils/ArrayUtil.java new file mode 100644 index 0000000000..b423661ce3 --- /dev/null +++ b/group14/972386549/src/com/codeing/Utils/ArrayUtil.java @@ -0,0 +1,149 @@ +package com.codeing.Utils; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int temp; + int length = origin.length; + for (int i = 0; i < (length/2); i ++ ){ + //灏嗛灏句綅缃氦鎹 + temp = origin[i]; + origin[i] = origin[length - 1 - i]; + origin[length - 1 - i] = temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + for (int i = 0; i < oldArray.length; i ++){ + if (oldArray[i] == 0){ + System.arraycopy(oldArray, i + 1, oldArray, i, oldArray.length - 1 - i); + removeZero(oldArray); + } + } + return oldArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + public int[] merge(int[] firstArr, int[] secondArr){ + int[] mergeArr = new int[firstArr.length + secondArr.length]; + if (firstArr[firstArr.length - 1] <= secondArr[0]){ //涓や釜鏁扮粍鐨勬敹灏惧厛姣旇緝锛屽彲浠ョ洿鎺ヤ覆杩 + System.arraycopy(firstArr, 0, mergeArr, 0, firstArr.length); + System.arraycopy(secondArr, 0, mergeArr, firstArr.length, secondArr.length); + }else if (firstArr[0] >= secondArr[secondArr.length - 1]){ + System.arraycopy(secondArr, 0, mergeArr, 0, secondArr.length); + System.arraycopy(firstArr, 0, mergeArr, secondArr.length, firstArr.length); + }else { //涓や釜鏁扮粍鏃犳硶鐩存帴涓茶繛 + int i = 0; //鎸囧悜firstArr + int j = 0; //鎸囧悜secondArr + int count = 0; + while ( (i < firstArr.length) && (j < secondArr.length) ){ //鍙鏈変竴涓粨鏉熶簡锛屽氨缁撴潫浜嗗惊鐜 + if(firstArr[i] < secondArr[j]){ //杈冨皬鐨勫煎~鍏ュ悎骞跺悗鐨勬暟缁勶紝骞朵笖鎸囬拡鍚庣Щ + mergeArr[count] = firstArr[i]; + i ++; + } else if (firstArr[i] > secondArr[j]) { + mergeArr[count] = secondArr[j]; + j ++; + } else { + mergeArr[count] = firstArr[i]; + i ++; + j ++; + } + count ++; + } + if (i == firstArr.length ){ //灏嗘湭缁撴潫鐨勬暟缁勫悎骞 + System.arraycopy(secondArr, j, mergeArr, count, secondArr.length - j); + } else { + System.arraycopy(firstArr, i, mergeArr, count, firstArr.length - j); + } + } + return mergeArr; + } + + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArr, int size){ + int[] newArr = new int[oldArr.length + size]; + System.arraycopy(oldArr, 0, newArr, 0, oldArr.length); + return newArr; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + String joinStr = new String(); + for (int i = 0; i < array.length - 1; i ++){ + joinStr += (array[i] + seperator); + } + return joinStr + array[array.length - 1]; + } + + public static void main(String[] args){ + + } + +} diff --git a/group14/972386549/src/com/codeing/basic/ArrayList.java b/group14/972386549/src/com/codeing/basic/ArrayList.java new file mode 100644 index 0000000000..2b8feae963 --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/ArrayList.java @@ -0,0 +1,12 @@ +package com.codeing.basic; + + +/** + * 鏁扮粍鍩烘湰鎿嶄綔 + * + * @author LiS + * + */ +public class ArrayList implements List { + +} diff --git a/group14/972386549/src/com/codeing/basic/BinaryTree.java b/group14/972386549/src/com/codeing/basic/BinaryTree.java new file mode 100644 index 0000000000..8532e251f6 --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/BinaryTree.java @@ -0,0 +1,5 @@ +package com.codeing.basic; + +public class BinaryTree { + +} diff --git a/group14/972386549/src/com/codeing/basic/LinkList.java b/group14/972386549/src/com/codeing/basic/LinkList.java new file mode 100644 index 0000000000..59a3f55e26 --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/LinkList.java @@ -0,0 +1,5 @@ +package com.codeing.basic; + +public class LinkList implements List { + +} diff --git a/group14/972386549/src/com/codeing/basic/List.java b/group14/972386549/src/com/codeing/basic/List.java new file mode 100644 index 0000000000..ade02d53bf --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/List.java @@ -0,0 +1,5 @@ +package com.codeing.basic; + +public interface List { + +} diff --git a/group14/972386549/src/com/codeing/basic/Queue.java b/group14/972386549/src/com/codeing/basic/Queue.java new file mode 100644 index 0000000000..eeefcfcf70 --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/Queue.java @@ -0,0 +1,5 @@ +package com.codeing.basic; + +public class Queue { + +} diff --git a/group14/972386549/src/com/codeing/basic/Stack.java b/group14/972386549/src/com/codeing/basic/Stack.java new file mode 100644 index 0000000000..c702d9d250 --- /dev/null +++ b/group14/972386549/src/com/codeing/basic/Stack.java @@ -0,0 +1,5 @@ +package com.codeing.basic; + +public class Stack { + +} From 43a908206d753a44dbc1ef54706fc5c784eb9412 Mon Sep 17 00:00:00 2001 From: zhanglei <383117348@qq.com> Date: Tue, 7 Mar 2017 11:54:00 +0800 Subject: [PATCH 146/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=202017-03-07?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group27/383117348/.classpath | 9 + group27/383117348/.gitignore | 21 + group27/383117348/.project | 17 + .../src/com/coding/basic/ArrayList.java | 213 ++++++++++ .../src/com/coding/basic/BinaryTreeNode.java | 113 ++++++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 382 ++++++++++++++++++ .../383117348/src/com/coding/basic/List.java | 9 + .../383117348/src/com/coding/basic/Queue.java | 74 ++++ .../383117348/src/com/coding/basic/Stack.java | 99 +++++ 10 files changed, 944 insertions(+) create mode 100644 group27/383117348/.classpath create mode 100644 group27/383117348/.gitignore create mode 100644 group27/383117348/.project create mode 100644 group27/383117348/src/com/coding/basic/ArrayList.java create mode 100644 group27/383117348/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/383117348/src/com/coding/basic/Iterator.java create mode 100644 group27/383117348/src/com/coding/basic/LinkedList.java create mode 100644 group27/383117348/src/com/coding/basic/List.java create mode 100644 group27/383117348/src/com/coding/basic/Queue.java create mode 100644 group27/383117348/src/com/coding/basic/Stack.java diff --git a/group27/383117348/.classpath b/group27/383117348/.classpath new file mode 100644 index 0000000000..d98690584e --- /dev/null +++ b/group27/383117348/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/group27/383117348/.gitignore b/group27/383117348/.gitignore new file mode 100644 index 0000000000..9ded3b51b7 --- /dev/null +++ b/group27/383117348/.gitignore @@ -0,0 +1,21 @@ +*.class +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +#ide config +.metadata +.recommenders +.idea/ +*.iml +rebel.* +.rebel.* + +target \ No newline at end of file diff --git a/group27/383117348/.project b/group27/383117348/.project new file mode 100644 index 0000000000..ccad29da35 --- /dev/null +++ b/group27/383117348/.project @@ -0,0 +1,17 @@ + + + 383117348Learning + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/383117348/src/com/coding/basic/ArrayList.java b/group27/383117348/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..773d8f6c6b --- /dev/null +++ b/group27/383117348/src/com/coding/basic/ArrayList.java @@ -0,0 +1,213 @@ +package com.coding.basic; + +import java.util.Arrays; + +import org.junit.Test; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + /** + * 鑷姩澧為暱鍊 + */ + private static final int GROW_UP_SIZE = 100; + + /** + * 鍦ㄦ暟缁勬渶鏈熬娣诲姞瀵硅薄 + */ + public void add(Object o) { + growUp(size); + elementData[size] = o; + size++; + } + + /** + * 鍚戞寚瀹氫笅鏍囧娣诲姞瀵硅薄 + */ + public void add(int index, Object o) { + checkIndex(index); + growUp(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = o; + size++; + + } + + /** + * 鏍规嵁index鑾峰彇瀵硅薄 + */ + public Object get(int index) { + checkIndex(index); + return elementData[index]; + } + + /** + * 绉婚櫎鎸囧畾涓嬫爣瀵硅薄 + */ + public Object remove(int index) { + checkIndex(index); + Object obj = elementData[index]; + int afterRemove = size - index - 1; + // System.out.println("@@@@"+afterRemove+"---"+index); + if (afterRemove > 0) + System.arraycopy(elementData, index + 1, elementData, index, afterRemove); + elementData = Arrays.copyOf(elementData, --size); + return obj; + } + + /** + * 鑾峰彇鏁扮粍澶у皬 + */ + public int size() { + return size; + } + + /** + * 杩唬鍣 + * + * @return + */ + public Iterator iterator() { + return new Iter(); + } + + /** + * 杩唬鍣ㄥ唴閮ㄧ被 + * + * @author Adminstater + * + */ + private class Iter implements Iterator { + private int nextIndex = 0; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return nextIndex != size; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + int i = nextIndex++; + if (i > size - 1) + throw new IndexOutOfBoundsException(); + + return elementData[i]; + } + + } + + /** + * 妫鏌ユ暟缁勯暱搴︽槸鍚﹁秺鐣,瓒婄晫灏辫嚜鍔ㄥ闀100 + */ + private void growUp(int size) { + if (size > elementData.length - 1) { + Object[] elementGrow = new Object[elementData.length + GROW_UP_SIZE]; + System.arraycopy(elementData, 0, elementGrow, 0, elementData.length); + elementData = elementGrow; + // System.out.println(elementData.length); + } + } + + /** + * 妫鏌ヤ笅鏍囨槸鍚﹁秺鐣,瓒婄晫鎶涘嚭寮傚父 + */ + private void checkIndex(int index) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("涓嬫爣瓒婄晫"); + } + } + + /*------------------------------------------------------鍗曞厓娴嬭瘯----------------------------------------------------*/ + /** + * 娴嬭瘯鑷闀挎暟缁勯暱搴﹀彉鍖栧強澧炲姞鍔熻兘 + */ + @Test + public void TestAddFunction() { + ArrayList list = new ArrayList(); + for (int x = 0; x < 300; x++) { + list.add(x); + } + } + + /** + * 娴嬭瘯add(int index,Object obj)鏂规硶 + */ + @Test + public void TestAddIndexFunction() { + ArrayList list = new ArrayList(); + // System.out.println(list.size()); + list.add(0, 20); + list.add(1, 30); + System.out.println(list.get(1)); + + } + + /** + * 娴嬭瘯get鏂规硶 + */ + @Test + public void TestGetFunction() { + ArrayList list = new ArrayList(); + for (int x = 0; x < 300; x++) { + list.add(x); + } + for (int x = 0; x < list.size; x++) { + System.out.println(list.get(x)); + } + } + + /** + * 娴嬭瘯size鏂规硶 + */ + @Test + public void TestSizeFunction() { + ArrayList list = new ArrayList(); + for (int x = 0; x < 259; x++) { + list.add(x); + } + /* + * for(int x=0;x list = null; + } + +} diff --git a/group27/383117348/src/com/coding/basic/BinaryTreeNode.java b/group27/383117348/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..366f41224f --- /dev/null +++ b/group27/383117348/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,113 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Comparable data; + private BinaryTreeNode root; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Comparable getData() { + return data; + } + + public void setData(Comparable data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode getRoot() { + return root; + } + + public void setRoot(BinaryTreeNode root) { + this.root = root; + } + + /** + * 鎻掑叆鑺傜偣鏂规硶 + * + * @param o + * @return + */ + public BinaryTreeNode insert(Comparable o) { + if (o != null) { + root = insert(root, o); + // System.out.println("@@@@@@"+o); + } + return root; + } + + /** + * 閫掑綊姣旇緝鎻掑叆骞宠 鏍 + * + * @param node + * @param o + * @return + */ + private BinaryTreeNode insert(BinaryTreeNode node, Comparable o) { + if (node == null) { + node = new BinaryTreeNode(); + node.setData(o); + } else if (compare(node, o) >= 0) { + node.left = insert(node.left, o); + // System.out.println("insert into left"); + } else if (compare(node, o) < 0) { + node.right = insert(node.right, o); + // System.out.println("insert into right"); + } + return node; + } + + /** + * 姣旇緝鍐呭澶у皬 + * + * @param node + * @param o + * @return + */ + private int compare(BinaryTreeNode node, Comparable o) { + // TODO Auto-generated method stub + return node.data.compareTo(o); + } + + /*-----------------------------------------------------鍗曞厓娴嬭瘯-----------------------------------------------------*/ + + private void printTree() { + printTree(root); + } + + private void printTree(BinaryTreeNode node) { + if (node == null) + return; + printTree(node.left); + System.out.println(node.data + ""); + printTree(node.right); + } + + public static void main(String[] args) { + BinaryTreeNode tree = new BinaryTreeNode(); + for (int x = 0; x < 100; x++) { + Double i = new Double(Math.random() * 100); + System.out.println(i); + tree.insert(i); + } + System.out.println("@@@@@@" + tree.getRoot().getData()); + tree.printTree(); + } +} diff --git a/group27/383117348/src/com/coding/basic/Iterator.java b/group27/383117348/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..dbe8b9afb2 --- /dev/null +++ b/group27/383117348/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group27/383117348/src/com/coding/basic/LinkedList.java b/group27/383117348/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..faeafffca6 --- /dev/null +++ b/group27/383117348/src/com/coding/basic/LinkedList.java @@ -0,0 +1,382 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + +import org.junit.Test; + +public class LinkedList implements List { + + private Node first; + + private Node last; + + private int size; + + /** + * 澶撮儴娣诲姞鑺傜偣鏂规硶 + */ + private void linkFirst(Object o) { + final Node node = first; + final Node firstNode = new Node(o, node, null); + this.first = firstNode; + if (node == null) { + last = firstNode; + } else { + node.prev = firstNode; + } + size++; + } + + /** + * 鏈娣诲姞鑺傜偣鏂规硶 + * + * @param o + */ + private void linkLast(Object o) { + final Node node = last; + final Node lastNode = new Node(o, null, node); + last = lastNode; + if (node == null) { + first = lastNode; + } else { + node.next = lastNode; + } + size++; + } + + /** + * 鍦ㄩ摼琛ㄦ湯绔坊鍔犺妭鐐 + */ + public void add(Object o) { + if (o != null) + linkLast(o); + } + + /** + * 鍦ㄦ寚瀹氫笅鏍囧娣诲姞鑺傜偣 + */ + public void add(int index, Object o) { + checkIndex(index); + Node befo = getNodeByIndex(index); + linkBefore(o, befo); + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇鑺傜偣 + */ + public Object get(int index) { + checkIndex(index); + return getNodeByIndex(index).data; + } + + /** + * 鏍规嵁涓嬫爣绉婚櫎鑺傜偣 + */ + public Object remove(int index) { + checkIndex(index); + Node current = getNodeByIndex(index); + final Node node = current; + final Node prev = node.prev; + final Node next = node.next; + if (prev == null) { + first = next; + } else { + prev.next = next; + next.prev = prev; + current = null; + } + if (next == null) { + last = prev; + } else { + prev.next = next; + next.prev = prev; + current = null; + } + size--; + return node.data; + } + + /** + * 杩斿洖閾捐〃闀垮害 + */ + public int size() { + return size; + } + + /** + * 鍦ㄩ摼琛ㄥご娣诲姞鑺傜偣 + * + * @param o + */ + public void addFirst(Object o) { + linkFirst(o); + } + + /** + * 鍦ㄩ摼琛ㄦ渶鍚庢坊鍔犺妭鐐 + * + * @param o + */ + public void addLast(Object o) { + linkLast(o); + } + + /** + * 绉婚櫎閾捐〃棣栦釜鍏冪礌 + * + * @return + */ + public Object removeFirst() { + Node node = first; + if (node == null) + throw new NoSuchElementException(); + else { + Node next = node.next; + if (next == null) + first = null; + else { + first = next; + first.prev = null; + } + } + size--; + return node.data; + } + + /** + * 绉婚櫎閾捐〃鏈鍚庝竴涓厓绱 + * + * @return + */ + public Object removeLast() { + Node node = last; + if (last == null) + throw new NoSuchElementException(); + else { + Node prev = node.prev; + if (prev == null) + last = null; + else { + last = prev; + last.next = null; + } + } + size--; + return node.data; + } + + /** + * 杩唬鏂规硶 + * + * @return + */ + public Iterator iterator() { + return new Iter(); + } + + /** + * 鍦ㄨ妭鐐逛箣鍓嶆彃鍏ヤ竴涓柊鐨勮妭鐐 + * + * @param data + * @param befo + */ + private void linkBefore(Object data, Node befo) { + final Node prev = befo.prev; + final Node node = new Node(data, befo, prev); + befo.prev = node; + if (prev == null) + first = node; + else + prev.next = node; + size++; + } + + /** + * 鏍规嵁涓嬫爣鑾峰彇鑺傜偣 + * + * @param index + * @return + */ + private Node getNodeByIndex(int index) { + checkIndex(index); + + Node node = first; + for (int x = 0; x < index; x++) { + node = node.next; + } + return node; + } + + /** + * 妫鏌ヤ笅鏍囨槸鍚﹁秺鐣 + * + * @param index + */ + private void checkIndex(int index) { + // TODO Auto-generated method stub + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("閾捐〃涓嬫爣瓒婄晫"); + } + } + + /** + * 杩唬鍣ㄥ唴閮ㄧ被 + * + * @author Adminstater + * + */ + private class Iter implements Iterator { + private int nextIndex = 0; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return nextIndex != size; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + int i = nextIndex++; + if (i > size - 1) + throw new IndexOutOfBoundsException(); + return getNodeByIndex(i).data; + } + + } + + /** + * 鑺傜偣鍐呴儴绫 + * + * @author Adminstater + * + */ + private static class Node { + Object data; + Node next; + Node prev; + + private Node(Object data, Node next, Node prev) { + this.data = data; + this.next = next; + this.prev = prev; + } + + private Node() { + + } + } + + /*------------------------------------------------------鍗曞厓娴嬭瘯----------------------------------------------------*/ + + /** + * 娴嬭瘯娣诲姞鏂规硶鍔熻兘 + */ + // add(Object o) + @Test + public void TestAddFunction() { + + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println("娣诲姞瀹屾瘯"); + + } + + // add(int index,Object o) + @Test + public void TestAddIndexFunction() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + for (int x = 0; x < list.size(); x++) { + System.out.println(list.get(x)); + } + list.add(3, 111); + System.out.println(list.get(3)); + } + + // addFirst(Object o) + @Test + public void TestAddFirstFunction() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println(list.get(0)); + list.addFirst(20); + System.out.println(list.get(0)); + } + + // addLast(Object o) + @Test + public void TestAddLastFunction() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println(list.get(list.size() - 1)); + list.addLast(111); + System.out.println(list.get(list.size() - 1)); + } + + /** + * remove鏂规硶娴嬭瘯 + */ + // removeFirst() + @Test + public void TestRemoveFirst() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println(list.get(0)); + list.removeFirst(); + System.out.println(list.get(0)); + } + + // removeLast() + @Test + public void TestRemoveLast() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println(list.get(list.size() - 1)); + list.removeLast(); + System.out.println(list.get(list.size() - 1)); + } + + // remove(int index) + @Test + public void TestRemoveFunction() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + System.out.println(list.get(50)); + list.remove(50); + System.out.println(list.get(50)); + } + + /** + * Iterator娴嬭瘯 + */ + @Test + public void TestIterator() { + LinkedList list = new LinkedList(); + for (int i = 0; i < 100; i++) { + list.add(i); + } + Iterator ite = list.iterator(); + while (ite.hasNext()) { + System.out.println(ite.next()); + } + } + + public static void main(String[] args) { + java.util.LinkedList list = null; + } +} diff --git a/group27/383117348/src/com/coding/basic/List.java b/group27/383117348/src/com/coding/basic/List.java new file mode 100644 index 0000000000..396b1f6416 --- /dev/null +++ b/group27/383117348/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/383117348/src/com/coding/basic/Queue.java b/group27/383117348/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..84cb43e3db --- /dev/null +++ b/group27/383117348/src/com/coding/basic/Queue.java @@ -0,0 +1,74 @@ +package com.coding.basic; + +import org.junit.Test; + +public class Queue { + private int size = 0; + private LinkedList linkedList = new LinkedList(); + + /** + * 鍏ラ槦鏂规硶 + * + * @param o + */ + public void enQueue(Object o) { + linkedList.add(o); + size++; + } + + /** + * 鍑洪槦鏂规硶 + * + * @return + */ + public Object deQueue() { + Object result = linkedList.removeFirst(); + size--; + return result; + } + + /** + * 鍒ゆ柇闃熷垪鏄惁涓虹┖ + * + * @return + */ + public boolean isEmpty() { + return size == 0; + } + + /** + * 鑾峰彇闃熷垪鐨勯暱搴 + * + * @return + */ + public int size() { + return size; + } + + /*------------------------------------------------------鍗曞厓娴嬭瘯----------------------------------------------------*/ + /** + * 鍏ラ槦娴嬭瘯 + */ + @Test + public void enQueueTest() { + Queue queue = new Queue(); + queue.enQueue(1); + } + + /** + * 鍑洪槦娴嬭瘯 + */ + @Test + public void deQueueTest() { + Queue queue = new Queue(); + for (int x = 0; x < 100; x++) { + queue.enQueue(x); + } + for (int x = 0; x < queue.size();) { + System.out.println(queue.deQueue()); + } + } + + public static void main(String[] args) { + } +} diff --git a/group27/383117348/src/com/coding/basic/Stack.java b/group27/383117348/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..1b12b63b0f --- /dev/null +++ b/group27/383117348/src/com/coding/basic/Stack.java @@ -0,0 +1,99 @@ +package com.coding.basic; + +import org.junit.Test; + +public class Stack { + + private ArrayList elementData = new ArrayList(); + + /** + * 鍘嬫爤鏂规硶 + * + * @param o + */ + public void push(Object o) { + if (o != null) + elementData.add(o); + } + + /** + * 寮规爤鏂规硶 + * + * @return + */ + public Object pop() { + Object result = elementData.remove(elementData.size() - 1); + return result; + } + + /** + * 鏌ョ湅鏍堥《瀵硅薄 + * + * @return + */ + public Object peek() { + Object result = elementData.get(elementData.size() - 1); + return result; + } + + /** + * 鍒ゆ柇鏄惁涓虹┖ + * + * @return + */ + public boolean isEmpty() { + return elementData.size() == 0; + } + + /** + * 鑾峰彇鏍堢殑闀垮害 + * + * @return + */ + public int size() { + return elementData.size(); + } + + /*------------------------------------------------------鍗曞厓娴嬭瘯----------------------------------------------------*/ + /** + * push(Object obj)鏂规硶娴嬭瘯 + */ + @Test + public void TestPushFunction() { + Stack stack = new Stack(); + for (int x = 0; x < 100; x++) { + stack.push(x); + } + } + + /** + * peek()鏂规硶娴嬭瘯 + */ + @Test + public void TestPeekFunction() { + Stack stack = new Stack(); + for (int x = 0; x < 100; x++) { + stack.push(x); + } + for (int x = 0; x < stack.size(); x++) { + System.out.println(x + ":" + stack.peek()); + } + } + + /** + * pop()鏂规硶娴嬭瘯 + */ + @Test + public void TestPopFunction() { + Stack stack = new Stack(); + for (int x = 0; x < 100; x++) { + stack.push(x); + } + System.out.println("before:" + stack.size()); + for (int x = 0; x < stack.size();) { + System.out.println(stack.pop()); + } + System.out.println("after:" + stack.size()); + } + +} From 378896ef0fb65aa0685bb4cd56307af8e164c64e Mon Sep 17 00:00:00 2001 From: myThinkPad <1252327158@qq.com> Date: Tue, 7 Mar 2017 12:47:59 +0800 Subject: [PATCH 147/646] task1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 瀹炵幇甯歌鐨勬暟鎹粨鏋 ArrayList, Stack , LinkedList , Queue ,Tree 锛 Iterator --- group27/1252327158/task1_20170312/.classpath | 6 + group27/1252327158/task1_20170312/.project | 17 +++ .../org.eclipse.core.resources.prefs | 3 + .../src/com/coding/ArrayList.java | 32 +++++ .../src/com/coding/BinaryTreeNode.java | 32 +++++ .../src/com/coding/Iterator.java | 7 + .../src/com/coding/LinkedList.java | 124 ++++++++++++++++++ .../task1_20170312/src/com/coding/List.java | 9 ++ .../task1_20170312/src/com/coding/Queue.java | 19 +++ .../task1_20170312/src/com/coding/Stack.java | 22 ++++ 10 files changed, 271 insertions(+) create mode 100644 group27/1252327158/task1_20170312/.classpath create mode 100644 group27/1252327158/task1_20170312/.project create mode 100644 group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs create mode 100644 group27/1252327158/task1_20170312/src/com/coding/ArrayList.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/Iterator.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/LinkedList.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/List.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/Queue.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/Stack.java diff --git a/group27/1252327158/task1_20170312/.classpath b/group27/1252327158/task1_20170312/.classpath new file mode 100644 index 0000000000..fb5011632c --- /dev/null +++ b/group27/1252327158/task1_20170312/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group27/1252327158/task1_20170312/.project b/group27/1252327158/task1_20170312/.project new file mode 100644 index 0000000000..1e6bc81917 --- /dev/null +++ b/group27/1252327158/task1_20170312/.project @@ -0,0 +1,17 @@ + + + task1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs b/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..1cb2cd29eb --- /dev/null +++ b/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Tue Mar 07 12:45:01 CST 2017 +eclipse.preferences.version=1 +encoding//src/com/coding/LinkedList.java=UTF-8 diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java new file mode 100644 index 0000000000..13e4b94ba3 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -0,0 +1,32 @@ +package com.coding; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java new file mode 100644 index 0000000000..66a43d937d --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/Iterator.java b/group27/1252327158/task1_20170312/src/com/coding/Iterator.java new file mode 100644 index 0000000000..7533c97158 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/Iterator.java @@ -0,0 +1,7 @@ +package com.coding; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java new file mode 100644 index 0000000000..f1c49814dd --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java @@ -0,0 +1,124 @@ +package com.coding; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 閹跺﹨顕氶柧鎹愩冮柅鍡欑枂 + * 娓氬顪嗛柧鎹愩冩稉锟3->7->10 , 闁棛鐤嗛崥搴″綁娑擄拷 10->7->3 + */ + public void reverse(){ + + } + + /** + * 閸掔娀娅庢稉锟介嚋閸楁洟鎽肩悰銊ф畱閸撳秴宕愰柈銊ュ瀻 + * 娓氬顪嗛敍姝璱st = 2->5->7->8 , 閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟7->8 + * 婵″倹鐏塴ist = 2->5->7->8->10 ,閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 娴犲海顑噄娑擃亜鍘撶槐鐘茬磻婵绱 閸掔娀娅巐ength 娑擃亜鍘撶槐锟介敍锟藉▔銊﹀壈i娴狅拷瀵拷顬 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 閸嬪洤鐣捐ぐ鎾冲闁炬崘銆冮崪瀹璱st閸у洤瀵橀崥顐㈠嚒閸楀洤绨幒鎺戝灙閻ㄥ嫭鏆i弫锟 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戦崣鏍у毉闁絼绨簂ist閹碉拷瀵氱规氨娈戦崗鍐 + * 娓氬顪嗚ぐ鎾冲闁炬崘銆 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 鏉╂柨娲栭惃鍕波閺嬫粌绨茬拠銉︽Ц[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戞稉顓炲灩闂勩倕婀猯ist娑擃厼鍤悳鎵畱閸忓啰绀 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 瀹歌尙鐓¤ぐ鎾冲闁炬崘銆冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 閸掔娀娅庣悰銊よ厬閹碉拷婀侀崐鑲╂祲閸氬瞼娈戞径姘稇閸忓啰绀岄敍鍫滃▏瀵版鎼锋担婊冩倵閻ㄥ嫮鍤庨幀褑銆冩稉顓熷閺堝鍘撶槐鐘垫畱閸婄厧娼庢稉宥囨祲閸氬矉绱 + */ + public void removeDuplicateValues(){ + + } + + /** + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 鐠囨洖鍟撴稉锟界彯閺佸牏娈戠粻妤佺《閿涘苯鍨归梽銈堛冩稉顓熷閺堝锟芥径褌绨琺in娑撴柨鐨禍宸慳x閻ㄥ嫬鍘撶槐鐙呯礄閼汇儴銆冩稉顓炵摠閸︺劏绻栭弽椋庢畱閸忓啰绀岄敍锟 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 閸嬪洩顔曡ぐ鎾冲闁炬崘銆冮崪灞藉棘閺佺櫦ist閹稿洤鐣鹃惃鍕懠鐞涖劌娼庢禒銉ュ帗缁辩姳绶烽崐濂革拷婢х偞婀佹惔蹇斿笓閸掓绱欓崥灞肩鐞涖劋鑵戦惃鍕帗缁辩姴锟介崥鍕瑝閻╃ǹ鎮撻敍锟 + * 閻滄媽顪呭Ч鍌滄晸閹存劖鏌婇柧鎹愩僀閿涘苯鍙鹃崗鍐娑撳搫缍嬮崜宥夋懠鐞涖劌鎷發ist娑擃厼鍘撶槐鐘垫畱娴溿倝娉﹂敍灞肩瑬鐞涒撴稉顓犳畱閸忓啰绀岄張澶夌贩閸婂ジ锟芥晶鐐存箒鎼村繑甯撻崚锟 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/List.java b/group27/1252327158/task1_20170312/src/com/coding/List.java new file mode 100644 index 0000000000..d39f4eea4c --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/List.java @@ -0,0 +1,9 @@ +package com.coding; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/Queue.java b/group27/1252327158/task1_20170312/src/com/coding/Queue.java new file mode 100644 index 0000000000..e9775d4b7c --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/Queue.java @@ -0,0 +1,19 @@ +package com.coding; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/Stack.java b/group27/1252327158/task1_20170312/src/com/coding/Stack.java new file mode 100644 index 0000000000..9d64f88b78 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/Stack.java @@ -0,0 +1,22 @@ +package com.coding; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From c232163a721bd174a4213cbcc82feef4942092d2 Mon Sep 17 00:00:00 2001 From: xiongrui Date: Tue, 7 Mar 2017 13:28:47 +0800 Subject: [PATCH 148/646] Basic framework --- group22/627559964/.classpath | 6 + group22/627559964/.gitignore | 1 + group22/627559964/.project | 17 +++ .../src/com/coding/basic/ArrayList.java | 33 +++++ .../src/com/coding/basic/BinaryTreeNode.java | 37 ++++++ .../src/com/coding/basic/Iterator.java | 9 ++ .../src/com/coding/basic/LinkedList.java | 125 ++++++++++++++++++ .../627559964/src/com/coding/basic/List.java | 13 ++ .../627559964/src/com/coding/basic/Queue.java | 19 +++ .../627559964/src/com/coding/basic/Stack.java | 24 ++++ 10 files changed, 284 insertions(+) create mode 100644 group22/627559964/.classpath create mode 100644 group22/627559964/.gitignore create mode 100644 group22/627559964/.project create mode 100644 group22/627559964/src/com/coding/basic/ArrayList.java create mode 100644 group22/627559964/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group22/627559964/src/com/coding/basic/Iterator.java create mode 100644 group22/627559964/src/com/coding/basic/LinkedList.java create mode 100644 group22/627559964/src/com/coding/basic/List.java create mode 100644 group22/627559964/src/com/coding/basic/Queue.java create mode 100644 group22/627559964/src/com/coding/basic/Stack.java diff --git a/group22/627559964/.classpath b/group22/627559964/.classpath new file mode 100644 index 0000000000..fb5011632c --- /dev/null +++ b/group22/627559964/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group22/627559964/.gitignore b/group22/627559964/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group22/627559964/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group22/627559964/.project b/group22/627559964/.project new file mode 100644 index 0000000000..870f65f4a0 --- /dev/null +++ b/group22/627559964/.project @@ -0,0 +1,17 @@ + + + 627559964 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group22/627559964/src/com/coding/basic/ArrayList.java b/group22/627559964/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..0ba3cb15a8 --- /dev/null +++ b/group22/627559964/src/com/coding/basic/ArrayList.java @@ -0,0 +1,33 @@ +package com.coding.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o) { + + } + + public void add(int index, Object o) { + + } + + public Object get(int index) { + return null; + } + + public Object remove(int index) { + return null; + } + + public int size() { + return -1; + } + + public Iterator iterator() { + return null; + } + +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/BinaryTreeNode.java b/group22/627559964/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..981812cf59 --- /dev/null +++ b/group22/627559964/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,37 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o) { + return null; + } + +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/Iterator.java b/group22/627559964/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..c4c1725d21 --- /dev/null +++ b/group22/627559964/src/com/coding/basic/Iterator.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface Iterator { + + public boolean hasNext(); + + public Object next(); + +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/LinkedList.java b/group22/627559964/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..8aa70d53bd --- /dev/null +++ b/group22/627559964/src/com/coding/basic/LinkedList.java @@ -0,0 +1,125 @@ +package com.coding.basic; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o) { + + } + + public void add(int index, Object o) { + + } + + public Object get(int index) { + return null; + } + + public Object remove(int index) { + return null; + } + + public int size() { + return -1; + } + + public void addFirst(Object o) { + + } + + public void addLast(Object o) { + + } + + public Object removeFirst() { + return null; + } + + public Object removeLast() { + return null; + } + + public Iterator iterator() { + return null; + } + + private static class Node { + Object data; + Node next; + + } + + /** + * 把该链表逆置 例如链表为 3->7->10 , 逆置后变为 10->7->3 + */ + public void reverse() { + + } + + /** + * 删除一个单链表的前半部分 例如:list = 2->5->7->8 , 删除以后的值为 7->8 如果list = 2->5->7->8->10 + * ,删除以后的值为7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 假定当前链表和list均包含已升序排列的整数 从当前链表中取出那些list所指定的元素 例如当前链表 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * + * @param list + */ + public static int[] getElements(LinkedList list) { + return null; + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 从当前链表中中删除在list中出现的元素 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) + */ + public void removeDuplicateValues() { + + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/List.java b/group22/627559964/src/com/coding/basic/List.java new file mode 100644 index 0000000000..8815065b99 --- /dev/null +++ b/group22/627559964/src/com/coding/basic/List.java @@ -0,0 +1,13 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + + public void add(int index, Object o); + + public Object get(int index); + + public Object remove(int index); + + public int size(); +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/Queue.java b/group22/627559964/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..a487336ffe --- /dev/null +++ b/group22/627559964/src/com/coding/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o) { + } + + public Object deQueue() { + return null; + } + + public boolean isEmpty() { + return false; + } + + public int size() { + return -1; + } +} \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/Stack.java b/group22/627559964/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..b68067ee75 --- /dev/null +++ b/group22/627559964/src/com/coding/basic/Stack.java @@ -0,0 +1,24 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + } + + public Object pop() { + return null; + } + + public Object peek() { + return null; + } + + public boolean isEmpty() { + return false; + } + + public int size() { + return -1; + } +} \ No newline at end of file From ad889aa885f8c3e062bd6cb0a755c71bb19bc9d9 Mon Sep 17 00:00:00 2001 From: wizardzhang Date: Tue, 7 Mar 2017 13:48:57 +0800 Subject: [PATCH 149/646] init --- group27/282287610/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 group27/282287610/.gitignore diff --git a/group27/282287610/.gitignore b/group27/282287610/.gitignore new file mode 100644 index 0000000000..3eaf5674b8 --- /dev/null +++ b/group27/282287610/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/.classpath +/.project From f18be8315db0b127fde7fffe68e425246a576ee8 Mon Sep 17 00:00:00 2001 From: zhanglei <383117348@qq.com> Date: Tue, 7 Mar 2017 15:13:39 +0800 Subject: [PATCH 150/646] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B5=8B=E8=AF=95Tre?= =?UTF-8?q?eNode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/BinaryTreeNode.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/group27/383117348/src/com/coding/basic/BinaryTreeNode.java b/group27/383117348/src/com/coding/basic/BinaryTreeNode.java index 366f41224f..bd2ad5effb 100644 --- a/group27/383117348/src/com/coding/basic/BinaryTreeNode.java +++ b/group27/383117348/src/com/coding/basic/BinaryTreeNode.java @@ -48,7 +48,7 @@ public void setRoot(BinaryTreeNode root) { public BinaryTreeNode insert(Comparable o) { if (o != null) { root = insert(root, o); - // System.out.println("@@@@@@"+o); + //System.out.println("@@@@@@"+root.getData()); } return root; } @@ -66,10 +66,12 @@ private BinaryTreeNode insert(BinaryTreeNode node, Comparable o) { node.setData(o); } else if (compare(node, o) >= 0) { node.left = insert(node.left, o); - // System.out.println("insert into left"); + //System.out.println(o+":insert into left"); + //System.out.println("left:"+node.getData()+":"+o); } else if (compare(node, o) < 0) { node.right = insert(node.right, o); - // System.out.println("insert into right"); + //System.out.println(o+":insert into right"); + //System.out.println("right:"+node.getData()+":"+o); } return node; } @@ -96,7 +98,7 @@ private void printTree(BinaryTreeNode node) { if (node == null) return; printTree(node.left); - System.out.println(node.data + ""); + System.out.println("---"+node.data + ""); printTree(node.right); } @@ -104,7 +106,7 @@ public static void main(String[] args) { BinaryTreeNode tree = new BinaryTreeNode(); for (int x = 0; x < 100; x++) { Double i = new Double(Math.random() * 100); - System.out.println(i); + //System.out.println(i); tree.insert(i); } System.out.println("@@@@@@" + tree.getRoot().getData()); From a459047b8944ac86dc9ceea93c644a598e6f6615 Mon Sep 17 00:00:00 2001 From: chishiwu <1107225491@qq.com> Date: Tue, 7 Mar 2017 15:51:56 +0800 Subject: [PATCH 151/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group24/1107225491/1107225491/.classpath | 6 ++++++ group24/1107225491/1107225491/.project | 17 +++++++++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 11 +++++++++++ group24/1107225491/1107225491/test.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 group24/1107225491/1107225491/.classpath create mode 100644 group24/1107225491/1107225491/.project create mode 100644 group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs create mode 100644 group24/1107225491/1107225491/test.txt diff --git a/group24/1107225491/1107225491/.classpath b/group24/1107225491/1107225491/.classpath new file mode 100644 index 0000000000..07ca123c63 --- /dev/null +++ b/group24/1107225491/1107225491/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group24/1107225491/1107225491/.project b/group24/1107225491/1107225491/.project new file mode 100644 index 0000000000..2d1d33be8a --- /dev/null +++ b/group24/1107225491/1107225491/.project @@ -0,0 +1,17 @@ + + + 1107225491 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs b/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..54e493c07c --- /dev/null +++ b/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/group24/1107225491/1107225491/test.txt b/group24/1107225491/1107225491/test.txt new file mode 100644 index 0000000000..2086f8809c --- /dev/null +++ b/group24/1107225491/1107225491/test.txt @@ -0,0 +1 @@ +奋斗奋斗 \ No newline at end of file From a3cb4f47d001ad49782826cda9b9c0642871825d Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 7 Mar 2017 16:21:27 +0800 Subject: [PATCH 152/646] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=B9=A0=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/LinkedList.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java index 1071c17eeb..3bf26a1a1c 100644 --- a/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java +++ b/group12/2258659044/zj-2017/src/com/coding/basic/LinkedList.java @@ -125,7 +125,7 @@ private Node getPointNode(int index){ } return node; } - + private static class Node{ Object data; Node next; @@ -137,18 +137,16 @@ private static class Node{ * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ public void reverse(){ - //缂撳瓨鍘熼摼琛ㄦ暟鎹 + Stack stack = new Stack(); - Node node = head; - for (int i = 0; i < size; i++) { + Node node; + //缂撳瓨鍘熼摼琛ㄦ暟鎹 + for (node = head; node!=null;node = node.next) { stack.push(node.data); - node = node.next; - } + } //閲嶆柊璧嬪 - node = head; - for (int i = 0; i < size; i++) { + for (node = head; node!=null;node = node.next) { node.data = stack.pop(); - node = node.next; } } @@ -182,6 +180,7 @@ public void remove(int i, int length){ if(length<(size-i)){ getPointNode(i-1).next = getPointNode(i+length); size = size-length; + size = size-length; }else{ getPointNode(i-1).next = null; size = i; @@ -199,7 +198,7 @@ public void remove(int i, int length){ public int[] getElements(LinkedList list){ int[] array = new int[list.size()]; for (int i = 0; i < array.length; i++) { - array[i] = (int)getPointNode((int)list.get(i)).data; + array[i] = (int) get((int)list.get(i)); } return array; } @@ -210,11 +209,12 @@ public int[] getElements(LinkedList list){ * @param list */ - public void subtract(LinkedList list){ + public void subtract(LinkedList list){ for (int i = 0; i < size; i++) { for (int j = 0; j < list.size(); j++) { if(get(i).equals(list.get(j))){ remove(i); + i--; } } } From b20115e29c2cfce6fc4d59560a8716391d480395 Mon Sep 17 00:00:00 2001 From: Alvin Date: Tue, 7 Mar 2017 00:34:29 -0800 Subject: [PATCH 153/646] Homework 3rd --- .../coderising/download/DownloadThread.java | 20 ++++++ .../coderising/download/FileDownloader.java | 68 +++++++++++++++++++ .../download/FileDownloaderTest.java | 59 ++++++++++++++++ .../coderising/download/api/Connection.java | 23 +++++++ .../download/api/ConnectionException.java | 5 ++ .../download/api/ConnectionManager.java | 10 +++ .../download/api/DownloadListener.java | 5 ++ .../download/impl/ConnectionImpl.java | 31 +++++++++ .../download/impl/ConnectionManagerImpl.java | 28 ++++++++ 9 files changed, 249 insertions(+) create mode 100644 group20/404130810/src/com/coderising/download/DownloadThread.java create mode 100644 group20/404130810/src/com/coderising/download/FileDownloader.java create mode 100644 group20/404130810/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group20/404130810/src/com/coderising/download/api/Connection.java create mode 100644 group20/404130810/src/com/coderising/download/api/ConnectionException.java create mode 100644 group20/404130810/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group20/404130810/src/com/coderising/download/api/DownloadListener.java create mode 100644 group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group20/404130810/src/com/coderising/download/DownloadThread.java b/group20/404130810/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..d71540b497 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/FileDownloader.java b/group20/404130810/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..3a4bcd8d9e --- /dev/null +++ b/group20/404130810/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,68 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 在这里实现你的代码, 注意: 需要用多线程实现下载 + // 这个类依赖于其他几个接口, 你需要写这几个接口的实现代码 + // (1) ConnectionManager , 可以打开一个连接,通过Connection可以读取其中的一段(用startPos, + // endPos来指定) + // (2) DownloadListener, 由于是多线程下载, 调用这个类的客户端不知道什么时候结束,所以你需要实现当所有 + // 线程都执行完以后, 调用listener的notifiedFinished方法, 这样客户端就能收到通知。 + // 具体的实现思路: + // 1. 需要调用ConnectionManager的open方法打开连接, + // 然后通过Connection.getContentLength方法获得文件的长度 + // 2. 至少启动3个线程下载, 注意每个线程需要先调用ConnectionManager的open方法 + // 然后调用read方法, read方法中有读取文件的开始位置和结束位置的参数, 返回值是byte[]数组 + // 3. 把byte数组写入到文件中 + // 4. 所有的线程都下载完成以后, 需要调用listener的notifiedFinished方法 + + // 下面的代码是示例代码, 也就是说只有一个线程, 你需要改造成多线程的。 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn, 0, length - 1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/FileDownloaderTest.java b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4a781d87c3 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 等待多线程下载程序执行完毕 + while (!downloadFinished) { + try { + System.out.println("还没有下载完成,休眠五秒"); + //休眠5秒 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("下载完成!"); + + + + } + +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/api/Connection.java b/group20/404130810/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..911ee46891 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 给定开始和结束位置, 读取数据, 返回值是字节数组 + * @param startPos 开始位置, 从0开始 + * @param endPos 结束位置 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 得到数据内容的长度 + * @return + */ + public int getContentLength(); + + /** + * 关闭连接 + */ + public void close(); +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/api/ConnectionException.java b/group20/404130810/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..7e13414c73 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/api/ConnectionManager.java b/group20/404130810/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..e274234679 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 给定一个url , 打开一个连接 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/api/DownloadListener.java b/group20/404130810/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..a6589e52f5 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..0c62ee1711 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,31 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + private byte[] fileContent; + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + return fileContent.length; + } + + @Override + public void close() { + + } + + public void setFileContent(byte[] fileContent) { + this.fileContent = fileContent; + } + +} \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..b92d7d6c8f --- /dev/null +++ b/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,28 @@ +package com.coderising.download.impl; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + + @Override + public Connection open(String urlStr) throws ConnectionException { + URL url; + try { + url = new URL(urlStr); + HttpURLConnection conn = (HttpURLConnection)url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + +} \ No newline at end of file From 0701a76a14cf549a50ede813d38abc56f2821b49 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 7 Mar 2017 18:05:42 +0800 Subject: [PATCH 154/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../download/impl/ConnectionImpl.java | 19 +++++++++++------- .../download/impl/ConnectionManagerImpl.java | 20 +++++++++++++++++-- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java index 32f03efdc7..189d9389bc 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,27 +1,32 @@ package com.coderising.download.impl; import java.io.IOException; +import java.net.HttpURLConnection; import com.coderising.download.api.Connection; public class ConnectionImpl implements Connection{ + private HttpURLConnection urlCon; + @Override public byte[] read(int startPos, int endPos) throws IOException { - + return null; } @Override - public int getContentLength() { - - return 0; + public int getContentLength() { + return urlCon.getContentLength(); } @Override public void close() { - - + } - + + public void setUrlCon(HttpURLConnection urlCon) { + this.urlCon = urlCon; + } + } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java index 1281dfaa9e..55c953b85d 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -1,5 +1,10 @@ package com.coderising.download.impl; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; @@ -9,7 +14,18 @@ public class ConnectionManagerImpl implements ConnectionManager { @Override public Connection open(String url) throws ConnectionException { - return null; + URL remotUrl = null; + HttpURLConnection urlCon = null; + ConnectionImpl conn = new ConnectionImpl(); + try { + remotUrl = new URL(url); + urlCon = (HttpURLConnection)remotUrl.openConnection(); + conn.setUrlCon(urlCon); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return conn; } - } \ No newline at end of file From 591cf740636cbe8eb64b7076414953b73c5fce1f Mon Sep 17 00:00:00 2001 From: thomas_young Date: Tue, 7 Mar 2017 19:50:37 +0800 Subject: [PATCH 155/646] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coding2017/basic/LinkedList.java | 77 +++++++++ .../coding2017/basic/test/LinkedListTest.java | 163 ++++++++++++++++++ .../coding2017/basic/test/ListTest.java | 2 +- 3 files changed, 241 insertions(+), 1 deletion(-) diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java index e34d76001b..6c7e154e92 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java @@ -1,5 +1,6 @@ package com.github.miniyk2012.coding2017.basic; + public class LinkedList implements List { private Node head; @@ -100,4 +101,80 @@ private void checkPositionIndex(int index) { if (index < 0 || index > size) throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java index 487fd2ee00..0205f59b57 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java @@ -1,10 +1,15 @@ package com.github.miniyk2012.coding2017.basic.test; import static org.junit.Assert.*; + +import org.junit.After; import org.junit.Before; import org.junit.Test; + +import com.github.miniyk2012.coding2017.basic.Iterator; import com.github.miniyk2012.coding2017.basic.LinkedList; + public class LinkedListTest extends ListTest{ private LinkedList aLinkedList; @@ -15,6 +20,23 @@ public void setUpLinkedList() { aLinkedList = new LinkedList(); } + /** + * 娴嬭瘯iterator涓嶅洜涓哄悇绉嶆搷浣滆屽け鏁 + */ + @After + public void testIterator2() { + java.util.LinkedList aStandardList = new java.util.LinkedList(); + for (int i=0; i5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + @Test + public void testRemoveFirstHalf() { + aLinkedList.removeFirstHalf(); + assertEquals(0, aLinkedList.size()); + + aLinkedList.add(2); + aLinkedList.add(5); + aLinkedList.add(7); + aLinkedList.add(8); // [2,5,7,8] + + aLinkedList.removeFirstHalf(); // [7,8] + assertEquals(2, aLinkedList.size()); + assertEquals(7, aLinkedList.get(0)); + assertEquals(8, aLinkedList.get(1)); + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + @Test + public void testRemoveIntInt() { + + for (int i=0; i<4; i++) { + aLinkedList.add(i); // [0,1,2,3] + } + + aLinkedList.remove(0, 2); // [2,3] + assertEquals(2, aLinkedList.get(0)); + assertEquals(3, aLinkedList.get(1)); + assertEquals(2, aLinkedList.size()); + + aLinkedList.remove(1, 0); + aLinkedList.remove(0, 0); + assertEquals(2, aLinkedList.size()); + + aLinkedList.remove(1, 1); // [2] + assertEquals(1, aLinkedList.size()); + assertEquals(2, aLinkedList.get(0)); + + aLinkedList.remove(0, 1); // [] + assertEquals(0, aLinkedList.size()); + + expectedEx.expect(Exception.class); + aLinkedList.remove(1, 3); + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + @Test + public void testGetElements() { + for (int i=0; i<4; i=i*i) { + aLinkedList.add(i); // [0,1,4,9] + } + + LinkedList bLinkedList = new LinkedList(); + int[] z1 = aLinkedList.getElements(bLinkedList); // [] + assertEquals(new int[0], z1); + + bLinkedList.add(1); + bLinkedList.add(3); // [1, 3] + + z1 = aLinkedList.getElements(bLinkedList); // [1, 9] + assertArrayEquals(new int[] {1,9}, z1); + + bLinkedList.add(1, 2); // bLinkedList = [1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [1, 4, 9] + assertArrayEquals(new int[] {1,4,9}, z1); + + bLinkedList.add(0, 0); // bLinkedList = [0, 1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [0, 1, 4, 9] + assertArrayEquals(new int[] {0,1,4,9}, z1); + + // aLinkedList涓嶅簲璇ュ彉鍖 + assertEquals(4, aLinkedList.size()); + for (int i=0; i<4; i++) { + assertEquals(i*i, aLinkedList.get(i)); // [0,1,4,9] + } + + // Exception + bLinkedList.add(5); // bLinkedList = [0, 1, 2, 3, 5] + expectedEx.expect(Exception.class); + z1 = aLinkedList.getElements(bLinkedList); + } + + @Test + public void testSubtract() { + fail("Not yet implemented"); + } + + @Test + public void testRemoveDuplicateValues() { + fail("Not yet implemented"); + } + + @Test + public void testRemoveRange() { + fail("Not yet implemented"); + } + + @Test + public void testIntersection() { + fail("Not yet implemented"); + } } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/ListTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/ListTest.java index 587bf17f4d..b9f32fcc3b 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/ListTest.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/ListTest.java @@ -6,7 +6,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import com.github.miniyk2012.coding2017.basic.Iterator; -import com.github.miniyk2012.coding2017.basic.List;; +import com.github.miniyk2012.coding2017.basic.List; public class ListTest { From f274565a1cae42339bc3067c79a5a2a690105462 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Tue, 7 Mar 2017 20:23:11 +0800 Subject: [PATCH 156/646] =?UTF-8?q?=E5=A2=9E=E5=8A=A04=E4=B8=AA=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coding2017/basic/LinkedList.java | 2 +- .../coding2017/basic/test/LinkedListTest.java | 119 ++++++++++++++++-- 2 files changed, 109 insertions(+), 12 deletions(-) diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java index 6c7e154e92..e1c369af1e 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java @@ -174,7 +174,7 @@ public void removeRange(int min, int max){ * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 * @param list */ - public LinkedList intersection( LinkedList list){ + public LinkedList intersection(LinkedList list){ return null; } } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java index 0205f59b57..83c984b650 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java @@ -235,22 +235,119 @@ public void testGetElements() { } @Test - public void testSubtract() { - fail("Not yet implemented"); + public void TestSubtract() + { + //浼犺繘鐨刲ist涓簄ull,浠涔堥兘涓嶅共 + LinkedList list = null; + for (int i=0; i<6; i++) + { + aLinkedList.add(i); //[0,1,2,3,4,5] + } + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + + //浼犺繘鐨刲ist涓虹┖ + list = new LinkedList(); + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + + aLinkedList.add(1, 1); //[0,1,1,2,3,4,5] + aLinkedList.add(4, 3); //[0,1, 1, 2, 3, 3, 4, 5] + + + // list娣诲姞鍏冪礌[0锛1, 3, 7] + list.add(0); + list.add(1); + list.add(3); + list.add(7); + + aLinkedList.subtract(list); //[ 2, 4, 5] + + assertEquals(2, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + assertEquals(3, aLinkedList.size()); } - @Test - public void testRemoveDuplicateValues() { - fail("Not yet implemented"); + public void testRemoveDuplicateValues() + { + aLinkedList.add(3); + aLinkedList.add(3); + aLinkedList.add(4); + aLinkedList.add(4); + aLinkedList.add(5); + aLinkedList.add(6); + aLinkedList.add(6); //[3, 3, 4, 4, 5, 6, 6] + + aLinkedList.removeDuplicateValues(); //[3, 4, 5, 6] + + assertEquals(3, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + assertEquals(6, aLinkedList.get(3)); + assertEquals(4, aLinkedList.size()); + } - @Test - public void testRemoveRange() { - fail("Not yet implemented"); - } + public void testRemoveRange() + { + for (int i=0; i<6; i++) + { + aLinkedList.add(i); // [0, 1, 2, 3, 4, 5] //鑰冭檻閲嶅鍏冪礌 + } + aLinkedList.addFirst(0); // [0, 0, 1, 2, 3, 4, 5] + aLinkedList.add(3, 2); // [0, 0, 1, 2, 2, 3, 4, 5] + + aLinkedList.removeRange(1, 4); // 澶т簬1灏忎簬4 [0, 0, 1, 4, 5] + + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + assertEquals(5, aLinkedList.size()); + + //鑻ュ嚭鐜 min >= max鐨勬儏鍐碉紝浠涔堥兘涓嶅仛 + aLinkedList.removeRange(4, 1); + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + assertEquals(5, aLinkedList.size()); + + //灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 + expectedEx.expect(Exception.class); + aLinkedList.remove(-1, 9); + } @Test - public void testIntersection() { - fail("Not yet implemented"); + public void testIntersection() + { + for (int i=0; i<6; i++) + { + aLinkedList.add(i); // [0锛 1, 2, 3, 4, 5] + } + //list涓簄ull + LinkedList list = null; + LinkedList newList1 = aLinkedList.intersection(list); + assertNull(newList1); + + //list涓虹┖閾捐〃 + list = new LinkedList(); + LinkedList newList2 = aLinkedList.intersection(list); + assertEquals(0, newList2.size()); + + list.add(2); + list.add(3); + list.add(4); + list.add(6); + list.add(7); // [2, 3, 4, 6, 7] + LinkedList newList3 = aLinkedList.intersection(list); + + assertEquals(2, newList3.get(0)); + assertEquals(3, newList3.get(1)); + assertEquals(4, newList3.get(2)); + assertEquals(3, newList3.size()); } } From 37703733a1fa6784dca47f991f6ff32463b04abe Mon Sep 17 00:00:00 2001 From: FelixCJF Date: Tue, 7 Mar 2017 21:01:20 +0800 Subject: [PATCH 157/646] Delete StrutsTest.java --- .../coderising/litestruts/StrutsTest.java | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java deleted file mode 100644 index b8c81faf3c..0000000000 --- a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.coderising.litestruts; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Assert; -import org.junit.Test; - - - - - -public class StrutsTest { - - @Test - public void testLoginActionSuccess() { - - String actionName = "login"; - - Map params = new HashMap(); - params.put("name","test"); - params.put("password","1234"); - - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); - Assert.assertEquals("login successful", view.getParameters().get("message")); - } - - @Test - public void testLoginActionFailed() { - String actionName = "login"; - Map params = new HashMap(); - params.put("name","test"); - params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); - Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); - } -} From d12c82f198eee6d97c3ce9c79066ad271c9ff42a Mon Sep 17 00:00:00 2001 From: FelixCJF Date: Tue, 7 Mar 2017 21:01:31 +0800 Subject: [PATCH 158/646] Delete LoginAction.java --- .../coderising/litestruts/LoginAction.java | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java deleted file mode 100644 index dcdbe226ed..0000000000 --- a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.coderising.litestruts; - -/** - * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 - * @author liuxin - * - */ -public class LoginAction{ - private String name ; - private String password; - private String message; - - public String getName() { - return name; - } - - public String getPassword() { - return password; - } - - public String execute(){ - if("test".equals(name) && "1234".equals(password)){ - this.message = "login successful"; - return "success"; - } - this.message = "login failed,please check your user/pwd"; - return "fail"; - } - - public void setName(String name){ - this.name = name; - } - public void setPassword(String password){ - this.password = password; - } - public String getMessage(){ - return this.message; - } -} From 94e79f8cc83af2a30d911f81c51e1a8703aad5df Mon Sep 17 00:00:00 2001 From: FelixCJF Date: Tue, 7 Mar 2017 21:01:46 +0800 Subject: [PATCH 159/646] Delete Struts.java --- .../coderising/litestruts/Struts.java | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java deleted file mode 100644 index 85e2e22de3..0000000000 --- a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.coderising.litestruts; - -import java.util.Map; - - - -public class Struts { - - public static View runAction(String actionName, Map parameters) { - - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters - - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - */ - - return null; - } - -} From cb53fd04bb0cb7e6b7ea1c851d74df35ccb4d6fa Mon Sep 17 00:00:00 2001 From: FelixCJF Date: Tue, 7 Mar 2017 21:02:41 +0800 Subject: [PATCH 160/646] Delete View.java --- .../coderising/litestruts/View.java | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java deleted file mode 100644 index 07df2a5dab..0000000000 --- a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.coderising.litestruts; - -import java.util.Map; - -public class View { - private String jsp; - private Map parameters; - - public String getJsp() { - return jsp; - } - public View setJsp(String jsp) { - this.jsp = jsp; - return this; - } - public Map getParameters() { - return parameters; - } - public View setParameters(Map parameters) { - this.parameters = parameters; - return this; - } -} From 97e0be367e4cddfe9b3a07c744214c931cd28b64 Mon Sep 17 00:00:00 2001 From: FelixCJF Date: Tue, 7 Mar 2017 21:02:51 +0800 Subject: [PATCH 161/646] Delete struts.xml --- .../coding2017/coderising/litestruts/struts.xml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml deleted file mode 100644 index a6cfe43e6c..0000000000 --- a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /jsp/homepage.jsp - /jsp/showLogin.jsp - - - /jsp/welcome.jsp - /jsp/error.jsp - - \ No newline at end of file From d23e51e9a10513cad603a064ca71d3fc8d0f1fcc Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Tue, 7 Mar 2017 21:58:30 +0800 Subject: [PATCH 162/646] LinkedList Ex --- .../basic/collection/concrete/LinkedList.java | 103 ++++++++++++++---- .../basic/test/collection/LinkedListTest.java | 2 - .../test/collection/LinkedListTest2.java | 86 +++++++++++++++ 3 files changed, 169 insertions(+), 22 deletions(-) create mode 100644 group12/382266293/coding/basic/test/collection/LinkedListTest2.java diff --git a/group12/382266293/coding/basic/collection/concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java index adcbd9df6e..f42f493363 100644 --- a/group12/382266293/coding/basic/collection/concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -1,5 +1,6 @@ package collection.concrete; +import java.util.Arrays; import java.util.NoSuchElementException; import static util.TestUtil.*; import static util.Print.*; @@ -41,16 +42,7 @@ public void reverse(){ head = pre; } - - - public static void main(String args[]) { - LinkedList myLL = new LinkedList(); - addIntWithNatureOrder(myLL,5); - myLL.reverse(); - println(myLL); - - } - + /** * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 @@ -58,8 +50,8 @@ public static void main(String args[]) { */ public void removeFirstHalf(){ - int deleteIndex = size/2; - clearAndSetNewHead(deleteIndex); + int deleteLength = size/2; + remove(0,deleteLength); } private void clearAndSetNewHead(int deleteIndex) { @@ -74,7 +66,19 @@ private void clearAndSetNewHead(int deleteIndex) { head = next; } } - + + private void clearAndSetNewHead(Node node,int deleteLength) { + Node x = node; + for (int i = 0; i < deleteLength; i++) { + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == deleteLength-1) + node = next; + } + } /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 @@ -82,11 +86,24 @@ private void clearAndSetNewHead(int deleteIndex) { * @param length */ public void remove(int i, int length){ - checkIndex(i); - checkIndex(length-i); + if (i == 0) { + clearAndSetNewHead(length); + return; + } + Node pre = getNode(i-1); + Node x = pre.next; + checkIndex(length + i); + for (int j = 0; j < length; j++) { + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == length-1) + pre.next = next; + } } - - + /** * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 @@ -95,9 +112,29 @@ public void remove(int i, int length){ * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list */ - public static int[] getElements(LinkedList list){ - return null; + public int[] getElements(LinkedList list){ + Iterator it2 = list.iterator(); + int size = list.size(); + int[] result = new int[size]; + int curr = (int) it2.next(); + Node start = getNode(curr); + result[0] = (int) start.data; + int next, batch; + int res = -1; + for (int i = 1; i < size; i++) { + next = (int) it2.next(); + batch = next - curr; + Node p = start; + for(int j = 0; j < batch; j++){ + p = p.next; + } + result[i] = (int) p.data; + start = p; + curr = next; + } + return result; } + /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 @@ -106,10 +143,36 @@ public static int[] getElements(LinkedList list){ * @param list */ - public void subtract(LinkedList list){ + public void subtract(LinkedList list){ + Node start = head; +// Node curr; +// Node next; +// Node x; + int count = list.size(); + while (count != 0) { + + + } + + } + + + + public static void main(String args[]) { + LinkedList myLL = new LinkedList(); + addIntWithNatureOrder(myLL,10); + println(myLL); + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(5); + + } + + /** * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest.java b/group12/382266293/coding/basic/test/collection/LinkedListTest.java index bcf2f9a05e..2613aed28f 100644 --- a/group12/382266293/coding/basic/test/collection/LinkedListTest.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest.java @@ -46,8 +46,6 @@ public void testLinkedList() { public void testReverse() { addString(myLL,5); myLL.reverse(); - println(myLL); - } diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest2.java b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java new file mode 100644 index 0000000000..b12272ef19 --- /dev/null +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java @@ -0,0 +1,86 @@ +package test.collection; + +import static util.Print.*; +import static util.TestUtil.*; + +import java.util.Arrays; +import java.util.Date; +import java.util.NoSuchElementException; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import collection.Iterator; +import collection.List; +import collection.concrete.LinkedList; +import junit.framework.TestCase; + + +public class LinkedListTest2 extends TestCase { + + LinkedList myLL; + + @Before + public void setUp() throws Exception { + myLL = new LinkedList(); + assertEquals(0,myLL.size()); + } + + @After + public void tearDown() throws Exception { + myLL = null; + } + + + + @Test + public void testReverse() { + addIntWithNatureOrder(myLL,5); + myLL.reverse(); + for (int i = 0; i < 5; i++) { + int acutal = myLL.get(i); + assertEquals(4-i,acutal); + } + } + + + @Test + public void testRemoveFirstHalf() { + addIntWithNatureOrder(myLL,5); + myLL.removeFirstHalf(); + assertEquals(3,myLL.size()); + assertEquals(2,(int)myLL.get(0)); + assertEquals(3,(int)myLL.get(1)); + assertEquals(4,(int)myLL.get(2)); + } + + @Test + public void testRemove2() { + addIntWithNatureOrder(myLL,5); + myLL.remove(1,2); + assertEquals(3,myLL.size()); + assertEquals(0,(int)myLL.get(0)); + assertEquals(3,(int)myLL.get(1)); + assertEquals(4,(int)myLL.get(2)); + } + + @Test + public void testGetElements() { + addIntWithNatureOrder(myLL,10); + LinkedList list = new LinkedList(); + list.add(0); + list.add(2); + list.add(7); + int[] result = myLL.getElements(list); + for (int i = 0; i < result.length; i++) { + int expected = list.get(i); + int actual = result[i]; + assertEquals(expected,actual); + } + + } + + + +} From 1edf6fc95ce11a102871dbb5ca887a299411557d Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 7 Mar 2017 22:38:48 +0800 Subject: [PATCH 163/646] Add second LinkedList code --- .../coding2017/basic/LinkedListTest.java | 249 ++++++++++++- .../coding2017/basic/MyLinkedList.java | 330 +++++++++++++++++- 2 files changed, 563 insertions(+), 16 deletions(-) diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java b/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java index 7c754e37af..7c77e97f97 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java @@ -3,6 +3,8 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; + + import com.github.HarryHook.coding2017.basic.MyLinkedList; public class LinkedListTest extends ListTest{ @@ -14,7 +16,7 @@ public void setUpLinkedList() { aList = new MyLinkedList(); aLinkedList = new MyLinkedList(); } - + @Test public void testAddFirst() { aLinkedList.addFirst(5); @@ -84,10 +86,253 @@ public void testLinkedListFunctional() { aLinkedList.removeLast(); // [5, 4, 1] assertEquals(1, aLinkedList.get(aLinkedList.size()-1)); aLinkedList.removeFirst(); // [4,1] - + assertEquals(4, aLinkedList.get(0)); assertEquals(1, aLinkedList.get(1)); assertEquals(2, aLinkedList.size()); } + @Test + public void testReverse() { + // 娴嬭瘯褰揳LinkedList涓虹┖鏃剁殑鎯呭喌 + aLinkedList.reverse(); + assertEquals(0, aLinkedList.size()); + + // 娴嬭瘯褰揳LinkedList闀垮害涓1鏃剁殑鎯呭喌 + aLinkedList.add(4); + aLinkedList.reverse(); + assertEquals(1, aLinkedList.size()); + assertEquals(4, aLinkedList.get(0)); + + for (int i=1; i<4; i++) + { + aLinkedList.add(i); // [4,1,2,3] + } + + aLinkedList.reverse(); + assertEquals(4, aLinkedList.size()); + assertEquals(3, aLinkedList.get(0)); + assertEquals(2, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + @Test + public void testRemoveFirstHalf() { + aLinkedList.removeFirstHalf(); + assertEquals(0, aLinkedList.size()); + + aLinkedList.add(2); + aLinkedList.add(5); + aLinkedList.add(7); + aLinkedList.add(8); // [2,5,7,8] + + aLinkedList.removeFirstHalf(); // [7,8] + assertEquals(2, aLinkedList.size()); + assertEquals(7, aLinkedList.get(0)); + assertEquals(8, aLinkedList.get(1)); + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + @Test + public void testRemoveIntInt() { + + for (int i=0; i<4; i++) { + aLinkedList.add(i); // [0,1,2,3] + } + + aLinkedList.remove(0, 2); // [2,3] + assertEquals(2, aLinkedList.get(0)); + assertEquals(3, aLinkedList.get(1)); + assertEquals(2, aLinkedList.size()); + + aLinkedList.remove(1, 0); + aLinkedList.remove(0, 0); + assertEquals(2, aLinkedList.size()); + + aLinkedList.remove(1, 1); // [2] + assertEquals(1, aLinkedList.size()); + assertEquals(2, aLinkedList.get(0)); + + aLinkedList.remove(0, 1); // [] + assertEquals(0, aLinkedList.size()); + + expectedEx.expect(Exception.class); + aLinkedList.remove(1, 3); + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + @Test + public void testGetElements() { + for (int i=0; i<4; i=i*i) { + aLinkedList.add(i); // [0,1,4,9] + } + + MyLinkedList bLinkedList = new MyLinkedList(); + int[] z1 = aLinkedList.getElements(bLinkedList); // [] + assertEquals(new int[0], z1); + + bLinkedList.add(1); + bLinkedList.add(3); // [1, 3] + + z1 = aLinkedList.getElements(bLinkedList); // [1, 9] + assertArrayEquals(new int[] {1,9}, z1); + + bLinkedList.add(1, 2); // bLinkedList = [1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [1, 4, 9] + assertArrayEquals(new int[] {1,4,9}, z1); + + bLinkedList.add(0, 0); // bLinkedList = [0, 1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [0, 1, 4, 9] + assertArrayEquals(new int[] {0,1,4,9}, z1); + + // aLinkedList涓嶅簲璇ュ彉鍖 + assertEquals(4, aLinkedList.size()); + for (int i=0; i<4; i++) { + assertEquals(i*i, aLinkedList.get(i)); // [0,1,4,9] + } + + // Exception + bLinkedList.add(5); // bLinkedList = [0, 1, 2, 3, 5] + expectedEx.expect(Exception.class); + z1 = aLinkedList.getElements(bLinkedList); + } + + @Test + public void TestSubtract() + { + //浼犺繘鐨刲ist涓簄ull,浠涔堥兘涓嶅共 + MyLinkedList list = null; + for (int i=0; i<6; i++) + { + aLinkedList.add(i); //[0,1,2,3,4,5] + } + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + + //浼犺繘鐨刲ist涓虹┖ + list = new MyLinkedList(); + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + + aLinkedList.add(1, 1); //[0,1,1,2,3,4,5] + aLinkedList.add(4, 3); //[0,1, 1, 2, 3, 3, 4, 5] + + // list娣诲姞鍏冪礌[0, 1, 3, 7] + list.add(0); + list.add(1); + list.add(3); + list.add(7); + + aLinkedList.subtract(list); //[ 2, 4, 5] + + assertEquals(2, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + assertEquals(3, aLinkedList.size()); + } + @Test + public void testRemoveDuplicateValues() + { + aLinkedList.add(3); + aLinkedList.add(3); + aLinkedList.add(4); + aLinkedList.add(4); + aLinkedList.add(5); + aLinkedList.add(6); + aLinkedList.add(6); //[3, 3, 4, 4, 5, 6, 6] + + aLinkedList.removeDuplicateValues(); //[3, 4, 5, 6] + + assertEquals(3, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + assertEquals(6, aLinkedList.get(3)); + assertEquals(4, aLinkedList.size()); + + } + @Test + public void testRemoveRange() + { + for (int i=0; i<6; i++) + { + aLinkedList.add(i); // [0, 1, 2, 3, 4, 5] //鑰冭檻閲嶅鍏冪礌 + } + aLinkedList.addFirst(0); // [0, 0, 1, 2, 3, 4, 5] + aLinkedList.add(3, 2); // [0, 0, 1, 2, 2, 3, 4, 5] + + aLinkedList.removeRange(1, 4); // 澶т簬1灏忎簬4 [0, 0, 1, 4, 5] + + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + assertEquals(5, aLinkedList.size()); + + //鑻ュ嚭鐜 min >= max鐨勬儏鍐碉紝浠涔堥兘涓嶅仛 + aLinkedList.removeRange(4, 1); + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + assertEquals(5, aLinkedList.size()); + + //灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 + expectedEx.expect(Exception.class); + aLinkedList.remove(-1, 9); + } + @Test + public void testIntersection() + { + for (int i=0; i<6; i++) + { + aLinkedList.add(i); + } + aLinkedList.add(6); + aLinkedList.add(7); // [0锛 1, 2, 3, 4, 5, 6, 7] + //list涓簄ull + MyLinkedList list = null; + MyLinkedList newList1 = aLinkedList.intersection(list); + assertNull(newList1); + + //list涓虹┖閾捐〃 + list = new MyLinkedList(); + MyLinkedList newList2 = aLinkedList.intersection(list); + assertEquals(0, newList2.size()); + + list.add(0); + list.add(3); + list.add(4); + list.add(6); + list.add(7); // [0, 3, 4, 6, 7] + MyLinkedList newList3 = aLinkedList.intersection(list); + + assertEquals(0, newList3.get(0)); + assertEquals(3, newList3.get(1)); + assertEquals(4, newList3.get(2)); + assertEquals(6, newList3.get(3)); + assertEquals(7, newList3.get(4)); + assertEquals(5, newList3.size()); + } + } diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java index 5aeab57496..93fda43110 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java @@ -49,7 +49,9 @@ public void add(int index , Object o) } //杩斿洖鎸囧畾浣嶇疆鍏冪礌 public Object get(int index) - { + { + if(index >= size) + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); Node x = head; int i = 0; while(i < index && x != null) @@ -176,34 +178,334 @@ public Object next() return next; } } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() + { + if(head == null) + return ; + Node p1, p2, p3; + p1 = head; + p2 = p1.next; + while(p2 != null) + { + p3 = p2.next; + p2.next = p1; + p1 = p2; + p2 = p3; + } + head.next = null; + head = p1; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf() + { + Node p = head; + Node q = null; + int i = size / 2; + int j = 0; + while(j < i) + { + j++; + q = p; + p = p.next; + } + head = p; + q.next = null; + size = size - i; + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length) + { + Node p = head; + Node q = null; + int index = 0; + int j = 0; + + while(index < i) + { + q = p; + p = p.next; + index ++; + } + + while(p != null && j < length) + { + p = p.next; + j++; + } + if(i==0) //浠庡ご寮濮嬬Щ闄ゅ厓绱 + { + if(p == null) //鍏冪礌鍏ㄨ鍒犲厜 + { + head = null; + size = 0; + } + else //浠庡ご鍒爈ength涓厓绱 + { + head = p; + size = size - length; + } + } + else //浠庝腑闂村紑濮嬬Щ闄ゅ厓绱 + { + if(p == null) + { + q.next = null; + size = size - j ; + } + else + { + q.next = p; + size = size - length; + } + } + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(MyLinkedList list) + { + int i = 0 ; + int[] array = new int[list.size()]; + while(i < list.size()) + { + array[i] = (int) this.get((int)list.get(i)); + i++; + } + return array; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(MyLinkedList list) + { + int i = 0; + if(list == null) + return ; + while(i < list.size()) + { + for(int index = 0; index < this.size(); index++) + { + Node p = head; //褰撳墠鑺傜偣 + Node q = null; //鍓嶉┍鑺傜偣 + while(list.get(i) != p.data && p.next != null) + { + q = p; + p = p.next; + } + if(p.data == list.get(i)) //鍒犻櫎鎵惧埌鐨勮妭鐐 + { + if(p == head) + head = head.next; + else + { + q.next = p.next; + } + size--; + } + } + i++; + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() + { + + Node p = head; + Node q = head; //鍓嶉┍ + while(p.next != null) + { + p = p.next; + + while(p.data == q.data) + { + size--; + if(p.next == null) + { + q.next = null; + break; + } + q.next = p.next; + p = p.next; + if(p == null) + break; + } + q = q.next; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max) + { + + Node p = head; //褰撳墠鑺傜偣 + Node q = head; //鍓嶉┍鑺傜偣 + while(p.next != null && ((int)p.data <= min || (int)p.data >= max)) //鏈壘鍒扮户缁亶鍘 + { + q = p; + p = p.next; + } + + while((int)p.data > min && (int)p.data < max) //鍒犻櫎鎵惧埌鐨勮妭鐐 + { + p = p.next; + size--; + + } + if(size == 0) + return ; + + if(q == head) //澶寸粨鐐硅鍒犳帀 + head = p; + else + { + q.next = p; + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public MyLinkedList intersection(MyLinkedList list) + { + if(list == null || this == null) + return null; + Node p1 = list.head; + Node p2 = this.head; + MyLinkedList newList = new MyLinkedList(); + + while(p1 != null && p2 != null) + { + + while(((int) p1.data < (int) p2.data) && p1.next != null) + { + p1 = p1.next; + } + while(((int) p1.data > (int) p2.data) && p2.next != null) + { + p2 = p2.next; + } + if(p1.data == p2.data) + { + newList.add(p1.data); + p1 = p1.next; + p2 = p2.next; + } + + if(p1 == null && p2 == null) //鑻ユ渶鍚庝袱涓厓绱犵浉绛 + break; + } + return newList; + } + + public static void main(String[] args) { MyLinkedList myList = new MyLinkedList(); + myList.add(1); + myList.add(1); myList.add(3); + myList.add(4); myList.add(5); - myList.add(0, 4); - myList.add(2, 7); - myList.addFirst(1); - myList.addLast(6); - + myList.add(5); + myList.add(7); + myList.add(8); + myList.add(8); + myList.add(9); Print(myList); - - System.out.println("褰撳墠鎸囧畾浣嶇疆鍏冪礌锛 " + myList.get(1)); - System.out.println("绉婚櫎鎸囧畾浣嶇疆鍏冪礌锛 " + myList.remove(4)); + MyLinkedList list = new MyLinkedList(); + list.add(0); + list.add(3); + list.add(5); + list.add(6); + list.add(9); + list.add(19); + //Print(list); + //myList.removeDuplicateValues(); + //myList.subtract(list); + //myList.removeRange(1, 10); + MyLinkedList list1 = myList.intersection(list); + System.out.println("鎵撳嵃浜ら泦锛"); + Print(list1); + /* reverse() + myList.reverse(); Print(myList); - + */ + + //System.out.println("浠庣浜屼釜鍏冪礌寮濮嬶紝绉婚櫎涓変釜鍏冪礌"); + //myList.remove(1, 1); + //Print(myList); + + /* getElements() + MyLinkedList list = new MyLinkedList(); + list.add(1); + list.add(3); + list.add(4); + list.add(0); + int[] array = myList.getElements(list); + for(int i=0; i Date: Tue, 7 Mar 2017 23:05:49 +0800 Subject: [PATCH 164/646] update 2 week work update 2 week work --- .../com/coderising/{action => litestruts}/LoginAction.java | 2 +- group12/446031103/src/com/coderising/litestruts/Struts.java | 2 -- group12/446031103/src/com/coderising/litestruts/struts.xml | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) rename group12/446031103/src/com/coderising/{action => litestruts}/LoginAction.java (96%) diff --git a/group12/446031103/src/com/coderising/action/LoginAction.java b/group12/446031103/src/com/coderising/litestruts/LoginAction.java similarity index 96% rename from group12/446031103/src/com/coderising/action/LoginAction.java rename to group12/446031103/src/com/coderising/litestruts/LoginAction.java index 2a0b6d477b..39af2d5c26 100644 --- a/group12/446031103/src/com/coderising/action/LoginAction.java +++ b/group12/446031103/src/com/coderising/litestruts/LoginAction.java @@ -1,4 +1,4 @@ -package com.coderising.action; +package com.coderising.litestruts; /** * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 diff --git a/group12/446031103/src/com/coderising/litestruts/Struts.java b/group12/446031103/src/com/coderising/litestruts/Struts.java index b0e784d9fa..8f5913d836 100644 --- a/group12/446031103/src/com/coderising/litestruts/Struts.java +++ b/group12/446031103/src/com/coderising/litestruts/Struts.java @@ -16,8 +16,6 @@ import org.dom4j.Element; import org.dom4j.io.SAXReader; -import com.coderising.action.LoginAction; - /** * @ClassName: Struts * @Description: TODO diff --git a/group12/446031103/src/com/coderising/litestruts/struts.xml b/group12/446031103/src/com/coderising/litestruts/struts.xml index 90cf18b7da..07f80b6476 100644 --- a/group12/446031103/src/com/coderising/litestruts/struts.xml +++ b/group12/446031103/src/com/coderising/litestruts/struts.xml @@ -1,10 +1,10 @@ - + /jsp/homepage.jsp /jsp/showLogin.jsp - + /jsp/welcome.jsp /jsp/error.jsp From 14c92a8ea5d35447c1df89af63d34e58d824ebbd Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Tue, 7 Mar 2017 23:38:38 +0800 Subject: [PATCH 165/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 19 +++++++ .../coderising/download/FileDownloader.java | 53 +++++++++++++++++-- .../download/api/ConnectionException.java | 5 ++ .../download/impl/ConnectionImpl.java | 13 +++-- .../download/impl/ConnectionManagerImpl.java | 2 + 5 files changed, 83 insertions(+), 9 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java index d71540b497..e2900e70c1 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -1,5 +1,9 @@ package com.coderising.download; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + import com.coderising.download.api.Connection; public class DownloadThread extends Thread{ @@ -16,5 +20,20 @@ public DownloadThread( Connection conn, int startPos, int endPos){ } public void run(){ + try { + //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶅瓙鐨勫瓧鑺 + byte[] buffer = conn.read(startPos, endPos); + //闅忔満璁块棶鏂囦欢娴 + RandomAccessFile raf = new RandomAccessFile("setup.exe", "rwd"); + //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 + raf.seek(startPos);//瀹氫綅鏂囦欢 + //鍐欐枃浠 + raf.write(buffer); + raf.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java index 2a61b81ad8..c043ba4865 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -1,5 +1,10 @@ package com.coderising.download; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; @@ -13,6 +18,8 @@ public class FileDownloader { ConnectionManager cm; + /*绾跨▼鍚嶇О鍓嶇紑*/ + private final String threadName = "thread"; public FileDownloader(String _url) { this.url = _url; @@ -33,14 +40,35 @@ public void execute(){ // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + + Connection conn = null; try { - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); + conn = cm.open(this.url); + int threadCount = 3; + int length = conn.getContentLength(); + //瀛樻斁涓嬭浇绾跨▼鍚嶇О + List names = new ArrayList(); + int blockSize = length / threadCount; + for (int thread = 1; thread <= threadCount; thread++) { + + int startIndex = (thread - 1) * blockSize; + int endIndex = thread * blockSize - 1; + if (thread == threadCount) {//鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害瑕佺◢寰暱涓鐐 + endIndex = length; + } + System.out.println("绾跨▼锛"+thread+"涓嬭浇:---"+startIndex+"--->"+endIndex); + Thread thr= new DownloadThread(conn,startIndex,endIndex); + //绾跨▼鍚嶇О缁勬垚锛歵hread+缂栧彿 + thr.setName(threadName+thread); + thr.start(); + names.add(threadName+thread); + } + //鍒ゆ柇鎵鏈夌嚎绋嬫槸鍚︿笅杞藉畬鎴 + if(DownloadThreadsIsComplete(names)){ + listener.notifyFinished(); + } } catch (ConnectionException e) { e.printStackTrace(); @@ -53,6 +81,21 @@ public void execute(){ + } + + /** + * 鍒ゆ柇鎵鏈変笅杞界嚎绋嬫槸鍚︽墽琛屽畬 + * @return + */ + private boolean DownloadThreadsIsComplete(List threadNames){ + + Map threadMaps=Thread.getAllStackTraces(); + Iterator it = threadMaps.keySet().iterator(); + while(it.hasNext()){ + Thread thread = it.next(); + return !threadNames.contains(thread.getName()); + } + return true; } public void setListener(DownloadListener listener) { diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java index 8dbfe95dda..1afde319e7 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java @@ -2,4 +2,9 @@ public class ConnectionException extends Exception { + /** + * + */ + private static final long serialVersionUID = 4776347926322882920L; + } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java index 189d9389bc..9704b97757 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,6 +1,7 @@ package com.coderising.download.impl; import java.io.IOException; +import java.io.InputStream; import java.net.HttpURLConnection; import com.coderising.download.api.Connection; @@ -11,8 +12,12 @@ public class ConnectionImpl implements Connection{ @Override public byte[] read(int startPos, int endPos) throws IOException { - - return null; + //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 + urlCon.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); + InputStream is = urlCon.getInputStream(); + byte[] buffer = new byte[endPos-startPos]; + is.read(buffer); + return buffer; } @Override @@ -21,8 +26,8 @@ public int getContentLength() { } @Override - public void close() { - + public void close() { + urlCon.disconnect(); } public void setUrlCon(HttpURLConnection urlCon) { diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java index 55c953b85d..e30706e499 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -20,6 +20,8 @@ public Connection open(String url) throws ConnectionException { try { remotUrl = new URL(url); urlCon = (HttpURLConnection)remotUrl.openConnection(); + urlCon.setRequestMethod("GET"); + urlCon.connect(); conn.setUrlCon(urlCon); } catch (MalformedURLException e) { e.printStackTrace(); From 4107c274e39e7c6ef379493bd90eeddb5369211f Mon Sep 17 00:00:00 2001 From: Haochen Date: Wed, 8 Mar 2017 00:16:46 +0800 Subject: [PATCH 166/646] refactor multi-thread downloading --- .../code/src/download/DownloadThread.java | 74 +++++---- .../code/src/download/FileDownloader.java | 152 +++++++++--------- .../code/src/download/FileDownloaderTest.java | 10 +- .../src/download/impl/ConnectionImpl.java | 17 +- 4 files changed, 144 insertions(+), 109 deletions(-) diff --git a/group01/895457260/code/src/download/DownloadThread.java b/group01/895457260/code/src/download/DownloadThread.java index 2ec27810d7..3f132c3518 100644 --- a/group01/895457260/code/src/download/DownloadThread.java +++ b/group01/895457260/code/src/download/DownloadThread.java @@ -1,6 +1,7 @@ package download; import download.api.Connection; +import download.api.DownloadException; import java.io.File; import java.io.FileNotFoundException; @@ -12,55 +13,42 @@ public class DownloadThread extends Thread { int startPos; int endPos; - File targetFile; + File tempFile; OnCompleteListener onComplete; OnFailListener onFail; - public DownloadThread(Connection conn, int startPos, int endPos, File targetFile, + + public DownloadThread(Connection conn, int startPos, int endPos, File tempFile, OnCompleteListener onComplete, OnFailListener onFail) { this.conn = conn; this.startPos = startPos; this.endPos = endPos; - this.targetFile = targetFile; + this.tempFile = tempFile; this.onComplete = onComplete; this.onFail = onFail; } @Override public void run() { - boolean success = false; int maxFailCount = 5; int failCount = 0; + boolean success = false; while (!success) { - FileOutputStream fos = null; try { - fos = new FileOutputStream(targetFile); - tryDownload(fos); - success = true; - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { + success = tryDownload(); + } catch (DownloadException e) { if (failCount < maxFailCount) { failCount++; - try { - recreateFile(fos, targetFile); - } catch (IOException e1) { - e1.printStackTrace(); - } + retry(); } else { break; } - } finally { - if (fos != null) { - try { - fos.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } } } + callback(success); + } + private void callback(boolean success) { if (onComplete != null) { if (success) { onComplete.onComplete(); @@ -70,15 +58,42 @@ public void run() { } } - private void recreateFile(FileOutputStream old, File file) throws IOException { - if (old != null) { - old.close(); - } + private boolean tryDownload() throws DownloadException { + FileOutputStream fos = null; + try { + fos = new FileOutputStream(tempFile); + download(fos); + return true; + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + throw new DownloadException(); + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return false; + } + + private void retry() { + try { + recreateFile(tempFile); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + + private void recreateFile(File file) throws IOException { file.delete(); file.createNewFile(); } - private void tryDownload(FileOutputStream fos) throws IOException { + private void download(FileOutputStream fos) throws IOException { int bufSize = 1024; int from = startPos; while (from < endPos) { @@ -93,6 +108,7 @@ private void tryDownload(FileOutputStream fos) throws IOException { public interface OnCompleteListener { void onComplete(); } + public interface OnFailListener { void onFail(); } diff --git a/group01/895457260/code/src/download/FileDownloader.java b/group01/895457260/code/src/download/FileDownloader.java index 38a1b6940b..d9b1c4f0f7 100644 --- a/group01/895457260/code/src/download/FileDownloader.java +++ b/group01/895457260/code/src/download/FileDownloader.java @@ -3,9 +3,6 @@ import download.api.*; import java.io.*; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; import java.util.Date; @@ -14,6 +11,8 @@ public class FileDownloader { DownloadListener listener; ConnectionManager manager; + private final int[] completedThreadCount = new int[1]; + public FileDownloader(String url) { this.url = url; } @@ -32,65 +31,29 @@ public void execute() { // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - if (!Config.targetDirectory.exists()) { - Config.targetDirectory.mkdir(); - } - if (!Config.tempDirectory.exists()) { - Config.tempDirectory.mkdir(); - } - - int threadCount = 4; - File[] tempFiles = new File[threadCount]; - Connection[] connections = new Connection[threadCount]; - boolean[] threadComplete = new boolean[threadCount]; - for (int i = 0; i < threadCount; ++i) { - File targetFile = new File(Config.tempDirectory, - new Date().getTime() + "_" + i); - tempFiles[i] = targetFile; + new Thread(() -> { + initDirectories(); - Connection conn = null; - try { - conn = manager.open(this.url); - } catch (ConnectionException e) { - e.printStackTrace(); - } + int threadCount = 4; + File[] tempFiles = new File[threadCount]; + Connection[] connections = new Connection[threadCount]; + createMultiThread(threadCount, tempFiles, connections); - if (conn != null) { - connections[i] = conn; - int length = conn.getContentLength(); - int startPos = (int) (1.0 * length / threadCount * i); - int endPos = i == threadCount - 1 ? length : (int) (1.0 * length / threadCount * (i + 1)); - System.out.println(i + " start: " + startPos + " end: " + endPos); - final int index = i; - new DownloadThread(conn, startPos, endPos, targetFile, - () -> threadComplete[index] = true, () -> { - try { - downloadError(connections); - } catch (DownloadException e) { - e.printStackTrace(); - } - }).start(); - } - } + waitForComplete(threadCount); + mergeTempFiles(tempFiles); - // 绛夊緟涓嬭浇瀹屾垚 - while (true) { - boolean complete = true; - for (boolean b : threadComplete) { - complete = complete && b; - } - if (complete) { - break; - } else { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); + for (Connection c : connections) { + if (c != null) { + c.close(); } } - } + if (listener != null) { + listener.notifyFinished(); + } + }).start(); + } - // 鍚堝苟涓存椂鏂囦欢 + private void mergeTempFiles(File[] tempFiles) { String[] split = url.replaceAll("/+", "/").split("/"); File saveFile = new File(Config.targetDirectory, split[split.length - 1]); FileOutputStream fos = null; @@ -98,7 +61,7 @@ public void execute() { fos = new FileOutputStream(saveFile); for (File tempFile : tempFiles) { write(tempFile, fos); - tempFile.delete(); + tempFile.delete(); // 鍙垹闄や复鏃舵枃浠讹紝涓嶅垹闄や复鏃剁洰褰 } } catch (FileNotFoundException e) { e.printStackTrace(); @@ -110,20 +73,71 @@ public void execute() { e.printStackTrace(); } } - for (Connection c : connections) { - if (c != null) { - c.close(); + } + } + + private void waitForComplete(int threadCount) { + while (completedThreadCount[0] < threadCount) { + synchronized (completedThreadCount) { + if (completedThreadCount[0] < threadCount) { + try { + completedThreadCount.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } } } } + } + + private void createMultiThread(int threadCount, File[] tempFiles, Connection[] connections) { + for (int i = 0; i < threadCount; ++i) { + File targetFile = new File(Config.tempDirectory, + new Date().getTime() + "_" + i); + tempFiles[i] = targetFile; - if (listener != null) { - listener.notifyFinished(); + Connection connection = connect(); + if (connection != null) { + connections[i] = connection; + int length = connection.getContentLength(); + int startPos = (int) (1.0 * length / threadCount * i); + int endPos = i == threadCount - 1 ? length : (int) (1.0 * length / threadCount * (i + 1)); + new DownloadThread(connection, startPos, endPos, targetFile, () -> { + synchronized (completedThreadCount) { + completedThreadCount[0]++; + completedThreadCount.notifyAll(); + } + }, () -> { + try { + downloadFailed(connections); + } catch (DownloadException e) { + e.printStackTrace(); + } + }).start(); + } } } + private Connection connect() { + Connection conn = null; + try { + conn = manager.open(this.url); + } catch (ConnectionException e) { + e.printStackTrace(); + } + return conn; + } - private void downloadError(Connection[] connections) throws DownloadException { + private void initDirectories() { + if (!Config.targetDirectory.exists()) { + Config.targetDirectory.mkdir(); + } + if (!Config.tempDirectory.exists()) { + Config.tempDirectory.mkdir(); + } + } + + private void downloadFailed(Connection[] connections) throws DownloadException { for (Connection c : connections) { c.close(); } @@ -165,16 +179,4 @@ public void setConnectionManager(ConnectionManager manager){ public DownloadListener getListener(){ return this.listener; } - - public static void main(String[] args) { - try { - URL url = new URL("file:///E:/Video/download/88993.mp4"); - System.out.println(url.getProtocol() + " " + url.getHost() + " " + url.getPort() - + " " + url.getPath() + " " + url.getFile()); - URLConnection c = url.openConnection(); - System.out.println(c.getContentLength()); - } catch (IOException e) { - e.printStackTrace(); - } - } } diff --git a/group01/895457260/code/src/download/FileDownloaderTest.java b/group01/895457260/code/src/download/FileDownloaderTest.java index f8a715ac2a..0615c47702 100644 --- a/group01/895457260/code/src/download/FileDownloaderTest.java +++ b/group01/895457260/code/src/download/FileDownloaderTest.java @@ -2,6 +2,7 @@ import download.FileDownloader; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -9,6 +10,11 @@ import download.api.DownloadListener; import download.impl.ConnectionManagerImpl; +import java.io.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + public class FileDownloaderTest { boolean downloadFinished = false; @Before @@ -23,7 +29,8 @@ public void tearDown() throws Exception { public void testDownload() { // String url = "http://localhost:8080/test.jpg"; - String url = "file:///E:/Video/download/88993.mp4"; +// String url = "file:///E:/Video/download/88993.mp4"; + String url = "file:///E:/Pictures/Clannad/Clannad楂樻竻鍥剧墖/38.jpg"; FileDownloader downloader = new FileDownloader(url); @@ -57,5 +64,4 @@ public void notifyFinished() { } - } diff --git a/group01/895457260/code/src/download/impl/ConnectionImpl.java b/group01/895457260/code/src/download/impl/ConnectionImpl.java index 78ca55198a..74f3d169d7 100644 --- a/group01/895457260/code/src/download/impl/ConnectionImpl.java +++ b/group01/895457260/code/src/download/impl/ConnectionImpl.java @@ -12,10 +12,14 @@ public class ConnectionImpl implements Connection { private InputStream inputStream; ConnectionImpl(String url) throws ConnectionException { + init(url); + } + + private void init(String url) { try { connection = new URL(url).openConnection(); inputStream = connection.getInputStream(); - inputStream.mark(connection.getContentLength()); + inputStream.mark(connection.getContentLength()); // 鏍囪鍦ㄥ紑澶 } catch (IOException e) { e.printStackTrace(); } @@ -23,8 +27,8 @@ public class ConnectionImpl implements Connection { @Override public byte[] read(int startPos, int endPos) throws IOException { - inputStream.reset(); - inputStream.skip(startPos); + inputStream.reset(); // reset鍥炲埌鏍囪澶 + skipBytes(startPos); byte[] bytes = new byte[endPos - startPos]; int n = inputStream.read(bytes); return n == -1 ? new byte[0] : bytes; @@ -45,4 +49,11 @@ public void close() { } } } + + // InputStream.skip(long)瀹為檯璺宠繃鐨勫瓧鑺傛暟缁忓父灏忎簬鍙傛暟鍊硷紝浣嗕笉浼氬ぇ浜庡弬鏁板 + private void skipBytes(long n) throws IOException { + while (n > 0) { + n -= inputStream.skip(n); + } + } } From 69123e0b62077df13f26b0d8c7dc1cf3a0417522 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Wed, 8 Mar 2017 07:34:35 +0800 Subject: [PATCH 167/646] Ex --- .../basic/collection/concrete/LinkedList.java | 160 ++++++++++++++---- .../test/collection/LinkedListTest2.java | 54 ++++++ 2 files changed, 185 insertions(+), 29 deletions(-) diff --git a/group12/382266293/coding/basic/collection/concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java index f42f493363..8b14bedf57 100644 --- a/group12/382266293/coding/basic/collection/concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -2,6 +2,8 @@ import java.util.Arrays; import java.util.NoSuchElementException; +import java.util.Objects; + import static util.TestUtil.*; import static util.Print.*; import collection.AbstractList; @@ -144,43 +146,97 @@ public int[] getElements(LinkedList list){ */ public void subtract(LinkedList list){ - Node start = head; -// Node curr; -// Node next; -// Node x; + Node n1 = list.getNode(0); + Node n2 = head; int count = list.size(); - while (count != 0) { - + int index = 0; + int iR = 0; + while (count != 0 && n1 != null && n2 != null) { + + while(count > 1 && Objects.equals(n1.data, n1.next.data)) { + n1 = n1.next; + count--; + } + while(Objects.equals(n1.data, n2.data) == false) { + index++; + if (index > size() - 1) + return; + n2 = n2.next; + } + iR = index; + + while (n2 != null && Objects.equals(n1.data, n2.data)) { + remove(iR); + count--; + n2 = n2.next; + } + index = iR; + n1 = n1.next; } - - - - } - - - - - public static void main(String args[]) { - LinkedList myLL = new LinkedList(); - addIntWithNatureOrder(myLL,10); - println(myLL); - LinkedList list = new LinkedList(); - list.add(1); - list.add(2); - list.add(5); } + /** * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ public void removeDuplicateValues(){ + Node n1 = head; + //Node next; + int count = size(); + int index = 0; + int iR = 0; + while (count > 1 && n1 != null) { + while(count > 1 && Objects.equals(n1.data, n1.next.data) == false) { + n1 = n1.next; + index++; + count--; + } + iR = index; + //next = n1.next.next; + while(count > 1 && Objects.equals(n1.data, n1.next.data)) { + remove(iR); + //n1 = n1.next; + //n1.next = next; + n1 = n1.next; + count--; + } + index = iR; + } } + + + public void removeDuplicateValues2(){ + Node n1 = head; + int count = size(); + int index = 0; + int iR = 0; + while (count > 1 && n1 != null) { + while(count > 1 && Objects.equals(n1.data, n1.next.data) == false) { + n1 = n1.next; + index++; + count--; + } + iR = index; + + while(count > 1 && Objects.equals(n1.data, n1.next.data)) { + Node next = n1.next.next; + n1.next.data = null; + n1.next = null; + n1 = n1.next; + n1.next = next; + count--; + } + index = iR; + + } + } + /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 @@ -191,19 +247,65 @@ public void removeRange(int min, int max){ } - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; + public static void main(String args[]) { + LinkedList myLL = new LinkedList(); + myLL.add(0); + addIntWithNatureOrder(myLL,10); + myLL.add(10); + myLL.add(12); + myLL.add(13); + myLL.add(24); + println(myLL); + LinkedList list = new LinkedList(); + list.add(0); + list.add(5); + list.add(10); + + LinkedList result = myLL.intersection(list); + println(result); + } + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + + public LinkedList intersection(LinkedList list){ + Node n1 = list.getNode(0); + Node n2 = head; + LinkedList result = new LinkedList(); + int count = list.size(); + int index = 0; + int iR = 0; + while (count != 0 && n1 != null && n2 != null) { + + while(Objects.equals(n1.data, n2.data) == false) { + index++; + if (index > size() - 1) + return result; + n2 = n2.next; + } + iR = index; + + if (n2 != null && Objects.equals(n1.data, n2.data)) { + result.add(n1.data); + count--; + n2 = n2.next; + } + index = iR; + n1 = n1.next; + } + + return result; + + } + @Override public void add(E e) { diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest2.java b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java index b12272ef19..2dfbdb9ea8 100644 --- a/group12/382266293/coding/basic/test/collection/LinkedListTest2.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java @@ -81,6 +81,60 @@ public void testGetElements() { } + @Test + public void testSubstract() { + LinkedList myLL = new LinkedList(); + addIntWithNatureOrder(myLL,10); + myLL.add(10); + myLL.add(10); + myLL.add(12); + LinkedList list = new LinkedList(); + list.add(0); + list.add(0); + addIntWithNatureOrder(list,10); + list.add(10); + list.add(12); + list.add(22); + myLL.subtract(list); + assertEquals(0,myLL.size()); + } + + @Test + public void testIntersection() { + + addIntWithNatureOrder(myLL,10); + myLL.add(10); + myLL.add(12); + myLL.add(13); + myLL.add(24); + LinkedList list = new LinkedList(); + list.add(0); + list.add(5); + list.add(10); + LinkedList result = myLL.intersection(list); + assertEquals(0,(int)result.get(0)); + assertEquals(5,(int)result.get(1)); + assertEquals(10,(int)result.get(2)); + + } + + + @Test + public void testRemoveDuplicateValues() { + + myLL.add(0); + myLL.add(0); + myLL.add(1); + myLL.add(1); + myLL.add(10); + myLL.removeDuplicateValues(); + assertEquals(3,myLL.size()); + assertEquals(0,(int)myLL.get(0)); + assertEquals(1,(int)myLL.get(1)); + assertEquals(10,(int)myLL.get(2)); + } + + } From 618193789ccb9eaafbc97e59ca56aa8e65fc798d Mon Sep 17 00:00:00 2001 From: xiongrui Date: Wed, 8 Mar 2017 08:41:57 +0800 Subject: [PATCH 168/646] Complete Arraylist --- group22/627559964/.classpath | 1 + group22/627559964/.gitignore | 1 + .../src/com/coding/basic/ArrayList.java | 153 +++++++++++++++++- .../627559964/src/com/coding/basic/List.java | 3 + group22/627559964/src/demo/Demo.java | 24 +++ 5 files changed, 175 insertions(+), 7 deletions(-) create mode 100644 group22/627559964/src/demo/Demo.java diff --git a/group22/627559964/.classpath b/group22/627559964/.classpath index fb5011632c..83b76b7922 100644 --- a/group22/627559964/.classpath +++ b/group22/627559964/.classpath @@ -1,6 +1,7 @@ + diff --git a/group22/627559964/.gitignore b/group22/627559964/.gitignore index ae3c172604..3727029200 100644 --- a/group22/627559964/.gitignore +++ b/group22/627559964/.gitignore @@ -1 +1,2 @@ /bin/ +.metadata \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/ArrayList.java b/group22/627559964/src/com/coding/basic/ArrayList.java index 0ba3cb15a8..8a1eded430 100644 --- a/group22/627559964/src/com/coding/basic/ArrayList.java +++ b/group22/627559964/src/com/coding/basic/ArrayList.java @@ -1,33 +1,172 @@ package com.coding.basic; +import java.util.Arrays; + +/** + * 自定义ArrayList + * + * @author xiongrui233 + * + */ public class ArrayList implements List { + //list长度 private int size = 0; - private Object[] elementData = new Object[100]; + //list的元素集合 + private Object[] elementData = new Object[10]; - public void add(Object o) { + /** + * 合并数组 + * + * @param arrays1 + * @param arrays2 + * @return Object[] + */ + private Object[] concat(Object[] arrays1, Object[] arrays2) { + Object[] newArrays = new Object[arrays1.length + arrays2.length]; + System.arraycopy(arrays1, 0, newArrays, 0, arrays1.length); + System.arraycopy(arrays2, 0, newArrays, arrays1.length, arrays2.length); + return newArrays; + } + + /** + * 分割数组 + * + * @param arrays + * @param index + * @return Object[] + */ + private Object[] subArrays(Object[] arrays, int from, int index) { + Object[] tempArrays = new Object[index - from]; + for (int i = from, j = 0; i < index; i++, j++) { + tempArrays[j] = arrays[i]; + } + return tempArrays; + } + + /** + * 动态增长list长度 策略为:newSize = oldSize * 1.5 + * + * @param oldSize + */ + private void grow(int oldSize) { + elementData = Arrays.copyOf(elementData, oldSize + oldSize / 2); + } + /** + * 检查在插入新元素时,list长度是否足够 + * + * @param newSize + */ + private void checkSize(int newSize) { + int oldSize = elementData.length; + if (newSize > oldSize) { + grow(oldSize); + } } + /** + * 新增元素 + * + * @param Object + */ + public void add(Object o) { + checkSize(size + 1); + elementData[size++] = o; + } + + /** + * 新增元素 + * + * @param index, + * @param Object + */ public void add(int index, Object o) { + checkSize(size + 1); + Object[] arrays1 = subArrays(elementData, 0, index); + Object[] arrays2 = subArrays(elementData, index, elementData.length); + arrays1 = Arrays.copyOf(arrays1, arrays1.length + 1); + arrays1[index] = o; + size++; + elementData = concat(arrays1, arrays2); } + /** + * 获得编号为index的元素 + * + * @param int + * @return Object + */ public Object get(int index) { - return null; + return elementData[index]; } + /** + * 删除编号为index的元素 + * + * @param int + * @return Object + */ public Object remove(int index) { - return null; + Object[] arrays1 = subArrays(elementData, 0, index); + Object[] arrays2 = subArrays(elementData, index + 1, elementData.length); + Object obj = elementData[index]; + + size --; + elementData = concat(arrays1, arrays2); + return obj; } - + + /** + * 返回list长度 + * + * @return int + */ public int size() { - return -1; + return size; } + /** + * 重写迭代器 + * + * @return IteratorImpl + */ public Iterator iterator() { - return null; + + class IteratorImpl implements Iterator { + + private int point = 0; + + @Override + public boolean hasNext() { + if (elementData[point] != null) { + return true; + } + return false; + } + + @Override + public Object next() { + return elementData[point++]; + } + + } + return new IteratorImpl(); } + @Override + public String toString() { + StringBuffer list = new StringBuffer(); + list.append("["); + for (int i = 0; i < elementData.length; i++) { + list.append(elementData); + if (i != elementData.length - 1) { + list.append(","); + } + } + list.append("]"); + return list.toString(); + } } \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/List.java b/group22/627559964/src/com/coding/basic/List.java index 8815065b99..d04fcb7df6 100644 --- a/group22/627559964/src/com/coding/basic/List.java +++ b/group22/627559964/src/com/coding/basic/List.java @@ -1,6 +1,7 @@ package com.coding.basic; public interface List { + public void add(Object o); public void add(int index, Object o); @@ -10,4 +11,6 @@ public interface List { public Object remove(int index); public int size(); + + public Iterator iterator(); } \ No newline at end of file diff --git a/group22/627559964/src/demo/Demo.java b/group22/627559964/src/demo/Demo.java new file mode 100644 index 0000000000..de5ec1a19c --- /dev/null +++ b/group22/627559964/src/demo/Demo.java @@ -0,0 +1,24 @@ +package demo; + +import com.coding.basic.ArrayList; +import com.coding.basic.Iterator; +import com.coding.basic.List; + +public class Demo { + public static void main(String[] args) { + + List list = new ArrayList(); + for (int i = 0; i < 12; i++) { + list.add(new Integer(123)); + } + list.add(3, new Integer(233)); + list.add(3, new Double(233.33)); + list.remove(6); + Double kk = (Double) list.get(3); + Iterator it = list.iterator(); + while (it.hasNext()) { + System.out.println(it.next()); + } + System.out.println("End"); + } +} From ce7562ce7fc216a5ea25518fc9fcd74004173ed7 Mon Sep 17 00:00:00 2001 From: cjl1407 <1158477486@qq.com> Date: Wed, 8 Mar 2017 09:58:12 +0800 Subject: [PATCH 169/646] this is text --- group22/1158477486/src/my.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 group22/1158477486/src/my.txt diff --git a/group22/1158477486/src/my.txt b/group22/1158477486/src/my.txt new file mode 100644 index 0000000000..605f61fe72 --- /dev/null +++ b/group22/1158477486/src/my.txt @@ -0,0 +1 @@ +这是我的一个Git \ No newline at end of file From 0cdb2b2e8f08cf7f0fa81772aafdc5575d4e9aee Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 8 Mar 2017 09:59:06 +0800 Subject: [PATCH 170/646] java se --- group22/1158477486/src/myFist.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 group22/1158477486/src/myFist.java diff --git a/group22/1158477486/src/myFist.java b/group22/1158477486/src/myFist.java new file mode 100644 index 0000000000..136079fbac --- /dev/null +++ b/group22/1158477486/src/myFist.java @@ -0,0 +1,6 @@ + +public class myFist { +public static void main(String[] args) { + System.out.println("hello my love"); +} +} From 222e80b065e3b2555ace12ef5806b67e9f860488 Mon Sep 17 00:00:00 2001 From: cjl1407 <1158477486@qq.com> Date: Wed, 8 Mar 2017 12:59:34 +0800 Subject: [PATCH 171/646] this a java demo --- group22/1158477486/src/Test.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 group22/1158477486/src/Test.java diff --git a/group22/1158477486/src/Test.java b/group22/1158477486/src/Test.java new file mode 100644 index 0000000000..f106f0d3df --- /dev/null +++ b/group22/1158477486/src/Test.java @@ -0,0 +1,9 @@ + +public class Test { + + public static void main(String[] args) { + // TODO Auto-generated method stub +System.out.println("测试中------------"); + } + +} From a634ad70a21ca1448c3544db660dedda92ff599f Mon Sep 17 00:00:00 2001 From: Harry Date: Wed, 8 Mar 2017 14:08:39 +0800 Subject: [PATCH 172/646] update second LinkedList code --- .../coding2017/basic/LinkedListTest.java | 13 ++-- .../coding2017/basic/MyLinkedList.java | 69 ++++++++++--------- 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java b/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java index 7c77e97f97..1ab9ea06b2 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/basic/LinkedListTest.java @@ -182,13 +182,13 @@ public void testRemoveIntInt() { */ @Test public void testGetElements() { - for (int i=0; i<4; i=i*i) { - aLinkedList.add(i); // [0,1,4,9] + for (int i=0; i<4; i++) { + aLinkedList.add(i * i); // [0,1,4,9] } MyLinkedList bLinkedList = new MyLinkedList(); int[] z1 = aLinkedList.getElements(bLinkedList); // [] - assertEquals(new int[0], z1); + assertArrayEquals( z1, new int[0]); bLinkedList.add(1); bLinkedList.add(3); // [1, 3] @@ -252,6 +252,9 @@ public void TestSubtract() @Test public void testRemoveDuplicateValues() { + aLinkedList.removeDuplicateValues(); + assertEquals(0, aLinkedList.size()); + aLinkedList.add(3); aLinkedList.add(3); aLinkedList.add(4); @@ -298,8 +301,8 @@ public void testRemoveRange() assertEquals(5, aLinkedList.size()); //灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 - expectedEx.expect(Exception.class); - aLinkedList.remove(-1, 9); + aLinkedList.removeRange(-1, 8); + assertEquals(0, aLinkedList.size()); } @Test public void testIntersection() diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java index 93fda43110..fbad1b8f50 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java @@ -208,6 +208,8 @@ public void reverse() */ public void removeFirstHalf() { + if(size == 0) + return ; Node p = head; Node q = null; int i = size / 2; @@ -287,6 +289,8 @@ public void remove(int i, int length) */ public int[] getElements(MyLinkedList list) { + if(list == null) + return new int[0]; int i = 0 ; int[] array = new int[list.size()]; while(i < list.size()) @@ -341,7 +345,8 @@ public void subtract(MyLinkedList list) */ public void removeDuplicateValues() { - + if(head == null) + return ; Node p = head; Node q = head; //鍓嶉┍ while(p.next != null) @@ -374,29 +379,28 @@ public void removeDuplicateValues() public void removeRange(int min, int max) { - Node p = head; //褰撳墠鑺傜偣 - Node q = head; //鍓嶉┍鑺傜偣 - while(p.next != null && ((int)p.data <= min || (int)p.data >= max)) //鏈壘鍒扮户缁亶鍘 - { - q = p; - p = p.next; - } - - while((int)p.data > min && (int)p.data < max) //鍒犻櫎鎵惧埌鐨勮妭鐐 - { - p = p.next; - size--; - - } - if(size == 0) - return ; + Node p = head; //褰撳墠鑺傜偣 + Node q = head; //鍓嶉┍鑺傜偣 + while(p.next != null && ((int)p.data <= min || (int)p.data >= max)) //鏈壘鍒扮户缁亶鍘 + { + q = p; + p = p.next; + } + while((int)p.data > min && (int)p.data < max) //鍒犻櫎鎵惧埌鐨勮妭鐐 + { + p = p.next; + size--; - if(q == head) //澶寸粨鐐硅鍒犳帀 - head = p; - else - { - q.next = p; - } + if(size == 0) //鍒犲畬鎵鏈夊厓绱 + break ; + } + if(q == head) //澶寸粨鐐硅鍒犳帀 + head = p; + else + { + q.next = p; + } + } /** @@ -451,6 +455,7 @@ public static void main(String[] args) myList.add(8); myList.add(9); Print(myList); + /* MyLinkedList list = new MyLinkedList(); list.add(0); list.add(3); @@ -461,7 +466,11 @@ public static void main(String[] args) //Print(list); //myList.removeDuplicateValues(); //myList.subtract(list); - //myList.removeRange(1, 10); + */ + + myList.removeRange(-11, 10); + Print(myList); + /* MyLinkedList list1 = myList.intersection(list); System.out.println("鎵撳嵃浜ら泦锛"); Print(list1); @@ -474,18 +483,16 @@ public static void main(String[] args) //myList.remove(1, 1); //Print(myList); - /* getElements() + // getElements() MyLinkedList list = new MyLinkedList(); - list.add(1); - list.add(3); - list.add(4); - list.add(0); + int[] array = myList.getElements(list); + System.out.println("杈撳嚭锛"+array[0]); for(int i=0; i Date: Wed, 8 Mar 2017 14:32:17 +0800 Subject: [PATCH 173/646] week02 ArrayUtil --- group09/286674878/src/week02/ArrayUtil.java | 195 ++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 group09/286674878/src/week02/ArrayUtil.java diff --git a/group09/286674878/src/week02/ArrayUtil.java b/group09/286674878/src/week02/ArrayUtil.java new file mode 100644 index 0000000000..a3fd5afef8 --- /dev/null +++ b/group09/286674878/src/week02/ArrayUtil.java @@ -0,0 +1,195 @@ +package week02; + +import java.util.ArrayList; + + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int temp=0; + for(int i=1;i<=origin.length/2;i++){ + origin[i]=temp; + origin[i]=origin[origin.length-(i-1)]; + origin[origin.length-(i-1)]=temp; + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int[] re = new int[oldArray.length]; + for(int i=0,j=0;iarray2[j]){ + me[k]=array2[j]; + j++; + }else{ + me[k]=array1[i]; + i++; + } + k++; + } + if(array1.length Date: Wed, 8 Mar 2017 16:16:01 +0800 Subject: [PATCH 174/646] just test --- group27/514302761/src/com/company/Main.java | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 group27/514302761/src/com/company/Main.java diff --git a/group27/514302761/src/com/company/Main.java b/group27/514302761/src/com/company/Main.java new file mode 100644 index 0000000000..c43739a918 --- /dev/null +++ b/group27/514302761/src/com/company/Main.java @@ -0,0 +1,8 @@ +package com.company; + +public class Main { + + public static void main(String[] args) { + System.out.print("this is a test"); + } +} From 1ed4c71f5c05af0c0a9d81edae66fef5bfff7e28 Mon Sep 17 00:00:00 2001 From: Haochen Date: Wed, 8 Mar 2017 16:49:23 +0800 Subject: [PATCH 175/646] delete unused codes --- .../src/datastructure/basic/ArrayList.java | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/group01/895457260/code/src/datastructure/basic/ArrayList.java b/group01/895457260/code/src/datastructure/basic/ArrayList.java index 28eb439c1b..82c6ac6b1c 100644 --- a/group01/895457260/code/src/datastructure/basic/ArrayList.java +++ b/group01/895457260/code/src/datastructure/basic/ArrayList.java @@ -81,56 +81,4 @@ private void checkIndex(int index) { private String indexOutOfBoundMessage(int index) { return "index: " + index + ", size: " + size(); } - - public static void main(String[] args) { - ArrayList list = new ArrayList(); - for (int i = 0; i < 10; ++i) { - list.add(i); - list.add(10 - i); - } - System.out.println("------------------size"); - System.out.println("size: " + list.size()); - - System.out.println("------------------for(int i)"); - for (int i = 0; i < list.size(); ++i) { - System.out.print(list.get(i) + " "); - } - - System.out.println("\n-----------------iterator"); - Iterator iterator = list.iterator(); - while (iterator.hasNext()) { - System.out.print(iterator.next() + " "); - } - - System.out.println("\n-----------------add at index 0 100~104"); - for (int i = 100; i < 105; ++i) { - list.add(0, i); - } - list.print(); - System.out.println("-----------------add at last 200~204"); - for (int i = 200; i < 205; ++i) { - list.add(list.size(), i); - } - list.print(); - - System.out.println("-----------------removeFirst x4"); - for (int i = 0; i < 4; ++i) { - list.remove(0); - } - list.print(); - - System.out.println("\n-----------------removeLast x4"); - for (int i = 0; i < 4; ++i) { - list.remove(list.size() - 1); - } - list.print(); - } - - public void print() { - Iterator iterator = iterator(); - while (iterator.hasNext()) { - System.out.print(iterator.next() + " "); - } - System.out.println("\nsize: " + size()); - } } From eee5017c54c8b4d7010110760321a2f0233c7920 Mon Sep 17 00:00:00 2001 From: xxp17457741 <17457741@qq.com> Date: Wed, 8 Mar 2017 17:13:38 +0800 Subject: [PATCH 176/646] 17457741 --- group22/17457741/src/ArrayList.java | 110 +++++++++++++++++ group22/17457741/src/BinaryTreeNode.java | 53 ++++++++ group22/17457741/src/LinkedList.java | 149 +++++++++++++++++++++++ group22/17457741/src/Queue.java | 29 +++++ group22/17457741/src/Stack.java | 33 +++++ 5 files changed, 374 insertions(+) create mode 100644 group22/17457741/src/ArrayList.java create mode 100644 group22/17457741/src/BinaryTreeNode.java create mode 100644 group22/17457741/src/LinkedList.java create mode 100644 group22/17457741/src/Queue.java create mode 100644 group22/17457741/src/Stack.java diff --git a/group22/17457741/src/ArrayList.java b/group22/17457741/src/ArrayList.java new file mode 100644 index 0000000000..345538755c --- /dev/null +++ b/group22/17457741/src/ArrayList.java @@ -0,0 +1,110 @@ +import java.util.Iterator锛 +import java.util.NoSuchElementException; + +public class ArrayList implements Iterable{ + private static final int CAPACITY = 5; + + private int size; + + private T [] items; + + public ArrayList(){doClear();} + + public void clear(){ + doClear(); + } + + private void doClear(){ + this.size=0;ensureCapacity(CAPACITY); + } + + public int size(){ + return size; + } + + public boolean isEmpty(){ + return size==0; + } + + public void trimToSize(){ + ensureCapacity(size()); + } + + public T get( int a){ + return items[a]; + } + + public T set(int a,T b){ + T old = items[a]; + items[a]=b; + return old; + } + + public void ensureCapacity(int newCapacity){ + if(newCapacitya;i--){ + items[i]=items[i-1]; + } + items[a]=b; + size++; + } + + public T remove(int a){ + T removedItem=items[a]; + for(int i=a;i iterator() { + // TODO Auto-generated method stub + return new ArrayListIterator(); + } + + private class ArrayListIterator implements Iterator{ + + private int current =0; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return current implements Iterable{ + private Nodebegin; + private Nodeend; + private int size; + private int modCount=0; + + public LinkedList(){ + doClear(); + } + public void clear(){ + doClear(); + } + private void doClear(){ + begin=new Node(null,null,null); + end=new Node(null,begin,null); + begin.next=end; + } + + public int size(){ + return size; + } + public boolean isEmpty(){ + return size==0; + } + + public boolean add( T x){ + add(size(),x); + return true; + } + public void add(int a,T x){ + addBefore(getNode(a,0,size()),x); + } + + public T get(int a){ + return getNode(a).data; + } + public T set(int a,T newVal){ + Nodep=getNode(a); + T old=p.data; + p.data=newVal; + return old; + } + + public T remove(int a){ + return remove(getNode(a)); + } + + private void addBefore(Nodep,T x){ + Node newNode=new Node<>(x,p.prev,p); + newNode.prev.next=newNode; + p.prev=newNode; + size++; + modCount--; + } + + private T remove(Nodep){ + p.next.prev=p.prev; + p.prev.next=p.next; + size--; + modCount++; + + return p.data; + } + + private NodegetNode(int a){ + return getNode(a,0,size()-1); + } + + private NodegetNode(int a,int lower,int upper){ + Nodep; + + if(aupper) + throw new IndexOutOfBoundsException(); + if(aa;i--) + p=p.prev; + } + return p; + } + @Override + public Iterator iterator() { + // TODO Auto-generated method stub + return new LinkedListIterator(); + } + private class LinkedListIterator implements Iterator{ + private Node current=begin.next; + private int expectedModCount=modCount; + private boolean toRemove=false; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return current!=end; + } + @Override + public T next() { + // TODO Auto-generated method stub + if(modCount!=expectedModCount) + throw new java.util.ConcurrentModificationException(); + if(!toRemove) + throw new IllegalStateException(); + + T nextItem=current.data; + current=current.next; + toRemove=true; + return nextItem; + } + + public void remove(){ + if(modCount!=expectedModCount) + throw new java.util.ConcurrentModificationException(); + if(!toRemove) + throw new IllegalStateException(); + + LinkedList.this.remove(current.prev); + expectedModCount++; + toRemove=false; + } + } + + private static class Node{ + + public T data; + public Node prev; + public Node next; + + public Node(T d, Node p,Node n) { + // TODO Auto-generated constructor stub + data=d;prev=p;next=n; + } + + } + +} + diff --git a/group22/17457741/src/Queue.java b/group22/17457741/src/Queue.java new file mode 100644 index 0000000000..b98d8e2043 --- /dev/null +++ b/group22/17457741/src/Queue.java @@ -0,0 +1,29 @@ + + +public class Queue { + + private ArrayList list = new ArrayList(); + + public void enQueue(Object o) { + list.add(o); + } + + public Object deQueue() { + final int size = list.size(); + if (0 == size) + return null; + Object o = list.remove(size); + return o; + } + + public boolean isEmpty() { + return list.isEmpty(); + } + + public int size() { + return list.size(); + } + +} + + diff --git a/group22/17457741/src/Stack.java b/group22/17457741/src/Stack.java new file mode 100644 index 0000000000..12f870566f --- /dev/null +++ b/group22/17457741/src/Stack.java @@ -0,0 +1,33 @@ + + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + + elementData.add(o); + } + + public Object peek(){ + return elementData.get(0); + } + + public Object pop(){ + Object a = null; + if(elementData.size() > 0) { + + a = elementData.get(elementData.size() - 1); + elementData.remove(elementData.size() - 1); + } + return a; + } + + public boolean isEmpty(){ + return elementData.size() == 0; + } + + public int size(){ + return elementData.size(); + } + +} From 1cd0c34be6d711ad95386830796611e94d2915ee Mon Sep 17 00:00:00 2001 From: xxp17457741 <17457741@qq.com> Date: Wed, 8 Mar 2017 17:14:54 +0800 Subject: [PATCH 177/646] 17457741 --- group22/17457741/src/ArrayList.java | 2 +- group22/17457741/src/LinkedList.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/group22/17457741/src/ArrayList.java b/group22/17457741/src/ArrayList.java index 345538755c..45b583d13c 100644 --- a/group22/17457741/src/ArrayList.java +++ b/group22/17457741/src/ArrayList.java @@ -1,4 +1,4 @@ -import java.util.Iterator锛 +import java.util.Iterator; import java.util.NoSuchElementException; public class ArrayList implements Iterable{ diff --git a/group22/17457741/src/LinkedList.java b/group22/17457741/src/LinkedList.java index d7c4fe3415..c098978572 100644 --- a/group22/17457741/src/LinkedList.java +++ b/group22/17457741/src/LinkedList.java @@ -1,7 +1,6 @@ import java.util.Iterator; -import LinkedList.LinkedListIterator; -import LinkedList.Node; + From 009358e1f49f5057ea678ebb9774c0bc00cfd873 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 8 Mar 2017 17:15:07 +0800 Subject: [PATCH 178/646] =?UTF-8?q?list=20=E9=9B=86=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group22/1158477486/src/TestCollection/List.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 group22/1158477486/src/TestCollection/List.java diff --git a/group22/1158477486/src/TestCollection/List.java b/group22/1158477486/src/TestCollection/List.java new file mode 100644 index 0000000000..1b14c3ebe6 --- /dev/null +++ b/group22/1158477486/src/TestCollection/List.java @@ -0,0 +1,9 @@ +package TestCollection; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} From b43a17d1c6b5818be0ee16b5384ca7229d2ecca4 Mon Sep 17 00:00:00 2001 From: Haochen Date: Wed, 8 Mar 2017 17:21:05 +0800 Subject: [PATCH 179/646] add linkedlist algorithm & test --- .../src/datastructure/basic/LinkedList.java | 27 ++-- .../datastructure/test/LinkedListTest.java | 121 ++++++++++++++++++ 2 files changed, 138 insertions(+), 10 deletions(-) diff --git a/group01/895457260/code/src/datastructure/basic/LinkedList.java b/group01/895457260/code/src/datastructure/basic/LinkedList.java index b59e72c90a..f99ee4dd67 100644 --- a/group01/895457260/code/src/datastructure/basic/LinkedList.java +++ b/group01/895457260/code/src/datastructure/basic/LinkedList.java @@ -189,9 +189,10 @@ public void removeFirstHalf(){ public void remove(int i, int length){ Node preI = findNode(i - 1); Node removeTo = findNode(i + length - 1); - head.next = removeTo.next; + Node removeFrom = preI.next; + preI.next = removeTo.next; removeTo.next = null; - size -= clearLink(preI); + size -= clearLink(removeFrom); } /** * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 @@ -205,20 +206,25 @@ public Object[] getElements(LinkedList list){ Object[] result = new Object[list.size()]; int count = 0; - Node nodeI = head.next; Node nodeJ = list.head.next; - for (int i = 0; i < size() && count < result.length; ++i) { - if (i == (int) nodeJ.data) { - result[count] = nodeI; + for (int i = 0; nodeI != null && nodeJ != null; ++i) { + int compare = i - (int) nodeJ.data; + if (compare == 0) { + result[count] = nodeI.data; count++; nodeI = nodeI.next; nodeJ = nodeJ.next; - } else { + } else if (compare < 0) { nodeI = nodeI.next; + } else { + nodeJ = nodeJ.next; + i--; } } - return result; + Object[] trueResult = new Object[count]; + System.arraycopy(result, 0, trueResult, 0, count); + return trueResult; } /** @@ -295,12 +301,13 @@ public LinkedList intersection(LinkedList list){ } else if (compare > 0) { node = node.next; } else { - temp[count++] = (int) node.data; + temp[count] = (int) node.data; + count++; inThis = inThis.next; node = node.next; } } - for (int i = count; i >= 0; --i) { + for (int i = count - 1; i >= 0; --i) { result.addFirst(temp[i]); } return result; diff --git a/group01/895457260/code/src/datastructure/test/LinkedListTest.java b/group01/895457260/code/src/datastructure/test/LinkedListTest.java index 43e080258c..f4517dd3b9 100644 --- a/group01/895457260/code/src/datastructure/test/LinkedListTest.java +++ b/group01/895457260/code/src/datastructure/test/LinkedListTest.java @@ -85,4 +85,125 @@ public void testRemoveLast() throws Exception { Assert.assertArrayEquals(exceptions, new boolean[]{false, false, false, false, false, true, true}); Assert.assertArrayEquals(toArray(list), new Object[0]); } + + /** + * + * Method: reverse() + * + */ + @Test + public void testReverse() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + list.reverse(); + Assert.assertArrayEquals(toArray(list), new Object[] {5, 4, 3, 2, 1}); + } + + /** + * + * Method: removeFirstHalf() + * + */ + @Test + public void testRemoveFirstHalf() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + list.removeFirstHalf(); + Assert.assertArrayEquals(toArray(list), new Object[] {3, 4, 5}); + } + + /** + * + * Method: remove(int i, int length) + * + */ + @Test + public void testRemoveForILength() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + list.remove(1, 3); + Assert.assertArrayEquals(toArray(list), new Object[] {1, 5}); + } + + /** + * + * Method: getElements(LinkedList list) + * + */ + @Test + public void testGetElements() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + LinkedList indexList = new LinkedList(); + for (int i = 0; i < 3; ++i) { + indexList.add(2 * i); + } + Object[] elements = list.getElements(indexList); + Assert.assertArrayEquals(elements, new Object[] {1, 3, 5}); + } + + /** + * + * Method: subtract(LinkedList list) + * + */ + @Test + public void testSubtract() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + LinkedList removeList = new LinkedList(); + for (int i = 0; i < 3; ++i) { + removeList.add(2 * i); + } + list.subtract(removeList); + Assert.assertArrayEquals(toArray(list), new Object[] {1, 3, 5}); + } + + /** + * + * Method: removeDuplicateValues() + * + */ + @Test + public void testRemoveDuplicateValues() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + list.add(5); + list.add(6); + list.add(8); + list.add(8); + list.add(9); + list.removeDuplicateValues(); + Assert.assertArrayEquals(toArray(list), new Object[] {1, 2, 3, 4, 5, 6, 8, 9}); + } + + /** + * + * Method: removeRange(int min, int max) + * + */ + @Test + public void testRemoveRange() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + list.removeRange(2, 5); + Assert.assertArrayEquals(toArray(list), new Object[] {1, 2, 5}); + } + + /** + * + * Method: intersection(LinkedList list) + * + */ + @Test + public void testIntersection() throws Exception { +//TODO: Test goes here... + LinkedList list = (LinkedList) getList(); + LinkedList list1 = new LinkedList(); + for (int i = 0; i < 4; ++i) { + list1.add(2 * i); + } + LinkedList result = list.intersection(list1); + Assert.assertArrayEquals(toArray(result), new Object[] {2, 4}); + } } From 58d3631218cac356057f3fdd59d7c4d04f032a05 Mon Sep 17 00:00:00 2001 From: Haochen Date: Wed, 8 Mar 2017 17:37:57 +0800 Subject: [PATCH 180/646] add linkedlist algorithm test --- .../src/datastructure/basic/LinkedList.java | 6 ++- .../datastructure/test/LinkedListTest.java | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/group01/895457260/code/src/datastructure/basic/LinkedList.java b/group01/895457260/code/src/datastructure/basic/LinkedList.java index f99ee4dd67..5dfa11fcb4 100644 --- a/group01/895457260/code/src/datastructure/basic/LinkedList.java +++ b/group01/895457260/code/src/datastructure/basic/LinkedList.java @@ -1,7 +1,6 @@ package datastructure.basic; import datastructure.exception.EmptyListException; -import javafx.util.Pair; import java.util.Objects; @@ -186,7 +185,10 @@ public void removeFirstHalf(){ * @param i * @param length */ - public void remove(int i, int length){ + public void remove(int i, int length) { + if (length <= 0) { + return; + } Node preI = findNode(i - 1); Node removeTo = findNode(i + length - 1); Node removeFrom = preI.next; diff --git a/group01/895457260/code/src/datastructure/test/LinkedListTest.java b/group01/895457260/code/src/datastructure/test/LinkedListTest.java index f4517dd3b9..d82cfa6ed5 100644 --- a/group01/895457260/code/src/datastructure/test/LinkedListTest.java +++ b/group01/895457260/code/src/datastructure/test/LinkedListTest.java @@ -206,4 +206,47 @@ public void testIntersection() throws Exception { LinkedList result = list.intersection(list1); Assert.assertArrayEquals(toArray(result), new Object[] {2, 4}); } + + @Test + public void testMultiMethod() throws Exception { + LinkedList list = (LinkedList) getList(); + LinkedList subtractList = new LinkedList(); + for (int i = 0; i < 3; ++i) { + subtractList.add(2 * i); + } + LinkedList intersectionList = new LinkedList(); + for (int i = 0; i < 4; ++i) { + intersectionList.add(2 * i); + } + + list.reverse(); + list.subtract(subtractList); + Assert.assertArrayEquals(toArray(list), new Object[] {5, 4, 3, 2, 1}); + LinkedList intersection = list.intersection(intersectionList); + Assert.assertArrayEquals(toArray(intersection), new Object[] {}); + list.reverse(); + list.add(6); + list.add(6); + list.add(6); + list.add(7); + list.add(7); + list.add(8); + list.add(9); + list.add(9); + list.add(9); + list.add(10); + list.add(11); + list.removeDuplicateValues(); + Assert.assertArrayEquals(toArray(list), new Object[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); + list.remove(0, 0); + list.remove(0, 2); + Assert.assertArrayEquals(toArray(list), new Object[] {3, 4, 5, 6, 7, 8, 9, 10, 11}); + list.removeRange(0, 3); + list.removeRange(11, 13); + list.removeRange(11, 8); + list.removeRange(8, 11); + Assert.assertArrayEquals(toArray(list), new Object[] {3, 4, 5, 6, 7, 8, 11}); + list.removeFirstHalf(); + Assert.assertArrayEquals(toArray(list), new Object[] {6, 7, 8, 11}); + } } From 6e5b52c256c86ffc79dc13502d49deb0c34912ed Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Wed, 8 Mar 2017 18:00:23 +0800 Subject: [PATCH 181/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 15 +++-- .../coderising/download/FileDownloader.java | 64 +++++++----------- .../com/coderising/download/NotifyCaller.java | 65 +++++++++++++++++++ .../coderising/download/api/Connection.java | 6 ++ .../download/api/ConnectionException.java | 3 + .../download/impl/ConnectionImpl.java | 42 ++++++++---- .../download/impl/ConnectionManagerImpl.java | 29 +++++++-- .../download/FileDownloaderTest.java | 12 ++-- 8 files changed, 167 insertions(+), 69 deletions(-) create mode 100644 group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java index e2900e70c1..a9065fac29 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -8,12 +8,17 @@ public class DownloadThread extends Thread{ + /*榛樿涓嬭浇浣嶇疆*/ + String downloadPath = "C:/Users/ZJ/Desktop"; Connection conn; int startPos; int endPos; - public DownloadThread( Connection conn, int startPos, int endPos){ - + public DownloadThread( String downloadPath,Connection conn, int startPos, int endPos){ + + if(downloadPath!=null&&!downloadPath.isEmpty()){ + this.downloadPath = downloadPath; + } this.conn = conn; this.startPos = startPos; this.endPos = endPos; @@ -24,7 +29,7 @@ public void run(){ //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶅瓙鐨勫瓧鑺 byte[] buffer = conn.read(startPos, endPos); //闅忔満璁块棶鏂囦欢娴 - RandomAccessFile raf = new RandomAccessFile("setup.exe", "rwd"); + RandomAccessFile raf = new RandomAccessFile(downloadPath+"/"+conn.getDownloadName(), "rw"); //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 raf.seek(startPos);//瀹氫綅鏂囦欢 //鍐欐枃浠 @@ -34,6 +39,8 @@ public void run(){ e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); - } + }finally{ + conn.close(); + } } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java index c043ba4865..e5d67c77c6 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -1,9 +1,7 @@ package com.coderising.download; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; -import java.util.Map; import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; @@ -14,13 +12,17 @@ public class FileDownloader { String url; + String downloadPath; + DownloadListener listener; ConnectionManager cm; /*绾跨▼鍚嶇О鍓嶇紑*/ - private final String threadName = "thread"; + private static final String THREADNAME = "thread"; + private final int threadNum = 5; + public FileDownloader(String _url) { this.url = _url; @@ -46,64 +48,38 @@ public void execute(){ try { conn = cm.open(this.url); - int threadCount = 3; int length = conn.getContentLength(); //瀛樻斁涓嬭浇绾跨▼鍚嶇О List names = new ArrayList(); - int blockSize = length / threadCount; - for (int thread = 1; thread <= threadCount; thread++) { - + int blockSize = length / threadNum; + for (int thread = 1; thread <= threadNum; thread++) { int startIndex = (thread - 1) * blockSize; - int endIndex = thread * blockSize - 1; - if (thread == threadCount) {//鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害瑕佺◢寰暱涓鐐 + int endIndex = thread * blockSize-1; + if (thread == threadNum) {//鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害 endIndex = length; - } - System.out.println("绾跨▼锛"+thread+"涓嬭浇:---"+startIndex+"--->"+endIndex); - Thread thr= new DownloadThread(conn,startIndex,endIndex); + } + Thread thr= new DownloadThread(downloadPath,cm.open(this.url),startIndex,endIndex); //绾跨▼鍚嶇О缁勬垚锛歵hread+缂栧彿 - thr.setName(threadName+thread); + thr.setName(THREADNAME+thread); + names.add(THREADNAME+thread); thr.start(); - names.add(threadName+thread); } //鍒ゆ柇鎵鏈夌嚎绋嬫槸鍚︿笅杞藉畬鎴 - if(DownloadThreadsIsComplete(names)){ - listener.notifyFinished(); - } - + new NotifyCaller(listener,names).start(); + } catch (ConnectionException e) { e.printStackTrace(); }finally{ if(conn != null){ conn.close(); } - } - - - - + } } - - /** - * 鍒ゆ柇鎵鏈変笅杞界嚎绋嬫槸鍚︽墽琛屽畬 - * @return - */ - private boolean DownloadThreadsIsComplete(List threadNames){ - Map threadMaps=Thread.getAllStackTraces(); - Iterator it = threadMaps.keySet().iterator(); - while(it.hasNext()){ - Thread thread = it.next(); - return !threadNames.contains(thread.getName()); - } - return true; - } - public void setListener(DownloadListener listener) { this.listener = listener; } - - - + public void setConnectionManager(ConnectionManager ucm){ this.cm = ucm; } @@ -111,5 +87,9 @@ public void setConnectionManager(ConnectionManager ucm){ public DownloadListener getListener(){ return this.listener; } - + + public void setDownloadPath(String downloadPath) { + this.downloadPath = downloadPath; + } + } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java new file mode 100644 index 0000000000..1c4d1006a6 --- /dev/null +++ b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java @@ -0,0 +1,65 @@ +package com.coderising.download; + +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import com.coderising.download.api.DownloadListener; + +public class NotifyCaller extends Thread{ + + /*鐩戝惉鍣*/ + private DownloadListener listener; + + /*绾跨▼鍚*/ + private List threadNames; + + public NotifyCaller(DownloadListener listener,List threadNames){ + + this.listener = listener; + this.threadNames = threadNames; + } + + @Override + public void run() { + while(true){ + if(DownloadThreadsIsComplete(threadNames)){ + listener.notifyFinished(); + break; + } + } + } + + /** + * 鏍规嵁鍚嶇О鍒ゆ柇杩欎簺绾跨▼鏄惁鎵ц瀹屾瘯 + * @param threadNames + * @return + */ + private boolean DownloadThreadsIsComplete(List threadNames){ + + Map threadMaps=Thread.getAllStackTraces(); + Iterator it = threadMaps.keySet().iterator(); + while(it.hasNext()){ + Thread thread = it.next(); + if(threadNames.contains(thread.getName())){ + return false; + } + } + return true; + } + + public DownloadListener getListener() { + return listener; + } + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public List getThreadNames() { + return threadNames; + } + + public void setThreadNames(List threadNames) { + this.threadNames = threadNames; + } +} diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java index 249da5d667..0301fe58d6 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java @@ -20,4 +20,10 @@ public interface Connection { * 鍏抽棴杩炴帴 */ public void close(); + + /** + * 鑾峰彇涓嬭浇鏂囦欢鍚嶇О + * @return + */ + public String getDownloadName(); } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java index 1afde319e7..c9bca99995 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/ConnectionException.java @@ -7,4 +7,7 @@ public class ConnectionException extends Exception { */ private static final long serialVersionUID = 4776347926322882920L; + public ConnectionException(){ + super(); + } } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java index 9704b97757..3f0586dae1 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,5 +1,6 @@ package com.coderising.download.impl; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; @@ -8,30 +9,49 @@ public class ConnectionImpl implements Connection{ - private HttpURLConnection urlCon; + /*http杩炴帴*/ + private HttpURLConnection httpConnection; + + /*涓嬭浇鏂囦欢鍚嶇О*/ + private String fileName; @Override public byte[] read(int startPos, int endPos) throws IOException { //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 - urlCon.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); - InputStream is = urlCon.getInputStream(); - byte[] buffer = new byte[endPos-startPos]; - is.read(buffer); - return buffer; + httpConnection.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); + httpConnection.connect(); + InputStream is = httpConnection.getInputStream(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; + int length = -1; + while ((length = is.read(buffer)) != -1) { + baos.write(buffer, 0, length); + } + baos.flush(); + byte[] data = baos.toByteArray(); + return data; } @Override public int getContentLength() { - return urlCon.getContentLength(); + return httpConnection.getContentLength(); } @Override public void close() { - urlCon.disconnect(); + httpConnection.disconnect(); } - public void setUrlCon(HttpURLConnection urlCon) { - this.urlCon = urlCon; + public void setHttpConnection(HttpURLConnection httpConnection) { + this.httpConnection = httpConnection; } - + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + @Override + public String getDownloadName() { + return fileName; + } } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java index e30706e499..df1ea5a686 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -15,14 +15,17 @@ public class ConnectionManagerImpl implements ConnectionManager { public Connection open(String url) throws ConnectionException { URL remotUrl = null; - HttpURLConnection urlCon = null; + HttpURLConnection httpCon = null; ConnectionImpl conn = new ConnectionImpl(); try { remotUrl = new URL(url); - urlCon = (HttpURLConnection)remotUrl.openConnection(); - urlCon.setRequestMethod("GET"); - urlCon.connect(); - conn.setUrlCon(urlCon); + httpCon = (HttpURLConnection)remotUrl.openConnection(); + httpCon.setRequestMethod("GET"); + httpCon.setConnectTimeout(6000); + httpCon.setDoInput(true); + //璁剧疆Connection灞炴 + conn.setHttpConnection(httpCon); + conn.setFileName(getFileName(url)); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { @@ -30,4 +33,20 @@ public Connection open(String url) throws ConnectionException { } return conn; } + + /** + * 鑾峰彇鏂囦欢鍚嶇О + * @param url + * @return + */ + private String getFileName(String url){ + + String fileName = ""; + if(url.contains("&")&&url.contains("=")){ + fileName = url.substring(url.lastIndexOf("=")+1); + }else{ + fileName = url.substring(url.lastIndexOf("/")+1); + } + return fileName; + } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java index 32bab332dd..685e51d808 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java @@ -22,14 +22,15 @@ public void tearDown() throws Exception { @Test public void testDownload() { - String url = "http://localhost:8080/test.jpg"; + //String url = "http://localhost:8080/test.jpg"; + String url = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; + //String url = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1233198091,3919880155&fm=116&gp=0.jpg"; FileDownloader downloader = new FileDownloader(url); - ConnectionManager cm = new ConnectionManagerImpl(); downloader.setConnectionManager(cm); - + downloader.setDownloadPath("C:/Users/ZJ/Desktop"); downloader.setListener(new DownloadListener() { @Override public void notifyFinished() { @@ -37,7 +38,6 @@ public void notifyFinished() { } }); - downloader.execute(); @@ -52,9 +52,7 @@ public void notifyFinished() { } } System.out.println("涓嬭浇瀹屾垚锛"); - - - + } } From 09540a88cc473659b2679e3c06584c67c5ef2c65 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Wed, 8 Mar 2017 21:33:47 +0800 Subject: [PATCH 182/646] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coding2017/basic/LinkedList.java | 211 ++++++++++++++++-- .../coding2017/basic/test/LinkedListTest.java | 155 ++++++++----- group02/812350401/src/utils/ArrayUtils.java | 33 +++ 3 files changed, 334 insertions(+), 65 deletions(-) create mode 100644 group02/812350401/src/utils/ArrayUtils.java diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java index e1c369af1e..0ba1d9861c 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/LinkedList.java @@ -1,5 +1,14 @@ package com.github.miniyk2012.coding2017.basic; +import static org.junit.Assert.assertEquals; +import java.util.Arrays; +import java.util.Objects; + +import org.omg.CORBA.PRIVATE_MEMBER; + +import com.sun.tracing.dtrace.ArgsAttributes; + +import utils.ArrayUtils; public class LinkedList implements List { @@ -106,8 +115,16 @@ private void checkPositionIndex(int index) { * 鎶婅閾捐〃閫嗙疆 * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ - public void reverse(){ - + public void reverse(){ + // 鑷劅鍐欑殑杩樿锛屾病鏈夊浣欎唬鐮 + Node previous = null; + while (head != null) { + Node next = head.next; + head.next = previous; + previous = head; + head = next; + } + head = previous; } /** @@ -116,18 +133,33 @@ public void reverse(){ * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 */ - public void removeFirstHalf(){ - + public void removeFirstHalf(){ + int halfIndex = size() / 2; + head = node(halfIndex); + size = size() - halfIndex; } /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * @param i * @param length + * @throws Exception */ - public void remove(int i, int length){ + public void remove(int i, int length) throws Exception{ + if (length <0 || i <0 || i>=size()) throw new Exception(); + if (length == 0) return; + if (i+length>size()) throw new Exception(); + + Node after = (i+length==size()?null:node(i+length)); + if (i>=1) { + node(i-1).next = after; + } else { + head = after; + } + size -= length; } + /** * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 @@ -135,9 +167,25 @@ public void remove(int i, int length){ * listB = 1->3->4->6 * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list + * @throws Exception */ - public int[] getElements(LinkedList list){ - return null; + public int[] getElements(LinkedList list) throws Exception { + // 涓嶅厑璁哥敤get鏂规硶鍙栧緱褰撳墠閾捐〃鐨勫厓绱狅紝閲嶅垎鍒╃敤褰撳墠閾捐〃鍜宭ist鐨勬湁搴忔 + if (list.size == 0) return new int[0]; + if ((int)list.get(0)<0 || (int)list.get(list.size-1)>=size) { + throw new Exception(); + } + java.util.LinkedList aStandardList = new java.util.LinkedList<>(); + Node current = head; + for (int i=0,j=0; i bValue) { + b++; + } else if (aValue < bValue) { + a++; + } else { + cList.add(a); + a++; + b++; + } + } + return cList; + } + + public static LinkedList copy(LinkedList list) { + LinkedList copy = new LinkedList(); + Iterator it = list.iterator(); + while (it.hasNext()) { + copy.add(it.next()); + } + return copy; + } + + public static void main(String args[]) throws Exception { + LinkedList aLinkedList = new LinkedList(); + for (int i=0; i<4; i=i*i) { + aLinkedList.add(i); // [0,1,4,9] + } + LinkedList bLinkedList = new LinkedList(); + int[] z1 = aLinkedList.getElements(bLinkedList); // [] + System.out.println(Arrays.toString(z1)); } } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java index 83c984b650..199e6a9a12 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/test/LinkedListTest.java @@ -162,9 +162,10 @@ public void testRemoveFirstHalf() { * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * @param i * @param length + * @throws Exception */ @Test - public void testRemoveIntInt() { + public void testRemoveIntInt() throws Exception { for (int i=0; i<4; i++) { aLinkedList.add(i); // [0,1,2,3] @@ -197,16 +198,16 @@ public void testRemoveIntInt() { * listB = 1->3->4->6 * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list + * @throws Exception */ @Test - public void testGetElements() { - for (int i=0; i<4; i=i*i) { - aLinkedList.add(i); // [0,1,4,9] + public void testGetElements() throws Exception { + for (int i=0; i<4; i=i+1) { + aLinkedList.add(i*i); // [0,1,4,9] } - LinkedList bLinkedList = new LinkedList(); int[] z1 = aLinkedList.getElements(bLinkedList); // [] - assertEquals(new int[0], z1); + assertArrayEquals(new int[0], z1); bLinkedList.add(1); bLinkedList.add(3); // [1, 3] @@ -235,7 +236,7 @@ public void testGetElements() { } @Test - public void TestSubtract() + public void TestSubtract() { //浼犺繘鐨刲ist涓簄ull,浠涔堥兘涓嶅共 LinkedList list = null; @@ -255,11 +256,11 @@ public void TestSubtract() aLinkedList.add(4, 3); //[0,1, 1, 2, 3, 3, 4, 5] - // list娣诲姞鍏冪礌[0锛1, 3, 7] + // list娣诲姞鍏冪礌[0锛1, 6, 3] list.add(0); list.add(1); + list.add(6); list.add(3); - list.add(7); aLinkedList.subtract(list); //[ 2, 4, 5] @@ -267,9 +268,32 @@ public void TestSubtract() assertEquals(4, aLinkedList.get(1)); assertEquals(5, aLinkedList.get(2)); assertEquals(3, aLinkedList.size()); + + list = new LinkedList(); + list.add(7); + list.add(4); + list.add(2); + list.add(2); // [7,4,2,2] + + aLinkedList.subtract(list); // [5] + + assertEquals(5, aLinkedList.get(0)); + assertEquals(1, aLinkedList.size()); + + list = new LinkedList(); + list.add(5); + list.add(5); + list.add(5); // [5,5,5] + + aLinkedList.subtract(list); // [] + assertEquals(0, aLinkedList.size()); + + aLinkedList.subtract(list); + assertEquals(0, aLinkedList.size()); } + @Test - public void testRemoveDuplicateValues() + public void testRemoveDuplicateValues() { aLinkedList.add(3); aLinkedList.add(3); @@ -278,35 +302,58 @@ public void testRemoveDuplicateValues() aLinkedList.add(5); aLinkedList.add(6); aLinkedList.add(6); //[3, 3, 4, 4, 5, 6, 6] + assertEquals(7, aLinkedList.size()); aLinkedList.removeDuplicateValues(); //[3, 4, 5, 6] - + assertEquals(3, aLinkedList.get(0)); assertEquals(4, aLinkedList.get(1)); assertEquals(5, aLinkedList.get(2)); assertEquals(6, aLinkedList.get(3)); assertEquals(4, aLinkedList.size()); - + + aLinkedList = new LinkedList(); + aLinkedList.removeDuplicateValues(); + assertEquals(0, aLinkedList.size()); + + aLinkedList = new LinkedList(); + aLinkedList.add(0); + aLinkedList.removeDuplicateValues(); + assertEquals(1, aLinkedList.size()); + assertEquals(0, aLinkedList.get(0)); + + for (int i=1; i<4; i++) { + aLinkedList.add(i); // [0,1,2,3] + } + aLinkedList.removeDuplicateValues(); + assertEquals(4, aLinkedList.size()); + assertEquals(0, aLinkedList.get(0)); + assertEquals(1, aLinkedList.get(1)); + assertEquals(2, aLinkedList.get(2)); + assertEquals(3, aLinkedList.get(3)); + + } + @Test - public void testRemoveRange() + public void testRemoveRange() throws Exception { - for (int i=0; i<6; i++) + for (int i=0; i<6; i++) { aLinkedList.add(i); // [0, 1, 2, 3, 4, 5] //鑰冭檻閲嶅鍏冪礌 } - aLinkedList.addFirst(0); // [0, 0, 1, 2, 3, 4, 5] - aLinkedList.add(3, 2); // [0, 0, 1, 2, 2, 3, 4, 5] - + aLinkedList.addFirst(0); // [0, 0, 1, 2, 3, 4, 5] + aLinkedList.add(3, 2); // [0, 0, 1, 2, 2, 3, 4, 5] + aLinkedList.removeRange(1, 4); // 澶т簬1灏忎簬4 [0, 0, 1, 4, 5] - + assertEquals(0, aLinkedList.get(0)); assertEquals(0, aLinkedList.get(1)); assertEquals(1, aLinkedList.get(2)); assertEquals(4, aLinkedList.get(3)); assertEquals(5, aLinkedList.get(4)); assertEquals(5, aLinkedList.size()); - + //鑻ュ嚭鐜 min >= max鐨勬儏鍐碉紝浠涔堥兘涓嶅仛 aLinkedList.removeRange(4, 1); assertEquals(0, aLinkedList.get(0)); @@ -315,39 +362,43 @@ public void testRemoveRange() assertEquals(4, aLinkedList.get(3)); assertEquals(5, aLinkedList.get(4)); assertEquals(5, aLinkedList.size()); - - //灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 - expectedEx.expect(Exception.class); - aLinkedList.remove(-1, 9); + + // 灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 + aLinkedList.removeRange(-1, 9); + assertEquals(0, aLinkedList.size()); } - @Test - public void testIntersection() - { - for (int i=0; i<6; i++) - { - aLinkedList.add(i); // [0锛 1, 2, 3, 4, 5] - } - //list涓簄ull - LinkedList list = null; - LinkedList newList1 = aLinkedList.intersection(list); - assertNull(newList1); - - //list涓虹┖閾捐〃 - list = new LinkedList(); - LinkedList newList2 = aLinkedList.intersection(list); - assertEquals(0, newList2.size()); - - list.add(2); - list.add(3); - list.add(4); - list.add(6); - list.add(7); // [2, 3, 4, 6, 7] - LinkedList newList3 = aLinkedList.intersection(list); - - assertEquals(2, newList3.get(0)); - assertEquals(3, newList3.get(1)); - assertEquals(4, newList3.get(2)); - assertEquals(3, newList3.size()); - } + + @Test + public void testIntersection() { + for (int i = 0; i < 6; i++) { + aLinkedList.add(i); + } + aLinkedList.add(6); + aLinkedList.add(7); // [0锛 1, 2, 3, 4, 5, 6, 7] + // list涓簄ull + LinkedList list = null; + LinkedList newList1 = aLinkedList.intersection(list); + assertNull(newList1); + + // list涓虹┖閾捐〃 + list = new LinkedList(); + LinkedList newList2 = aLinkedList.intersection(list); + assertEquals(0, newList2.size()); + + list.add(0); + list.add(3); + list.add(4); + list.add(7); + list.add(8); // [0, 3, 4, 7, 8] + LinkedList newList3 = aLinkedList.intersection(list); + + assertEquals(4, newList3.size()); + assertEquals(0, newList3.get(0)); + assertEquals(3, newList3.get(1)); + assertEquals(4, newList3.get(2)); + assertEquals(7, newList3.get(3)); + } + } + diff --git a/group02/812350401/src/utils/ArrayUtils.java b/group02/812350401/src/utils/ArrayUtils.java new file mode 100644 index 0000000000..8b807db160 --- /dev/null +++ b/group02/812350401/src/utils/ArrayUtils.java @@ -0,0 +1,33 @@ +package utils; + +import java.util.ArrayList; +import java.util.List; + +public class ArrayUtils { + /** + * 灏哃ist杞崲涓虹浉鍚岄『搴忓拰闀垮害鐨刬nt[] + * @param list + * @return + */ + public static int[] list2Array(List list) { + int size = list.size(); + int[] newArray = new int[size]; + for (int i=0; i + * @param array + * @return + */ + public static List array2List(int[] array) { + List list = new ArrayList<>(); + for (int e : array) { + list.add(e); + } + return list; + } +} From 9024d31161c152c6b407336dd1307008eb35c10b Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Wed, 8 Mar 2017 21:58:05 +0800 Subject: [PATCH 183/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8A=93=E7=8B=82?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A/=E6=96=87=E7=AB=A0=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "group26/26\347\273\204\347\273\237\350\256\241.md" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "group26/26\347\273\204\347\273\237\350\256\241.md" diff --git "a/group26/26\347\273\204\347\273\237\350\256\241.md" "b/group26/26\347\273\204\347\273\237\350\256\241.md" new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ "b/group26/26\347\273\204\347\273\237\350\256\241.md" @@ -0,0 +1 @@ + From 794c48f219a62f76fbe3823d373ada27c6d412ab Mon Sep 17 00:00:00 2001 From: millionkn Date: Wed, 8 Mar 2017 23:06:11 +0900 Subject: [PATCH 184/646] =?UTF-8?q?=E7=BB=93=E6=9E=84=E7=9A=84=E5=B0=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group13/453070251/lessones02/ArrayUtil.class | Bin 2915 -> 2844 bytes group13/453070251/lessones02/ArrayUtil.java | 8 ++-- group13/453070251/others/Other.java | 39 ----------------- .../453070251/others/Others$PrimeGetter.class | Bin 1313 -> 0 bytes group13/453070251/others/Others.class | Bin 269 -> 0 bytes group13/453070251/others/Others.java | 41 ------------------ group13/453070251/others/PrimeGetter.class | Bin 0 -> 1247 bytes group13/453070251/others/PrimeGetter.java | 39 +++++++++++++++++ 8 files changed, 43 insertions(+), 84 deletions(-) delete mode 100644 group13/453070251/others/Other.java delete mode 100644 group13/453070251/others/Others$PrimeGetter.class delete mode 100644 group13/453070251/others/Others.class delete mode 100644 group13/453070251/others/Others.java create mode 100644 group13/453070251/others/PrimeGetter.class create mode 100644 group13/453070251/others/PrimeGetter.java diff --git a/group13/453070251/lessones02/ArrayUtil.class b/group13/453070251/lessones02/ArrayUtil.class index 342fba3beeadcc1145f4323786da10693e473ecb..37610d4b9712be415818e3e9cc28b95006b622bd 100644 GIT binary patch delta 162 zcmaDXHb;!>)W2Q(7#J8#81go9oo8eV=V6Foh@5<%QQ0?&has9FhKE6pL7s;pmLZOZ zA)Xe;=_$hx2d|Z3nZDH@=Mb7dPqz=IY zkPsdLf#e+s1y?m0F=C#YU(NXK=j9dHB0R?*X6aBEaZ-Pp?%t_z#<|d@BV6EwORj`# zG~z}`8AnWnj9Ve6_zS&ZJ#&vP$(>J=fv+^xAWSLhq3t#@?&=5I??v1jTGMK*p-hJV z*w_z~LU*;QG#FMEOa|U-=;y91wVb`%wplZ*F66WC#%9#AY|mFLI~>m$W9V_f5zD{5 Co;!&E diff --git a/group13/453070251/lessones02/ArrayUtil.java b/group13/453070251/lessones02/ArrayUtil.java index fe2fa5a5a4..1aeb3ceb79 100644 --- a/group13/453070251/lessones02/ArrayUtil.java +++ b/group13/453070251/lessones02/ArrayUtil.java @@ -1,5 +1,5 @@ package lessones02; -import others.Others; +import others.PrimeGetter; import lessones01.LinkedListWithFloat; public class ArrayUtil{ public static void reverseArray(int[] arg_arr){ @@ -72,9 +72,9 @@ private static int[] makeFibonacci(int num,int a,int b,int max){ } public static int[] getPrimes(int max){ int i=0; - for(;Others.PrimeGetter.get(i)=0;i--){arr[i] = Others.PrimeGetter.get(i);} + for(i--;i>=0;i--){arr[i] = PrimeGetter.get(i);} return arr; } private static int[] two_s_TimesEnd = {8,6,2,4}; @@ -84,7 +84,7 @@ public static int[] getPerfectNumbers(int arg_num){ int z = (int)Math.pow(2,i) - 1; int zz = z*two_s_TimesEnd[i&3]; if(zz%10 == 8||zz%10 == 6){ - if(Others.PrimeGetter.isPrime(z)){ + if(PrimeGetter.isPrime(z)){ int zzz = (int)Math.pow(2,i-1)*z; if(zzz0){ arr.add(zzz); diff --git a/group13/453070251/others/Other.java b/group13/453070251/others/Other.java deleted file mode 100644 index 05a2715ea8..0000000000 --- a/group13/453070251/others/Other.java +++ /dev/null @@ -1,39 +0,0 @@ -package others; -import lessones01.LinkedListWithFloat; -public class Others{ - public static class PrimeGetter{ - private static LinkedListWithFloat primes = new LinkedListWithFloat(); - public static int get(int arg_num){ - for(int i = primes.size()-1;ij;P@y6JoOzVq%q_ngK~VCXpno7c z?t1r~!nhlRQ*O90S}fV&uz)e?&U<#a>^lPI{sYgA-?Jau*`n>uXUDwInRoo*JZr>r zuIGk%fmm1fZ2|R4slaM=Z0OurUYv3KTlP$mnb^D&^0;fPdrY8qGPGy!U$>Wb4(&og zKzDg}3eEGJ*O-xlYUp9NG`w@k3Vm zyN0wSx!3)=9WKb;5B$iFtKC=W$G)l1#)nnMHz{CBVYxOkQg8qo_tcx;L(H^r6lh+lVb*w|#Kuj&awxF&EQLcPtI=uny6XF}t-w>!k zmNKJDI`;{r85>ZxVTkXjK<~<0o260SEv9 diff --git a/group13/453070251/others/Others.class b/group13/453070251/others/Others.class deleted file mode 100644 index 69ae67f9c0fa761798cbbd835c8c9e6266ea64c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 269 zcmY+8y>7x#426%wPap|}jtm_tF|-V1VMHuQph~EzRK$J*7QHCkNH-VWiwUViAApCd zaMFd^lCAR{+w%4I`v<@nj{$1v_;~Qq_0c1QA66fD!OpQIL~q8hon@*hxF9qq+GsZ= z)LvfKg!(MsGNHTFhTo5el8Qgt^XL#~-86+tOrM5*qRT^jvFQ9W}2U44YAqyTt=^i2>Kp?a( Hs)6 primes = new LinkedListWithFloat(); - public static int get(int arg_num){ - for(int i = primes.size()-1;iget(i);i++){} - return arg_num == primes.get(i); - } - } -} \ No newline at end of file diff --git a/group13/453070251/others/PrimeGetter.class b/group13/453070251/others/PrimeGetter.class new file mode 100644 index 0000000000000000000000000000000000000000..1a18484ecbb09a79874bbf23cae01124b21df8d1 GIT binary patch literal 1247 zcmah|OHUI~7(I77kIpbH52=sV7YYiB6cq45Ato9O2?z-WqbmnGl)=*CbZUrkNn|B^ zT^VE2jT=`Qa0QUR<+Kj}{YgoU&l! zw8dMiytNrPV?oDR`DvG)4h!dSUIID|T#%j?16>Bv0{WuwEx09tlcRaJR4NwSQg=^! z)GIu6v!h-qxa$RT!}+2U3<#K$UasH-W#1L(`wu)bI`2Go(s`$lOOF%+H|P2TL#&}^ zyn+`D2}IgErUcX*#Vo7Uv!Q#tyfE$hcbw@wJ&~LnFx)=UF(MF~44j#VW6t7E(8*>6 z46igHhp)lz3q&(B`R(e~WU=hexWk^T)eypNxk2FiU2-fN%}Cg2K%yA^Dr(7 zH2yWVjY|^Ji$00#H*nd;6v2(MJFQc z3ar+u47^abL?rfTKamW5KOzLSd7XxyfBl8k{m{^Yxf zQM@?+k`2gE;339`DeO2IWhw0}347Ger*DZopW-N+SxQ;4Lgod;ct#W5t7y`Z{{)48;YI1dQg?Fi(+{@WWCdujR-jGqakffxu%ls7# zwE{J=x0yH-fzwQG primes = new LinkedListWithFloat(); + public static int get(int arg_num){ + for(int i = primes.size()-1;iget(i);i++){} + return arg_num == primes.get(i); + } +} \ No newline at end of file From 3aaaf8c43d1b954c3b687fd253cbc66350c31c07 Mon Sep 17 00:00:00 2001 From: liujk <1252327158@qq.com> Date: Wed, 8 Mar 2017 22:08:10 +0800 Subject: [PATCH 185/646] ArrayList --- .../src/com/coding/ArrayList.java | 55 ++++++++++++++++--- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java index 13e4b94ba3..f49ea9cdd1 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -2,27 +2,68 @@ public class ArrayList implements List { + private final static int INIT_CAPACITY = 100; + + private final static int INCREASE_CAPACITY = 50; + private int size = 0; - private Object[] elementData = new Object[100]; + private int mCurrentCapacity = INIT_CAPACITY; + + private Object[] elementData = new Object[INIT_CAPACITY]; - public void add(Object o){ - + public void add(Object o) { + if (size < mCurrentCapacity) { + elementData[size] = o; + size++; + } else { + Object[] newElementData = new Object[mCurrentCapacity + INCREASE_CAPACITY]; + System.arraycopy(elementData, 0, newElementData, 0, size); + newElementData[size] = o; + elementData = newElementData; + size++; + mCurrentCapacity += INCREASE_CAPACITY; + } } public void add(int index, Object o){ - + if (index > size) { + return; /////////////////////////// + } else { + if (size >= mCurrentCapacity) { + Object[] newElementData = new Object[mCurrentCapacity + INCREASE_CAPACITY]; + System.arraycopy(elementData, 0, newElementData, 0, size); + elementData = newElementData; + mCurrentCapacity += INCREASE_CAPACITY; + } + for (int i = size; i > index; i--) { + elementData[i] = elementData[i-1]; + } + elementData[index] = o; + size++; + } } public Object get(int index){ - return null; + if (index >= size) { + return null; ///////////////////////////////// + } + return elementData[index]; } public Object remove(int index){ - return null; + if (index >= size) { + return null;///////////////////////////////////// + } + Object item = elementData[index]; + for (int i = index; i < size - 1; i++) { + elementData[i] = elementData[i+1]; + } + size--; + return item; } public int size(){ - return -1; + return size; } public Iterator iterator(){ From 1547757fc9054dd141e6c9996a37aea8e7419988 Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Wed, 8 Mar 2017 22:14:09 +0800 Subject: [PATCH 186/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...47\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename group26/group26.md => "group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" (100%) diff --git a/group26/group26.md "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" similarity index 100% rename from group26/group26.md rename to "group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" From 9e2b0325ddab5d5fe2e190d9e5c52bbff13b963a Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Wed, 8 Mar 2017 22:16:19 +0800 Subject: [PATCH 187/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...46\203\205\345\206\265\347\273\237\350\256\241.md" | 11 ++++++++++- "group26/26\347\273\204\347\273\237\350\256\241.md" | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 "group26/26\347\273\204\347\273\237\350\256\241.md" diff --git "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" index 8b13789179..e5bdba2fd0 100644 --- "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" +++ "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" @@ -1 +1,10 @@ - +| | | | | | | | | | | | +| -------- | ---------------- | ----- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 鎶撶媯 | 浣滀笟1 | 浣滀笟2 | 浣滀笟3瀹屾垚60% | | | | | | | | +| | 鏂囩珷1 | | | | | | | | | | +| JEE-閫嗘按鐧惧窛 | 宸插畬鎴 | 瀹屾垚90% | | | | | | | | | +| | 鐧惧害 www.baidu.com | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | \ No newline at end of file diff --git "a/group26/26\347\273\204\347\273\237\350\256\241.md" "b/group26/26\347\273\204\347\273\237\350\256\241.md" deleted file mode 100644 index 8b13789179..0000000000 --- "a/group26/26\347\273\204\347\273\237\350\256\241.md" +++ /dev/null @@ -1 +0,0 @@ - From 1010dd4dad483cb2b7a8d675170a97555fceaa7f Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Wed, 8 Mar 2017 22:29:11 +0800 Subject: [PATCH 188/646] =?UTF-8?q?=E6=8A=93=E7=8B=82=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05\345\206\265\347\273\237\350\256\241.md" | 20 +++++++++---------- group26/zhuakuang2017/Main.java | 5 +++++ 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 group26/zhuakuang2017/Main.java diff --git "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" index e5bdba2fd0..8700b37aaf 100644 --- "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" +++ "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" @@ -1,10 +1,10 @@ -| | | | | | | | | | | | -| -------- | ---------------- | ----- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -| 鎶撶媯 | 浣滀笟1 | 浣滀笟2 | 浣滀笟3瀹屾垚60% | | | | | | | | -| | 鏂囩珷1 | | | | | | | | | | -| JEE-閫嗘按鐧惧窛 | 宸插畬鎴 | 瀹屾垚90% | | | | | | | | | -| | 鐧惧害 www.baidu.com | | | | | | | | | | -| | | | | | | | | | | | -| | | | | | | | | | | | -| | | | | | | | | | | | -| | | | | | | | | | | | \ No newline at end of file +| | | | | | | | | | | | +| -------- | ---------------- | ----- | --------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 鎶撶媯 | 浣滀笟1 | 浣滀笟2 | 浣滀笟3瀹屾垚100% | | | | | | | | +| | 鏂囩珷1 | | | | | | | | | | +| JEE-閫嗘按鐧惧窛 | 宸插畬鎴 | 瀹屾垚90% | | | | | | | | | +| | 鐧惧害 www.baidu.com | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | +| | | | | | | | | | | | \ No newline at end of file diff --git a/group26/zhuakuang2017/Main.java b/group26/zhuakuang2017/Main.java new file mode 100644 index 0000000000..0ef0803b17 --- /dev/null +++ b/group26/zhuakuang2017/Main.java @@ -0,0 +1,5 @@ +package zhuakuang2017; + +public class Main { + +} From 8f979c7037ce87db8b56e7cb9b72b47b2fa41723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=90=A6=E5=B3=B0?= Date: Wed, 8 Mar 2017 22:30:48 +0800 Subject: [PATCH 189/646] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/download/DownloadThread.java" | 55 ++++++++++++++ .../src/download/FileDownloader.java" | 72 +++++++++++++++++++ .../src/download/FileDownloaderTest.java" | 59 +++++++++++++++ .../src/download/api/Connection.java" | 23 ++++++ .../download/api/ConnectionException.java" | 5 ++ .../src/download/api/ConnectionManager.java" | 10 +++ .../src/download/api/DownloadListener.java" | 5 ++ .../src/download/impl/ConnectionImpl.java" | 66 +++++++++++++++++ .../download/impl/ConnectionManagerImpl.java" | 40 +++++++++++ 9 files changed, 335 insertions(+) create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/DownloadThread.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloader.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloaderTest.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/Connection.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionException.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionManager.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/DownloadListener.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionImpl.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionManagerImpl.java" diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/DownloadThread.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/DownloadThread.java" new file mode 100644 index 0000000000..2e9534d2f0 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/DownloadThread.java" @@ -0,0 +1,55 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +import java.io.*; +import java.util.concurrent.locks.Lock; + +public class DownloadThread extends Thread { + + ConnectionManager cm; + int startPos; + int endPos; + RandomAccessFile raf; + String url; + DownloadListener listener; + + public DownloadThread(ConnectionManager cm, int startPos, int endPos, String url, DownloadListener downloadListener) { + this.cm = cm; + this.startPos = startPos; + this.endPos = endPos; + this.url = url; + this.listener = downloadListener; + } + + public void run() { + try { + Connection conn = cm.open(url); + byte[] bytes = conn.read(startPos, endPos); + raf = new RandomAccessFile(new File("/Users/byhieg/Desktop/2.png"), "rwd"); + System.out.println(bytes.length); + raf.seek(startPos); + raf.write(bytes); + if (raf.length() >= (conn.getContentLength() - 2)) { + listener.notifyFinished(); + } + + } catch (IOException | ConnectionException e) { + e.printStackTrace(); + } finally { + if (raf != null) { + try { + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + + } + + } +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloader.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloader.java" new file mode 100644 index 0000000000..a92f21a343 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloader.java" @@ -0,0 +1,72 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + int length = conn.getContentLength(); + int threadNum = 3; + for (int i = 0 ;i < threadNum; i++) { + new DownloadThread(cm, i * length / threadNum, (i + 1) * length / threadNum - 1,url,getListener()).start(); + } + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloaderTest.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloaderTest.java" new file mode 100644 index 0000000000..60f1e7577a --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/FileDownloaderTest.java" @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://wx2.sinaimg.cn/mw600/005vbOHfgy1fdfnf5dom0j30rs15ok2l.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + } + +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/Connection.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/Connection.java" new file mode 100644 index 0000000000..091c5c97ce --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/Connection.java" @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionException.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionException.java" new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionException.java" @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionManager.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionManager.java" new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/ConnectionManager.java" @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/DownloadListener.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/DownloadListener.java" new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/api/DownloadListener.java" @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionImpl.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionImpl.java" new file mode 100644 index 0000000000..8c8ad989a7 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionImpl.java" @@ -0,0 +1,66 @@ +package com.coderising.download.impl; + +import java.io.*; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private InputStream inputStream; + private BufferedInputStream bufferedInputStream; + private int contentLength; + public ConnectionImpl(InputStream isr,int contentLength) { + this.inputStream = isr; + this.contentLength = contentLength; + } + + byte[] bytes = new byte[]{}; + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + bufferedInputStream = new BufferedInputStream(inputStream); + bytes = new byte[1]; + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int pos = endPos; + bufferedInputStream.skip(startPos); + while (pos-- > 0) { + int flag = bufferedInputStream.read(bytes); + if (flag != -1) { + baos.write(bytes); + } + } + //鍗曠嚎绋嬭鍙 +// int flag = 0; +// flag = bufferedInputStream.read(bytes,0,(endPos - startPos)); +// if (flag != -1){ +// return bytes; +// } + return baos.toByteArray(); + } + + @Override + public int getContentLength() { + return contentLength; + } + + @Override + public void close() { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + if (bufferedInputStream != null) { + try { + bufferedInputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + } + +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionManagerImpl.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionManagerImpl.java" new file mode 100644 index 0000000000..7b20ce84f3 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/download/impl/ConnectionManagerImpl.java" @@ -0,0 +1,40 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + +public class ConnectionManagerImpl implements ConnectionManager { + + + InputStream is; + int length ; + HttpURLConnection connection; + String name; + + @Override + public Connection open(String url) throws ConnectionException { + + try { + URL u = new URL(url); + connection = (HttpURLConnection) u.openConnection(); + length = connection.getContentLength(); + name = u.getFile(); + is = u.openStream(); + } catch (MalformedURLException e) { + System.out.println("URL鍦板潃涓嶆纭"); + } catch (IOException e) { + System.out.println("URL鎵撳紑娴佸け璐"); + } + return new ConnectionImpl(is,length); + } + +} From c4b94e171d1f2b3f840282b6ce875318cd81e94a Mon Sep 17 00:00:00 2001 From: xiaozi Date: Wed, 8 Mar 2017 23:08:18 +0800 Subject: [PATCH 190/646] This is a test. --- group24/1054283210/.classpath | 6 ++++++ group24/1054283210/.gitignore | 1 + group24/1054283210/.project | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 group24/1054283210/.classpath create mode 100644 group24/1054283210/.gitignore create mode 100644 group24/1054283210/.project diff --git a/group24/1054283210/.classpath b/group24/1054283210/.classpath new file mode 100644 index 0000000000..d171cd4c12 --- /dev/null +++ b/group24/1054283210/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group24/1054283210/.gitignore b/group24/1054283210/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group24/1054283210/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group24/1054283210/.project b/group24/1054283210/.project new file mode 100644 index 0000000000..b401802bd0 --- /dev/null +++ b/group24/1054283210/.project @@ -0,0 +1,17 @@ + + + 1054283210Learning + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + From 1c8a6800f87bf185ed3c57ba14e3e9d8d85c14a0 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Thu, 9 Mar 2017 00:31:56 +0800 Subject: [PATCH 191/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 14 +++++-- .../coderising/download/FileDownloader.java | 21 ++++------ .../com/coderising/download/NotifyCaller.java | 40 +++++++++---------- .../download/FileDownloaderTest.java | 2 + 4 files changed, 39 insertions(+), 38 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java index a9065fac29..5f8f34a638 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -26,15 +26,16 @@ public DownloadThread( String downloadPath,Connection conn, int startPos, int en public void run(){ try { - //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶅瓙鐨勫瓧鑺 + + //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶇疆鐨勫瓧鑺 byte[] buffer = conn.read(startPos, endPos); //闅忔満璁块棶鏂囦欢娴 RandomAccessFile raf = new RandomAccessFile(downloadPath+"/"+conn.getDownloadName(), "rw"); //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 raf.seek(startPos);//瀹氫綅鏂囦欢 - //鍐欐枃浠 + //鍐欐枃浠 raf.write(buffer); - raf.close(); + raf.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { @@ -43,4 +44,11 @@ public void run(){ conn.close(); } } + + public String getDownloadPath() { + return downloadPath; + } + public void setDownloadPath(String downloadPath) { + this.downloadPath = downloadPath; + } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java index e5d67c77c6..b5fe9afa3f 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -1,8 +1,5 @@ package com.coderising.download; -import java.util.ArrayList; -import java.util.List; - import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; @@ -18,10 +15,8 @@ public class FileDownloader { ConnectionManager cm; - /*绾跨▼鍚嶇О鍓嶇紑*/ - private static final String THREADNAME = "thread"; - - private final int threadNum = 5; + /*绾跨▼鏁扮洰*/ + private final int threadNum = 10; public FileDownloader(String _url) { this.url = _url; @@ -50,7 +45,7 @@ public void execute(){ conn = cm.open(this.url); int length = conn.getContentLength(); //瀛樻斁涓嬭浇绾跨▼鍚嶇О - List names = new ArrayList(); + DownloadThread[] threads = new DownloadThread[threadNum]; int blockSize = length / threadNum; for (int thread = 1; thread <= threadNum; thread++) { int startIndex = (thread - 1) * blockSize; @@ -58,15 +53,13 @@ public void execute(){ if (thread == threadNum) {//鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害 endIndex = length; } - Thread thr= new DownloadThread(downloadPath,cm.open(this.url),startIndex,endIndex); - //绾跨▼鍚嶇О缁勬垚锛歵hread+缂栧彿 - thr.setName(THREADNAME+thread); - names.add(THREADNAME+thread); + DownloadThread thr= new DownloadThread(downloadPath,cm.open(this.url),startIndex,endIndex); + threads[thread-1] = thr; thr.start(); } //鍒ゆ柇鎵鏈夌嚎绋嬫槸鍚︿笅杞藉畬鎴 - new NotifyCaller(listener,names).start(); - + new NotifyCaller(listener,threads).start(); + } catch (ConnectionException e) { e.printStackTrace(); }finally{ diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java index 1c4d1006a6..dbfa170423 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java @@ -1,8 +1,7 @@ package com.coderising.download; -import java.util.Iterator; -import java.util.List; import java.util.Map; +import java.util.Set; import com.coderising.download.api.DownloadListener; @@ -11,22 +10,22 @@ public class NotifyCaller extends Thread{ /*鐩戝惉鍣*/ private DownloadListener listener; - /*绾跨▼鍚*/ - private List threadNames; + /*涓嬭浇绾跨▼*/ + private DownloadThread[] downloadThreads; - public NotifyCaller(DownloadListener listener,List threadNames){ + + public NotifyCaller(DownloadListener listener,DownloadThread[] downloadThreads){ this.listener = listener; - this.threadNames = threadNames; + this.downloadThreads = downloadThreads; } @Override public void run() { - while(true){ - if(DownloadThreadsIsComplete(threadNames)){ + while(true){ + if(DownloadThreadsIsComplete(downloadThreads)){ listener.notifyFinished(); - break; - } + } } } @@ -35,19 +34,18 @@ public void run() { * @param threadNames * @return */ - private boolean DownloadThreadsIsComplete(List threadNames){ + private boolean DownloadThreadsIsComplete(DownloadThread[] downloadThreads){ Map threadMaps=Thread.getAllStackTraces(); - Iterator it = threadMaps.keySet().iterator(); - while(it.hasNext()){ - Thread thread = it.next(); - if(threadNames.contains(thread.getName())){ + Set keySet = threadMaps.keySet(); + for (int i = 0; i < downloadThreads.length; i++) { + if(keySet.contains(downloadThreads[i])){ return false; } } return true; } - + public DownloadListener getListener() { return listener; } @@ -55,11 +53,11 @@ public void setListener(DownloadListener listener) { this.listener = listener; } - public List getThreadNames() { - return threadNames; + public DownloadThread[] getDownloadThreads() { + return downloadThreads; } - public void setThreadNames(List threadNames) { - this.threadNames = threadNames; - } + public void setDownloadThreads(DownloadThread[] downloadThreads) { + this.downloadThreads = downloadThreads; + } } diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java index 685e51d808..737cde42ab 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java @@ -10,7 +10,9 @@ import com.coderising.download.impl.ConnectionManagerImpl; public class FileDownloaderTest { + boolean downloadFinished = false; + @Before public void setUp() throws Exception { } From bfc1e2476e4fee5b46d344b5a0ffc4506b59c2e8 Mon Sep 17 00:00:00 2001 From: ipk Date: Thu, 9 Mar 2017 01:29:01 +0800 Subject: [PATCH 192/646] this is test for git --- group24/121111914/src/com/ipk/code2017/TestGit.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 group24/121111914/src/com/ipk/code2017/TestGit.java diff --git a/group24/121111914/src/com/ipk/code2017/TestGit.java b/group24/121111914/src/com/ipk/code2017/TestGit.java new file mode 100644 index 0000000000..dbfa49c571 --- /dev/null +++ b/group24/121111914/src/com/ipk/code2017/TestGit.java @@ -0,0 +1,10 @@ +package com.ipk.code2017; + +public class TestGit { + + public static void main(String[] args) { + // TODO Auto-generated method stub + System.out.println("hehe"); + } + +} From 391f19c32957f463d2af82e383a963f53932ee02 Mon Sep 17 00:00:00 2001 From: LF Date: Thu, 9 Mar 2017 01:35:01 +0800 Subject: [PATCH 193/646] test for git --- group24/121111914/src/com/ipk/code2017/TestGit1.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 group24/121111914/src/com/ipk/code2017/TestGit1.java diff --git a/group24/121111914/src/com/ipk/code2017/TestGit1.java b/group24/121111914/src/com/ipk/code2017/TestGit1.java new file mode 100644 index 0000000000..2b1a0cd7ca --- /dev/null +++ b/group24/121111914/src/com/ipk/code2017/TestGit1.java @@ -0,0 +1,10 @@ +package com.ipk.code2017; + +public class TestGit1 { + + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + +} From 3d5aad10f4b9997ff17278384ac3dda155aa4a56 Mon Sep 17 00:00:00 2001 From: vallain Date: Thu, 9 Mar 2017 02:50:36 +0800 Subject: [PATCH 194/646] this is a testdf --- group17/365689789/.classpath | 6 ++++++ group17/365689789/.gitignore | 1 + group17/365689789/.project | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 group17/365689789/.classpath create mode 100644 group17/365689789/.gitignore create mode 100644 group17/365689789/.project diff --git a/group17/365689789/.classpath b/group17/365689789/.classpath new file mode 100644 index 0000000000..d171cd4c12 --- /dev/null +++ b/group17/365689789/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group17/365689789/.gitignore b/group17/365689789/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group17/365689789/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group17/365689789/.project b/group17/365689789/.project new file mode 100644 index 0000000000..3e0116edb8 --- /dev/null +++ b/group17/365689789/.project @@ -0,0 +1,17 @@ + + + L365689789 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + From d93dd7e4a2f99359ceb2345ab7de491f3cf5fc6c Mon Sep 17 00:00:00 2001 From: vallain Date: Thu, 9 Mar 2017 02:58:20 +0800 Subject: [PATCH 195/646] this is test --- group17/333333/.classpath | 6 ++++++ group17/333333/.gitignore | 1 + group17/333333/.project | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 group17/333333/.classpath create mode 100644 group17/333333/.gitignore create mode 100644 group17/333333/.project diff --git a/group17/333333/.classpath b/group17/333333/.classpath new file mode 100644 index 0000000000..d171cd4c12 --- /dev/null +++ b/group17/333333/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group17/333333/.gitignore b/group17/333333/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group17/333333/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group17/333333/.project b/group17/333333/.project new file mode 100644 index 0000000000..4b0233c4cc --- /dev/null +++ b/group17/333333/.project @@ -0,0 +1,17 @@ + + + 333 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + From 33bdccbfc0ce220e4b9118fa64a953ce0679fcf3 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Thu, 9 Mar 2017 07:34:36 +0800 Subject: [PATCH 196/646] download ex --- group12/382266293/.gitignore | 1 + .../coderising/download/DownloadThread.java | 50 ++++- .../coderising/download/FileDownloader.java | 171 +++++++++++++----- .../download/FileDownloaderTest.java | 8 +- .../coderising/download/api/Connection.java | 4 + .../download/api/ConnectionException.java | 4 + .../download/impl/ConnectionImpl.java | 57 ++++-- .../download/impl/ConnectionManagerImpl.java | 7 +- .../download/impl/DownloadThreadListener.java | 23 +++ 9 files changed, 260 insertions(+), 65 deletions(-) create mode 100644 group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java diff --git a/group12/382266293/.gitignore b/group12/382266293/.gitignore index ae3c172604..88284eee9a 100644 --- a/group12/382266293/.gitignore +++ b/group12/382266293/.gitignore @@ -1 +1,2 @@ /bin/ +/*.lyj diff --git a/group12/382266293/src/com/coderising/download/DownloadThread.java b/group12/382266293/src/com/coderising/download/DownloadThread.java index 1456314140..0e5568ad5b 100644 --- a/group12/382266293/src/com/coderising/download/DownloadThread.java +++ b/group12/382266293/src/com/coderising/download/DownloadThread.java @@ -1,12 +1,30 @@ package com.coderising.download; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.RandomAccessFile; + import com.coderising.download.api.Connection; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.DownloadThreadListener; public class DownloadThread extends Thread{ Connection conn; int startPos; int endPos; + private String dest; + private FileDownloader fileDownloader; + + public void setFileDownloader(FileDownloader fileDownloader) { + this.fileDownloader = fileDownloader; + } + + public void notifyFinished() { + fileDownloader.setFinished(); + } public DownloadThread( Connection conn, int startPos, int endPos){ @@ -14,7 +32,37 @@ public DownloadThread( Connection conn, int startPos, int endPos){ this.startPos = startPos; this.endPos = endPos; } - public void run(){ + public void run(){ + System.out.println(this.getName()+" is running"); + RandomAccessFile raf = null; + try { + byte[] buffer = conn.read(startPos, endPos); + System.out.println("buffer length: " + buffer.length); + raf = new RandomAccessFile(new File(dest), "rws"); + raf.seek(startPos); + raf.write(buffer); + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + conn.close(); + System.out.println(this.getName()+" finished"); + notifyFinished(); + try { + if (raf != null) + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + public void setDest(String dest) { + this.dest = dest; + } + public void close() { + this.conn.close(); } + + } diff --git a/group12/382266293/src/com/coderising/download/FileDownloader.java b/group12/382266293/src/com/coderising/download/FileDownloader.java index f8702be4b2..ff90959a07 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloader.java +++ b/group12/382266293/src/com/coderising/download/FileDownloader.java @@ -1,5 +1,6 @@ package com.coderising.download; +import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -7,78 +8,126 @@ import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; - +import com.coderising.download.impl.DownloadThreadListener; public class FileDownloader { - + String url; - + DownloadListener listener; - + ConnectionManager cm; - - private static final int MIN_CONNECTIONS = 3; - private static final int MAX_CONNECTIONS = 10; - + + public String downloadLocation = "C:\\"; + + private final static String EXT = "lyj"; + private static int buffer_size = 1024; + + private int finishedCount; + public void setFinished() { + finishedCount++; + } + + private static final int MIN_CONNECTIONS = 2; + private static final int MAX_CONNECTIONS = 4; public FileDownloader(String _url) { this.url = _url; - + this.finishedCount = 0; } - - public void execute(){ + public void execute() { // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 Connection conn = null; + DownloadThread[] threadPool = null; try { - conn = cm.open(this.url); int length = conn.getContentLength(); - String dest = ""; - createTempFile(dest,length); + if (length <= 0) { + try { + throw new ConnectionException("file does not exist"); + } catch (ConnectionException e) { + e.printStackTrace(); + return; + } finally { + conn.close(); + } + } + System.out.println("length:"+length); + String fileName = conn.getFileName(); + String tempName = createTempName(downloadLocation+fileName); + createTempFile(tempName, length); int connNum = calculateConnects(length); - DownloadThread[] threadPool = new DownloadThread[connNum]; + System.out.println(connNum + " Threads will be created."); + threadPool = new DownloadThread[connNum]; + System.out.println(connNum); + int batch_size = length / connNum; int beginPos = 0; - int endPos = -1; - int bath_size = length/connNum; - for (int i = 0; i < connNum; i++) { + int endPos = batch_size; + threadPool[0] = new DownloadThread(conn, beginPos, endPos); + threadPool[0].setDest(tempName); + threadPool[0].setFileDownloader(this); + threadPool[0].start(); + for (int i = 1; i < connNum; i++) { beginPos = endPos + 1; - endPos = beginPos + bath_size; + endPos = beginPos + batch_size; if (i == connNum - 1) { endPos = length - 1; } - DownloadThread dt = new DownloadThread(conn,beginPos,endPos); + Connection con = cm.open(this.url); + DownloadThread dt = new DownloadThread(con, beginPos, endPos); + dt.setDest(tempName); + dt.setFileDownloader(this); threadPool[i] = dt; dt.start(); } - - } catch (ConnectionException e) { + checkFinish(threadPool.length); + listener.notifyFinished(); + changeName(tempName, fileName); + } catch (ConnectionException e) { e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); + } finally { + if (threadPool != null) { + for (int i = 0; i < threadPool.length; i++) { + if (threadPool[i] != null) + threadPool[i].close(); + } } } - - - - + + } + private void checkFinish(int links) { + + while(finishedCount != links) { + try { + System.out.println( "Unfinshed threads number: " + (links - finishedCount)); + Thread.sleep(5000); + + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } - - + + private static String createTempName(String fileName) { + return fileName.substring(0, fileName.lastIndexOf('.') + 1) + EXT; + } + private int calculateConnects(int length) { - int conns = length/1024/1024; + int conns = length / 1024 / 1024; if (conns < MIN_CONNECTIONS) { return MIN_CONNECTIONS; } else if (conns > MAX_CONNECTIONS) { @@ -88,8 +137,29 @@ private int calculateConnects(int length) { } } - - private static void createTempFile(String dest, int len){ + private void changeName(String from, String to) { + rename(from, downloadLocation + to); + } + + public boolean rename(String from, String to) { + System.out.println(from); + System.out.println(to); + File file = new File(from); + if (file.exists()) { + file.renameTo(new File(to)); + System.out.println("rename success"); + return true; + } + System.out.println("rename failed"); + return false; + } + + private static void createTempFile(String dest, int len) { + File file = new File(dest); + if (file.exists()) { + System.out.println("tempfile already created"); + return; + } FileOutputStream temp = null; try { temp = new FileOutputStream(dest); @@ -101,7 +171,8 @@ private static void createTempFile(String dest, int len){ temp.write(buffer); } temp.write(buffer, 0, left); - + System.out.println("tempFile "+ dest + " created"); + } catch (Exception e) { e.printStackTrace(); } finally { @@ -113,19 +184,25 @@ private static void createTempFile(String dest, int len){ } } } - + public void setListener(DownloadListener listener) { this.listener = listener; } - - - public void setConnectionManager(ConnectionManager ucm){ + public void setConnectionManager(ConnectionManager ucm) { this.cm = ucm; } - - public DownloadListener getListener(){ + + public DownloadListener getListener() { return this.listener; } - + + public String getDownloadLocation() { + return downloadLocation; + } + + public void setDownloadLocation(String downloadLocation) { + this.downloadLocation = downloadLocation; + } + } diff --git a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java index 8171ee5763..d83cf1b4e1 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java +++ b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java @@ -18,12 +18,16 @@ public void setUp() throws Exception { public void tearDown() throws Exception { } + public static String url1 = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; + public static String url2 = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; + public static String url3 = "http://dlsw.baidu.com/sw-search-sp/soft/de/26290/WPIconMaker_1.0.1398047889.exe"; + @Test public void testDownload() { String url = "http://localhost:8080/test.jpg"; - - FileDownloader downloader = new FileDownloader(url); + + FileDownloader downloader = new FileDownloader(url2); ConnectionManager cm = new ConnectionManagerImpl(); diff --git a/group12/382266293/src/com/coderising/download/api/Connection.java b/group12/382266293/src/com/coderising/download/api/Connection.java index 9710e270e1..63d9fc7b19 100644 --- a/group12/382266293/src/com/coderising/download/api/Connection.java +++ b/group12/382266293/src/com/coderising/download/api/Connection.java @@ -19,5 +19,9 @@ public interface Connection { /** * 鍏抽棴杩炴帴 */ + public void close(); + public String getFileName(); + public void setFinished(); + public boolean isFinished(); } diff --git a/group12/382266293/src/com/coderising/download/api/ConnectionException.java b/group12/382266293/src/com/coderising/download/api/ConnectionException.java index 8dbfe95dda..b073bf2d6d 100644 --- a/group12/382266293/src/com/coderising/download/api/ConnectionException.java +++ b/group12/382266293/src/com/coderising/download/api/ConnectionException.java @@ -2,4 +2,8 @@ public class ConnectionException extends Exception { + public ConnectionException(String string) { + super(string); + } + } diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java index fff7d830fe..7dae156533 100644 --- a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java @@ -2,12 +2,15 @@ import static util.Print.println; +import java.io.ByteArrayOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import sun.net.www.protocol.http.HttpURLConnection; @@ -16,24 +19,37 @@ public class ConnectionImpl implements Connection{ private ConnectionManager cm; private static int buffer_size = 1024; + private HttpURLConnection httpConn; + private URL url; + private boolean finished = false; - public ConnectionImpl(ConnectionManager cm) { + public ConnectionImpl(ConnectionManager cm, String _url) { this.cm = cm; + try { + url = new URL(_url); + httpConn = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } } @Override public byte[] read(int startPos, int endPos) throws IOException { - FileOutputStream out = null; InputStream in = null; - HttpURLConnection conn = null; + ByteArrayOutputStream out = null; try { - in = conn.getInputStream(); - byte[] buffer = new byte[1024]; + in = httpConn.getInputStream(); + out = new ByteArrayOutputStream(); + in = httpConn.getInputStream(); + in.skip(startPos); + byte[] buffer = new byte[endPos-startPos + 1]; int len = 0; - while( (len = in.read(buffer)) != -1) { - out.write(buffer, 0, len); + //byte[] b = new byte[1024]; + while((len = in.read(buffer)) != -1) { + out.write(buffer); } - println("Read buffer Complete!"); + System.out.println(out.toByteArray().length); + return out.toByteArray(); } catch (IOException e) { e.printStackTrace(); } @@ -42,14 +58,33 @@ public byte[] read(int startPos, int endPos) throws IOException { @Override public int getContentLength() { + int len = httpConn.getContentLength(); + + return len; - return 0; } @Override public void close() { - - + httpConn.disconnect(); + } + + @Override + public String getFileName() { + String fileName = httpConn.getURL().getFile(); + fileName = fileName.substring(fileName.lastIndexOf('/')+1); + return fileName; + } + + @Override + public void setFinished() { + finished = true; } + @Override + public boolean isFinished() { + return finished; + } + + } diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java index bea080edac..a50884c256 100644 --- a/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -23,12 +23,12 @@ public Connection open(String url) throws ConnectionException { this.url = url; checkConnectionSize(); URL address = null; - HttpURLConnection conn = null; + Connection conn = null; try { address = new URL(url); - conn = (HttpURLConnection) address.openConnection(); + conn = new ConnectionImpl(this,url); connections++; - return (Connection) conn; + return conn; } catch (IOException e) { e.printStackTrace(); } @@ -42,7 +42,6 @@ private void checkConnectionSize() { } catch (NoFreeSourceException e) { e.printStackTrace(); } - } } diff --git a/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java b/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java new file mode 100644 index 0000000000..b5ae0e5afa --- /dev/null +++ b/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java @@ -0,0 +1,23 @@ +package com.coderising.download.impl; + +import com.coderising.download.FileDownloader; +import com.coderising.download.api.DownloadListener; + +public class DownloadThreadListener implements DownloadListener { + + + public DownloadThreadListener() { + } + + private FileDownloader fileDownloader; + public DownloadThreadListener(FileDownloader fileDownloader) { + this.fileDownloader = fileDownloader; + } + + @Override + public void notifyFinished() { + System.out.println("noted"); + fileDownloader.setFinished(); + } + +} From f01d8d3935b10fef7587620af87381ce0a03e010 Mon Sep 17 00:00:00 2001 From: "yanght1454385822@qq.com" Date: Thu, 9 Mar 2017 10:04:24 +0800 Subject: [PATCH 197/646] homework_03 --- group06/1454385822/copy.jpg | Bin 0 -> 46831 bytes .../basic/homework_02/litestruts/Struts.java | 3 +- .../homework_03/download/DownloadThread.java | 50 +++ .../homework_03/download/FileDownloader.java | 130 +++++++ .../download/FileDownloaderTest.java | 57 +++ .../homework_03/download/api/Connection.java | 26 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 16 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 75 ++++ .../download/impl/ConnectionManagerImpl.java | 16 + .../linkedListImpl/LinkedList.java | 365 ++++++++++++++++++ .../linkedListImpl/TestLinkedList.java | 192 +++++++++ 13 files changed, 938 insertions(+), 2 deletions(-) create mode 100644 group06/1454385822/copy.jpg create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/DownloadThread.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloader.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloaderTest.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/api/Connection.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionException.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionManager.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/api/DownloadListener.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionImpl.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionManagerImpl.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/LinkedList.java create mode 100644 group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/TestLinkedList.java diff --git a/group06/1454385822/copy.jpg b/group06/1454385822/copy.jpg new file mode 100644 index 0000000000000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X@)sOt5>V zQ6&{|r^4_}?Gn95`*`v%&NCnK5I5c=gEvMNUrh?|_;gJ>>qb`gPzPTUtmD|MQxn)1 z7B&4jC2a{M`Q)u9S1MxXPyhKe^{+iiPP;O{=){eaEp|C{ug@5Pg$N!J^Pgx`rkcxS z;Ij!C)#^)&W8hi!`CK20oag7;!_#|D>x@=jaGR!mfO$W(`SO|CFMFYn7j+CdEI_K` z-_|%R)&#W!$FX1h`w|gy9??)4sNwN-UeDU9da4JqvAnVGX$te_1ODA8Cs&E%6A29T zJiQZ}4VVIpr?^4Q!iLCCZZd&zSyb)!GR*G!*WTmXuf8Gh4S{b6d_&+H0^bn$hQK!j Rz9H}pf&U2t-~BQ4e*opEui*dy literal 0 HcmV?d00001 diff --git a/group06/1454385822/src/com/coding/basic/homework_02/litestruts/Struts.java b/group06/1454385822/src/com/coding/basic/homework_02/litestruts/Struts.java index 5c6c57cf73..ba9cc5922b 100644 --- a/group06/1454385822/src/com/coding/basic/homework_02/litestruts/Struts.java +++ b/group06/1454385822/src/com/coding/basic/homework_02/litestruts/Struts.java @@ -42,11 +42,10 @@ public static View runAction(String actionName, Map params) thro 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 */ - - View view = new View(); Element root = getRoot(); Class clazz = getClazz(actionName, root); Object obj = clazz.newInstance(); + View view = new View(); methodInvoke(clazz, obj, params); String result = getExecuteInfo(clazz, obj); diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/DownloadThread.java b/group06/1454385822/src/com/coding/basic/homework_03/download/DownloadThread.java new file mode 100644 index 0000000000..73fe0a42ef --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/DownloadThread.java @@ -0,0 +1,50 @@ +package com.coding.basic.homework_03.download; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.coding.basic.homework_03.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + boolean downOver = false; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + RandomAccessFile raf = null; + try { +// System.out.println(Thread.currentThread().getName() + "寮濮嬩笅杞..."); + byte[] bytes = conn.read(startPos, endPos); + +// if(!file.exists()){ +// file.createNewFile(); +// } + synchronized(this){ + File file = new File("copy.jpg"); + raf = new RandomAccessFile(file,"rw"); + raf.seek(startPos); + raf.write(bytes); + } + } catch (IOException e) { + e.printStackTrace(); + }finally{ + if(raf != null){ + try { + raf.close(); + downOver = true; + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } +} \ No newline at end of file diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloader.java b/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloader.java new file mode 100644 index 0000000000..06a6644c7b --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloader.java @@ -0,0 +1,130 @@ +package com.coding.basic.homework_03.download; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; + +import com.coding.basic.homework_03.download.api.Connection; +import com.coding.basic.homework_03.download.api.ConnectionManager; +import com.coding.basic.homework_03.download.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + private static final long KBSIZE = 1024; + private static final long MBSIZE = 1024 * 1024; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() throws IOException { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + int length = conn.getContentLength(); + createFile(new File("copy.jpg"), length); +// System.out.println(length); + int len = length / 5; + DownloadThread t1 = new DownloadThread(cm.open(this.url), 0, len - 1); + DownloadThread t2 = new DownloadThread(cm.open(this.url), len, len * 2 - 1); + DownloadThread t3 = new DownloadThread(cm.open(this.url), len * 2, len * 3 - 1); + DownloadThread t4 = new DownloadThread(cm.open(this.url), len * 3, len * 4 - 1); + DownloadThread t5 = new DownloadThread(cm.open(this.url), len * 4, len * 5 - 1); + DownloadThread t6 = new DownloadThread(cm.open(this.url), len * 5, length - 1); + t1.start(); + t2.start(); + t3.start(); + t4.start(); + t5.start(); + t6.start(); + + while (!(t1.downOver && t2.downOver && t3.downOver && t4.downOver && t5.downOver && t6.downOver)) { + try { + System.out.println("杩樻湁绾跨▼娌℃湁涓嬭浇瀹屾垚锛岀瓑寰呬簲绉..."); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + } + + /** + * 鍒涘缓涓涓复鏃舵枃浠 + * + * @param file + * @param length + * @throws IOException + */ + private void createFile(File file, int length) throws IOException { + long batchSize = 0; + FileOutputStream fos = null; + if (!file.exists()) { + file.createNewFile(); + } + + if (length > KBSIZE) { + batchSize = KBSIZE; + } + if (length > MBSIZE) { + batchSize = MBSIZE; + } + fos = new FileOutputStream(file); + int times = length / (int) batchSize; + int last = length % (int) batchSize; + FileChannel channel = fos.getChannel(); + for (int i = 0; i < times; i++) { + ByteBuffer buffer = ByteBuffer.allocate((int) batchSize); + channel.write(buffer); + } + ByteBuffer buffer = ByteBuffer.allocate(last); + channel.write(buffer); + fos.close(); + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloaderTest.java b/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloaderTest.java new file mode 100644 index 0000000000..cc02371dfa --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/FileDownloaderTest.java @@ -0,0 +1,57 @@ +package com.coding.basic.homework_03.download; + +import java.io.IOException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coding.basic.homework_03.download.api.ConnectionManager; +import com.coding.basic.homework_03.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() throws IOException { + + String url = "http://bpic.588ku.com/element_origin_min_pic/16/12/01/b4365c64e8a567afd0ab63285515de55.jpg"; + + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.execute(); + +// downloader.setListener(new DownloadListener() { +// @Override +// public void notifyFinished() { +// downloadFinished = true; +// } +// }); + + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 +// while (!downloadFinished) { +// try { +//// System.out.println(Thread.currentThread().getName()); +// System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); +// //浼戠湢5绉 +//// Thread.sleep(1000); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } + System.out.println("涓嬭浇瀹屾垚锛佹枃浠跺瓨鏀惧湪姝ら」鐩牴鐩綍涓"); + + + + } + +} \ No newline at end of file diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/api/Connection.java b/group06/1454385822/src/com/coding/basic/homework_03/download/api/Connection.java new file mode 100644 index 0000000000..dbebed39d3 --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/api/Connection.java @@ -0,0 +1,26 @@ +package com.coding.basic.homework_03.download.api; + +import java.io.IOException; + +public interface Connection { + + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + * @throws IOException + */ + public int getContentLength() throws IOException; + + /** + * 鍏抽棴杩炴帴 + * @throws IOException + */ + public void close() throws IOException; +} \ No newline at end of file diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionException.java b/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionException.java new file mode 100644 index 0000000000..0d68b040a8 --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coding.basic.homework_03.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionManager.java b/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionManager.java new file mode 100644 index 0000000000..15759b05e8 --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/api/ConnectionManager.java @@ -0,0 +1,16 @@ +package com.coding.basic.homework_03.download.api; + +import java.io.FileNotFoundException; +import java.io.IOException; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + * @throws FileNotFoundException + * @throws IOException + */ + public Connection open(String url) throws IOException; +} + diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/api/DownloadListener.java b/group06/1454385822/src/com/coding/basic/homework_03/download/api/DownloadListener.java new file mode 100644 index 0000000000..732c8dc806 --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coding.basic.homework_03.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionImpl.java b/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..d6874ae76f --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionImpl.java @@ -0,0 +1,75 @@ +package com.coding.basic.homework_03.download.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; + +import com.coding.basic.homework_03.download.api.Connection; + +public class ConnectionImpl implements Connection{ +// public RandomAccessFile raf = null; + public HttpURLConnection httpUrl = null; + public URL Url = null; +// public BufferedInputStream bis = null; +// FileInputStream fis = null; + InputStream is = null; + public ConnectionImpl(String url) throws IOException{ + + Url = new URL(url); + httpUrl = (HttpURLConnection) Url.openConnection(); + httpUrl.connect(); + is = httpUrl.getInputStream(); + +// fis = (FileInputStream) httpUrl.getInputStream(); +// bis = new BufferedInputStream(httpUrl.getInputStream()); +// raf = new RandomAccessFile(url, "r"); + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + int length = endPos - startPos + 1; + byte[] result = new byte[length]; + int num = 0; + if(startPos != 0){ + is.skip(startPos); + } + num = (int)is.read(result); +// System.out.println("length : " + length); +// System.out.println("num : " + num); + +// System.out.println(startPos +"....璇诲埌浜...."+endPos); +// +// System.out.println(Integer.MAX_VALUE); +// System.out.println("num:" + num); +// fis.skip(startPos); +// fis.read(result, startPos, length); +// bis.read(result, startPos, length); + +// raf.seek(startPos); +// raf.read(result); + return result; + } + + @Override + public int getContentLength() throws IOException { + int num = 0; + return httpUrl.getContentLength(); +// return (int) raf.length(); + } + + @Override + public void close() throws IOException { +// if(raf != null){ +// raf.close(); +// } +// if(bis != null){ +// bis.close(); +// } + if(is != null){ + is.close(); + } + + } + +} \ No newline at end of file diff --git a/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionManagerImpl.java b/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..e81398ac7b --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,16 @@ +package com.coding.basic.homework_03.download.impl; + +import java.io.IOException; + +import com.coding.basic.homework_03.download.api.Connection; +import com.coding.basic.homework_03.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws IOException { + Connection conn = new ConnectionImpl(url); + return conn; + } + +} diff --git a/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/LinkedList.java b/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/LinkedList.java new file mode 100644 index 0000000000..a617f003fc --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/LinkedList.java @@ -0,0 +1,365 @@ +package com.coding.basic.homework_03.linkedListImpl; + +import com.coding.basic.homework_01.Iterator; +import com.coding.basic.homework_01.List; + +/** + * 閲嶆柊瀹炵幇鐨凩inkedList + * @author yanght + * + */ +public class LinkedList implements List { + + private Node head; //澶磋妭鐐 + private Node end; //褰撳墠閾捐〃鐨勬湯灏剧粨鐐 + private int num = 0; //閾捐〃涓厓绱犵殑涓暟 + + /** + * 鐩存帴浠庨摼琛ㄧ殑灏鹃儴娣诲姞鑺傜偣 + */ + public void add(Object o){ + Node node = new Node(o); + if(head == null){ //褰撳墠List涓虹┖锛屼粠绗竴涓妭鐐瑰紑濮嬫坊鍔 + head = end = node; + }else{ + end.next = node; + end = node; + } + num++; + } + + /** + * 灏嗙粨鐐规坊鍔犲埌index澶(浠0寮濮) + */ + public void add(int index , Object o){ + if(index == num){ + add(o); + }else if(index < num && index >= 0){ + addNode(index, o); + } + } + + /** + * 鍦ㄩ摼琛ㄥご閮ㄥ拰涓棿娣诲姞鑺傜偣 + * @param index + * @param node + */ + private void addNode(int index,Object o){ + if(index == 0){ + addFirst(o); + }else{ + Node node = new Node(o); + Node tem = getNode(index - 1); + Node pos = tem.next; + tem.next = node; + node.next = pos; + num++; + } + } + + /** + * 鏍规嵁绱㈠紩鑾峰彇鑺傜偣 + * @param index + * @return + */ + private Node getNode(int index){ + Node node = head; + if(index < num){ + for(int i = 1; i<= index; i++){ + node = node.next; + } + return node; + } + return node; + } + + public Object get(int index){ + if(index < 0 && index >= num){ + throw new IndexOutOfBoundsException(); + } + return getNode(index).data; + } + + public Object remove(int index){ + if(index < 0 && index >= num){ + throw new IndexOutOfBoundsException(); + } + Object result = null; + if(index == 0){ + removeFirst(); + }else if(index == num -1){ + removeLast(); + }else{ + Node pre = getNode(index - 1); + result = pre.next.data; + pre.next = pre.next.next; + num--; + } + return result; + } + + public int size(){ + return num; + } + + public void addFirst(Object o){ + if(o != null){ + Node node = new Node(o); + node.next = head; + head = node; + num++; + } + } + + public void addLast(Object o){ + add(o); + } + + public Object removeFirst(){ + Object result = null; + if(size() > 1){ + result = head.data; + head = head.next; + num--; + }else if(size() == 1){ + result = head.data; + head = end = null; + num-- ; + } + return result; + } + + public Object removeLast(){ + Object result = null; + if(size() > 1){ + Node pre = getNode(num - 2); + result = end.data; + pre.next = null; + end = pre; + num--; + }else if(size() == 1){ + result = head.data; + head = end = null; + num-- ; + } + return result; + } + + + public Iterator iterator(){ + return new Iterator(){ + private int cur = 0; + private Node node = null; + @Override + public boolean hasNext() { + + return num - cur > 0; + } + + @Override + public Object next() { + if(node == null){ + node = head; + }else{ + node = node.next; + } + cur++; + return node.data; + } + }; + } + + + private static class Node{ + Object data; + Node next; + @SuppressWarnings("unused") + public Node(){} + public Node(Object data){ + this.data = data; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Object[] obj = new Object[num]; + Node node = head; + for(int i = obj.length-1; i >= 0; i--){ + obj[i] = node.data; + node = node.next; + } + node = head; + for(int i = 0; i < obj.length; i++){ + node.data = obj[i]; + node = node.next; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + Node node = getNode(num / 2); + head = node; + if(num % 2 == 0){ + num = num / 2; + }else{ + num = num / 2 + 1; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + if(num - length < i + 1){ + throw new IndexOutOfBoundsException(); + } + if(num - length == i){ //i鍚庨潰鐨勫叏閮ㄥ垹闄 + Node node = getNode(i - 1); + end = node; + num = i; + }else{ + Node pre = getNode(i - 1); + Node pos = getNode(i + length); + pre.next = pos; + num = num - length; + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list, LinkedList listB){ + int[] result = new int[listB.size()]; + for(int i = 0; i < result.length; i++){ + result[i] =(int) list.getNode((Integer)listB.get(i)).data; + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + for(int i = 0; i < list.size(); i++){ + findPos(list.get(i), this); + } + } + + /** + * 鍦ㄥ師鏁扮粍涓壘鐩稿悓鐨勫厓绱 + * @param pos 璧峰浣嶇疆 + * @param obj 瑕佹壘鐨勫厓绱 + * @param list 鍘熸暟缁 + * @return 涓嬩竴娆¤浼犲叆鐨勪綅缃 + */ + private void findPos(Object obj, LinkedList list){ + for(int i = 0; i < list.size(); i++){ + if(compare(list.get(i), obj) == 0){ + list.remove(i); + break; + } + if(compare(list.get(i), obj) > 0){ + break; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + int pos = 0; + while(pos < this.size() - 1){ + if(compare(this.get(pos), this.get(pos + 1)) == 0){ + this.remove(pos); + continue; + } + pos++; + } + } + + /** + *姣旇緝澶у皬 + * @param o1 + * @param o2 + * @return + */ + private int compare(Object o1, Object o2){ + int i1 = (Integer)o1; + int i2 = (Integer)o2; + return i1 > i2 ? 1 : (i1 < i2 ? -1 : 0); + } + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + Integer start = null; + Integer end = null; + for(int i = 0; i < this.size(); i++){ + if(compare(this.get(i), min) > 0 && compare(this.get(i), max) < 0){ + if(start == null){ + start = end = i; + }else{ + end = i; + } + } + } + remove(start, end - start); + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + int point1 = 0; + int point2 = 0; + LinkedList result = new LinkedList(); + while(point1 < this.size() && point2 < list.size()){ + if(compare(this.get(point1), list.get(point2)) < 0){ + point1++; + }else if(compare(this.get(point1), list.get(point2)) > 0){ + point2++; + }else{ + result.add(list.get(point2)); + point1++; + point2++; + } + } + return result; + } +} + + + + + + + + + + + diff --git a/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/TestLinkedList.java b/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/TestLinkedList.java new file mode 100644 index 0000000000..6c8c4fd50b --- /dev/null +++ b/group06/1454385822/src/com/coding/basic/homework_03/linkedListImpl/TestLinkedList.java @@ -0,0 +1,192 @@ +package com.coding.basic.homework_03.linkedListImpl; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.coding.basic.homework_01.Iterator; + +public class TestLinkedList { + LinkedList list; + @Before + public void before(){ + list = new LinkedList(); + } + +// @Test + public void test1(){ + list.add(1); + list.add(2); + list.add(3); + list.remove(2); + list.add(4); + list.add(0, 0); + list.addFirst(-1); + Iterator it = list.iterator(); + while(it.hasNext()){ + System.out.println(it.next()); + } + System.out.println("size:" + list.size()); + } + + @Test + public void testReverse(){ + list.add(3); + list.add(7); + list.add(10); + list.reverse(); + String str = ""; + Iterator it = list.iterator(); + while(it.hasNext()){ + str = str + it.next() + " "; + } + Assert.assertEquals("10 7 3 ", str); + } + + @Test + public void testRemoveFirstHalf(){ + list.add(2); + list.add(5); + list.add(7); + list.add(8); + list.add(10); +// Object[] obj = new Object[list.size() / 2]; + Object[] obj = new Object[list.size() / 2 + 1]; + list.removeFirstHalf(); + for(int i = 0; i < obj.length; i++){ + obj[i] = list.get(i); + } +// Assert.assertArrayEquals(new Object[]{7, 8}, obj); + Assert.assertArrayEquals(new Object[]{7, 8, 10}, obj); + } + + @Test + public void testRemove(){ + list.add(0); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + list.remove(3, 4); + Object[] obj = new Object[4]; + for (int i = 0; i < obj.length; i++) { + obj[i] = list.get(i); + } + Assert.assertArrayEquals(new Object[]{0, 1, 2, 7}, obj); + } + + @Test + public void testGetElements(){ + list.add(11); + list.add(101); + list.add(201); + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(701); + LinkedList listB = new LinkedList(); + listB.add(1); + listB.add(3); + listB.add(4); + listB.add(6); + int[] result = LinkedList.getElements(list, listB); + Assert.assertArrayEquals(new int[]{101, 301, 401, 601}, result); + } + + @Test + public void testSubtract(){ + list.add(11); + list.add(101); + list.add(201); + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(701); + LinkedList listB = new LinkedList(); + listB.add(11); + listB.add(201); + listB.add(601); + list.subtract(listB); + Object[] obj = new Object[list.size()]; + for(int i = 0; i < list.size(); i++){ + System.out.println(list.get(i)); + obj[i] = list.get(i); + } + Assert.assertArrayEquals(new Object[]{101, 301, 401, 501, 701}, obj); + } + + @Test + public void testRemoveDuplicateValues(){ + list.add(11); + list.add(11); + list.add(11); + list.add(11); + list.add(101); + list.add(201); + list.add(201); + list.add(201); + list.add(301); + list.removeDuplicateValues(); + Object[] obj = new Object[list.size()]; + for(int i = 0; i < list.size(); i++){ + obj[i] = list.get(i); + } + Assert.assertArrayEquals(new Object[]{11, 101, 201, 301}, obj); + } + + @Test + public void testRemoveRange(){ + list.add(1); + list.add(5); + list.add(7); + list.add(9); + list.add(11); + list.add(12); + list.add(13); + list.add(14); + list.add(15); + list.add(20); + list.add(30); + list.removeRange(8, 17); + Object[] obj = new Object[list.size()]; + for(int i = 0; i < list.size(); i++){ + obj[i] = list.get(i); + } + Assert.assertArrayEquals(new Object[]{1, 5, 7, 15, 20, 30}, obj); + } + + @Test + public void testIntersection(){ + list.add(1); + list.add(2); + list.add(4); + list.add(7); + list.add(9); + list.add(11); + list.add(15); + list.add(20); + LinkedList list1 = new LinkedList(); + list1.add(2); + list1.add(3); + list1.add(5); + list1.add(6); + list1.add(7); + list1.add(8); + list1.add(11); + LinkedList result = list.intersection(list1); + Object[] obj = new Object[result.size()]; + for(int i = 0; i < result.size(); i++){ + obj[i] = result.get(i); + } + Assert.assertArrayEquals(new Object[]{2, 7, 11}, obj); + } + +} + + + From ffc07a4ae94ca5232e51a91821bd76ce0a06fa58 Mon Sep 17 00:00:00 2001 From: laoheihei Date: Thu, 9 Mar 2017 10:52:45 +0800 Subject: [PATCH 198/646] template --- group22/2622819383/Task1/ArrayList.java | 30 +++++ group22/2622819383/Task1/BinaryTreeNode.java | 30 +++++ group22/2622819383/Task1/Iterator.java | 5 + group22/2622819383/Task1/LinkedList.java | 120 +++++++++++++++++++ group22/2622819383/Task1/List.java | 7 ++ group22/2622819383/Task1/Queue.java | 17 +++ group22/2622819383/Task1/Stack.java | 20 ++++ 7 files changed, 229 insertions(+) create mode 100644 group22/2622819383/Task1/ArrayList.java create mode 100644 group22/2622819383/Task1/BinaryTreeNode.java create mode 100644 group22/2622819383/Task1/Iterator.java create mode 100644 group22/2622819383/Task1/LinkedList.java create mode 100644 group22/2622819383/Task1/List.java create mode 100644 group22/2622819383/Task1/Queue.java create mode 100644 group22/2622819383/Task1/Stack.java diff --git a/group22/2622819383/Task1/ArrayList.java b/group22/2622819383/Task1/ArrayList.java new file mode 100644 index 0000000000..ca9faa3291 --- /dev/null +++ b/group22/2622819383/Task1/ArrayList.java @@ -0,0 +1,30 @@ +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group22/2622819383/Task1/BinaryTreeNode.java b/group22/2622819383/Task1/BinaryTreeNode.java new file mode 100644 index 0000000000..1f07869939 --- /dev/null +++ b/group22/2622819383/Task1/BinaryTreeNode.java @@ -0,0 +1,30 @@ +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group22/2622819383/Task1/Iterator.java b/group22/2622819383/Task1/Iterator.java new file mode 100644 index 0000000000..96a43dbe0a --- /dev/null +++ b/group22/2622819383/Task1/Iterator.java @@ -0,0 +1,5 @@ +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group22/2622819383/Task1/LinkedList.java b/group22/2622819383/Task1/LinkedList.java new file mode 100644 index 0000000000..d431e25fdb --- /dev/null +++ b/group22/2622819383/Task1/LinkedList.java @@ -0,0 +1,120 @@ +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group22/2622819383/Task1/List.java b/group22/2622819383/Task1/List.java new file mode 100644 index 0000000000..4f7bcc71a8 --- /dev/null +++ b/group22/2622819383/Task1/List.java @@ -0,0 +1,7 @@ +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group22/2622819383/Task1/Queue.java b/group22/2622819383/Task1/Queue.java new file mode 100644 index 0000000000..08f1e8ba29 --- /dev/null +++ b/group22/2622819383/Task1/Queue.java @@ -0,0 +1,17 @@ +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group22/2622819383/Task1/Stack.java b/group22/2622819383/Task1/Stack.java new file mode 100644 index 0000000000..6c8c49bb10 --- /dev/null +++ b/group22/2622819383/Task1/Stack.java @@ -0,0 +1,20 @@ +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From 73464719e655535833d167758a86f1100366010c Mon Sep 17 00:00:00 2001 From: GUK0 <1685605435@qq.com> Date: Thu, 9 Mar 2017 11:24:51 +0800 Subject: [PATCH 199/646] =?UTF-8?q?=E5=AF=B9=E4=B9=8B=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=81=9A=E4=B8=80=E4=BA=9B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group12/247565311/week1/ArrayList.java | 53 +++------ group12/247565311/week1/ArrayListTest.java | 113 -------------------- group12/247565311/week1/BinaryTreeNode.java | 32 ++++++ group12/247565311/week1/Deque.java | 34 ------ group12/247565311/week1/Iterator.java | 6 ++ group12/247565311/week1/Link.java | 5 - group12/247565311/week1/LinkedList.java | 51 ++------- group12/247565311/week1/List.java | 9 ++ group12/247565311/week1/Queue.java | 18 ++++ group12/247565311/week1/Stack.java | 29 ++--- group12/247565311/week2/ArrayUtilTest.java | 1 - group12/247565311/week2/Struts.java | 11 +- 12 files changed, 104 insertions(+), 258 deletions(-) delete mode 100644 group12/247565311/week1/ArrayListTest.java create mode 100644 group12/247565311/week1/BinaryTreeNode.java delete mode 100644 group12/247565311/week1/Deque.java create mode 100644 group12/247565311/week1/Iterator.java delete mode 100644 group12/247565311/week1/Link.java create mode 100644 group12/247565311/week1/List.java create mode 100644 group12/247565311/week1/Queue.java diff --git a/group12/247565311/week1/ArrayList.java b/group12/247565311/week1/ArrayList.java index f15c04e289..794630a76c 100644 --- a/group12/247565311/week1/ArrayList.java +++ b/group12/247565311/week1/ArrayList.java @@ -1,11 +1,6 @@ package week1; -import java.util.Arrays; import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - public class ArrayList implements List { private int size=0,offset=10; @@ -19,8 +14,7 @@ public ArrayList(int arg0){ data = new Object[size]; } @Override - public boolean add(E arg0) { - if(arg0 == null) return false; + public void add(Object arg0) { size += 1; int leng = data.length; if(size>leng){ @@ -31,7 +25,6 @@ public boolean add(E arg0) { data = newdata; } data[size-1] = arg0; - return true; } @Override @@ -53,7 +46,6 @@ public void add(int arg0, E arg1) { return ; } - @Override public boolean addAll(Collection arg0) { if (arg0 == null) return false; int leng = data.length,newobjnum = arg0.size(),lastsize=size; @@ -72,7 +64,6 @@ public boolean addAll(Collection arg0) { return true; } - @Override public boolean addAll(int arg0, Collection arg1) { int newobjnum = arg1.size(),lastsize = size; if(arg1 == null || arg0>size+1 || 0>arg0 || newobjnum==0) return false; @@ -96,13 +87,11 @@ public boolean addAll(int arg0, Collection arg1) { return true; } - @Override public void clear() { size=0; data = new Object[offset]; } - @Override public boolean contains(Object arg0) { for(Object e:data){ if(e.equals(arg0)) return true; @@ -110,7 +99,6 @@ public boolean contains(Object arg0) { return false; } - @Override public boolean containsAll(Collection arg0) { for(Object o:arg0){ if(!this.contains(o)) return false; @@ -124,7 +112,6 @@ public E get(int arg0) { return null; } - @Override public int indexOf(Object arg0) { for(int i=0;i-1;i--){ if(this.data[i].equals(arg0)) return i; @@ -144,25 +130,11 @@ public int lastIndexOf(Object arg0) { return -1; } - @Override public Iterator iterator() { return null; } - @Override - public ListIterator listIterator() { - - return null; - } - - @Override - public ListIterator listIterator(int arg0) { - - return null; - } - - @Override public boolean remove(Object arg0) { for(int i=0;i arg0) { int toberemovednums = arg0.size(); if(!this.containsAll(arg0)) return false; @@ -197,13 +168,6 @@ public boolean removeAll(Collection arg0) { return true; } - @Override - public boolean retainAll(Collection arg0) { - // what does this mean? - return false; - } - - @Override public E set(int arg0, E arg1) { if(arg0<0||arg0>this.size-1) return null; this.data[arg0] = arg1; @@ -215,7 +179,6 @@ public int size() { return this.size; } - @Override public List subList(int arg0, int arg1) { if(arg0>=arg1 || arg0<0 || arg1>this.size-1) return null; List res = new ArrayList(); @@ -228,7 +191,6 @@ public List subList(int arg0, int arg1) { return null; } ////////////////////////////////////////////// - @Override public Object[] toArray() { if(this.size == 0) return null; Object[] res = new Object[this.size]; @@ -238,7 +200,6 @@ public Object[] toArray() { return res; } - @Override public T[] toArray(T[] arg0) { T[] res = (T[])(new Object[this.size]); for(int i=0;i T[] toArray(T[] arg0) { } return res; } + @Override + public boolean hasNext() { + // TODO 自动生成的方法存根 + return false; + } + @Override + public Object next() { + // TODO 自动生成的方法存根 + return null; + } } diff --git a/group12/247565311/week1/ArrayListTest.java b/group12/247565311/week1/ArrayListTest.java deleted file mode 100644 index 846dd152f5..0000000000 --- a/group12/247565311/week1/ArrayListTest.java +++ /dev/null @@ -1,113 +0,0 @@ -package week1; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ArrayListTest { - - @Before - public void setUp() throws Exception { - // 执行测试方法钱执行此方法 - } - - @After - public void tearDown() throws Exception { - // 测试用例执行完了执行此方法 - } - - @Test - public void testArrayList() { - fail("尚未实现"); - } - - @Test - public void testAddE() { - fail("尚未实现"); - } - - @Test - public void testAddIntE() { - fail("尚未实现"); - } - - @Test - public void testAddAllCollectionOfQextendsE() { - fail("尚未实现"); - } - - @Test - public void testAddAllIntCollectionOfQextendsE() { - fail("尚未实现"); - } - - @Test - public void testClear() { - fail("尚未实现"); - } - - @Test - public void testContains() { - fail("尚未实现"); - } - - @Test - public void testContainsAll() { - fail("尚未实现"); - } - - @Test - public void testGet() { - fail("尚未实现"); - } - - @Test - public void testIndexOf() { - fail("尚未实现"); - } - - @Test - public void testIsEmpty() { - fail("尚未实现"); - } - - @Test - public void testRemoveObject() { - fail("尚未实现"); - } - - @Test - public void testRemoveInt() { - fail("尚未实现"); - } - - @Test - public void testRemoveAll() { - fail("尚未实现"); - } - - @Test - public void testRetainAll() { - fail("尚未实现"); - } - - @Test - public void testSet() { - fail("尚未实现"); - } - - @Test - public void testSize() { - fail("尚未实现"); - } - - @Test - public void testToArray() { - fail("尚未实现"); - } - -} diff --git a/group12/247565311/week1/BinaryTreeNode.java b/group12/247565311/week1/BinaryTreeNode.java new file mode 100644 index 0000000000..617ca84348 --- /dev/null +++ b/group12/247565311/week1/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package week1; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group12/247565311/week1/Deque.java b/group12/247565311/week1/Deque.java deleted file mode 100644 index b71c4b9fac..0000000000 --- a/group12/247565311/week1/Deque.java +++ /dev/null @@ -1,34 +0,0 @@ -package week1; -public class Deque { - private LinkedList data = new LinkedList(); - private int size = 0; - - - public Deque(){ - - } - public Deque(int arg0){ - data = new LinkedList(arg0); - } - public boolean push(E arg0){ - data.add(data.size(),arg0); - size += 1; - return true; - } - public E pop(){ - size -= 1; - E res = data.get(0); - data.remove(0); - return res; - } - public E peek(){ - return data.get(0); - } - public int size(){ - return this.size; - } - public boolean isEmpty(){ - return this.size==0; - } - -} diff --git a/group12/247565311/week1/Iterator.java b/group12/247565311/week1/Iterator.java new file mode 100644 index 0000000000..7967f1827e --- /dev/null +++ b/group12/247565311/week1/Iterator.java @@ -0,0 +1,6 @@ +package week1; + +public interface Iterator { + public boolean hasNext(); + public E next(); +} diff --git a/group12/247565311/week1/Link.java b/group12/247565311/week1/Link.java deleted file mode 100644 index e2910e53d3..0000000000 --- a/group12/247565311/week1/Link.java +++ /dev/null @@ -1,5 +0,0 @@ -package week1; - -public class Link { - -} diff --git a/group12/247565311/week1/LinkedList.java b/group12/247565311/week1/LinkedList.java index 3acf90ac47..0b74925cbe 100644 --- a/group12/247565311/week1/LinkedList.java +++ b/group12/247565311/week1/LinkedList.java @@ -1,11 +1,8 @@ package week1; import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -public class LinkedList implements List,Cloneable { +public class LinkedList implements List { private Node head = null; private Node tail = null; private int size = 0; @@ -40,14 +37,13 @@ public Object clone(){ return clone; } @Override - public boolean add(Object val) { + public void add(Object val) { Node n = new Node(val); n.next = tail; n.ahead = tail.ahead; tail.ahead.next = n; tail.ahead = n; size += 1; - return true; } @Override @@ -64,7 +60,6 @@ public void add(int arg0, E arg1) { size += 1; } - @Override public boolean addAll(Collection arg0) { for(E o:arg0){ this.add(o); @@ -72,7 +67,6 @@ public boolean addAll(Collection arg0) { return true; } - @Override public boolean addAll(int arg0, Collection arg1) { for(E e:arg1){ this.add(arg0,e); @@ -81,7 +75,6 @@ public boolean addAll(int arg0, Collection arg1) { return true; } - @Override public void clear() { head = new Node(null); tail = new Node(null); @@ -90,7 +83,6 @@ public void clear() { size = 0; } - @Override public boolean contains(Object arg0) { boolean flag = arg0==null; Node n = head; @@ -105,7 +97,6 @@ public boolean contains(Object arg0) { return false; } - @Override public boolean containsAll(Collection arg0) { for(Object e:arg0){ if(!this.contains(e)) return false; @@ -126,9 +117,8 @@ public E get(int arg0) { return res; } - @Override public int indexOf(Object arg0) { - boolean flag = arg0 == null; + boolean flag = (arg0 == null); Node n=head; for(int i=0;i iterator() { return null; } - @Override public int lastIndexOf(Object arg0) { boolean flag = arg0==null; Node n = tail; @@ -167,19 +154,6 @@ public int lastIndexOf(Object arg0) { return -1; } - @Override - public ListIterator listIterator() { - - return null; - } - - @Override - public ListIterator listIterator(int arg0) { - - return null; - } - - @Override public boolean remove(Object arg0) { Node n = head; int index = this.indexOf(arg0); @@ -206,7 +180,6 @@ public E remove(int arg0) { return (E)(d.val); } - @Override public boolean removeAll(Collection arg0) { for(Object o:arg0){ if(!this.remove(o)) return false; @@ -214,13 +187,11 @@ public boolean removeAll(Collection arg0) { return true; } - @Override public boolean retainAll(Collection arg0) { // ? return false; } - @Override public E set(int arg0, E arg1) { if(arg0<0 || arg0>size-1) return null; Node n=head; @@ -236,13 +207,6 @@ public int size() { return size; } - @Override - public List subList(int arg0, int arg1) { - - return null; - } - - @Override public Object[] toArray() { Object[]res = new Object[size]; Node n = head; @@ -253,7 +217,6 @@ public Object[] toArray() { return res; } - @Override public T[] toArray(T[] arg0) { T[]res = (T[]) new Object[size]; Node n = head; @@ -268,4 +231,12 @@ private static class Node{ Node next = null,ahead=null; public Node(Object arg0){val = arg0;} } + @Override + public boolean hasNext() { + return false; + } + @Override + public Object next() { + return null; + } } diff --git a/group12/247565311/week1/List.java b/group12/247565311/week1/List.java new file mode 100644 index 0000000000..a669a6169d --- /dev/null +++ b/group12/247565311/week1/List.java @@ -0,0 +1,9 @@ +package week1; + +public interface List extends Iterator{ + public void add(Object o); + public void add(int index, E o); + public E get(int index); + public E remove(int index); + public int size(); +} diff --git a/group12/247565311/week1/Queue.java b/group12/247565311/week1/Queue.java new file mode 100644 index 0000000000..78f25cb826 --- /dev/null +++ b/group12/247565311/week1/Queue.java @@ -0,0 +1,18 @@ +package week1; +public class Queue { + private LinkedList data = new LinkedList(); + public void enQueue(E arg0){ + data.add(data.size(),arg0); + } + public E deQueue(){ + E res = data.get(0); + data.remove(0); + return res; + } + public int size(){ + return data.size(); + } + public boolean isEmpty(){ + return data.isEmpty(); + } +} diff --git a/group12/247565311/week1/Stack.java b/group12/247565311/week1/Stack.java index 5672274d81..5dcccc5fca 100644 --- a/group12/247565311/week1/Stack.java +++ b/group12/247565311/week1/Stack.java @@ -1,39 +1,28 @@ package week1; -import java.util.List; +import week1.List; public class Stack { - private List data = new ArrayList(); - private int size = 0; - - public Stack(){ - - } - - public Stack(int arg0){ - if(arg0 < 0) arg0 = 0; - size = arg0; - data = new ArrayList(size); - - } + private ArrayList data = new ArrayList(); public boolean isEmpty(){ - return size==0; + return data.isEmpty(); + } + public int size(){ + return data.size(); } public boolean push(E arg0){ - size += 1; data.add(arg0); return true; } public E pop(){ if(this.isEmpty()) return null; - size -= 1; - E res = data.get(size); - data.remove(size); + E res = data.get(data.size()-1); + data.remove(data.size()-1); return res; } public E peek(){ if(this.isEmpty()) return null; - E res = data.get(size-1); + E res = data.get(data.size()-1); return res; } } diff --git a/group12/247565311/week2/ArrayUtilTest.java b/group12/247565311/week2/ArrayUtilTest.java index 889054f6c5..b59b14dfe3 100644 --- a/group12/247565311/week2/ArrayUtilTest.java +++ b/group12/247565311/week2/ArrayUtilTest.java @@ -1,5 +1,4 @@ package week2; -import week2.ArrayUtil; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/group12/247565311/week2/Struts.java b/group12/247565311/week2/Struts.java index 8bb8fedf6d..45658881eb 100644 --- a/group12/247565311/week2/Struts.java +++ b/group12/247565311/week2/Struts.java @@ -1,12 +1,15 @@ package week2; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import java.io.File; import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import org.dom4j.*; +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; import org.dom4j.io.SAXReader; public class Struts { From 3f34116d9b7980b3644de3d14c240f8a4b9600e9 Mon Sep 17 00:00:00 2001 From: Korben_CHY Date: Thu, 9 Mar 2017 11:51:05 +0800 Subject: [PATCH 200/646] implement LinkedList by Korben --- .../coding/basic/list/KDoubleLinkedList.java | 2 +- .../korben/coding/basic/list/KLinkedList.java | 291 +++++++++++++++++- .../coding/basic/list/KLinkedListTest.java | 157 ++++++++++ 3 files changed, 434 insertions(+), 16 deletions(-) create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedListTest.java diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java index 276428beca..575e537da9 100644 --- a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KDoubleLinkedList.java @@ -148,7 +148,7 @@ public int indexOf(T o) { @Override public KIterator iterator() { - throw new IllegalStateException("鏂规硶鏈疄鐜"); + throw new UnsupportedOperationException("鏂规硶鏈疄鐜"); } private Node getNode(int index) { diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java index e3ae1bb4d1..719881cf91 100644 --- a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedList.java @@ -1,5 +1,7 @@ package org.korben.coding.basic.list; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; /** @@ -68,8 +70,7 @@ public boolean remove(T o) { preNode = node; node = node.next; if (Objects.equals(node.data, o)) { - preNode.next = node.next; - this.size--; + removeNode(preNode, node); return true; } } @@ -98,9 +99,7 @@ public T set(int index, T element) { @Override public void add(int index, T element) { - if (index < 0 || index >= this.size) { - throw new IndexOutOfBoundsException(); - } + ensureIndex(index); Node node = this.head; Node preNode = node; @@ -118,19 +117,19 @@ public void add(int index, T element) { @Override public T remove(int index) { - if (index < 0 || index >= size) { - throw new IndexOutOfBoundsException(); - } + ensureIndex(index); Node node = this.head; Node preNode = this.head; - for (int i = 0; i <= index; i++) { preNode = node; node = node.next; } preNode.next = node.next; + if (node == last) { + last = preNode; + } this.size--; return node.data; } @@ -151,13 +150,11 @@ public int indexOf(T o) { @Override public KIterator iterator() { - throw new IllegalStateException("鏂规硶鏈疄鐜"); + return new Iterator(this); } private Node getNode(int index) { - if (index < 0 || index >= size) { - throw new IndexOutOfBoundsException(); - } + ensureIndex(index); Node node = this.head; for (int i = 0; i <= index; i++) { @@ -171,7 +168,31 @@ private Node getNode(int index) { * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ public void reverse() { + // 閾捐〃涓虹┖, 涓嶇敤閫嗙疆, 杩斿洖 + if (this.head.next == null) { + return; + } + + // 鍙湁涓涓厓绱, 涓嶇敤閫嗙疆, 杩斿洖 + if (this.head.next.next == null) { + return; + } + + this.last = this.head.next; + Node preNode = this.head.next; + Node node = preNode.next; + Node nextNode = node.next; + while (nextNode != null) { + node.next = preNode; + + preNode = node; + node = nextNode; + nextNode = nextNode.next; + } + + node.next = preNode; + this.head.next = node; } /** @@ -180,23 +201,118 @@ public void reverse() { * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 */ public void removeFirstHalf() { + if (isEmpty()) { + return; + } + int halfIndex = (this.size) / 2; + + if (halfIndex >= 0) { + this.head.next = getNode(halfIndex); + } + + this.size -= halfIndex; } /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 */ public void remove(int i, int length) { + ensureIndex(i); + ensureIndex(i + length - 1); + int newSize = this.size - length; + + // 寰楀埌琚垹闄よ捣濮嬪厓绱犵殑鍓嶄竴涓妭鐐 + Node preNode; + if (i == 0) { + preNode = this.head; + } else { + preNode = getNode(i - 1); + } + + // 寰楀埌鏈鍚庝竴涓鍒犻櫎鐨勫厓绱 + Node node = preNode.next; + while (--length > 0) { + node = node.next; + } + + // 鍒犻櫎鍏冪礌 + preNode.next = node.next; + + // 濡傛灉琚垹闄ょ殑鍏冪礌鍖呭惈鏈鍚庣殑鑺傜偣, 鏀瑰彉鏈鍚庤妭鐐 + if (i + length == this.size - 1) { + this.last = preNode; + } + + this.size = newSize; + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + */ + public int[] getElements(KLinkedList list) { + if (list == null || list.size == 0) { + return new int[0]; + } + + List resultList = new ArrayList<>(); + + Node node = this.head; + + KIterator listIterator = list.iterator(); + int elementIndex = (int) listIterator.next(); + for (int i = 0; i < this.size; i++) { + node = node.next; + if (elementIndex == i) { + resultList.add((Integer) node.data); + if (listIterator.hasNext()) { + elementIndex = (int) listIterator.next(); + } else { + break; + } + } + } + + // list 2 array + int[] result = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + result[i] = resultList.get(i); + } + return result; } /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 */ + public void subtract(KLinkedList list) { + if (list == null || list.size() == 0) { + return; + } - public void subtract(KLinkedList list) { + KIterator listIterator = list.iterator(); + Node node = this.head; + Node pre; + while (listIterator.hasNext()) { + + int listData = listIterator.next(); + while (node.next != null) { + pre = node; + node = node.next; + + if (listData == (int) node.data) { + removeNode(pre, node); + } else if (listData < (int) node.data) { + break; + } + } + } } /** @@ -204,7 +320,21 @@ public void subtract(KLinkedList list) { * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ public void removeDuplicateValues() { + if (this.size() <= 1) { + return; + } + + Node node = this.head; + Node pre; + while (node.next.next != null) { + pre = node; + node = node.next; + + if (node.data == node.next.data) { + removeNode(pre, node); + } + } } /** @@ -212,15 +342,124 @@ public void removeDuplicateValues() { * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 */ public void removeRange(int min, int max) { + Node preMinNode = null; + Node maxNode = null; + Node node = this.head; + + // get min and max + int minIndex = -1; + int maxIndex = -1; + while (node.next != null) { + maxIndex++; + if (preMinNode == null) { + minIndex++; + if ((int) node.next.data == min) { + preMinNode = node; + } + } else if ((int) node.next.data == max) { + maxNode = node.next; + } else if (maxNode != null && (int) node.next.data > (int) maxNode.data) { + break; + } + + node = node.next; + } + // do remove + if (preMinNode != null) { + if (maxNode != null) { + preMinNode.next = maxNode.next; + this.size -= maxIndex - minIndex + 1; + if (preMinNode.next == null) { + this.last = preMinNode; + } + } else { + preMinNode.next = null; + this.size = minIndex; + this.last = preMinNode; + } + } } /** + * 123456789876543 * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 */ public KLinkedList intersection(KLinkedList list) { - return null; + if (list == null || list.size() == 0) { + return copyList(this); + } + if (this.isEmpty()) { + return copyList(list); + } + + KLinkedList resultList = new KLinkedList(); + + KIterator listIterator = list.iterator(); + KIterator iterator = this.iterator(); + Integer listValue = (Integer) listIterator.next(); + Integer value = (Integer) iterator.next(); + for (int i = 0; i < list.size() + this.size() - 1; i++) { + + if (listValue == null) { + if (value != null) { + resultList.add(value); + continue; + } else { + break; + } + } + + if (value == null) { + if (listValue != null) { + resultList.add(listValue); + listValue = (Integer) listIterator.next(); + continue; + } else { + break; + } + } + + if (listValue <= value) { + resultList.add(listValue); + listValue = (Integer) listIterator.next(); + value = (Integer) iterator.next(); + } else { + resultList.add(value); + value = (Integer) iterator.next(); + } + } + + return resultList; + } + + private KLinkedList copyList(KLinkedList linkedList) { + if (linkedList == null) { + return null; + } + + KLinkedList result = new KLinkedList(); + KIterator iterator = linkedList.iterator(); + while (iterator.hasNext()) { + result.add(iterator.next()); + } + + return result; + } + + private void ensureIndex(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + } + + private void removeNode(Node pre, Node node) { + pre.next = node.next; + this.size--; + if (this.last == node) { + this.last = pre; + } } private static class Node { @@ -231,4 +470,26 @@ private static class Node { this.data = data; } } + + private class Iterator implements KIterator { + private Node node; + + Iterator(KLinkedList list) { + this.node = list.head; + } + + @Override + public boolean hasNext() { + return node.next != null; + } + + @Override + public T next() { + if (hasNext()) { + node = node.next; + return node.data; + } + return null; + } + } } diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedListTest.java b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedListTest.java new file mode 100644 index 0000000000..f086efdbdc --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coding/basic/list/KLinkedListTest.java @@ -0,0 +1,157 @@ +package org.korben.coding.basic.list; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * 閾捐〃娴嬭瘯--绗笁娆$畻娉曚綔涓 + * + * Created by Korben on 07/03/2017. + */ +public class KLinkedListTest { + + private KLinkedList linkedList; + + @Before + public void init() { + linkedList = new KLinkedList<>(); + for (int i = 0; i < 5; i++) { + linkedList.add(i); + } + } + + @Test + public void reverse() throws Exception { + // 娴嬭瘯澶氫釜 + linkedList.reverse(); + Assert.assertEquals(linkedList.size(), 5); + for (int i = 0; i < 5; i++) { + Assert.assertEquals(linkedList.get(i).intValue(), 4 - i); + } + + // 娴嬭瘯绌洪摼琛 + linkedList = new KLinkedList<>(); + linkedList.reverse(); + Assert.assertEquals(linkedList.size(), 0); + + // 娴嬭瘯鍗曚釜 + linkedList.add(0); + linkedList.reverse(); + Assert.assertEquals(linkedList.size(), 1); + Assert.assertEquals(linkedList.get(0).intValue(), 0); + } + + @Test + public void removeFirstHalf() throws Exception { + linkedList.removeFirstHalf(); + Assert.assertEquals(linkedList.size(), 3); + for (int i = 0; i < 3; i++) { + Assert.assertEquals(linkedList.get(i).intValue(), i + 2); + } + + linkedList = new KLinkedList<>(); + linkedList.removeFirstHalf(); + Assert.assertEquals(linkedList.size(), 0); + } + + @Test + public void remove() throws Exception { + // 娴嬭瘯鍒犻櫎寮濮嬭妭鐐 + { + linkedList.remove(0, 2); + Assert.assertEquals(linkedList.size(), 3); + for (int i = 0; i < 3; i++) { + Assert.assertEquals(linkedList.get(i).intValue(), i + 2); + } + } + + // 娴嬭瘯鍒犻櫎涓棿鑺傜偣 + { + init(); + linkedList.remove(1, 2); + Assert.assertEquals(linkedList.size(), 3); + Assert.assertEquals(linkedList.get(0).intValue(), 0); + Assert.assertEquals(linkedList.get(1).intValue(), 3); + Assert.assertEquals(linkedList.get(2).intValue(), 4); + } + + // 娴嬭瘯鍒犻櫎鏈熬鑺傜偣 + { + init(); + linkedList.remove(3, 2); + Assert.assertEquals(linkedList.size(), 3); + Assert.assertEquals(linkedList.get(0).intValue(), 0); + Assert.assertEquals(linkedList.get(1).intValue(), 1); + Assert.assertEquals(linkedList.get(2).intValue(), 2); + } + + // 娴嬭瘯鍒犻櫎鍏ㄩ儴 + { + init(); + linkedList.remove(0, 5); + Assert.assertEquals(linkedList.size(), 0); + } + } + + @Test + public void getElements() throws Exception { + KLinkedList list = new KLinkedList<>(); + list.add(2); + list.add(4); + + int[] elements = linkedList.getElements(list); + Assert.assertEquals(elements.length, 2); + Assert.assertEquals(elements[0], linkedList.get(2).intValue()); + Assert.assertEquals(elements[1], linkedList.get(4).intValue()); + } + + @Test + public void subtract() throws Exception { + KLinkedList list = new KLinkedList<>(); + list.add(2); + list.add(4); + + linkedList.subtract(list); + Assert.assertEquals(linkedList.size(), 3); + Assert.assertEquals(linkedList.get(0).intValue(), 0); + Assert.assertEquals(linkedList.get(1).intValue(), 1); + Assert.assertEquals(linkedList.get(2).intValue(), 3); + } + + @Test + public void removeDuplicateValues() throws Exception { + linkedList = new KLinkedList<>(); + for (int i = 0; i < 10; i++) { + linkedList.add(i / 2); + } + + linkedList.removeDuplicateValues(); + Assert.assertEquals(linkedList.size(), 5); + for (int i = 0; i < 5; i++) { + Assert.assertEquals(linkedList.get(i).intValue(), i); + } + } + + @Test + public void removeRange() throws Exception { + linkedList.removeRange(2, 4); + Assert.assertEquals(linkedList.size(), 2); + Assert.assertEquals(linkedList.get(0).intValue(), 0); + Assert.assertEquals(linkedList.get(1).intValue(), 1); + } + + @Test + public void intersection() throws Exception { + KLinkedList insertList = new KLinkedList(); + for (int i = 3; i < 8; i++) { + insertList.add(i); + } + + KLinkedList intersection = linkedList.intersection(insertList); + Assert.assertEquals(intersection.size(), 8); + for (int i = 0; i < intersection.size(); i++) { + Assert.assertEquals(intersection.get(i), i); + } + } +} \ No newline at end of file From aa9a515649cce4260ed37acdb85cf1fe330104e7 Mon Sep 17 00:00:00 2001 From: laoheihei Date: Thu, 9 Mar 2017 12:26:19 +0800 Subject: [PATCH 201/646] done with ArrayList.java --- group22/2622819383/Task1/ArrayList.java | 136 ++++++++++++++++++++++-- 1 file changed, 125 insertions(+), 11 deletions(-) diff --git a/group22/2622819383/Task1/ArrayList.java b/group22/2622819383/Task1/ArrayList.java index ca9faa3291..1c060ffe3a 100644 --- a/group22/2622819383/Task1/ArrayList.java +++ b/group22/2622819383/Task1/ArrayList.java @@ -1,30 +1,144 @@ public class ArrayList implements List { - private int size = 0; + private int size; + + private int capacity; + + private static final int DEFAULT_CAPACITY = 10; - private Object[] elementData = new Object[100]; + private Object[] elementData; + + //add()时用于扩容 + private void expand() { + if (size < capacity) return;//尚未满员,不必扩容 + + if (capacity < DEFAULT_CAPACITY) capacity = DEFAULT_CAPACITY;//不低于最小容量 + + Object[] oldElem = elementData; + elementData = new Object[capacity <<= 1]; + for (int i = 0; i < size; i++) + elementData[i] = oldElem[i]; + } + + //remove()时用于缩容 + private void shrink() { + if (capacity < DEFAULT_CAPACITY << 1) return;//不致收缩至DEFAULT_CAPACITY以下 + + if (capacity >> 2 < size) return; //以25%为界 + + Object[] oldElem = elementData; elementData = new Object[capacity >>= 1]; + for (int i = 0; i < size; i++) + elementData[i] = oldElem[i]; + + } + + public ArrayList() { + clear(); + } + + public ArrayList(Object ...args) { + this(); + for (Object o : args) + add(o); + } + + public void clear() { + size = 0; + elementData = new Object[capacity = DEFAULT_CAPACITY]; + } + public int size() { return size; } + + public int capacity() { return capacity; }//用于测试shrink()&expand() + + public boolean isEmpty() { return size == 0; } + public void add(Object o){ - + add(size(), o); } public void add(int index, Object o){ - + if (index < 0 || size < index) throw new IndexOutOfBoundsException(); + expand(); + + for (int i = size; i > index; i--) + elementData[i] = elementData[i - 1]; + elementData[index] = o; + + size++; } + public void add(Object ...args) { + for (Object o : args) + add(o); + } public Object get(int index){ - return null; + if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); + return elementData[index]; } public Object remove(int index){ - return null; - } - - public int size(){ - return -1; + if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); + + Object removed = elementData[index]; + + for (int i = index; i < size - 1; i++) + elementData[i] = elementData[i + 1]; + size--; + shrink(); + return removed; } + + public void removeElems(int ...args) { + for (int i : args) + remove(i); + } public Iterator iterator(){ - return null; + return new ArrayListIterator(); } + private class ArrayListIterator implements Iterator { + private int current; + public boolean hasNext() { return current != size; } + public Object next() { + if (!hasNext()) throw new java.util.NoSuchElementException(); + + return elementData[current++]; + } + } + public static void showElements(ArrayList list) { + System.out.print("当前list中元素:"); + Iterator iter = list.iterator(); + while (iter.hasNext()) + System.out.print(iter.next() + " "); + System.out.println(); + } + + public static void test(ArrayList list) { + System.out.println("--------基本方法测试---------"); + System.out.println("当前list.isEmpty(): " + list.isEmpty()); + System.out.println("当前list.size(): " + list.size()); + System.out.println("当前list.capacity(): " + list.capacity()); + showElements(list); + + } + + public static void main(String[] args) { + ArrayList list = new ArrayList(1, 2, 3, 4, 5); + test(list); + list.add(6, 7, 8, 9, 10); + test(list); + list.add(3, 11); + list.get(3); + test(list); + list.remove(3); + test(list); + list.add(11,12,13,14,15,16,17,18,19,20,21,22,23,24); + test(list); + + list.removeElems(1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); + test(list); + + + } } From f1691151953a645e9e602ed2111434a611b981df Mon Sep 17 00:00:00 2001 From: laoheihei Date: Thu, 9 Mar 2017 12:32:42 +0800 Subject: [PATCH 202/646] add ignore file --- group22/2622819383/Task1/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 group22/2622819383/Task1/.gitignore diff --git a/group22/2622819383/Task1/.gitignore b/group22/2622819383/Task1/.gitignore new file mode 100644 index 0000000000..5241a7220a --- /dev/null +++ b/group22/2622819383/Task1/.gitignore @@ -0,0 +1 @@ +*.class \ No newline at end of file From 2f5a03f209f73445de5ec8896d7ce6afa96d852c Mon Sep 17 00:00:00 2001 From: GordenChow <513274874@qq.com> Date: Thu, 9 Mar 2017 15:34:46 +0800 Subject: [PATCH 203/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E5=91=A8=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group27/513274874/homework/.classpath | 7 + group27/513274874/homework/.gitignore | 1 + group27/513274874/homework/.project | 17 ++ .../src/com/coding/basic/ArrayList.java | 120 +++++++++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 188 ++++++++++++++++++ .../homework/src/com/coding/basic/List.java | 9 + .../homework/src/com/coding/basic/Queue.java | 48 +++++ .../homework/src/com/coding/basic/Stack.java | 65 ++++++ .../test/com/coding/basic/ArrayListTest.java | 151 ++++++++++++++ 11 files changed, 645 insertions(+) create mode 100644 group27/513274874/homework/.classpath create mode 100644 group27/513274874/homework/.gitignore create mode 100644 group27/513274874/homework/.project create mode 100644 group27/513274874/homework/src/com/coding/basic/ArrayList.java create mode 100644 group27/513274874/homework/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/513274874/homework/src/com/coding/basic/Iterator.java create mode 100644 group27/513274874/homework/src/com/coding/basic/LinkedList.java create mode 100644 group27/513274874/homework/src/com/coding/basic/List.java create mode 100644 group27/513274874/homework/src/com/coding/basic/Queue.java create mode 100644 group27/513274874/homework/src/com/coding/basic/Stack.java create mode 100644 group27/513274874/homework/test/com/coding/basic/ArrayListTest.java diff --git a/group27/513274874/homework/.classpath b/group27/513274874/homework/.classpath new file mode 100644 index 0000000000..2d7497573f --- /dev/null +++ b/group27/513274874/homework/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group27/513274874/homework/.gitignore b/group27/513274874/homework/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group27/513274874/homework/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group27/513274874/homework/.project b/group27/513274874/homework/.project new file mode 100644 index 0000000000..b6d8ce6204 --- /dev/null +++ b/group27/513274874/homework/.project @@ -0,0 +1,17 @@ + + + coding2017 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/513274874/homework/src/com/coding/basic/ArrayList.java b/group27/513274874/homework/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..1b6f5c4e7d --- /dev/null +++ b/group27/513274874/homework/src/com/coding/basic/ArrayList.java @@ -0,0 +1,120 @@ + +package com.coding.basic; + +import java.util.Arrays; + +/** + * @autor zhougd 20170306 + * 鏁扮粍瀹炵幇ArrayList + */ +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData; + + //鎵╁榛樿鍊 + private static final int INCREAMENT_CAP = 10; + + //鍚弬鏁扮殑鏋勯犲嚱鏁 + public ArrayList(int size, Object[] elementData) { + this.size = size; + this.elementData = elementData; + } + + //榛樿100瀹归噺鐨勬瀯閫犲嚱鏁 + public ArrayList() { + this.size = 0; + this.elementData = new Object[100]; + } + + @Override + public void add(Object o) { + //鍒ゆ柇瓒呰繃瀹归噺鑷姩鎵╁ + if (this.size + 1 > this.elementData.length) { + increase(); + } + this.elementData[size++] = o; + } + + @Override + public void add(int index, Object o) { + if (index < 0 || index > this.size) { + throw new IndexOutOfBoundsException("Index out of bound!"); + } + //鍒ゆ柇瓒呰繃瀹归噺鑷姩鎵╁ + if (this.size + 1 > this.elementData.length) { + increase(); + } + this.size++; + //index鍚庨潰鏁扮粍鍚庣Щ涓浣 + for (int cur = this.size; cur > index; cur--) { + this.elementData[cur] = this.elementData[cur - 1]; + } + + this.elementData[index] = o; + + } + + public Object get(int index) { + if (index < 0 || index > this.size) { + throw new IndexOutOfBoundsException("Index out of bound!"); + } + return this.elementData[index]; + } + + public Object remove(int index) { + Object o = this.get(index); + this.size--; + //index鍚庨潰鐨勬暟鍚戝墠绉诲姩涓浣 + for (int cur = index + 1; cur < this.size; cur++) { + this.elementData[cur] = this.elementData[cur + 1]; + } + return o; + } + + public int size() { + return this.size; + } + + public Iterator iterator() { + return new ArrayListIterator(); + } + + @Override + public String toString() { + String arrayStr = "ArrayList{ size = " + this.size() + " , "; + + arrayStr += "elementData=["; + for(int i = 0 ;isize()){ + throw new IndexOutOfBoundsException("Index out of bound !"); + } + } + + private Node getNode(int index ){ + + Node node = this.head; + for(int i = 0 ;i +* @since
涓夋湀 6, 2017
+* @version 1.0 +*/ +public class ArrayListTest { + +@Before +public void before() throws Exception { + +} + +@After +public void after() throws Exception { +} + +/** +* +* Method: add(Object o) +* +*/ +@Test +public void testAddO() throws Exception { + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(100); + arrayList.add(20); + + for(int i = 1 ;i <= 200 ;i++){ + arrayList.add(new Random().nextInt(100)); + } + + System.out.println(arrayList); + + assert(arrayList.size() == 202); +} + +/** +* +* Method: add(int index, Object o) +* +*/ +@Test +public void testAddForIndexO() throws Exception { + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(1); + arrayList.add(2); + arrayList.add(3); + arrayList.add(4); + arrayList.add(5); + + arrayList.add(3,"娣诲姞"); + //arrayList.add(100,3); + assert(arrayList.size() == 6); + System.out.println(arrayList); +} + +/** +* +* Method: get(int index) +* +*/ +@Test +public void testGet() throws Exception { + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(1); + arrayList.add(2); + arrayList.add(3); + arrayList.add(4); + arrayList.add(5); + + assert(((Integer)arrayList.get(3)).intValue() == 4); +} + +/** +* +* Method: remove(int index) +* +*/ +@Test +public void testRemove() throws Exception { + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(1); + arrayList.add(2); + arrayList.add(3); + arrayList.add(4); + arrayList.add(5); + + arrayList.remove(3); + //arrayList.add(100,3); + assert(arrayList.size() == 4); + System.out.println(arrayList); +} + +/** +* +* Method: size() +* +*/ +@Test +public void testSize() throws Exception { +//TODO: Test goes here... + + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(100); + arrayList.add(20); + + for(int i = 1 ;i <= 200 ;i++){ + arrayList.add(new Random().nextInt(100)); + } + + System.out.println(arrayList); + + assert(arrayList.size() == 202); +} + +/** +* +* Method: iterator() +* +*/ +@Test +public void testIterator() throws Exception { +//TODO: Test goes here... + ArrayList arrayList = new com.coding.basic.ArrayList(); + arrayList.add(100); + arrayList.add(20); + + for(int i = 1 ;i <= 200 ;i++){ + arrayList.add(new Random().nextInt(100)); + } + System.out.println(arrayList); + + Iterator iterator = arrayList.iterator(); + while(iterator.hasNext()){ + System.out.print(iterator.next() + ","); + } + + assert(arrayList.size() == 202); +} + +} From 0a10f998bd356e10b09dca4f3bee80658cd3f8aa Mon Sep 17 00:00:00 2001 From: myThinkPad <1252327158@qq.com> Date: Thu, 9 Mar 2017 15:53:48 +0800 Subject: [PATCH 204/646] task1 --- group27/1252327158/task1_20170312/.classpath | 1 + .../src/com/coding/ArrayList.java | 140 +++++++++++------- .../src/com/coding/ArrayListTest.java | 62 ++++++++ .../src/com/coding/Iterator.java | 5 +- .../task1_20170312/src/com/coding/List.java | 10 +- 5 files changed, 160 insertions(+), 58 deletions(-) create mode 100644 group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java diff --git a/group27/1252327158/task1_20170312/.classpath b/group27/1252327158/task1_20170312/.classpath index fb5011632c..3e0fb272a8 100644 --- a/group27/1252327158/task1_20170312/.classpath +++ b/group27/1252327158/task1_20170312/.classpath @@ -2,5 +2,6 @@ + diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java index f49ea9cdd1..d371a5c8a4 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -1,73 +1,113 @@ package com.coding; -public class ArrayList implements List { - - private final static int INIT_CAPACITY = 100; - - private final static int INCREASE_CAPACITY = 50; - - private int size = 0; - - private int mCurrentCapacity = INIT_CAPACITY; +import java.util.ConcurrentModificationException; +import java.util.NoSuchElementException; + +public class ArrayList implements List { + + private final static int INIT_CAPACITY = 3; + + private final static int INCREASE_CAPACITY = 1; + + private int size = 0; //列表当前使用长度 + private int modCount = 0; //记录列表修改次数 + + private int mCurrentCapacity = INIT_CAPACITY; //列表当前容量 + private Object[] elementData = new Object[INIT_CAPACITY]; - public void add(Object o) { - if (size < mCurrentCapacity) { - elementData[size] = o; - size++; - } else { - Object[] newElementData = new Object[mCurrentCapacity + INCREASE_CAPACITY]; - System.arraycopy(elementData, 0, newElementData, 0, size); - newElementData[size] = o; - elementData = newElementData; - size++; - mCurrentCapacity += INCREASE_CAPACITY; - } + private void expansion() { + Object[] newElementData = new Object[mCurrentCapacity + INCREASE_CAPACITY]; + System.arraycopy(elementData, 0, newElementData, 0, elementData.length); + elementData = newElementData; + mCurrentCapacity += INCREASE_CAPACITY; } - public void add(int index, Object o){ - if (index > size) { - return; /////////////////////////// - } else { - if (size >= mCurrentCapacity) { - Object[] newElementData = new Object[mCurrentCapacity + INCREASE_CAPACITY]; - System.arraycopy(elementData, 0, newElementData, 0, size); - elementData = newElementData; - mCurrentCapacity += INCREASE_CAPACITY; - } - for (int i = size; i > index; i--) { - elementData[i] = elementData[i-1]; - } - elementData[index] = o; - size++; + + @Override + public void add(T o) { + if (size >= mCurrentCapacity) { + expansion(); } + elementData[size] = o; + size++; + modCount++; } - - public Object get(int index){ - if (index >= size) { - return null; ///////////////////////////////// + + @Override + public void add(int index, T o){ + if (index > size || index < 0) { + throw new IndexOutOfBoundsException(); + } + if (size >= mCurrentCapacity) { + expansion(); } - return elementData[index]; + for (int i = size; i > index; i--) { + elementData[i] = elementData[i-1]; + } + elementData[index] = o; + size++; + modCount++; } - - public Object remove(int index){ - if (index >= size) { - return null;///////////////////////////////////// + + @Override + public T get(int index){ + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException(); + } + return (T)elementData[index]; + } + + @Override + public T remove(int index){ + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException(); } Object item = elementData[index]; for (int i = index; i < size - 1; i++) { elementData[i] = elementData[i+1]; } size--; - return item; + modCount++; + return (T)item; } - + + @Override public int size(){ return size; } - - public Iterator iterator(){ - return null; + + public Iterator iterator(){ + return new Iter(); } + private class Iter implements Iterator { + int cursor; + int lastRet = -1; + int expectedModCount = modCount; + + @Override + public boolean hasNext() { + return cursor != size; + } + + @Override + public T next() { + checkForComodification(); + if (cursor >= size) { + throw new NoSuchElementException(); + } + Object item = elementData[cursor]; + cursor++; + lastRet++; + return (T)item; + } + + final void checkForComodification() + { + if (modCount != expectedModCount) + throw new ConcurrentModificationException(); + } + } + } diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java new file mode 100644 index 0000000000..bcf4af5022 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java @@ -0,0 +1,62 @@ +package com.coding; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + +public class ArrayListTest { + + ArrayList list; + + @Before + public void setUp() throws Exception { + list = new ArrayList(); + list.add(new String("first")); + list.add(new String("second")); + list.add(new String("third")); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testAddObject() { + list.add(new String("forth")); + Assert.assertEquals("forth", (String)list.get(3)); + } + + @Test + public void testAddIntObject() { + list.add(1, new String("add")); + Assert.assertEquals("add", (String)list.get(1)); + Assert.assertEquals("second", (String)list.get(2)); + } + + @Test + public void testGet() { + Assert.assertEquals("third", list.get(2)); + } + + @Test + public void testRemove() { + list.remove(0); + Assert.assertEquals("second", list.get(0)); + } + + @Test + public void testSize() { + Assert.assertEquals(3, list.size()); + } + + @Test + @Ignore("not implemented yet") + public void testIterator() { + fail("Not yet implemented"); + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/Iterator.java b/group27/1252327158/task1_20170312/src/com/coding/Iterator.java index 7533c97158..7d5b1e3b63 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/Iterator.java +++ b/group27/1252327158/task1_20170312/src/com/coding/Iterator.java @@ -1,7 +1,6 @@ package com.coding; -public interface Iterator { +public interface Iterator { public boolean hasNext(); - public Object next(); - + public T next(); } diff --git a/group27/1252327158/task1_20170312/src/com/coding/List.java b/group27/1252327158/task1_20170312/src/com/coding/List.java index d39f4eea4c..0cd05a3bae 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/List.java +++ b/group27/1252327158/task1_20170312/src/com/coding/List.java @@ -1,9 +1,9 @@ package com.coding; -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); +public interface List { + public void add(T o); + public void add(int index, T o); + public T get(int index); + public T remove(int index); public int size(); } From e2d14dc6809168c62a49e5c14750feeeba76f6d7 Mon Sep 17 00:00:00 2001 From: xiongrui Date: Thu, 9 Mar 2017 17:16:21 +0800 Subject: [PATCH 205/646] simple complete Stack --- .../src/com/coding/basic/ArrayList.java | 24 ++++++++++--------- .../627559964/src/com/coding/basic/Stack.java | 15 ++++++++---- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/group22/627559964/src/com/coding/basic/ArrayList.java b/group22/627559964/src/com/coding/basic/ArrayList.java index 8a1eded430..e20bd4ca45 100644 --- a/group22/627559964/src/com/coding/basic/ArrayList.java +++ b/group22/627559964/src/com/coding/basic/ArrayList.java @@ -10,10 +10,10 @@ */ public class ArrayList implements List { - //list长度 + // list长度 private int size = 0; - //list的元素集合 + // list的元素集合 private Object[] elementData = new Object[10]; /** @@ -34,6 +34,7 @@ private Object[] concat(Object[] arrays1, Object[] arrays2) { * 分割数组 * * @param arrays + * @param from * @param index * @return Object[] */ @@ -46,7 +47,8 @@ private Object[] subArrays(Object[] arrays, int from, int index) { } /** - * 动态增长list长度 策略为:newSize = oldSize * 1.5 + * 动态增长list长度 + * 策略为:newSize = oldSize * 1.5 * * @param oldSize */ @@ -79,7 +81,7 @@ public void add(Object o) { /** * 新增元素 * - * @param index, + * @param index * @param Object */ public void add(int index, Object o) { @@ -113,12 +115,12 @@ public Object remove(int index) { Object[] arrays1 = subArrays(elementData, 0, index); Object[] arrays2 = subArrays(elementData, index + 1, elementData.length); Object obj = elementData[index]; - - size --; + + size--; elementData = concat(arrays1, arrays2); return obj; } - + /** * 返回list长度 * @@ -129,16 +131,16 @@ public int size() { } /** - * 重写迭代器 + * 重写迭代器 * * @return IteratorImpl */ public Iterator iterator() { - + class IteratorImpl implements Iterator { private int point = 0; - + @Override public boolean hasNext() { if (elementData[point] != null) { @@ -151,7 +153,7 @@ public boolean hasNext() { public Object next() { return elementData[point++]; } - + } return new IteratorImpl(); } diff --git a/group22/627559964/src/com/coding/basic/Stack.java b/group22/627559964/src/com/coding/basic/Stack.java index b68067ee75..0d93aabb47 100644 --- a/group22/627559964/src/com/coding/basic/Stack.java +++ b/group22/627559964/src/com/coding/basic/Stack.java @@ -1,24 +1,31 @@ package com.coding.basic; public class Stack { + private ArrayList elementData = new ArrayList(); public void push(Object o) { + elementData.add(o); } public Object pop() { - return null; + Object obj = elementData.get(0); + elementData.remove(0); + return obj; } public Object peek() { - return null; + return elementData.get(0); } public boolean isEmpty() { - return false; + if (elementData.size() != 0) { + return false; + } + return true; } public int size() { - return -1; + return elementData.size(); } } \ No newline at end of file From bee5ae231502b9acd178949b0d3c31e23f3ab6c1 Mon Sep 17 00:00:00 2001 From: Fred Qin Date: Thu, 9 Mar 2017 01:34:34 -0800 Subject: [PATCH 206/646] complete linkedlist exercise --- .../coderising/download/DownloadThread.java | 20 + .../coderising/download/FileDownloader.java | 73 ++++ .../download/FileDownloaderTest.java | 59 +++ .../coderising/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++ .../download/impl/ConnectionManagerImpl.java | 15 + .../src/com/coding/basic/LinkedList.java | 343 ++++++++++++++++-- .../src/com/coding/basic/LinkedListTest.java | 184 +++++++++- 11 files changed, 728 insertions(+), 36 deletions(-) create mode 100644 group11/395443277/src/com/coderising/download/DownloadThread.java create mode 100644 group11/395443277/src/com/coderising/download/FileDownloader.java create mode 100644 group11/395443277/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group11/395443277/src/com/coderising/download/api/Connection.java create mode 100644 group11/395443277/src/com/coderising/download/api/ConnectionException.java create mode 100644 group11/395443277/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group11/395443277/src/com/coderising/download/api/DownloadListener.java create mode 100644 group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group11/395443277/src/com/coderising/download/DownloadThread.java b/group11/395443277/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..900a3ad358 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group11/395443277/src/com/coderising/download/FileDownloader.java b/group11/395443277/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..c3c8a3f27d --- /dev/null +++ b/group11/395443277/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group11/395443277/src/com/coderising/download/FileDownloaderTest.java b/group11/395443277/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4ff7f46ae0 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group11/395443277/src/com/coderising/download/api/Connection.java b/group11/395443277/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group11/395443277/src/com/coderising/download/api/ConnectionException.java b/group11/395443277/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ b/group11/395443277/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group11/395443277/src/com/coderising/download/api/ConnectionManager.java b/group11/395443277/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group11/395443277/src/com/coderising/download/api/DownloadListener.java b/group11/395443277/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java b/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..36a9d2ce15 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..172371dd55 --- /dev/null +++ b/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group11/395443277/src/com/coding/basic/LinkedList.java b/group11/395443277/src/com/coding/basic/LinkedList.java index fb9fbd81ca..df5d62aed8 100644 --- a/group11/395443277/src/com/coding/basic/LinkedList.java +++ b/group11/395443277/src/com/coding/basic/LinkedList.java @@ -3,84 +3,99 @@ import java.util.NoSuchElementException; public class LinkedList implements List { + private Node head; - - public void add(Object o){ + + public void add(Object o) { Node newNode = new Node(); newNode.data = o; newNode.next = null; - + if (head == null) { head = newNode; } else { Node curr = head; - while(curr.next != null) { + while (curr.next != null) { curr = curr.next; } curr.next = newNode; } } - public void add(int index , Object o){ + + public void add(int index, Object o) { Node newNode = new Node(); newNode.data = o; newNode.next = null; - + + if (index == 0) { + this.addFirst(o); + return; + } + if (head == null) { head = newNode; } else { Node curr = head; Node prev = curr; - while(index >0 && curr.next != null) { + while (index > 0 && curr.next != null) { prev = curr; curr = curr.next; index--; } - + prev.next = newNode; newNode.next = curr; } } - public Object get(int index){ + + public Object get(int index) { + if (index >= this.size()) { + return null; + } + Node curr = head; - while(index > 0) { + while (index > 0) { curr = curr.next; index--; - } + } return curr.data; } - public Object remove(int index){ - if (index ==0) { + + public Object remove(int index) { + if (index == 0) { return this.removeFirst(); } - + Node curr = head; Node prev = curr; - while(index >0 && curr.next != null) { + while (index > 0 && curr.next != null) { prev = curr; curr = curr.next; index--; } - + Object target = curr.data; prev.next = curr.next; curr.next = null; - + return target; } - public int size(){ + + public int size() { int size = 0; Node curr = head; - while(curr != null) { + while (curr != null) { size++; curr = curr.next; } return size; } - public void addFirst(Object o){ + + public void addFirst(Object o) { Node newNode = new Node(); newNode.data = o; newNode.next = null; - + if (head == null) { head = newNode; } else { @@ -88,37 +103,40 @@ public void addFirst(Object o){ head.next = newNode; } } - public void addLast(Object o){ + + public void addLast(Object o) { Node newNode = new Node(); newNode.data = o; newNode.next = null; - + Node curr = head; if (head == null) { head = newNode; } else { - while(curr.next != null) { + while (curr.next != null) { curr = curr.next; } curr.next = newNode; } } - public Object removeFirst(){ + + public Object removeFirst() { if (head == null) { return null; } - + Object target = head.data; head = head.next; return target; } - public Object removeLast(){ + + public Object removeLast() { if (head == null) { return null; } Node curr = head; Node prev = curr; - while(curr.next != null) { + while (curr.next != null) { prev = curr; curr = curr.next; } @@ -126,13 +144,23 @@ public Object removeLast(){ prev.next = null; return target; } - public Iterator iterator(){ + + public void print() { + Node curr = head; + + while (curr != null) { + System.out.println(curr.data); + curr = curr.next; + } + } + + public Iterator iterator() { return new SeqIterator(); } - + private class SeqIterator implements Iterator { Node curr = head; - + @Override public boolean hasNext() { return curr != null; @@ -140,17 +168,262 @@ public boolean hasNext() { @Override public Object next() { - if (!hasNext()) throw new NoSuchElementException(); + if (!hasNext()) + throw new NoSuchElementException(); Object target = curr.data; curr = curr.next; return target; } } - - private static class Node{ + + private static class Node { Object data; Node next; - + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (head != null) { + Node curr = head; + Node nextNode = null; + Node prev = null; + + // move curr node link + while (curr != null) { + // move link + nextNode = curr.next; + curr.next = prev; + + // move forward + prev = curr; + curr = nextNode; + } + + head = prev; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + if (head != null) { + int listSize = this.size(); + int half = (int) Math.ceil(listSize / 2); + + Node curr = head; + while (half > 0) { + curr = curr.next; + head = curr; + half--; + } + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (head == null) { + return; + } + + if (i < 0) { + return; + } + + if (i > this.size() - 1) { + return; + } + + Node curr = head; + Node prev = head; + // move to index i + while (i > 0 && curr != null) { + prev = curr; + curr = curr.next; + i--; + } + + // if curr is out of bound return + if (curr == null) { + return; + } + + // else move length + while (length > 0 && curr != null) { + curr = curr.next; + length--; + } + + // special case to head + if (prev == head) { + head = curr; + } else { + prev.next = curr; + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if (list.size() == 0) { + return null; + } + + if (head == null) { + return null; + } + + // TODO: remove list which not existed in the original list + // special case: 1->3->4->20 + + int[] newArr = new int[list.size()]; + int i = 0; + Iterator it = list.iterator(); + while (it.hasNext()) { + int id = (int) it.next(); + + // if element is not existed + if (this.get(id) != null) { + int listElement = (int) this.get(id); + newArr[i] = listElement; + i++; + } + } + + return newArr; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + if (list.size() == 0) { + return; + } + + if (head == null) { + return; + } + + Iterator it = list.iterator(); + while (it.hasNext()) { + int id = (int) it.next(); + this.remove(id); + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + if (head == null) { + return; + } + + Node curr = head; + + // note: + // duplicate value in the first or last + // all values the same + while (curr.next != null) { + if (curr.data.equals(curr.next.data)) { + curr.next = curr.next.next; + } else { + curr = curr.next; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if (head == null) { + return; + } + + if (min > max) { + return; + } + + // only works for integer + Node curr = head; + Node prev = head; + // include last node + while (curr != null) { + if ((int) curr.data > min && (int) curr.data < max) { + // special case for head + if (curr == head) { + head = curr.next; + } else { + prev.next = curr.next; + curr = curr.next; + } + } else { + prev = curr; + curr = curr.next; + } + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + if (list.size() == 0) { + return null; + } + + if (head == null) { + return null; + } + + // find size + int l1Size = this.size(); + int l2Size = list.size(); + + // runner + int i = 0; + int j = 0; + + LinkedList rtnList = new LinkedList(); + + while (i < l1Size && j < l2Size) { + if (this.get(i).equals(list.get(j))) { + rtnList.add(this.get(i)); + i++; + j++; + } else if ((int) this.get(i) < (int) list.get(j)) { + i++; + } else { + j++; + } + } + + return rtnList; } } diff --git a/group11/395443277/src/com/coding/basic/LinkedListTest.java b/group11/395443277/src/com/coding/basic/LinkedListTest.java index af5aa2d3a2..47418e188d 100644 --- a/group11/395443277/src/com/coding/basic/LinkedListTest.java +++ b/group11/395443277/src/com/coding/basic/LinkedListTest.java @@ -1,6 +1,7 @@ package com.coding.basic; -import static org.junit.Assert.*; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; import org.junit.Test; @@ -124,4 +125,185 @@ public void testIterator() { assertEquals(3, it.next()); assertEquals(2, it.next()); } + + @Test + public void testReverse() { + LinkedList list = new LinkedList(); + list.add(3); + list.add(7); + list.add(10); + list.add(15); + + list.reverse(); + assertEquals(15, list.get(0)); + + LinkedList list2 = new LinkedList(); + list2.reverse(); + } + + @Test + public void testRemoveFirstHalf() { + LinkedList list = new LinkedList(); + list.add(2); + list.add(5); + list.add(7); + list.add(8); + list.add(10); + + list.removeFirstHalf(); + } + + + @Test + public void testRemoveDuplicateValues() { + LinkedList list = new LinkedList(); + list.add(1); + + // with single element + assertEquals(1, list.get(0)); + + // add another one with 1->1 + list.add(1); + list.removeDuplicateValues(); + assertEquals(1, list.get(0)); + assertEquals(1, list.size()); + + // test the duplicate value is the last one + for(int i=2; i<6; i++) { + list.add(i); + } + list.add(5); + list.removeDuplicateValues(); + assertEquals(5, list.get(4)); + assertEquals(5, list.size()); + + // regular + for(int i=0; i<6; i++) { + list.add(5); + } + list.add(6); + + list.removeDuplicateValues(); + assertEquals(6, list.get(5)); + assertEquals(6, list.size()); + } + + @Test + public void testRemoveRange() { + LinkedList list = new LinkedList(); + + // regular + for(int i=1; i<7; i++) { + list.add(i); + } + + list.removeRange(2, 4); + assertEquals(5, list.size()); + + // head case + list.add(1, 1); + list.removeRange(0, 3); + assertEquals(3, list.size()); + + // tail case + list.add(6); + list.add(7); + list.removeRange(5, 20); + assertEquals(2, list.size()); + } + + @Test + public void testRemoveLength() { + LinkedList list = new LinkedList(); + + // regular + for(int i=0; i<9; i++) { + list.add(i); + } + + // regular + list.remove(4, 2); + + // head + LinkedList list2 = new LinkedList(); + for(int i=0; i<9; i++) { + list2.add(i); + } + list2.remove(0, 3); + + // tail + LinkedList list3 = new LinkedList(); + for(int i=0; i<10; i++) { + list3.add(i); + } + list3.remove(9, 3); + assertEquals(9, list3.size()); + } + + @Test + public void testGetElements() { + LinkedList list1 = new LinkedList(); + // 11->101->201->301->401->501->601->701 + list1.add(11); + list1.add(101); + list1.add(201); + list1.add(301); + list1.add(401); + list1.add(501); + list1.add(601); + list1.add(701); + + LinkedList list2 = new LinkedList(); + // 1->3->4->6 + list2.add(1); + list2.add(3); + list2.add(4); + list2.add(6); + + int[] newArr = list1.getElements(list2); + assertArrayEquals(new int[]{101,301,401,601}, newArr); + } + + @Test + public void testSubtract() { + LinkedList list1 = new LinkedList(); + // 11->101->201->301->401->501->601->701 + list1.add(11); + list1.add(101); + list1.add(201); + list1.add(301); + list1.add(401); + list1.add(501); + list1.add(601); + list1.add(701); + + LinkedList list2 = new LinkedList(); + // 1->3->4->6 + list2.add(1); + list2.add(3); + list2.add(4); + list2.add(6); + + list1.subtract(list2); + // 11->201->501->701 + assertEquals(4, list1.size()); + } + + @Test + public void testIntersection() { + LinkedList list1 = new LinkedList(); + list1.add(1); + list1.add(2); + list1.add(4); + list1.add(5); + + LinkedList list2 = new LinkedList(); + list2.add(2); + list2.add(3); + list2.add(4); + list2.add(7); + + LinkedList l3 = list1.intersection(list2); + assertEquals(2, l3.size()); + } } From 50d2f775ea3dea5819a21a6782f156cd85cc7d18 Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Thu, 9 Mar 2017 18:06:31 +0800 Subject: [PATCH 207/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 106 ++++++++++++++---- .../coderising/download/FileDownloader.java | 30 ++--- .../com/coderising/download/NotifyCaller.java | 73 ++++++------ .../coderising/download/api/Connection.java | 7 ++ .../download/api/DownloadListener.java | 2 +- .../download/impl/ConnectionImpl.java | 16 ++- .../download/FileDownloaderTest.java | 18 ++- 7 files changed, 160 insertions(+), 92 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java index 5f8f34a638..3325381c6c 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -1,54 +1,112 @@ package com.coderising.download; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.io.RandomAccessFile; import com.coderising.download.api.Connection; -public class DownloadThread extends Thread{ +public class DownloadThread extends Thread { - /*榛樿涓嬭浇浣嶇疆*/ - String downloadPath = "C:/Users/ZJ/Desktop"; Connection conn; int startPos; int endPos; + /* 鏂囦欢璺緞 */ + String downloadPath; + /*涓存椂鏂囦欢*/ + File tempFile; + /*鏂囦欢鍚庣紑鍚嶇О*/ + String sufferName; + /*褰撳墠绾跨▼涓嬭浇閲*/ + volatile int downloadSize; - public DownloadThread( String downloadPath,Connection conn, int startPos, int endPos){ - - if(downloadPath!=null&&!downloadPath.isEmpty()){ - this.downloadPath = downloadPath; - } - this.conn = conn; + public DownloadThread(String downloadPath, Connection conn, int startPos, + int endPos) { + + this.downloadPath = downloadPath; + this.conn = conn; this.startPos = startPos; this.endPos = endPos; } - public void run(){ - - try { - - //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶇疆鐨勫瓧鑺 + + /** + * 杩欑鎿嶄綔瀛樺湪寮婄锛 + * 鑻ユ枃浠惰繃澶э紝璋冪敤conn.read璇诲彇杩囩▼涓▼搴忎腑鏂 + * 灏嗘棤娉曠紦瀛樹换浣曟暟鎹 + */ + /*public void run() { + + try { + + //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 璇诲彇鎸囧畾浣嶅瓙鐨勫瓧鑺 byte[] buffer = conn.read(startPos, endPos); //闅忔満璁块棶鏂囦欢娴 - RandomAccessFile raf = new RandomAccessFile(downloadPath+"/"+conn.getDownloadName(), "rw"); + RandomAccessFile raf = new RandomAccessFile(tempFile, "rwd"); //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 raf.seek(startPos);//瀹氫綅鏂囦欢 - //鍐欐枃浠 + //鍐欐枃浠 raf.write(buffer); - raf.close(); + raf.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + }*/ + + public void run() { + + try { + + //淇敼鍚庣紑鍚嶇О,骞朵繚瀛樻纭悗缂鍚 + String name = reSufferNameAndStore(conn.getDownloadName()); + //鍒涘缓涓存椂鏂囦欢 + File file = new File(downloadPath+"/"+name); + if(!file.exists()){ + file.createNewFile(); + } + //鍒濆鍖栧睘鎬 + tempFile = file; + //鑾峰彇鎸囧畾鏂囦欢娈电殑涓嬭浇娴 + InputStream in = conn.getDownloadStream(startPos, endPos); + //闅忔満璁块棶鏂囦欢娴 + RandomAccessFile raf = new RandomAccessFile(tempFile, "rwd"); + //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 + raf.seek(startPos);//瀹氫綅鏂囦欢 + //寮濮嬪啓鍏 + byte[] buffer = new byte[1024]; + int length = -1; + while ((length = in.read(buffer)) != -1) { + raf.write(buffer, 0, length); + downloadSize += length; + } + raf.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); - }finally{ - conn.close(); + } finally { + if (conn != null) { + conn.close(); + } } } - public String getDownloadPath() { - return downloadPath; + /** + * 淇敼鍚庣紑鍚嶇О,骞朵繚瀛樻纭悗缂鍚 + * @param name + * @return + */ + private String reSufferNameAndStore(String name){ + + sufferName = name.substring(name.lastIndexOf(".")); + name = name.substring(0,name.lastIndexOf("."))+".zj鈾y"; + return name; } - public void setDownloadPath(String downloadPath) { - this.downloadPath = downloadPath; - } } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java index b5fe9afa3f..289695cf40 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -16,7 +16,7 @@ public class FileDownloader { ConnectionManager cm; /*绾跨▼鏁扮洰*/ - private final int threadNum = 10; + private final int threadNum = 8; public FileDownloader(String _url) { this.url = _url; @@ -24,41 +24,27 @@ public FileDownloader(String _url) { } public void execute(){ - // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 - // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 - // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 - // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 - // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 - // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 - // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - - + Connection conn = null; try { conn = cm.open(this.url); - int length = conn.getContentLength(); - //瀛樻斁涓嬭浇绾跨▼鍚嶇О + int length = conn.getContentLength(); + //鍒嗛厤涓嬭浇鍧 + int blockSize = length / threadNum; DownloadThread[] threads = new DownloadThread[threadNum]; - int blockSize = length / threadNum; for (int thread = 1; thread <= threadNum; thread++) { int startIndex = (thread - 1) * blockSize; int endIndex = thread * blockSize-1; if (thread == threadNum) {//鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害 endIndex = length; - } - DownloadThread thr= new DownloadThread(downloadPath,cm.open(this.url),startIndex,endIndex); + } + DownloadThread thr = new DownloadThread(downloadPath,cm.open(this.url),startIndex,endIndex); threads[thread-1] = thr; thr.start(); } //鍒ゆ柇鎵鏈夌嚎绋嬫槸鍚︿笅杞藉畬鎴 - new NotifyCaller(listener,threads).start(); + new NotifyCaller(listener,threads,length).start(); } catch (ConnectionException e) { e.printStackTrace(); diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java index dbfa170423..3d680df4d8 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java @@ -1,7 +1,6 @@ package com.coderising.download; -import java.util.Map; -import java.util.Set; +import java.io.File; import com.coderising.download.api.DownloadListener; @@ -10,54 +9,60 @@ public class NotifyCaller extends Thread{ /*鐩戝惉鍣*/ private DownloadListener listener; - /*涓嬭浇绾跨▼*/ - private DownloadThread[] downloadThreads; + /*鍐呭瓨鏂囦欢*/ + DownloadThread[] downloadThreads; + /*鏂囦欢鎬婚暱搴*/ + private int fileLength; - public NotifyCaller(DownloadListener listener,DownloadThread[] downloadThreads){ + private static final int HUNDRED = 100; + + public NotifyCaller(DownloadListener listener,DownloadThread[] downloadThreads,int fileLength){ this.listener = listener; this.downloadThreads = downloadThreads; + this.fileLength = fileLength; } @Override public void run() { - while(true){ - if(DownloadThreadsIsComplete(downloadThreads)){ - listener.notifyFinished(); - } - } - } - - /** - * 鏍规嵁鍚嶇О鍒ゆ柇杩欎簺绾跨▼鏄惁鎵ц瀹屾瘯 - * @param threadNames - * @return - */ - private boolean DownloadThreadsIsComplete(DownloadThread[] downloadThreads){ - - Map threadMaps=Thread.getAllStackTraces(); - Set keySet = threadMaps.keySet(); - for (int i = 0; i < downloadThreads.length; i++) { - if(keySet.contains(downloadThreads[i])){ - return false; + while(true){ + if(HUNDRED == getPercentOfDownload()){ + rename(); } + listener.notifyFinished(getPercentOfDownload()); } - return true; } - + + /** + * 鑾峰彇涓嬭浇鐧惧垎姣 + * @return + */ + private int getPercentOfDownload(){ + + int sum = 0; + for (int i = 0; i < downloadThreads.length; i++) { + sum += downloadThreads[i].downloadSize; + } + return (sum)/(fileLength/HUNDRED); + } + + /** + * 閲嶅懡鍚 + */ + private void rename(){ + + File tempFile = downloadThreads[0].tempFile; + String name = tempFile.getName(); + name = name.substring(0,name.lastIndexOf("."))+downloadThreads[0].sufferName; + File file = new File(tempFile.getPath()+"/"+name); + tempFile.renameTo(file); + } + public DownloadListener getListener() { return listener; } public void setListener(DownloadListener listener) { this.listener = listener; } - - public DownloadThread[] getDownloadThreads() { - return downloadThreads; - } - - public void setDownloadThreads(DownloadThread[] downloadThreads) { - this.downloadThreads = downloadThreads; - } } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java index 0301fe58d6..8ccb6a11bf 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/Connection.java @@ -1,6 +1,7 @@ package com.coderising.download.api; import java.io.IOException; +import java.io.InputStream; public interface Connection { /** @@ -26,4 +27,10 @@ public interface Connection { * @return */ public String getDownloadName(); + + /** + * 鑾峰彇涓嬭浇娴 + * @return + */ + public InputStream getDownloadStream(int startPos, int endPos)throws IOException; } \ No newline at end of file diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java index 4cd0b3eab1..fc81f6c6f4 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java @@ -1,5 +1,5 @@ package com.coderising.download.api; public interface DownloadListener { - public void notifyFinished(); + public void notifyFinished(int percet); } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java index 3f0586dae1..fcf0cf7ae9 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -17,10 +17,8 @@ public class ConnectionImpl implements Connection{ @Override public byte[] read(int startPos, int endPos) throws IOException { - //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 - httpConnection.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); - httpConnection.connect(); - InputStream is = httpConnection.getInputStream(); + + InputStream is = getDownloadStream(startPos,endPos); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int length = -1; @@ -32,6 +30,13 @@ public byte[] read(int startPos, int endPos) throws IOException { return data; } + @Override + public InputStream getDownloadStream(int startPos, int endPos) throws IOException { + //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 + httpConnection.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); + httpConnection.connect(); + return httpConnection.getInputStream(); + } @Override public int getContentLength() { return httpConnection.getContentLength(); @@ -53,5 +58,6 @@ public void setFileName(String fileName) { @Override public String getDownloadName() { return fileName; - } + } + } diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java index 737cde42ab..5d386ddb6b 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java @@ -11,7 +11,7 @@ public class FileDownloaderTest { - boolean downloadFinished = false; + int persent = 0; @Before public void setUp() throws Exception { @@ -35,8 +35,8 @@ public void testDownload() { downloader.setDownloadPath("C:/Users/ZJ/Desktop"); downloader.setListener(new DownloadListener() { @Override - public void notifyFinished() { - downloadFinished = true; + public void notifyFinished(int percent) { + persent = percent; } }); @@ -44,9 +44,16 @@ public void notifyFinished() { downloader.execute(); // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 - while (!downloadFinished) { + int temp = -1; + while (true) { try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + if(temp!=persent){ + temp = persent; + System.out.println("宸蹭笅杞"+persent+"%"); + } + if(persent == 100){ + break; + } //浼戠湢5绉 Thread.sleep(5000); } catch (InterruptedException e) { @@ -56,5 +63,4 @@ public void notifyFinished() { System.out.println("涓嬭浇瀹屾垚锛"); } - } From 02446049cb7a5896f6c17392b0cccb47bf9e25fa Mon Sep 17 00:00:00 2001 From: guoqixuan <1016908591@qq.com> Date: Thu, 9 Mar 2017 19:05:55 +0800 Subject: [PATCH 208/646] week01 homework --- .../src/com/coding/basic/ArrayList.java | 123 ++++++++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++ .../src/com/coding/basic/Iterator.java | 8 + .../src/com/coding/basic/LinkedList.java | 212 ++++++++++++++++++ .../guoqixuan/src/com/coding/basic/List.java | 9 + .../guoqixuan/src/com/coding/basic/Queue.java | 21 ++ .../guoqixuan/src/com/coding/basic/Stack.java | 41 ++++ 7 files changed, 446 insertions(+) create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/ArrayList.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/Iterator.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/LinkedList.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/List.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/Queue.java create mode 100644 group27/1016908591/guoqixuan/src/com/coding/basic/Stack.java diff --git a/group27/1016908591/guoqixuan/src/com/coding/basic/ArrayList.java b/group27/1016908591/guoqixuan/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..2eab2cd640 --- /dev/null +++ b/group27/1016908591/guoqixuan/src/com/coding/basic/ArrayList.java @@ -0,0 +1,123 @@ +package com.coding.basic; + +import java.util.Arrays; + + +public class ArrayList implements List{ + + private int size = 0; + + private Object[] elementData = new Object[100]; + + private int length; + private static final int MAX_SIZE = 50; + + public ArrayList(){ + this(MAX_SIZE); + } + public ArrayList(int maxSize){ + length = 0; + elementData = new Object[maxSize]; + } + + public void add(Object o){ + if(! isFull()){ + elementData[size] =o; + size++; + } + else + elementData = Arrays.copyOf(elementData, elementData.length*2); + + + } + public void add(int index, Object o){ + + makeRoom(index); + elementData[size-1] =o; + size++; + + + + } + + public Object get(int index){ + if(index>0 && indexsize){ + System.out.println("锟斤拷锟斤拷越锟斤拷"); + return null; + } + Object o = elementData[size]; + System.arraycopy(elementData,index+1,elementData,index,size-index-1); + elementData[size--] = null; + return o; + + + } + + public int size(){ + return elementData.length; + } + + public Iterator iterator(){ + return null; + } + + public boolean isFull(){ + return size == elementData.length; + } + + + private void makeRoom(int index){ + for(int i = size;i>=index;i--){ + elementData[i] =elementData[i-1]; + + } + } + + public Iterator getiterator(){ + return new ArrayListIterator(this); + } + + private class ArrayListIterator implements Iterator{ + ArrayList l = null; + private int nextIndex; + ArrayListIterator(ArrayList l){ + nextIndex = 0; + this.l = l; + + } + @Override + public boolean hasNext() { + + return nextIndex7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/1016908591/guoqixuan/src/com/coding/basic/List.java b/group27/1016908591/guoqixuan/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group27/1016908591/guoqixuan/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/1016908591/guoqixuan/src/com/coding/basic/Queue.java b/group27/1016908591/guoqixuan/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..b31c1625b4 --- /dev/null +++ b/group27/1016908591/guoqixuan/src/com/coding/basic/Queue.java @@ -0,0 +1,21 @@ +package com.coding.basic; + +public class Queue { + private LinkedList List = new LinkedList(); + + public void enQueue(Object o){ + List.addLast(o); + } + + public Object deQueue(){ + return List.removeFirst(); + } + + public boolean isEmpty(){ + return List.size()==0; + } + + public int size(){ + return List.size(); + } +} diff --git a/group27/1016908591/guoqixuan/src/com/coding/basic/Stack.java b/group27/1016908591/guoqixuan/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..060fd1862d --- /dev/null +++ b/group27/1016908591/guoqixuan/src/com/coding/basic/Stack.java @@ -0,0 +1,41 @@ +package com.coding.basic; +import java.util.Arrays; +import java.util.EmptyStackException; + +public class Stack { + private ArrayList elementData = new ArrayList(); + private int topIndex =-1;//鏍堥《鍏冪礌绱㈠紩 + private static final int DEFAULT_MAX_SIZE = 50; + private int length; + + //鍘嬪叆涓涓厓绱 + public void push(Object o){ + topIndex++; + elementData.add(o); + + + + } + + public Object pop(){ + if(elementData.size() ==0 ){ + throw new EmptyStackException(); + } + topIndex--; + return elementData.remove(elementData.size()-1); + + } + + public Object peek(){ + if(elementData.size()!=1){ + return elementData.get(elementData.size()-1); + } + return null; + } + public boolean isEmpty(){ + return topIndex>0; + } + public int size(){ + return topIndex; + } +} From 14c298570c49a31865e82a79681d1557430dbdb4 Mon Sep 17 00:00:00 2001 From: guoqixuan <1016908591@qq.com> Date: Thu, 9 Mar 2017 19:17:45 +0800 Subject: [PATCH 209/646] week01homehome --- group27/1016908591/week01/.classpath | 6 + group27/1016908591/week01/.gitignore | 1 + group27/1016908591/week01/.project | 17 ++ .../.settings/org.eclipse.jdt.core.prefs | 11 + .../src/com/coding/basic/ArrayList.java | 123 ++++++++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++ .../week01/src/com/coding/basic/Iterator.java | 8 + .../src/com/coding/basic/LinkedList.java | 212 ++++++++++++++++++ .../week01/src/com/coding/basic/List.java | 9 + .../week01/src/com/coding/basic/Queue.java | 21 ++ .../week01/src/com/coding/basic/Stack.java | 41 ++++ 11 files changed, 481 insertions(+) create mode 100644 group27/1016908591/week01/.classpath create mode 100644 group27/1016908591/week01/.gitignore create mode 100644 group27/1016908591/week01/.project create mode 100644 group27/1016908591/week01/.settings/org.eclipse.jdt.core.prefs create mode 100644 group27/1016908591/week01/src/com/coding/basic/ArrayList.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/Iterator.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/LinkedList.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/List.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/Queue.java create mode 100644 group27/1016908591/week01/src/com/coding/basic/Stack.java diff --git a/group27/1016908591/week01/.classpath b/group27/1016908591/week01/.classpath new file mode 100644 index 0000000000..fb565a588d --- /dev/null +++ b/group27/1016908591/week01/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group27/1016908591/week01/.gitignore b/group27/1016908591/week01/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/group27/1016908591/week01/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/group27/1016908591/week01/.project b/group27/1016908591/week01/.project new file mode 100644 index 0000000000..3b3c4fa7ee --- /dev/null +++ b/group27/1016908591/week01/.project @@ -0,0 +1,17 @@ + + + week01 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/1016908591/week01/.settings/org.eclipse.jdt.core.prefs b/group27/1016908591/week01/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..7341ab1683 --- /dev/null +++ b/group27/1016908591/week01/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/group27/1016908591/week01/src/com/coding/basic/ArrayList.java b/group27/1016908591/week01/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..2eab2cd640 --- /dev/null +++ b/group27/1016908591/week01/src/com/coding/basic/ArrayList.java @@ -0,0 +1,123 @@ +package com.coding.basic; + +import java.util.Arrays; + + +public class ArrayList implements List{ + + private int size = 0; + + private Object[] elementData = new Object[100]; + + private int length; + private static final int MAX_SIZE = 50; + + public ArrayList(){ + this(MAX_SIZE); + } + public ArrayList(int maxSize){ + length = 0; + elementData = new Object[maxSize]; + } + + public void add(Object o){ + if(! isFull()){ + elementData[size] =o; + size++; + } + else + elementData = Arrays.copyOf(elementData, elementData.length*2); + + + } + public void add(int index, Object o){ + + makeRoom(index); + elementData[size-1] =o; + size++; + + + + } + + public Object get(int index){ + if(index>0 && indexsize){ + System.out.println("锟斤拷锟斤拷越锟斤拷"); + return null; + } + Object o = elementData[size]; + System.arraycopy(elementData,index+1,elementData,index,size-index-1); + elementData[size--] = null; + return o; + + + } + + public int size(){ + return elementData.length; + } + + public Iterator iterator(){ + return null; + } + + public boolean isFull(){ + return size == elementData.length; + } + + + private void makeRoom(int index){ + for(int i = size;i>=index;i--){ + elementData[i] =elementData[i-1]; + + } + } + + public Iterator getiterator(){ + return new ArrayListIterator(this); + } + + private class ArrayListIterator implements Iterator{ + ArrayList l = null; + private int nextIndex; + ArrayListIterator(ArrayList l){ + nextIndex = 0; + this.l = l; + + } + @Override + public boolean hasNext() { + + return nextIndex7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/1016908591/week01/src/com/coding/basic/List.java b/group27/1016908591/week01/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group27/1016908591/week01/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/1016908591/week01/src/com/coding/basic/Queue.java b/group27/1016908591/week01/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..b31c1625b4 --- /dev/null +++ b/group27/1016908591/week01/src/com/coding/basic/Queue.java @@ -0,0 +1,21 @@ +package com.coding.basic; + +public class Queue { + private LinkedList List = new LinkedList(); + + public void enQueue(Object o){ + List.addLast(o); + } + + public Object deQueue(){ + return List.removeFirst(); + } + + public boolean isEmpty(){ + return List.size()==0; + } + + public int size(){ + return List.size(); + } +} diff --git a/group27/1016908591/week01/src/com/coding/basic/Stack.java b/group27/1016908591/week01/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..060fd1862d --- /dev/null +++ b/group27/1016908591/week01/src/com/coding/basic/Stack.java @@ -0,0 +1,41 @@ +package com.coding.basic; +import java.util.Arrays; +import java.util.EmptyStackException; + +public class Stack { + private ArrayList elementData = new ArrayList(); + private int topIndex =-1;//鏍堥《鍏冪礌绱㈠紩 + private static final int DEFAULT_MAX_SIZE = 50; + private int length; + + //鍘嬪叆涓涓厓绱 + public void push(Object o){ + topIndex++; + elementData.add(o); + + + + } + + public Object pop(){ + if(elementData.size() ==0 ){ + throw new EmptyStackException(); + } + topIndex--; + return elementData.remove(elementData.size()-1); + + } + + public Object peek(){ + if(elementData.size()!=1){ + return elementData.get(elementData.size()-1); + } + return null; + } + public boolean isEmpty(){ + return topIndex>0; + } + public int size(){ + return topIndex; + } +} From 07d64da88238bd6bdc346c6252bf2f3b32aeaf2a Mon Sep 17 00:00:00 2001 From: lingchen1dian21fen <2474600377@qq.com> Date: Thu, 9 Mar 2017 22:25:05 +0800 Subject: [PATCH 210/646] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=8A=A0=E8=BE=B9=E7=95=8C=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/array/ArrayUtil.java | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/group10/904627477/src/com/coding/array/ArrayUtil.java b/group10/904627477/src/com/coding/array/ArrayUtil.java index 37f230812a..dc3a7a7254 100644 --- a/group10/904627477/src/com/coding/array/ArrayUtil.java +++ b/group10/904627477/src/com/coding/array/ArrayUtil.java @@ -10,6 +10,9 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin){ + if(origin==null){ + return ; + } int len = origin.length; for (int i = 0; i < len/2 ; i++) { int temp = origin[len-1-i]; @@ -27,6 +30,9 @@ public void reverseArray(int[] origin){ */ public int[] removeZero(int[] oldArray){ + if(oldArray==null){ + return new int[0]; + } int[] tempArr = new int[oldArray.length]; int size = 0; for (int i = 0; i < oldArray.length; i++) { @@ -49,6 +55,11 @@ public int[] removeZero(int[] oldArray){ */ public int[] merge(int[] array1, int[] array2){ + if(array1==null&&array2==null){ + return new int[0]; + }else if(array1==null||array2==null){ + return array1==null?array2:array1; + } int[] arr3 = new int[array1.length+array2.length]; int len1 = array1.length; int len2 = array2.length; @@ -85,6 +96,9 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ + if(oldArray==null){ + return new int[0]; + } if(size<0){ throw new IllegalArgumentException(); } @@ -202,13 +216,28 @@ public boolean isPerfectNumber(int n){ * @param s * @return */ - public String join(int[] array, String seperator){ + /*My + public String join(int[] array, String seperator){ String result = ""; for (int i = 0; i < array.length; i++) { result = result + array[i] + seperator; } int index = result.lastIndexOf(seperator); return result.substring(0, index); + }*/ + + public String join(int[] array, String seperator){ + if(array==null){ + return ""; + } + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < array.length; i++) { + sb.append(array[i]); + if(i Date: Thu, 9 Mar 2017 22:26:01 +0800 Subject: [PATCH 211/646] Signed-off-by: lingchen1dian21fen <2474600377@qq.com> --- group10/904627477/.settings/org.eclipse.core.resources.prefs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 group10/904627477/.settings/org.eclipse.core.resources.prefs diff --git a/group10/904627477/.settings/org.eclipse.core.resources.prefs b/group10/904627477/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/group10/904627477/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 From fd03fa14ea498dd058f6fad7b35ebe7ff212af6d Mon Sep 17 00:00:00 2001 From: liujk <1252327158@qq.com> Date: Thu, 9 Mar 2017 22:53:38 +0800 Subject: [PATCH 212/646] task1 --- .../org.eclipse.core.resources.prefs | 4 +- .../src/com/coding/ArrayList.java | 9 +- .../src/com/coding/ArrayListTest.java | 6 +- .../src/com/coding/LinkedList.java | 127 ++++++++++++------ .../task1_20170312/src/com/coding/List.java | 1 + 5 files changed, 100 insertions(+), 47 deletions(-) diff --git a/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs b/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs index 1cb2cd29eb..3e64772097 100644 --- a/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs +++ b/group27/1252327158/task1_20170312/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,3 @@ -#Tue Mar 07 12:45:01 CST 2017 +#Thu Mar 09 21:30:26 CST 2017 eclipse.preferences.version=1 -encoding//src/com/coding/LinkedList.java=UTF-8 +encoding/=UTF-8 diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java index d371a5c8a4..735a720074 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -9,11 +9,11 @@ public class ArrayList implements List { private final static int INCREASE_CAPACITY = 1; - private int size = 0; //列表当前使用长度 + private int size = 0; //鍒楄〃浣跨敤闀垮害 - private int modCount = 0; //记录列表修改次数 + private int modCount = 0; //鍒楄〃缁撴瀯淇敼娆℃暟 - private int mCurrentCapacity = INIT_CAPACITY; //列表当前容量 + private int mCurrentCapacity = INIT_CAPACITY; //鍒楄〃瀹归噺 private Object[] elementData = new Object[INIT_CAPACITY]; @@ -76,7 +76,8 @@ public T remove(int index){ public int size(){ return size; } - + + @Override public Iterator iterator(){ return new Iter(); } diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java index bcf4af5022..a96d7287fb 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayListTest.java @@ -54,9 +54,11 @@ public void testSize() { } @Test - @Ignore("not implemented yet") public void testIterator() { - fail("Not yet implemented"); + Iterator it = list.iterator(); + if (it.hasNext()) { + Assert.assertEquals("first", it.next()); + } } } diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java index f1c49814dd..84895b8aa6 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java @@ -1,63 +1,112 @@ package com.coding; - - -public class LinkedList implements List { +public class LinkedList implements List { - private Node head; + private int size; - public void add(Object o){ - + private Node head; + + public LinkedList(){ + size = 0; + head = null; } - public void add(int index , Object o){ - + + @Override + public void add(T o){ + Node item = new Node(o, null); + if(head == null) { + head = item; + } else { + Node tag = head; + while (tag.next != null) { + tag = tag.next; + } + tag.next = item; + } + size++; } - public Object get(int index){ - return null; + + @Override + public void add(int index , T o){ + if (index > size || index < 0) { + throw new IndexOutOfBoundsException(); + } + Node item = new Node(o, null); + if (index == 0) { + item.next = head; + head = item; + } else { + Node temp = head; + for (int i = 1; i < index; i++) { + temp = temp.next; + } + item.next = temp.next; + temp.next = item; + } + size++; + } + + @Override + public T get(int index){ + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException(); + } + Node result = head; + for (int i = 0; i < index; i++) { + result = result.next; + } + return result.data; } - public Object remove(int index){ + + @Override + public T remove(int index){ return null; } + @Override public int size(){ - return -1; + return size; } - public void addFirst(Object o){ + public void addFirst(T o){ } - public void addLast(Object o){ + public void addLast(T o){ } - public Object removeFirst(){ + public T removeFirst(){ return null; } - public Object removeLast(){ + public T removeLast(){ return null; } + + @Override public Iterator iterator(){ return null; } - - - private static class Node{ - Object data; - Node next; + private static class Node{ + T data; + Node next; + public Node(T data, Node node) { + this.data = data; + this.next = node; + } } /** - * 閹跺﹨顕氶柧鎹愩冮柅鍡欑枂 - * 娓氬顪嗛柧鎹愩冩稉锟3->7->10 , 闁棛鐤嗛崥搴″綁娑擄拷 10->7->3 + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ public void reverse(){ } /** - * 閸掔娀娅庢稉锟介嚋閸楁洟鎽肩悰銊ф畱閸撳秴宕愰柈銊ュ瀻 - * 娓氬顪嗛敍姝璱st = 2->5->7->8 , 閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟7->8 - * 婵″倹鐏塴ist = 2->5->7->8->10 ,閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟,8,10 + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 */ public void removeFirstHalf(){ @@ -65,7 +114,7 @@ public void removeFirstHalf(){ } /** - * 娴犲海顑噄娑擃亜鍘撶槐鐘茬磻婵绱 閸掔娀娅巐ength 娑擃亜鍘撶槐锟介敍锟藉▔銊﹀壈i娴狅拷瀵拷顬 + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * @param i * @param length */ @@ -73,11 +122,11 @@ public void remove(int i, int length){ } /** - * 閸嬪洤鐣捐ぐ鎾冲闁炬崘銆冮崪瀹璱st閸у洤瀵橀崥顐㈠嚒閸楀洤绨幒鎺戝灙閻ㄥ嫭鏆i弫锟 - * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戦崣鏍у毉闁絼绨簂ist閹碉拷瀵氱规氨娈戦崗鍐 - * 娓氬顪嗚ぐ鎾冲闁炬崘銆 = 11->101->201->301->401->501->601->701 + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 * listB = 1->3->4->6 - * 鏉╂柨娲栭惃鍕波閺嬫粌绨茬拠銉︽Ц[101,301,401,601] + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list */ public static int[] getElements(LinkedList list){ @@ -85,8 +134,8 @@ public static int[] getElements(LinkedList list){ } /** - * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 - * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戞稉顓炲灩闂勩倕婀猯ist娑擃厼鍤悳鎵畱閸忓啰绀 + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 * @param list */ @@ -96,16 +145,16 @@ public void subtract(LinkedList list){ } /** - * 瀹歌尙鐓¤ぐ鎾冲闁炬崘銆冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 - * 閸掔娀娅庣悰銊よ厬閹碉拷婀侀崐鑲╂祲閸氬瞼娈戞径姘稇閸忓啰绀岄敍鍫滃▏瀵版鎼锋担婊冩倵閻ㄥ嫮鍤庨幀褑銆冩稉顓熷閺堝鍘撶槐鐘垫畱閸婄厧娼庢稉宥囨祲閸氬矉绱 + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ public void removeDuplicateValues(){ } /** - * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 - * 鐠囨洖鍟撴稉锟界彯閺佸牏娈戠粻妤佺《閿涘苯鍨归梽銈堛冩稉顓熷閺堝锟芥径褌绨琺in娑撴柨鐨禍宸慳x閻ㄥ嫬鍘撶槐鐙呯礄閼汇儴銆冩稉顓炵摠閸︺劏绻栭弽椋庢畱閸忓啰绀岄敍锟 + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 * @param min * @param max */ @@ -114,8 +163,8 @@ public void removeRange(int min, int max){ } /** - * 閸嬪洩顔曡ぐ鎾冲闁炬崘銆冮崪灞藉棘閺佺櫦ist閹稿洤鐣鹃惃鍕懠鐞涖劌娼庢禒銉ュ帗缁辩姳绶烽崐濂革拷婢х偞婀佹惔蹇斿笓閸掓绱欓崥灞肩鐞涖劋鑵戦惃鍕帗缁辩姴锟介崥鍕瑝閻╃ǹ鎮撻敍锟 - * 閻滄媽顪呭Ч鍌滄晸閹存劖鏌婇柧鎹愩僀閿涘苯鍙鹃崗鍐娑撳搫缍嬮崜宥夋懠鐞涖劌鎷發ist娑擃厼鍘撶槐鐘垫畱娴溿倝娉﹂敍灞肩瑬鐞涒撴稉顓犳畱閸忓啰绀岄張澶夌贩閸婂ジ锟芥晶鐐存箒鎼村繑甯撻崚锟 + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 * @param list */ public LinkedList intersection( LinkedList list){ diff --git a/group27/1252327158/task1_20170312/src/com/coding/List.java b/group27/1252327158/task1_20170312/src/com/coding/List.java index 0cd05a3bae..eefd43a1d2 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/List.java +++ b/group27/1252327158/task1_20170312/src/com/coding/List.java @@ -6,4 +6,5 @@ public interface List { public T get(int index); public T remove(int index); public int size(); + public Iterator iterator(); } From fe00bef2c76e861011212a667a36e0146884c9db Mon Sep 17 00:00:00 2001 From: zj <2258659044@qq.com> Date: Thu, 9 Mar 2017 23:37:16 +0800 Subject: [PATCH 213/646] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 3 ++ .../coderising/download/FileDownloader.java | 2 +- .../com/coderising/download/NotifyCaller.java | 52 +++++++++++++++---- .../download/api/DownloadListener.java | 7 ++- .../download/impl/ConnectionImpl.java | 29 +++++++---- .../download/impl/ConnectionManagerImpl.java | 3 ++ .../download/FileDownloaderTest.java | 7 ++- 7 files changed, 78 insertions(+), 25 deletions(-) diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java index 3325381c6c..b4d218399f 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/DownloadThread.java @@ -75,6 +75,9 @@ public void run() { tempFile = file; //鑾峰彇鎸囧畾鏂囦欢娈电殑涓嬭浇娴 InputStream in = conn.getDownloadStream(startPos, endPos); + if(in == null){ + return; + } //闅忔満璁块棶鏂囦欢娴 RandomAccessFile raf = new RandomAccessFile(tempFile, "rwd"); //闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java index 289695cf40..cb84d148c7 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/FileDownloader.java @@ -16,7 +16,7 @@ public class FileDownloader { ConnectionManager cm; /*绾跨▼鏁扮洰*/ - private final int threadNum = 8; + private final int threadNum = 5; public FileDownloader(String _url) { this.url = _url; diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java index 3d680df4d8..03f4149688 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/NotifyCaller.java @@ -1,6 +1,7 @@ package com.coderising.download; import java.io.File; +import java.text.DecimalFormat; import com.coderising.download.api.DownloadListener; @@ -25,12 +26,20 @@ public NotifyCaller(DownloadListener listener,DownloadThread[] downloadThreads,i } @Override - public void run() { - while(true){ - if(HUNDRED == getPercentOfDownload()){ - rename(); + public void run() { + + int i =1; + while(true){ + try { + Thread.sleep(5000); + if(HUNDRED == getPercentOfDownload()){ + rename(); + } + listener.notifyFinished(getPercentOfDownload(),getDownloadSpeed(5*i)); + i++; + } catch (InterruptedException e) { + e.printStackTrace(); } - listener.notifyFinished(getPercentOfDownload()); } } @@ -40,23 +49,46 @@ public void run() { */ private int getPercentOfDownload(){ + int sum = calculateDownloadSize(); + return (sum)/(fileLength/HUNDRED); + } + + /** + * 鑾峰彇涓嬭浇閫熷害 + * @return + */ + private String getDownloadSpeed(int timeDiff){ + + float sum = calculateDownloadSize(); + DecimalFormat df = new DecimalFormat("0.000");//鏍煎紡鍖栧皬鏁 + String num = df.format((sum/((float)(1024*1024)*timeDiff)));//杩斿洖鐨勬槸String绫诲瀷 + if(num==null||num.isEmpty()){ + num = "0"; + } + return num+"M/s"; + } + + /** + * 璁$畻宸蹭笅杞芥枃浠跺ぇ灏 + */ + private int calculateDownloadSize(){ int sum = 0; for (int i = 0; i < downloadThreads.length; i++) { sum += downloadThreads[i].downloadSize; } - return (sum)/(fileLength/HUNDRED); + return sum; } - /** * 閲嶅懡鍚 */ private void rename(){ File tempFile = downloadThreads[0].tempFile; - String name = tempFile.getName(); - name = name.substring(0,name.lastIndexOf("."))+downloadThreads[0].sufferName; - File file = new File(tempFile.getPath()+"/"+name); + String path = tempFile.getPath(); + String name = path.substring(0,path.lastIndexOf("."))+downloadThreads[0].sufferName; + File file = new File(name); tempFile.renameTo(file); + } public DownloadListener getListener() { diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java index fc81f6c6f4..82694051bd 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/api/DownloadListener.java @@ -1,5 +1,10 @@ package com.coderising.download.api; public interface DownloadListener { - public void notifyFinished(int percet); + + /** + * @param percent 涓嬭浇鐧惧垎姣 + * @param downloadSpeed 涓嬭浇閫熷害锛屽崟浣峂/s + */ + public void notifyFinished(int percent,String downloadSpeed); } diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java index fcf0cf7ae9..fbf8de35ae 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionImpl.java @@ -18,15 +18,19 @@ public class ConnectionImpl implements Connection{ @Override public byte[] read(int startPos, int endPos) throws IOException { - InputStream is = getDownloadStream(startPos,endPos); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buffer = new byte[1024]; - int length = -1; - while ((length = is.read(buffer)) != -1) { - baos.write(buffer, 0, length); - } - baos.flush(); - byte[] data = baos.toByteArray(); + byte[] data = null; + InputStream is = getDownloadStream(startPos,endPos); + if(is !=null){ + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; + int length = -1; + while ((length = is.read(buffer)) != -1) { + baos.write(buffer, 0, length); + } + baos.flush(); + data = baos.toByteArray(); + return data; + } return data; } @@ -34,8 +38,11 @@ public byte[] read(int startPos, int endPos) throws IOException { public InputStream getDownloadStream(int startPos, int endPos) throws IOException { //璇锋眰鏈嶅姟鍣ㄤ笅杞介儴鍒嗘枃浠 鎸囧畾鏂囦欢鐨勪綅缃 httpConnection.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); - httpConnection.connect(); - return httpConnection.getInputStream(); + httpConnection.connect(); + if(httpConnection.getResponseCode()/100 == 2){ + return httpConnection.getInputStream(); + } + return null; } @Override public int getContentLength() { diff --git a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java index df1ea5a686..4996c21cc0 100644 --- a/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/2258659044/zj-2017/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -22,7 +22,10 @@ public Connection open(String url) throws ConnectionException { httpCon = (HttpURLConnection)remotUrl.openConnection(); httpCon.setRequestMethod("GET"); httpCon.setConnectTimeout(6000); + httpCon.setReadTimeout(6000); httpCon.setDoInput(true); + httpCon.setRequestProperty("connection", "keep-alive"); + httpCon.setRequestProperty("accept", "*/*"); //璁剧疆Connection灞炴 conn.setHttpConnection(httpCon); conn.setFileName(getFileName(url)); diff --git a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java index 5d386ddb6b..80e2d5f356 100644 --- a/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java +++ b/group12/2258659044/zj-2017/src/test/com/coderising/download/FileDownloaderTest.java @@ -13,6 +13,8 @@ public class FileDownloaderTest { int persent = 0; + String downloadSpeed ="0"; + @Before public void setUp() throws Exception { } @@ -35,8 +37,9 @@ public void testDownload() { downloader.setDownloadPath("C:/Users/ZJ/Desktop"); downloader.setListener(new DownloadListener() { @Override - public void notifyFinished(int percent) { + public void notifyFinished(int percent,String speed) { persent = percent; + downloadSpeed = speed; } }); @@ -49,7 +52,7 @@ public void notifyFinished(int percent) { try { if(temp!=persent){ temp = persent; - System.out.println("宸蹭笅杞"+persent+"%"); + System.out.println("宸蹭笅杞"+persent+"%锛屼笅杞介熷害涓猴細"+downloadSpeed+"銆"); } if(persent == 100){ break; From 87a70cdb6239aa7bc2e5a0ade0f70366c14f8ff3 Mon Sep 17 00:00:00 2001 From: LF Date: Thu, 9 Mar 2017 23:46:56 +0800 Subject: [PATCH 214/646] test for newName --- .../ipk2015/coding2017/basic/TestForNewName.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java new file mode 100644 index 0000000000..79a296c37d --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java @@ -0,0 +1,10 @@ +package com.github.ipk2015.coding2017.basic; + +public class TestForNewName { + + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + +} From be43af55826ff74d93cbe1dde9af45df58a37ca1 Mon Sep 17 00:00:00 2001 From: LF Date: Thu, 9 Mar 2017 23:48:23 +0800 Subject: [PATCH 215/646] delete the test --- group24/121111914/src/com/ipk/code2017/TestGit.java | 10 ---------- group24/121111914/src/com/ipk/code2017/TestGit1.java | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 group24/121111914/src/com/ipk/code2017/TestGit.java delete mode 100644 group24/121111914/src/com/ipk/code2017/TestGit1.java diff --git a/group24/121111914/src/com/ipk/code2017/TestGit.java b/group24/121111914/src/com/ipk/code2017/TestGit.java deleted file mode 100644 index dbfa49c571..0000000000 --- a/group24/121111914/src/com/ipk/code2017/TestGit.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.ipk.code2017; - -public class TestGit { - - public static void main(String[] args) { - // TODO Auto-generated method stub - System.out.println("hehe"); - } - -} diff --git a/group24/121111914/src/com/ipk/code2017/TestGit1.java b/group24/121111914/src/com/ipk/code2017/TestGit1.java deleted file mode 100644 index 2b1a0cd7ca..0000000000 --- a/group24/121111914/src/com/ipk/code2017/TestGit1.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.ipk.code2017; - -public class TestGit1 { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - } - -} From 53397c7b35d908ca2549be6b1c6a437d772dedde Mon Sep 17 00:00:00 2001 From: LF Date: Thu, 9 Mar 2017 23:56:26 +0800 Subject: [PATCH 216/646] delete the test --- .../ipk2015/coding2017/basic/TestForNewName.java | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java deleted file mode 100644 index 79a296c37d..0000000000 --- a/group24/121111914/src/com/github/ipk2015/coding2017/basic/TestForNewName.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.ipk2015.coding2017.basic; - -public class TestForNewName { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - } - -} From e2a07b91ee17fdde11022d67d68adcfc9901b3d3 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Fri, 10 Mar 2017 07:38:07 +0800 Subject: [PATCH 217/646] 2 --- group12/382266293/.classpath | 10 +- .../coderising/download/DownloadThread.java | 4 +- .../coderising/download/FileDownloader.java | 239 ++++++++++-------- .../download/FileDownloaderTest.java | 4 +- .../download/api/ConnectionManager.java | 2 +- .../download/impl/ConnectionImpl.java | 7 +- .../src/litestruts/Configuration.java | 104 ++++++++ .../src/litestruts/ConfigurationTest.java | 36 +++ 8 files changed, 292 insertions(+), 114 deletions(-) create mode 100644 group12/382266293/src/litestruts/Configuration.java create mode 100644 group12/382266293/src/litestruts/ConfigurationTest.java diff --git a/group12/382266293/.classpath b/group12/382266293/.classpath index 300ed0c62f..83faa48c0d 100644 --- a/group12/382266293/.classpath +++ b/group12/382266293/.classpath @@ -4,7 +4,15 @@ - + + + + + + + + + diff --git a/group12/382266293/src/com/coderising/download/DownloadThread.java b/group12/382266293/src/com/coderising/download/DownloadThread.java index 0e5568ad5b..0001e0e628 100644 --- a/group12/382266293/src/com/coderising/download/DownloadThread.java +++ b/group12/382266293/src/com/coderising/download/DownloadThread.java @@ -47,12 +47,14 @@ public void run(){ } finally { conn.close(); System.out.println(this.getName()+" finished"); - notifyFinished(); + try { if (raf != null) raf.close(); } catch (IOException e) { e.printStackTrace(); + } finally { + notifyFinished(); } } } diff --git a/group12/382266293/src/com/coderising/download/FileDownloader.java b/group12/382266293/src/com/coderising/download/FileDownloader.java index ff90959a07..6e8d10e726 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloader.java +++ b/group12/382266293/src/com/coderising/download/FileDownloader.java @@ -8,33 +8,30 @@ import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; -import com.coderising.download.impl.DownloadThreadListener; public class FileDownloader { - String url; - - DownloadListener listener; - - ConnectionManager cm; - - public String downloadLocation = "C:\\"; + private final static String EXT = "lyj"; - private static int buffer_size = 1024; - + private static final int MIN_CONNECTIONS = 3; + private static final int MAX_CONNECTIONS = 10; + private static DownloadThread[] threadPool; private int finishedCount; - public void setFinished() { - finishedCount++; - } - - private static final int MIN_CONNECTIONS = 2; - private static final int MAX_CONNECTIONS = 4; + public String downloadLocation = "C:\\"; + + String url; + ConnectionManager cm; + DownloadListener listener; + private static boolean finished; + private static String fileName; + private static String tempName; public FileDownloader(String _url) { this.url = _url; this.finishedCount = 0; } + public void execute() { // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 @@ -51,11 +48,12 @@ public void execute() { // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; - DownloadThread[] threadPool = null; + + int length = 0; + long start = getCurrentTime(); try { - conn = cm.open(this.url); - int length = conn.getContentLength(); + Connection conn = cm.open(this.url); + length = conn.getContentLength(); if (length <= 0) { try { throw new ConnectionException("file does not exist"); @@ -66,64 +64,67 @@ public void execute() { conn.close(); } } - System.out.println("length:"+length); - String fileName = conn.getFileName(); - String tempName = createTempName(downloadLocation+fileName); + + System.out.println("file length:" + length); + + fileName = conn.getFileName(); + setTempName(downloadLocation + fileName); createTempFile(tempName, length); - int connNum = calculateConnects(length); - System.out.println(connNum + " Threads will be created."); - threadPool = new DownloadThread[connNum]; - System.out.println(connNum); - int batch_size = length / connNum; - int beginPos = 0; - int endPos = batch_size; - threadPool[0] = new DownloadThread(conn, beginPos, endPos); - threadPool[0].setDest(tempName); - threadPool[0].setFileDownloader(this); - threadPool[0].start(); - for (int i = 1; i < connNum; i++) { - beginPos = endPos + 1; - endPos = beginPos + batch_size; - if (i == connNum - 1) { - endPos = length - 1; - } - Connection con = cm.open(this.url); - DownloadThread dt = new DownloadThread(con, beginPos, endPos); - dt.setDest(tempName); - dt.setFileDownloader(this); - threadPool[i] = dt; - dt.start(); - } - checkFinish(threadPool.length); + + int connNumbers = calculateConnects(length); + System.out.println(connNumbers + " Threads will be created."); + + threadPool = new DownloadThread[connNumbers]; + setAndStartThreadPool(conn, threadPool, length); + + finished = checkFinish(threadPool.length); listener.notifyFinished(); - changeName(tempName, fileName); + } catch (ConnectionException e) { e.printStackTrace(); } finally { - if (threadPool != null) { - for (int i = 0; i < threadPool.length; i++) { - if (threadPool[i] != null) - threadPool[i].close(); - } + freeDownloadThread(); + if (finished) { + changeName(tempName, fileName); + long end = getCurrentTime(); + printDownloadReport(length, start, end); } } - } - private void checkFinish(int links) { - while(finishedCount != links) { + private static void createTempFile(String dest, int len) { + File file = new File(dest); + if (file.exists()) { + System.out.println("tempfile already created"); + return; + } + FileOutputStream temp = null; + try { + temp = new FileOutputStream(dest); + int length = len; + byte[] buffer = new byte[1024]; + long times = length / 1024; + int left = (int) (length % 1024); + for (int i = 0; i < times; i++) { + temp.write(buffer); + } + temp.write(buffer, 0, left); + System.out.println("tempFile " + dest + " created"); + + } catch (Exception e) { + e.printStackTrace(); + } finally { try { - System.out.println( "Unfinshed threads number: " + (links - finishedCount)); - Thread.sleep(5000); - - } catch (InterruptedException e) { + temp.flush(); + temp.close(); + } catch (IOException e) { e.printStackTrace(); } - } + } } - private static String createTempName(String fileName) { - return fileName.substring(0, fileName.lastIndexOf('.') + 1) + EXT; + private static void setTempName(String fileName) { + tempName = fileName.substring(0, fileName.lastIndexOf('.') + 1) + EXT; } private int calculateConnects(int length) { @@ -141,68 +142,96 @@ private void changeName(String from, String to) { rename(from, downloadLocation + to); } + private boolean checkFinish(int links) { + + while (finishedCount != links) { + try { + + Thread.sleep(5000); + System.out.println("Unfinshed threads number: " + (links - finishedCount)); + + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + return true; + } + + private void freeDownloadThread() { + if (threadPool != null) { + for (int i = 0; i < threadPool.length; i++) { + if (threadPool[i] != null) + threadPool[i].close(); + } + } + } + + private long getCurrentTime() { + return System.currentTimeMillis(); + } + + public String getDownloadLocation() { + return downloadLocation; + } + + public DownloadListener getListener() { + return this.listener; + } + + private void printDownloadReport(int length, long start, long end) { + int time = (int) ((end - start) / 1000); + float speed = length / 1024 / 1024 / time; + System.out.println("鍏辫楁椂锛" + time + "s锛屼笅杞介熷害锛 " + speed + "Mb/s"); + } + public boolean rename(String from, String to) { System.out.println(from); System.out.println(to); File file = new File(from); if (file.exists()) { - file.renameTo(new File(to)); - System.out.println("rename success"); - return true; + return file.renameTo(new File(to)); } System.out.println("rename failed"); return false; } - private static void createTempFile(String dest, int len) { - File file = new File(dest); - if (file.exists()) { - System.out.println("tempfile already created"); - return; - } - FileOutputStream temp = null; - try { - temp = new FileOutputStream(dest); - int length = len; - byte[] buffer = new byte[1024]; - long times = length / 1024; - int left = (int) (length % 1024); - for (int i = 0; i < times; i++) { - temp.write(buffer); - } - temp.write(buffer, 0, left); - System.out.println("tempFile "+ dest + " created"); - - } catch (Exception e) { - e.printStackTrace(); - } finally { - try { - temp.flush(); - temp.flush(); - } catch (IOException e) { - e.printStackTrace(); + private void setAndStartThreadPool(Connection conn, DownloadThread[] threadPool, int length) + throws ConnectionException { + int connectionNumbers = threadPool.length; + int batch_size = length / connectionNumbers; + int beginPos = 0; + int endPos = batch_size; + threadPool[0] = new DownloadThread(conn, beginPos, endPos); + setAndStartThread(threadPool[0], tempName); + for (int i = 1; i < connectionNumbers; i++) { + Connection con = cm.open(this.url); + beginPos = endPos + 1; + endPos = beginPos + batch_size; + if (i == connectionNumbers - 1) { + endPos = length - 1; } + threadPool[i] = new DownloadThread(con, beginPos, endPos); + setAndStartThread(threadPool[i], tempName); } } - - public void setListener(DownloadListener listener) { - this.listener = listener; + + private void setAndStartThread(DownloadThread downloadThread, String dest) { + downloadThread.setDest(dest); + downloadThread.setFileDownloader(this); + downloadThread.start(); } public void setConnectionManager(ConnectionManager ucm) { this.cm = ucm; } - public DownloadListener getListener() { - return this.listener; - } - - public String getDownloadLocation() { - return downloadLocation; + public void setFinished() { + finishedCount++; } - public void setDownloadLocation(String downloadLocation) { - this.downloadLocation = downloadLocation; + public void setListener(DownloadListener listener) { + this.listener = listener; } } diff --git a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java index d83cf1b4e1..022b6945d2 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java +++ b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java @@ -20,7 +20,7 @@ public void tearDown() throws Exception { public static String url1 = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; public static String url2 = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; - public static String url3 = "http://dlsw.baidu.com/sw-search-sp/soft/de/26290/WPIconMaker_1.0.1398047889.exe"; + public static String url3 = "http://sw.bos.baidu.com/sw-search-sp/software/6c7bb8b6674d0/fm728chb379_7.2.8.379_setup.exe"; @Test public void testDownload() { @@ -49,7 +49,7 @@ public void notifyFinished() { try { System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); //浼戠湢5绉 - Thread.sleep(5000); + Thread.sleep(15000); } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/group12/382266293/src/com/coderising/download/api/ConnectionManager.java b/group12/382266293/src/com/coderising/download/api/ConnectionManager.java index c732657bcb..17f1e544b1 100644 --- a/group12/382266293/src/com/coderising/download/api/ConnectionManager.java +++ b/group12/382266293/src/com/coderising/download/api/ConnectionManager.java @@ -7,7 +7,7 @@ public interface ConnectionManager { * @return */ - final int MAX_CONNECTION_SIZE = 10; + final int MAX_CONNECTION_SIZE = 100; public Connection open(String url) throws ConnectionException; } diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java index 7dae156533..f34abb3b05 100644 --- a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java @@ -44,11 +44,10 @@ public byte[] read(int startPos, int endPos) throws IOException { in.skip(startPos); byte[] buffer = new byte[endPos-startPos + 1]; int len = 0; - //byte[] b = new byte[1024]; - while((len = in.read(buffer)) != -1) { - out.write(buffer); + byte[] b = new byte[1024]; + while((len = in.read(b)) != -1) { + out.write(b, 0, len); } - System.out.println(out.toByteArray().length); return out.toByteArray(); } catch (IOException e) { e.printStackTrace(); diff --git a/group12/382266293/src/litestruts/Configuration.java b/group12/382266293/src/litestruts/Configuration.java new file mode 100644 index 0000000000..90eac0be64 --- /dev/null +++ b/group12/382266293/src/litestruts/Configuration.java @@ -0,0 +1,104 @@ +package litestruts; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; +import static util.Print.*; +public class Configuration { + + + ActionCfg actionCfg = new ActionCfg(); + + private static Configuration cfg = new Configuration(); + + private Configuration() { + + } + + public static Configuration getNewInstance() { + + if (cfg == null) { + cfg = new Configuration(); + } + return cfg; + } + + private String getFile(String fileName) { + + String src = this.getClass().getPackage().getName(); + return "file://" + src + "\\" + fileName + ".xml"; + } + + public void parseAction(String src) { + + String fileName = getFile(src); + SAXBuilder reader = new SAXBuilder(); + try { + Document doc = reader.build("C:\\struts.xml"); + Element root = doc.getRootElement(); + + for(Element element : root.getChildren("action")) { + + String name = element.getAttributeValue("name"); + String clz = element.getAttributeValue("class"); + actionCfg.actionInfo.put(name, clz); + + for(Element e : element.getChildren("result")) { + + String result = e.getAttributeValue("name"); + String jsp = e.getText().trim(); + println("result:" + result + "jsp:" + jsp); + Map res = new HashMap<>(); + res.put(result, jsp); + actionCfg.resultInfo.put(name, res); + } + } + + } catch (JDOMException | IOException e) { + e.printStackTrace(); + } + + } + + public static void main(String[] args) { + Configuration cfg = new Configuration(); + cfg.parseAction("struts"); + Map info = cfg.getActionInfo(); + Map result = cfg.getResultInfo(); + println(info); + println(result); + } + + + private static class ActionCfg { + + private Map actionInfo; + private Map> resultInfo; + public ActionCfg() { + this.actionInfo = new HashMap(); + this.resultInfo = new HashMap>(); + } + + } + + + public Map> getResultInfo() { + + return actionCfg.resultInfo; + } + + public Map getActionInfo() { + + return actionCfg.actionInfo; + } + + + + + +} diff --git a/group12/382266293/src/litestruts/ConfigurationTest.java b/group12/382266293/src/litestruts/ConfigurationTest.java new file mode 100644 index 0000000000..ac86e30695 --- /dev/null +++ b/group12/382266293/src/litestruts/ConfigurationTest.java @@ -0,0 +1,36 @@ +package litestruts; + +import static org.junit.Assert.*; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ConfigurationTest { + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testGetGetterMethods() { + Configuration cfg = Configuration.getNewInstance(); + Map actionName = new HashMap<>(); + actionName.put("login","com.coderising.action.LoginAction"); + actionName.put("logout","com.coderising.action.LogoutAction"); + + //Assert.assertTrue(cfg.getActionName().containsKey(actionName)); + + + + } + +} From dd9a1b84a17aa87004a14e41bdf859f9bc5cbac2 Mon Sep 17 00:00:00 2001 From: felixCJF Date: Fri, 10 Mar 2017 08:51:36 +0800 Subject: [PATCH 218/646] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E8=A1=A5=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/litestruts/LoginAction.java | 43 ++++++++++ .../coderising/litestruts/Struts.java | 84 +++++++++++++++++++ .../coderising/litestruts/StrutsTest.java | 43 ++++++++++ .../coderising/litestruts/View.java | 23 +++++ .../coderising/litestruts/struts.xml | 11 +++ 5 files changed, 204 insertions(+) create mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java create mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java create mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java create mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java create mode 100644 group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..b803afb24d --- /dev/null +++ b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/LoginAction.java @@ -0,0 +1,43 @@ +package com.github.FelixCJF.coding2017.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } +} \ No newline at end of file diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..32852a36dd --- /dev/null +++ b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/Struts.java @@ -0,0 +1,84 @@ +package com.github.FelixCJF.coding2017.coderising.litestruts; + +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + View view = new View(); + + try { + // 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + //0.1灏唜ml鍔犺浇杩涘唴瀛樹腑 + SAXReader reader = new SAXReader(); + Document document = null; + try{ + document = reader.read("src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml"); + }catch (Exception e) { + e.printStackTrace(); + } + //0.2璇诲彇鏍瑰厓绱 + Element rootElement = document.getRootElement(); + //0.3鏍规嵁鏍瑰厓绱犺幏鍙栧叾瀛愬厓绱 + List actionElements = rootElement.elements("action"); + for (int i = 0; i < actionElements.size(); i++) { + Element actionElement = actionElements.get(i); + if (actionName.equals(actionElement.attributeValue("name"))) { + // 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + String className = actionElement.attributeValue("class"); + Class clazz = Class.forName(className); + Object object = clazz.newInstance(); + // 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + // ("name"="test" , "password"="1234") , + // 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + for (Map.Entry entry : parameters.entrySet()) { + PropertyDescriptor descriptor = new PropertyDescriptor(entry.getKey(), clazz); + Method method = descriptor.getWriteMethod(); + method.invoke(object, entry.getValue()); + } + // 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + Method execute = clazz.getMethod("execute"); + String result = (String) execute.invoke(object); + // 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + // 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + Field[] fields = clazz.getDeclaredFields(); + HashMap map = new HashMap<>(); + for (Field field : fields) { + PropertyDescriptor descriptor = new PropertyDescriptor(field.getName(), clazz); + Method method = descriptor.getReadMethod(); + Object value = method.invoke(object); + map.put(field.getName(), value); + } + // 鏀惧埌View瀵硅薄鐨刾arameters + view.setParameters(map); + // 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + // 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + List resultElements = actionElement.elements("result"); + for (int j = 0; j < resultElements.size(); j++) { + Element resultElement = resultElements.get(j); + if (result.equals(resultElement.attributeValue("name"))) { + view.setJsp(resultElement.getText()); + return view; + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +} \ No newline at end of file diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..1157313180 --- /dev/null +++ b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.github.FelixCJF.coding2017.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} \ No newline at end of file diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java new file mode 100644 index 0000000000..6d74cb6843 --- /dev/null +++ b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.github.FelixCJF.coding2017.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} \ No newline at end of file diff --git a/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..8a5fe95942 --- /dev/null +++ b/group02/1554421063/src/com/github/FelixCJF/coding2017/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 0a0e7aeed25eea941c9ae3e741f23deac702e38b Mon Sep 17 00:00:00 2001 From: "2474600377@qq.com" <2474600377@qq.com> Date: Fri, 10 Mar 2017 11:34:44 +0800 Subject: [PATCH 219/646] Merge remote-tracking branch 'origin/master' # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. --- .../org.eclipse.core.resources.prefs | 2 ++ .../src/com/coding/array/ArrayUtil.java | 31 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 group10/904627477/.settings/org.eclipse.core.resources.prefs diff --git a/group10/904627477/.settings/org.eclipse.core.resources.prefs b/group10/904627477/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/group10/904627477/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/group10/904627477/src/com/coding/array/ArrayUtil.java b/group10/904627477/src/com/coding/array/ArrayUtil.java index 37f230812a..dc3a7a7254 100644 --- a/group10/904627477/src/com/coding/array/ArrayUtil.java +++ b/group10/904627477/src/com/coding/array/ArrayUtil.java @@ -10,6 +10,9 @@ public class ArrayUtil { * @return */ public void reverseArray(int[] origin){ + if(origin==null){ + return ; + } int len = origin.length; for (int i = 0; i < len/2 ; i++) { int temp = origin[len-1-i]; @@ -27,6 +30,9 @@ public void reverseArray(int[] origin){ */ public int[] removeZero(int[] oldArray){ + if(oldArray==null){ + return new int[0]; + } int[] tempArr = new int[oldArray.length]; int size = 0; for (int i = 0; i < oldArray.length; i++) { @@ -49,6 +55,11 @@ public int[] removeZero(int[] oldArray){ */ public int[] merge(int[] array1, int[] array2){ + if(array1==null&&array2==null){ + return new int[0]; + }else if(array1==null||array2==null){ + return array1==null?array2:array1; + } int[] arr3 = new int[array1.length+array2.length]; int len1 = array1.length; int len2 = array2.length; @@ -85,6 +96,9 @@ public int[] merge(int[] array1, int[] array2){ * @return */ public int[] grow(int [] oldArray, int size){ + if(oldArray==null){ + return new int[0]; + } if(size<0){ throw new IllegalArgumentException(); } @@ -202,13 +216,28 @@ public boolean isPerfectNumber(int n){ * @param s * @return */ - public String join(int[] array, String seperator){ + /*My + public String join(int[] array, String seperator){ String result = ""; for (int i = 0; i < array.length; i++) { result = result + array[i] + seperator; } int index = result.lastIndexOf(seperator); return result.substring(0, index); + }*/ + + public String join(int[] array, String seperator){ + if(array==null){ + return ""; + } + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < array.length; i++) { + sb.append(array[i]); + if(i Date: Fri, 10 Mar 2017 11:37:42 +0800 Subject: [PATCH 220/646] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../904627477/src/com/coding/ArrayList.java | 107 ----------- .../src/com/coding/BinaryTreeNode.java | 32 ---- .../904627477/src/com/coding/Iterator.java | 7 - .../904627477/src/com/coding/LinkedList.java | 175 ------------------ group10/904627477/src/com/coding/List.java | 9 - group10/904627477/src/com/coding/Queue.java | 28 --- group10/904627477/src/com/coding/Stack.java | 36 ---- .../src/com/coding/test/ArrayListTest.java | 4 +- .../src/com/coding/test/LinkedListTest.java | 4 +- .../src/com/coding/test/QueueTest.java | 3 +- .../src/com/coding/test/StackTest.java | 3 +- .../904627477/src/com/coding/test/Test.java | 27 +-- 12 files changed, 18 insertions(+), 417 deletions(-) delete mode 100644 group10/904627477/src/com/coding/ArrayList.java delete mode 100644 group10/904627477/src/com/coding/BinaryTreeNode.java delete mode 100644 group10/904627477/src/com/coding/Iterator.java delete mode 100644 group10/904627477/src/com/coding/LinkedList.java delete mode 100644 group10/904627477/src/com/coding/List.java delete mode 100644 group10/904627477/src/com/coding/Queue.java delete mode 100644 group10/904627477/src/com/coding/Stack.java diff --git a/group10/904627477/src/com/coding/ArrayList.java b/group10/904627477/src/com/coding/ArrayList.java deleted file mode 100644 index 3053e54114..0000000000 --- a/group10/904627477/src/com/coding/ArrayList.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.coding; - -import java.util.NoSuchElementException; - -public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData = new Object[100]; - - private void addLength(){ - int len = elementData.length; - Object[] temp = new Object[len+50]; - for(int i=0;isize()){ - throw new IndexOutOfBoundsException(); - } - if(size==elementData.length){ - addLength(); - } - for(int i=size;i>index;i--){ - elementData[i] = elementData[i-1]; - } - elementData[index] = o; - size++; - } - - public Object get(int index){ - if(index<0||index>=size()){ - throw new IndexOutOfBoundsException(); - } - return elementData[index]; - } - - public Object remove(int index){ - if(index<0||index>=size()){ - throw new IndexOutOfBoundsException(); - } - Object temp = elementData[index]; - for (int i = index; i < size-1; i++) { - elementData[i] = elementData[i+1]; - } - elementData[size-1] = null; - size--; - return temp; - } - - public int size(){ - return this.size; - } - - public Iterator iterator(){ - return new ArrayListIterator(); - } - - private class ArrayListIterator implements Iterator{ - - private Object[] array; - private int index; - - public ArrayListIterator(){ - array = new Object[size]; - index = 0; - for (int i = 0; i < size; i++) { - array[i] = elementData[i]; - } - } - - @Override - public boolean hasNext() { - // TODO Auto-generated method stub - if(index>=0&&index=array.length){ - throw new NoSuchElementException(); - } - Object temp = array[index]; - index ++; - return temp; - } - - } - - -} diff --git a/group10/904627477/src/com/coding/BinaryTreeNode.java b/group10/904627477/src/com/coding/BinaryTreeNode.java deleted file mode 100644 index fe50e3d1ae..0000000000 --- a/group10/904627477/src/com/coding/BinaryTreeNode.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.coding; - -public class BinaryTreeNode { - - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public Object getData() { - return data; - } - public void setData(Object data) { - this.data = data; - } - public BinaryTreeNode getLeft() { - return left; - } - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - public BinaryTreeNode getRight() { - return right; - } - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o){ - return null; - } - -} diff --git a/group10/904627477/src/com/coding/Iterator.java b/group10/904627477/src/com/coding/Iterator.java deleted file mode 100644 index d2c1b79572..0000000000 --- a/group10/904627477/src/com/coding/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.coding; - -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} diff --git a/group10/904627477/src/com/coding/LinkedList.java b/group10/904627477/src/com/coding/LinkedList.java deleted file mode 100644 index f878f75820..0000000000 --- a/group10/904627477/src/com/coding/LinkedList.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.coding; - -import java.util.NoSuchElementException; - -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - addLast(o); - } - - public void add(int index , Object o){ - Node node = new Node(); - node.data = o; - if(index==0){ - addFirst(o); - return ; - } - Node before = getNode(index-1); - Node next = before.next; - before.next = node; - node.next = next; - } - - private Node getLastNode(){ - Node temp = head; - if(head!=null){ - while(true){ - if(temp.next!=null){ - temp = temp.next; - }else{ - break; - } - } - }else{ - throw new NoSuchElementException(); - } - return temp; - } - - private Node getNode(int index){ - if(index<0){ - throw new IndexOutOfBoundsException(); - } - int i = 0; - Node temp = head; - while(true){ - if(temp==null){ - throw new IndexOutOfBoundsException(); - } - if(i==index){ - break; - }else{ - i++; - temp = temp.next; - } - } - return temp; - } - - public Object get(int index){ - Node node = getNode(index); - return node.data; - } - - public Object remove(int index){ - if(index==0){ - removeFirst(); - } - Node before = getNode(index-1); - Node temp = getNode(index); - before.next = temp.next; - return temp.data; - } - - public int size(){ - int size = 0; - Node temp = head; - while(true){ - if(temp==null){ - break; - }else{ - size++; - temp = temp.next; - } - } - return size; - } - - public void addFirst(Object o){ - Node node = new Node(); - node.data = o; - node.next = head; - head = node; - } - - public void addLast(Object o){ - Node node = new Node(); - node.data = o; - if(head==null){ - head = node; - return; - } - Node last = getLastNode(); - last.next = node; - } - public Object removeFirst(){ - if(head == null){ - throw new NoSuchElementException(); - } - Object obj = head.data; - head = head.next; - return obj; - } - public Object removeLast(){ - if(head == null){ - throw new NoSuchElementException(); - } - if(head.next == null){ - return removeFirst(); - } - Node before = head; - Node temp = head.next; - while(true){ - if(temp.next==null){ - break; - }else{ - before = temp; - temp = temp.next; - } - } - before.next = null; - return temp.data; - } - - public Iterator iterator(){ - return new LinkedIterator(); - } - - - private static class Node{ - Object data; - Node next; - } - - private class LinkedIterator implements Iterator{ - - private Node node; - - public LinkedIterator(){ - node = head; - } - - @Override - public boolean hasNext() { - if(node!=null){ - return true; - } - return false; - } - - @Override - public Object next() { - if(node==null){ - throw new NoSuchElementException(); - }else{ - Object obj = node.data; - node = node.next; - return obj; - } - } - - } -} diff --git a/group10/904627477/src/com/coding/List.java b/group10/904627477/src/com/coding/List.java deleted file mode 100644 index 5e78eced11..0000000000 --- a/group10/904627477/src/com/coding/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.coding; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group10/904627477/src/com/coding/Queue.java b/group10/904627477/src/com/coding/Queue.java deleted file mode 100644 index 8fd01bef96..0000000000 --- a/group10/904627477/src/com/coding/Queue.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.coding; - -public class Queue { - - private ArrayList elementData = new ArrayList(); - - public void enQueue(Object o){ - elementData.add(o); - } - - public Object deQueue(){ - if(elementData.size()==0){ - return null; - } - return elementData.remove(0); - } - - public boolean isEmpty(){ - if(elementData.size()==0){ - return true; - } - return false; - } - - public int size(){ - return elementData.size(); - } -} diff --git a/group10/904627477/src/com/coding/Stack.java b/group10/904627477/src/com/coding/Stack.java deleted file mode 100644 index 3f8b319607..0000000000 --- a/group10/904627477/src/com/coding/Stack.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.coding; - -import java.util.EmptyStackException; - -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ - elementData.add(o); - } - - public Object pop(){ - if(elementData.size()==0){ - throw new EmptyStackException(); - } - Object obj = elementData.remove(size()-1); - return obj; - } - - public Object peek(){ - if(elementData.size()==0){ - throw new EmptyStackException(); - } - Object obj = elementData.get(size()-1); - return obj; - } - public boolean isEmpty(){ - if(elementData.size()==0){ - return true; - } - return false; - } - public int size(){ - return elementData.size(); - } -} diff --git a/group10/904627477/src/com/coding/test/ArrayListTest.java b/group10/904627477/src/com/coding/test/ArrayListTest.java index d65a692351..fc711a315a 100644 --- a/group10/904627477/src/com/coding/test/ArrayListTest.java +++ b/group10/904627477/src/com/coding/test/ArrayListTest.java @@ -6,8 +6,8 @@ import org.junit.Before; import org.junit.Test; -import com.coding.ArrayList; -import com.coding.Iterator; +import com.coding.basic.ArrayList; +import com.coding.basic.Iterator; public class ArrayListTest { diff --git a/group10/904627477/src/com/coding/test/LinkedListTest.java b/group10/904627477/src/com/coding/test/LinkedListTest.java index af48a6fb0b..174fdeb583 100644 --- a/group10/904627477/src/com/coding/test/LinkedListTest.java +++ b/group10/904627477/src/com/coding/test/LinkedListTest.java @@ -6,8 +6,8 @@ import org.junit.Before; import org.junit.Test; -import com.coding.Iterator; -import com.coding.LinkedList; +import com.coding.basic.Iterator; +import com.coding.basic.LinkedList; public class LinkedListTest { diff --git a/group10/904627477/src/com/coding/test/QueueTest.java b/group10/904627477/src/com/coding/test/QueueTest.java index 779120c0fb..5434522f14 100644 --- a/group10/904627477/src/com/coding/test/QueueTest.java +++ b/group10/904627477/src/com/coding/test/QueueTest.java @@ -6,7 +6,8 @@ import org.junit.Before; import org.junit.Test; -import com.coding.Queue; +import com.coding.basic.Queue; + public class QueueTest { diff --git a/group10/904627477/src/com/coding/test/StackTest.java b/group10/904627477/src/com/coding/test/StackTest.java index 38de36c9d9..ec96c6adcb 100644 --- a/group10/904627477/src/com/coding/test/StackTest.java +++ b/group10/904627477/src/com/coding/test/StackTest.java @@ -6,7 +6,8 @@ import org.junit.Before; import org.junit.Test; -import com.coding.Stack; +import com.coding.basic.Stack; + public class StackTest { diff --git a/group10/904627477/src/com/coding/test/Test.java b/group10/904627477/src/com/coding/test/Test.java index c8024a8c97..475c213362 100644 --- a/group10/904627477/src/com/coding/test/Test.java +++ b/group10/904627477/src/com/coding/test/Test.java @@ -1,5 +1,7 @@ package com.coding.test; +import com.coding.basic.LinkedList; + @@ -7,23 +9,14 @@ public class Test { public static void main(String[] args) { - /*int[] origin = {7, 9 , 30, 3}; - ArrayUtil au = new ArrayUtil(); - au.reverseArray(origin); - for (int i : origin) { - System.out.println(i); - } - */ -/* int a = 5; - System.out.println(5/2); - int[] a1 = new int[0]; - System.out.println(a1.length); - System.out.println(Math.sqrt(2));*/ -// int[] a2 = new ArrayUtil().getPerfectNumbers(100); -// for (int i = 0; i < a2.length; i++) { -// System.out.println(a2[i]); -// } - System.out.println(Test.class.getResource("").getPath()); + LinkedList link = new LinkedList(); + link.add("aaa"); + link.add("bbb"); + link.add("ccc"); + link.reverse(); + System.out.println(link.get(0)); + System.out.println(link.get(1)); + System.out.println(link.get(2)); } } From b33ac60b8672c9999bc03f428ffeb1b031138072 Mon Sep 17 00:00:00 2001 From: "2474600377@qq.com" <2474600377@qq.com> Date: Fri, 10 Mar 2017 11:39:08 +0800 Subject: [PATCH 221/646] Signed-off-by: 2474600377@qq.com <2474600377@qq.com> --- .../src/com/coding/basic/ArrayList.java | 107 +++++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 266 ++++++++++++++++++ .../904627477/src/com/coding/basic/List.java | 9 + .../904627477/src/com/coding/basic/Queue.java | 28 ++ .../904627477/src/com/coding/basic/Stack.java | 36 +++ .../com/coding/download/DownloadThread.java | 21 ++ .../com/coding/download/FileDownloader.java | 75 +++++ .../coding/download/FileDownloaderTest.java | 60 ++++ .../com/coding/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../coding/download/api/DownloadListener.java | 5 + .../coding/download/impl/ConnectionImpl.java | 28 ++ .../download/impl/ConnectionManagerImpl.java | 15 + 16 files changed, 727 insertions(+) create mode 100644 group10/904627477/src/com/coding/basic/ArrayList.java create mode 100644 group10/904627477/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group10/904627477/src/com/coding/basic/Iterator.java create mode 100644 group10/904627477/src/com/coding/basic/LinkedList.java create mode 100644 group10/904627477/src/com/coding/basic/List.java create mode 100644 group10/904627477/src/com/coding/basic/Queue.java create mode 100644 group10/904627477/src/com/coding/basic/Stack.java create mode 100644 group10/904627477/src/com/coding/download/DownloadThread.java create mode 100644 group10/904627477/src/com/coding/download/FileDownloader.java create mode 100644 group10/904627477/src/com/coding/download/FileDownloaderTest.java create mode 100644 group10/904627477/src/com/coding/download/api/Connection.java create mode 100644 group10/904627477/src/com/coding/download/api/ConnectionException.java create mode 100644 group10/904627477/src/com/coding/download/api/ConnectionManager.java create mode 100644 group10/904627477/src/com/coding/download/api/DownloadListener.java create mode 100644 group10/904627477/src/com/coding/download/impl/ConnectionImpl.java create mode 100644 group10/904627477/src/com/coding/download/impl/ConnectionManagerImpl.java diff --git a/group10/904627477/src/com/coding/basic/ArrayList.java b/group10/904627477/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..515d3f6030 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/ArrayList.java @@ -0,0 +1,107 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + private void addLength(){ + int len = elementData.length; + Object[] temp = new Object[len+50]; + for(int i=0;isize()){ + throw new IndexOutOfBoundsException(); + } + if(size==elementData.length){ + addLength(); + } + for(int i=size;i>index;i--){ + elementData[i] = elementData[i-1]; + } + elementData[index] = o; + size++; + } + + public Object get(int index){ + if(index<0||index>=size()){ + throw new IndexOutOfBoundsException(); + } + return elementData[index]; + } + + public Object remove(int index){ + if(index<0||index>=size()){ + throw new IndexOutOfBoundsException(); + } + Object temp = elementData[index]; + for (int i = index; i < size-1; i++) { + elementData[i] = elementData[i+1]; + } + elementData[size-1] = null; + size--; + return temp; + } + + public int size(){ + return this.size; + } + + public Iterator iterator(){ + return new ArrayListIterator(); + } + + private class ArrayListIterator implements Iterator{ + + private Object[] array; + private int index; + + public ArrayListIterator(){ + array = new Object[size]; + index = 0; + for (int i = 0; i < size; i++) { + array[i] = elementData[i]; + } + } + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + if(index>=0&&index=array.length){ + throw new NoSuchElementException(); + } + Object temp = array[index]; + index ++; + return temp; + } + + } + + +} diff --git a/group10/904627477/src/com/coding/basic/BinaryTreeNode.java b/group10/904627477/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group10/904627477/src/com/coding/basic/Iterator.java b/group10/904627477/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group10/904627477/src/com/coding/basic/LinkedList.java b/group10/904627477/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..5758a12d8c --- /dev/null +++ b/group10/904627477/src/com/coding/basic/LinkedList.java @@ -0,0 +1,266 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + addLast(o); + } + + public void add(int index , Object o){ + Node node = new Node(); + node.data = o; + if(index==0){ + addFirst(o); + return ; + } + Node before = getNode(index-1); + Node next = before.next; + before.next = node; + node.next = next; + } + + private Node getLastNode(){ + Node temp = head; + if(head!=null){ + while(true){ + if(temp.next!=null){ + temp = temp.next; + }else{ + break; + } + } + }else{ + throw new NoSuchElementException(); + } + return temp; + } + + private Node getNode(int index){ + if(index<0){ + throw new IndexOutOfBoundsException(); + } + int i = 0; + Node temp = head; + while(true){ + if(temp==null){ + throw new IndexOutOfBoundsException(); + } + if(i==index){ + break; + }else{ + i++; + temp = temp.next; + } + } + return temp; + } + + public Object get(int index){ + Node node = getNode(index); + return node.data; + } + + public Object remove(int index){ + if(index==0){ + removeFirst(); + } + Node before = getNode(index-1); + Node temp = getNode(index); + before.next = temp.next; + return temp.data; + } + + public int size(){ + int size = 0; + Node temp = head; + while(true){ + if(temp==null){ + break; + }else{ + size++; + temp = temp.next; + } + } + return size; + } + + public void addFirst(Object o){ + Node node = new Node(); + node.data = o; + node.next = head; + head = node; + } + + public void addLast(Object o){ + Node node = new Node(); + node.data = o; + if(head==null){ + head = node; + return; + } + Node last = getLastNode(); + last.next = node; + } + public Object removeFirst(){ + if(head == null){ + throw new NoSuchElementException(); + } + Object obj = head.data; + head = head.next; + return obj; + } + public Object removeLast(){ + if(head == null){ + throw new NoSuchElementException(); + } + if(head.next == null){ + return removeFirst(); + } + Node before = head; + Node temp = head.next; + while(true){ + if(temp.next==null){ + break; + }else{ + before = temp; + temp = temp.next; + } + } + before.next = null; + return temp.data; + } + + public Iterator iterator(){ + return new LinkedIterator(); + } + + + private static class Node{ + Object data; + Node next; + } + + private class LinkedIterator implements Iterator{ + + private Node node; + + public LinkedIterator(){ + node = head; + } + + @Override + public boolean hasNext() { + if(node!=null){ + return true; + } + return false; + } + + @Override + public Object next() { + if(node==null){ + throw new NoSuchElementException(); + }else{ + Object obj = node.data; + node = node.next; + return obj; + } + } + + } + + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + if(head==null||head.next==null){ + return ; + } + Node temp = head.next; + Node newHead = this.head; + newHead.next = null; + while(temp!=null){ + Node next = temp.next; + temp.next = newHead; + newHead = temp; + temp = next; + } + this.head = newHead; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group10/904627477/src/com/coding/basic/List.java b/group10/904627477/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group10/904627477/src/com/coding/basic/Queue.java b/group10/904627477/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..e54df70c96 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/Queue.java @@ -0,0 +1,28 @@ +package com.coding.basic; + +public class Queue { + + private ArrayList elementData = new ArrayList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + if(elementData.size()==0){ + return null; + } + return elementData.remove(0); + } + + public boolean isEmpty(){ + if(elementData.size()==0){ + return true; + } + return false; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group10/904627477/src/com/coding/basic/Stack.java b/group10/904627477/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..fc06fb3ce8 --- /dev/null +++ b/group10/904627477/src/com/coding/basic/Stack.java @@ -0,0 +1,36 @@ +package com.coding.basic; + +import java.util.EmptyStackException; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + if(elementData.size()==0){ + throw new EmptyStackException(); + } + Object obj = elementData.remove(size()-1); + return obj; + } + + public Object peek(){ + if(elementData.size()==0){ + throw new EmptyStackException(); + } + Object obj = elementData.get(size()-1); + return obj; + } + public boolean isEmpty(){ + if(elementData.size()==0){ + return true; + } + return false; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group10/904627477/src/com/coding/download/DownloadThread.java b/group10/904627477/src/com/coding/download/DownloadThread.java new file mode 100644 index 0000000000..525080110a --- /dev/null +++ b/group10/904627477/src/com/coding/download/DownloadThread.java @@ -0,0 +1,21 @@ +package com.coding.download; + +import com.coding.download.api.Connection; + + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group10/904627477/src/com/coding/download/FileDownloader.java b/group10/904627477/src/com/coding/download/FileDownloader.java new file mode 100644 index 0000000000..d165f6ee18 --- /dev/null +++ b/group10/904627477/src/com/coding/download/FileDownloader.java @@ -0,0 +1,75 @@ +package com.coding.download; + +import com.coding.download.api.Connection; +import com.coding.download.api.ConnectionException; +import com.coding.download.api.ConnectionManager; +import com.coding.download.api.DownloadListener; + + + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group10/904627477/src/com/coding/download/FileDownloaderTest.java b/group10/904627477/src/com/coding/download/FileDownloaderTest.java new file mode 100644 index 0000000000..f6d871a126 --- /dev/null +++ b/group10/904627477/src/com/coding/download/FileDownloaderTest.java @@ -0,0 +1,60 @@ +package com.coding.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coding.download.api.ConnectionManager; +import com.coding.download.api.DownloadListener; +import com.coding.download.impl.ConnectionManagerImpl; + + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group10/904627477/src/com/coding/download/api/Connection.java b/group10/904627477/src/com/coding/download/api/Connection.java new file mode 100644 index 0000000000..65f3dae9c5 --- /dev/null +++ b/group10/904627477/src/com/coding/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coding.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group10/904627477/src/com/coding/download/api/ConnectionException.java b/group10/904627477/src/com/coding/download/api/ConnectionException.java new file mode 100644 index 0000000000..1db8b093ec --- /dev/null +++ b/group10/904627477/src/com/coding/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coding.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group10/904627477/src/com/coding/download/api/ConnectionManager.java b/group10/904627477/src/com/coding/download/api/ConnectionManager.java new file mode 100644 index 0000000000..1d1a83caf2 --- /dev/null +++ b/group10/904627477/src/com/coding/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coding.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group10/904627477/src/com/coding/download/api/DownloadListener.java b/group10/904627477/src/com/coding/download/api/DownloadListener.java new file mode 100644 index 0000000000..c41045b0e8 --- /dev/null +++ b/group10/904627477/src/com/coding/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coding.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group10/904627477/src/com/coding/download/impl/ConnectionImpl.java b/group10/904627477/src/com/coding/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..0b5f61fdda --- /dev/null +++ b/group10/904627477/src/com/coding/download/impl/ConnectionImpl.java @@ -0,0 +1,28 @@ +package com.coding.download.impl; + +import java.io.IOException; + +import com.coding.download.api.Connection; + + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group10/904627477/src/com/coding/download/impl/ConnectionManagerImpl.java b/group10/904627477/src/com/coding/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..15dc2f0b07 --- /dev/null +++ b/group10/904627477/src/com/coding/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coding.download.impl; + +import com.coding.download.api.Connection; +import com.coding.download.api.ConnectionException; +import com.coding.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} From 032ee7251204241df8035e6a351b93b6924473d9 Mon Sep 17 00:00:00 2001 From: xiongrui Date: Fri, 10 Mar 2017 12:22:41 +0800 Subject: [PATCH 222/646] add Stack notes and complete TestArrayList --- group22/627559964/.classpath | 1 + .../src/com/coding/basic/ArrayList.java | 11 +--- .../627559964/src/com/coding/basic/Queue.java | 2 + .../627559964/src/com/coding/basic/Stack.java | 29 ++++++++- group22/627559964/src/demo/Demo.java | 3 + .../test/com/coding/basic/TestArrayList.java | 59 +++++++++++++++++++ 6 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 group22/627559964/test/com/coding/basic/TestArrayList.java diff --git a/group22/627559964/.classpath b/group22/627559964/.classpath index 83b76b7922..e72ef7c0d4 100644 --- a/group22/627559964/.classpath +++ b/group22/627559964/.classpath @@ -3,5 +3,6 @@ + diff --git a/group22/627559964/src/com/coding/basic/ArrayList.java b/group22/627559964/src/com/coding/basic/ArrayList.java index e20bd4ca45..59d055dfa7 100644 --- a/group22/627559964/src/com/coding/basic/ArrayList.java +++ b/group22/627559964/src/com/coding/basic/ArrayList.java @@ -160,15 +160,6 @@ public Object next() { @Override public String toString() { - StringBuffer list = new StringBuffer(); - list.append("["); - for (int i = 0; i < elementData.length; i++) { - list.append(elementData); - if (i != elementData.length - 1) { - list.append(","); - } - } - list.append("]"); - return list.toString(); + return Arrays.toString(Arrays.copyOf(elementData, size)); } } \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/Queue.java b/group22/627559964/src/com/coding/basic/Queue.java index a487336ffe..0cc28034fe 100644 --- a/group22/627559964/src/com/coding/basic/Queue.java +++ b/group22/627559964/src/com/coding/basic/Queue.java @@ -1,6 +1,8 @@ package com.coding.basic; public class Queue { + + private Object[] queue; public void enQueue(Object o) { } diff --git a/group22/627559964/src/com/coding/basic/Stack.java b/group22/627559964/src/com/coding/basic/Stack.java index 0d93aabb47..84e90bfb75 100644 --- a/group22/627559964/src/com/coding/basic/Stack.java +++ b/group22/627559964/src/com/coding/basic/Stack.java @@ -1,23 +1,46 @@ package com.coding.basic; +/** + * 自定义stack + * + * @author xiongrui233 + * + */ public class Stack { + //元素集合 private ArrayList elementData = new ArrayList(); + /** + * 向栈顶压入元素 + * @param o + */ public void push(Object o) { - elementData.add(o); + elementData.add(0,o); } + /** + * 获得栈顶元素,并移除栈里该元素 + * @return obj + */ public Object pop() { Object obj = elementData.get(0); elementData.remove(0); return obj; } + /** + * 获得栈顶元素,不移除栈里该元素 + * @return obj + */ public Object peek() { return elementData.get(0); } + /** + * 判断该栈是否为空 + * @return true/false + */ public boolean isEmpty() { if (elementData.size() != 0) { return false; @@ -25,6 +48,10 @@ public boolean isEmpty() { return true; } + /** + * 获得栈的大小 + * @return size + */ public int size() { return elementData.size(); } diff --git a/group22/627559964/src/demo/Demo.java b/group22/627559964/src/demo/Demo.java index de5ec1a19c..156d8ec61a 100644 --- a/group22/627559964/src/demo/Demo.java +++ b/group22/627559964/src/demo/Demo.java @@ -1,5 +1,7 @@ package demo; +import java.util.PriorityQueue; + import com.coding.basic.ArrayList; import com.coding.basic.Iterator; import com.coding.basic.List; @@ -14,6 +16,7 @@ public static void main(String[] args) { list.add(3, new Integer(233)); list.add(3, new Double(233.33)); list.remove(6); + System.out.println("List:" + list); Double kk = (Double) list.get(3); Iterator it = list.iterator(); while (it.hasNext()) { diff --git a/group22/627559964/test/com/coding/basic/TestArrayList.java b/group22/627559964/test/com/coding/basic/TestArrayList.java new file mode 100644 index 0000000000..68dabbb042 --- /dev/null +++ b/group22/627559964/test/com/coding/basic/TestArrayList.java @@ -0,0 +1,59 @@ +package com.coding.basic; + +import java.util.Arrays; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class TestArrayList { + + private List list = null; + + @Before + public void init() { + list = new ArrayList(); + + list.add(0); + list.add(1); + list.add(3); + } + + @Test + public void addTest () { + list.add(2,2); +// System.out.println(list.toString()); + Assert.assertEquals("[0, 1, 2, 3]", list.toString()); + } + + @Test + public void getTest () { + Assert.assertEquals(3, list.get(2)); + } + + @Test + public void removeTest () { + list.remove(0); +// System.out.println(list.toString()); + Assert.assertEquals("[1, 3]", list.toString()); + } + + @Test + public void sizeTest () { + Assert.assertEquals(3, list.size()); + } + + @Test + public void iteratorTest () { + Object[] obj = new Object[list.size()]; + Iterator it = list.iterator(); + int i = 0; + while (it.hasNext()) { + obj[i] = it.next(); + i ++; + } +// System.out.println(Arrays.toString(obj)); + Assert.assertEquals(Arrays.toString(obj), list.toString()); + } + +} From c05ed934d5749224aa15c0f060be4063f28e64da Mon Sep 17 00:00:00 2001 From: xiongrui Date: Fri, 10 Mar 2017 13:37:19 +0800 Subject: [PATCH 223/646] simple complete BinaryTreeNode --- .../src/com/coding/basic/BinaryTreeNode.java | 30 +++++++++++++++- group22/627559964/src/demo/Demo.java | 34 ++++++++++++------- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/group22/627559964/src/com/coding/basic/BinaryTreeNode.java b/group22/627559964/src/com/coding/basic/BinaryTreeNode.java index 981812cf59..9c416d3ad3 100644 --- a/group22/627559964/src/com/coding/basic/BinaryTreeNode.java +++ b/group22/627559964/src/com/coding/basic/BinaryTreeNode.java @@ -1,9 +1,18 @@ package com.coding.basic; +/** + * 自定义二叉树 + * + * @author xiongrui233 + * + */ public class BinaryTreeNode { + //节点值 private Object data; + //左子树 private BinaryTreeNode left; + //右子树 private BinaryTreeNode right; public Object getData() { @@ -30,8 +39,27 @@ public void setRight(BinaryTreeNode right) { this.right = right; } + /** + * 插入元素 + * @param o + * @return BinaryTreeNode + */ public BinaryTreeNode insert(Object o) { - return null; + BinaryTreeNode node = null; + if (this.data == null) { + this.data = o; + node = this; + } else { + if (this.left.data == null) { + this.left.data = o; + node = this.left; + } + if (this.right.data == null) { + this.right.data = o; + node = this.right; + } + } + return node; } } \ No newline at end of file diff --git a/group22/627559964/src/demo/Demo.java b/group22/627559964/src/demo/Demo.java index 156d8ec61a..10e4fbe402 100644 --- a/group22/627559964/src/demo/Demo.java +++ b/group22/627559964/src/demo/Demo.java @@ -4,24 +4,32 @@ import com.coding.basic.ArrayList; import com.coding.basic.Iterator; +import com.coding.basic.LinkedList; import com.coding.basic.List; public class Demo { public static void main(String[] args) { - List list = new ArrayList(); - for (int i = 0; i < 12; i++) { - list.add(new Integer(123)); - } - list.add(3, new Integer(233)); - list.add(3, new Double(233.33)); - list.remove(6); - System.out.println("List:" + list); - Double kk = (Double) list.get(3); - Iterator it = list.iterator(); - while (it.hasNext()) { - System.out.println(it.next()); - } +// List list = new ArrayList(); +// for (int i = 0; i < 12; i++) { +// list.add(new Integer(123)); +// } +// list.add(3, new Integer(233)); +// list.add(3, new Double(233.33)); +// list.remove(6); +// System.out.println("List:" + list); +// Double kk = (Double) list.get(3); +// Iterator it = list.iterator(); +// while (it.hasNext()) { +// System.out.println(it.next()); +// } + + List list = new LinkedList(); + list.add(1); + list.add(2); + list.add(3); +// list.add(0, 0); + System.out.println("End"); } } From 0c73e93c22f217a253f42e509fe57d8bffad6b2a Mon Sep 17 00:00:00 2001 From: xiongrui Date: Fri, 10 Mar 2017 13:38:20 +0800 Subject: [PATCH 224/646] doing LinkedList --- .../src/com/coding/basic/LinkedList.java | 95 ++++++++++++++++--- 1 file changed, 82 insertions(+), 13 deletions(-) diff --git a/group22/627559964/src/com/coding/basic/LinkedList.java b/group22/627559964/src/com/coding/basic/LinkedList.java index 8aa70d53bd..0296f1019b 100644 --- a/group22/627559964/src/com/coding/basic/LinkedList.java +++ b/group22/627559964/src/com/coding/basic/LinkedList.java @@ -1,27 +1,102 @@ package com.coding.basic; +/** + * 自定义LinkList + * + * @author xiongrui233 + * + */ public class LinkedList implements List { + + /** + * 定义链表节点结构 + * @author xiongrui233 + * + */ + private static class Node { + Object data; + Node next; + } + //链表节点 + private Node head = new Node(); - private Node head; - + /** + * 添加元素 + * + * @param o + */ public void add(Object o) { - + Node node = head; + while (node.data != null) { + node = node.next; + } + node.data = o; } + /** + * 添加元素 + * + * @param index + * @param o + */ public void add(int index, Object o) { - + Node node = head; + Node oldNode = head; + Node newNode = new Node(); + for (int i = 0; i <= index; i++) { + if (i == index - 1) { + oldNode = node.next; + } + node = node.next; + } + newNode.data = o; + newNode.next = node; + oldNode.next = newNode; } + /** + * 获取元素 + * + * @param index + */ public Object get(int index) { - return null; + Node node = head; + for (int i = 0; i <= index; i++) { + node = node.next; + } + return node.data; } + /** + * 删除元素 + * + * @param index + */ public Object remove(int index) { - return null; + Node node = head; + Node oldNode = head; + Node newNode = new Node(); + for (int i = 0; i <= index; i++) { + if (i == index - 1) { + oldNode = node.next; + } + node = node.next; + } + if (node.next != null) { + newNode = node.next; + } else { + newNode = node; + } + oldNode.next = newNode; + return node.data; } public int size() { - return -1; + int size = 0; + while (head.next != null) { + size ++; + } + return size; } public void addFirst(Object o) { @@ -44,12 +119,6 @@ public Iterator iterator() { return null; } - private static class Node { - Object data; - Node next; - - } - /** * 把该链表逆置 例如链表为 3->7->10 , 逆置后变为 10->7->3 */ From 037f5aea1eca6080ad65a3100e27b37d6d38a0a3 Mon Sep 17 00:00:00 2001 From: SJsunshine Date: Fri, 10 Mar 2017 14:18:31 +0800 Subject: [PATCH 225/646] 1515345281 --- group26/1515345281/.gitignore | 1 + .../1515345281/src/Collection/ArrayList.java | 72 +++++++ .../src/Collection/BinaryTreeNode.java | 44 ++++ .../1515345281/src/Collection/Iterator.java | 5 + .../1515345281/src/Collection/LinkedList.java | 195 ++++++++++++++++++ group26/1515345281/src/Collection/List.java | 9 + group26/1515345281/src/Collection/Queue.java | 24 +++ group26/1515345281/src/Collection/Stack.java | 33 +++ .../src/Collection/TestCollection.java | 89 ++++++++ 9 files changed, 472 insertions(+) create mode 100644 group26/1515345281/.gitignore create mode 100644 group26/1515345281/src/Collection/ArrayList.java create mode 100644 group26/1515345281/src/Collection/BinaryTreeNode.java create mode 100644 group26/1515345281/src/Collection/Iterator.java create mode 100644 group26/1515345281/src/Collection/LinkedList.java create mode 100644 group26/1515345281/src/Collection/List.java create mode 100644 group26/1515345281/src/Collection/Queue.java create mode 100644 group26/1515345281/src/Collection/Stack.java create mode 100644 group26/1515345281/src/Collection/TestCollection.java diff --git a/group26/1515345281/.gitignore b/group26/1515345281/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/group26/1515345281/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/group26/1515345281/src/Collection/ArrayList.java b/group26/1515345281/src/Collection/ArrayList.java new file mode 100644 index 0000000000..0b6d000669 --- /dev/null +++ b/group26/1515345281/src/Collection/ArrayList.java @@ -0,0 +1,72 @@ +package Collection; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + if(o==null) + throw new RuntimeException("鎻掑叆鐨勫间笉鑳戒负null"); + if((size+1)>=100){ + throw new RuntimeException("鏁扮粍瓒婄晫寮傚父"); + } + elementData[size]=o; + size++; + } + + public void add(int index, Object o){ + + for(int i=index;i=size) + throw new RuntimeException("绱㈠紩寮傚父"); + return elementData[index]; + } + + public Object remove(int index){ + + if(index<0 || index>=size) + throw new RuntimeException("绱㈠紩寮傚父"); + Object temp=elementData[index]; + for(int i=index;isize()){ + throw new IndexOutOfBoundsException(); + } + if(index==-1){ + return beginMarker; + }else if(index==theSize){ + return endMarker; + } + if(indexindex;i--){ + p=p.prev; + } + } + return p; + } + + private void addBefore(Node node,Object o){ + Node newNode=new Node(o,node.prev,node); + newNode.prev.next=newNode; + node.prev=newNode; + theSize++; + //nodeCount++; + } + + private static class Node{ + public Object data; + public Node next; + public Node prev; + public Node(Object data,Node prev,Node next){ + this.data=data; + this.prev=prev; + this.next=next; + } + } + + + //浠ヤ笅涓嶇敤瀹炵幇 + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group26/1515345281/src/Collection/List.java b/group26/1515345281/src/Collection/List.java new file mode 100644 index 0000000000..2c189c81e3 --- /dev/null +++ b/group26/1515345281/src/Collection/List.java @@ -0,0 +1,9 @@ +package Collection; + +public interface List{ + public void add(Object o); + public void add(int index,Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} \ No newline at end of file diff --git a/group26/1515345281/src/Collection/Queue.java b/group26/1515345281/src/Collection/Queue.java new file mode 100644 index 0000000000..eed752846f --- /dev/null +++ b/group26/1515345281/src/Collection/Queue.java @@ -0,0 +1,24 @@ +package Collection; + +public class Queue { + + private LinkedList list=new LinkedList(); + + public void enQueue(Object o){ + list.addFirst(o); + } + + public Object deQueue(){ + + return list.removeLast(); + } + + public boolean isEmpty(){ + + return list.size()==0; + } + + public int size(){ + return list.size(); + } +} diff --git a/group26/1515345281/src/Collection/Stack.java b/group26/1515345281/src/Collection/Stack.java new file mode 100644 index 0000000000..4c6d5f9255 --- /dev/null +++ b/group26/1515345281/src/Collection/Stack.java @@ -0,0 +1,33 @@ +package Collection; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + int index=elementData.size()-1; + Object data=elementData.get(index); + elementData.remove(index); + return data; + } + + public Object peek(){ + + int index=elementData.size()-1; + return (Object)elementData.get(index); + } + public boolean isEmpty(){ + if(elementData.size()==0) + return true; + else + return false; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group26/1515345281/src/Collection/TestCollection.java b/group26/1515345281/src/Collection/TestCollection.java new file mode 100644 index 0000000000..797ce419b5 --- /dev/null +++ b/group26/1515345281/src/Collection/TestCollection.java @@ -0,0 +1,89 @@ +package Collection; + +import org.junit.Test; + +public class TestCollection { + + @Test + public void arrayListTest(){ + ArrayList array=new ArrayList(); + array.add(1); + array.add(2); + System.out.println(array.size()); + Iterator it=array.iterator(); + while(it.hasNext()){ + System.out.println(it.next()); + } + } + @Test + public void stackTest(){ + Stack stack=new Stack(); + stack.push(1); + stack.push(2); + System.out.println(stack.peek()); + System.out.println(stack.pop()); + } + + @Test + public void linkedListTest(){ + LinkedList list=new LinkedList(); + list.add(1); + list.add(2); + list.addLast(3); + Iterator it=list.iterator(); + while(it.hasNext()){ + System.out.println(it.next()); + } + } + + @Test + public void queueTest(){ + Queue queue=new Queue(); + System.out.println(queue.isEmpty()); + queue.enQueue(1); + queue.enQueue(2); + queue.enQueue(2); + System.out.println(queue.isEmpty()); + System.out.println(queue.size()); + + } + @Test + public void binaryTreeNodeTest(){ + BinaryTreeNode root=new BinaryTreeNode(0); + Queue queue=new Queue(); + queue.enQueue(root); + + for(int i=1;i<10;){ + + BinaryTreeNode node=(BinaryTreeNode) queue.deQueue(); + //System.out.print(node.getData()+" "); + if(node.getLeft()==null){ + BinaryTreeNode t=node.insert(i); + node.setLeft(t); + queue.enQueue(t); + i++; + } + if(node.getRight()==null){ + BinaryTreeNode t=node.insert(i); + node.setRight(t); + queue.enQueue(t); + i++; + } + } + System.out.println("涓簭閬嶅巻缁撴灉涓:"); + print(root); + } + private void print(BinaryTreeNode root) { + + + if(root.getLeft()!=null){ + print(root.getLeft()); + } + + System.out.print(root.getData()+" "); + + if(root.getRight()!=null){ + print(root.getRight()); + } + } +} From 6ac369f20d74c35c29d6a16e70f4be64bc8f24c6 Mon Sep 17 00:00:00 2001 From: SJsunshine Date: Fri, 10 Mar 2017 14:19:59 +0800 Subject: [PATCH 226/646] 1515345281 --- group26/1515345281/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/group26/1515345281/.gitignore b/group26/1515345281/.gitignore index 5e56e040ec..4f4c622218 100644 --- a/group26/1515345281/.gitignore +++ b/group26/1515345281/.gitignore @@ -1 +1,2 @@ /bin +/.project/.classpath \ No newline at end of file From d4c6bf674f0dca65f6a4401ebe44f8c1c08feff7 Mon Sep 17 00:00:00 2001 From: Korben_CHY Date: Fri, 10 Mar 2017 14:51:56 +0800 Subject: [PATCH 227/646] implement FileDownloader by Korben --- .../coderising/download/DownloadThread.java | 79 ++++++++++++++++ .../coderising/download/FileDownloader.java | 81 ++++++++++++++++ .../download/FileDownloaderTest.java | 54 +++++++++++ .../coderising/download/api/Connection.java | 33 +++++++ .../download/api/ConnectionException.java | 11 +++ .../download/api/ConnectionManager.java | 21 +++++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 93 +++++++++++++++++++ .../download/impl/ConnectionManagerImpl.java | 60 ++++++++++++ 9 files changed, 437 insertions(+) create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/DownloadThread.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloader.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloaderTest.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/Connection.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionException.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionManager.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/DownloadListener.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionImpl.java create mode 100644 group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/DownloadThread.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..52a5fd20a9 --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/DownloadThread.java @@ -0,0 +1,79 @@ +package org.korben.coderising.download; + +import java.io.IOException; +import java.io.RandomAccessFile; +import org.korben.coderising.download.api.Connection; +import org.korben.coderising.download.api.ConnectionException; +import org.korben.coderising.download.api.ConnectionManager; +import org.korben.coderising.download.api.DownloadListener; + +public class DownloadThread extends Thread { + + private int endPos; + private int startPos; + private String url; + private String destFilePath; + private ConnectionManager connManager; + private DownloadListener downloadListener; + + public DownloadThread(ConnectionManager connManager, String url, int startPos, int endPos, String destFilePath, + DownloadListener downloadListener) { + + this.url = url; + this.endPos = endPos; + this.startPos = startPos; + this.connManager = connManager; + this.destFilePath = destFilePath; + this.downloadListener = downloadListener; + } + + @Override + public void run() { + Connection conn = null; + RandomAccessFile randomAccessFile = null; + try { + doLog("BIN"); + conn = connManager.open(url, startPos, endPos); + byte[] read = conn.read(startPos, endPos); + String _filePath = destFilePath; + if (_filePath == null || _filePath.length() == 0) { + _filePath = conn.getFileName(); + } + randomAccessFile = new RandomAccessFile(_filePath, "rw"); + randomAccessFile.seek(startPos); + randomAccessFile.write(read); + doLog("END"); + } catch (IOException e) { + doLog("EXP"); + e.printStackTrace(); + } catch (ConnectionException e) { + doLog("EXP"); + e.printStackTrace(); + } finally { + if (randomAccessFile != null) { + try { + randomAccessFile.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (conn != null) { + conn.close(); + } + if (downloadListener != null) { + downloadListener.notifyFinished(); + } + } + } + + private void doLog(String action) { + System.out.println( + "*********** " + action + + " [" + + startPos + + "-" + + endPos + + "]" + + " ***********"); + } +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloader.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..43fde0b69e --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloader.java @@ -0,0 +1,81 @@ +package org.korben.coderising.download; + +import java.util.concurrent.atomic.AtomicInteger; +import org.korben.coderising.download.api.ConnectionException; +import org.korben.coderising.download.api.ConnectionManager; +import org.korben.coderising.download.api.DownloadListener; + +public class FileDownloader { + + private String url; + + private DownloadListener listener; + + private ConnectionManager cm; + + private AtomicInteger atomicInteger; + + public FileDownloader(String _url) { + this.url = _url; + atomicInteger = new AtomicInteger(); + } + + /** + * 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + * 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + * (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + * (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + * 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + * 鍏蜂綋鐨勫疄鐜版濊矾锛 + * 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + * 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + * 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + * 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + * 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + * + * 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + */ + public void execute() { + try { + + int threadCount = 5; + int length = this.cm.getContentLength(this.url); + for (int i = 0; i < threadCount; i++) { + + int threadLoadLength = length / threadCount; + int startPos = threadLoadLength * i; + int endPos; + if (i != threadCount - 1) { + endPos = threadLoadLength * (i + 1) - 1; + } else { + endPos = length - 1; + } + atomicInteger.getAndIncrement(); + new DownloadThread(cm, this.url, startPos, endPos, null, new DownloadListener() { + @Override + public void notifyFinished() { + if (atomicInteger.decrementAndGet() == 0) { + if (FileDownloader.this.listener != null) { + FileDownloader.this.listener.notifyFinished(); + } + } + } + }).start(); + } + } catch (ConnectionException e) { + e.printStackTrace(); + } + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloaderTest.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..53b6b6e45e --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/FileDownloaderTest.java @@ -0,0 +1,54 @@ +package org.korben.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.korben.coderising.download.api.ConnectionManager; +import org.korben.coderising.download.api.DownloadListener; +import org.korben.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489721424&di=1fda6467501ab1d5e5bff43e801d14ee&imgtype=jpg&er=1&src=http%3A%2F%2Fimg4.duitang.com%2Fuploads%2Fitem%2F201507%2F30%2F20150730163204_A24MX.thumb.700_0.jpeg"; + //String url = "http://apache.fayea.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"; + + FileDownloader downloader = new FileDownloader(url); + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/Connection.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/Connection.java new file mode 100644 index 0000000000..6f58852d56 --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/Connection.java @@ -0,0 +1,33 @@ +package org.korben.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return 璇诲彇鐨勫瓧鑺傛暟缁 + */ + byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return 鏁版嵁鍐呭闀垮害 + */ + int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + void close(); + + /** + * 鑾峰彇涓嬭浇鏂囦欢鐨勬枃浠跺悕 + * + * @return 鏂囦欢鍚 + */ + String getFileName(); +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionException.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..d74b432783 --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionException.java @@ -0,0 +1,11 @@ +package org.korben.coderising.download.api; + +public class ConnectionException extends Exception { + public ConnectionException(Exception e) { + super(e); + } + + public ConnectionException(String msg) { + super(msg); + } +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionManager.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..5e0d4afe3f --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/ConnectionManager.java @@ -0,0 +1,21 @@ +package org.korben.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url 杩炴帴鍦板潃 + * @param startPos 璇诲彇鏂囦欢鐨勮捣濮嬩綅缃 + * @param endPos 璇诲彇鏂囦欢鐨勭粨鏉熶綅缃 + * @return 杩炴帴 + */ + Connection open(String url, int startPos, int endPos) throws ConnectionException; + + /** + * 鑾峰彇鏂囦欢闀垮害 + * + * @param url 杩炴帴鍦板潃 + * @return 鏂囦欢闀垮害 + */ + int getContentLength(String url) throws ConnectionException; +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/DownloadListener.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..e2685665b7 --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package org.korben.coderising.download.api; + +public interface DownloadListener { + void notifyFinished(); +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionImpl.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..cce16fafbe --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,93 @@ +package org.korben.coderising.download.impl; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import org.korben.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private static final int BUFFER_SIZE = 4096; + private HttpURLConnection httpConn; + private String fileUrl; + private InputStream inputStream; + + public ConnectionImpl(HttpURLConnection httpConn, String fileUrl) { + this.httpConn = httpConn; + this.fileUrl = fileUrl; + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + if (endPos < startPos) { + throw new IllegalArgumentException("argument endPos[" + endPos + "] less than startPos[" + startPos + "]"); + } + int bytesNeed2Read = endPos - startPos + 1; + if (bytesNeed2Read > getContentLength()) { + throw new IllegalArgumentException( + "endPos[" + endPos + "] is bigger than content length[" + getContentLength() + "]"); + } + + inputStream = httpConn.getInputStream(); + + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + byte[] buffer = new byte[Math.min(bytesNeed2Read, BUFFER_SIZE)]; + int read; + + long startTime = System.currentTimeMillis(); + final long progressInterval = 2000; + while ((read = inputStream.read(buffer)) != -1) { + byteArrayOutputStream.write(buffer, 0, read); + + if (System.currentTimeMillis() - startTime > progressInterval) { + startTime = System.currentTimeMillis(); + System.out.println(String.format(Thread.currentThread().getName() + + " [%.2f%%]", byteArrayOutputStream.size() * 100.0 / bytesNeed2Read) + ); + } + } + System.out.println(String.format(Thread.currentThread().getName() + " [%.2f%%]", 100.0)); + System.out.println("bytes read: " + byteArrayOutputStream.size()); + + return byteArrayOutputStream.toByteArray(); + } + + @Override + public int getContentLength() { + if (httpConn != null) { + return httpConn.getContentLength(); + } + return 0; + } + + @Override + public void close() { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (httpConn != null) { + httpConn.disconnect(); + } + } + + @Override + public String getFileName() { + String disposition = httpConn.getHeaderField("Content-Disposition"); + if (disposition != null) { + // extracts file name from header field + int index = disposition.indexOf("filename="); + if (index > 0) { + return disposition.substring(index + 10, + disposition.length() - 1); + } + } + // extracts file name from URL + return fileUrl.substring(fileUrl.lastIndexOf("/") + 1, + fileUrl.length()); + } +} \ No newline at end of file diff --git a/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionManagerImpl.java b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..16d8df8f7c --- /dev/null +++ b/group20/1107837739/1107837739Learning/src/org/korben/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,60 @@ +package org.korben.coderising.download.impl; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import org.korben.coderising.download.api.Connection; +import org.korben.coderising.download.api.ConnectionException; +import org.korben.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String fileURL, int startPos, int endPos) throws ConnectionException { + try { + System.out.println("try to open file url: " + fileURL); + + URL url = new URL(fileURL); + HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); + + // 璁惧畾璇诲彇range + httpConn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + System.out.println("Range: bytes=" + startPos + "-" + endPos); + + int responseCode = httpConn.getResponseCode(); + + System.out.println("server replied HTTP code: " + responseCode); + if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_PARTIAL) { + System.out.println("return new ConnectionImpl"); + return new ConnectionImpl(httpConn, fileURL); + } else { + throw new ConnectionException("server replied HTTP code: " + responseCode); + } + } catch (IOException e) { + throw new ConnectionException(e); + } + } + + @Override + public int getContentLength(String fileURL) throws ConnectionException { + try { + System.out.println("try to open file url: " + fileURL); + + URL url = new URL(fileURL); + HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); + int responseCode = httpConn.getResponseCode(); + + System.out.println("server replied HTTP code: " + responseCode); + if (responseCode == HttpURLConnection.HTTP_OK) { + System.out.println("return contentLength: " + httpConn.getContentLength()); + int contentLength = httpConn.getContentLength(); + httpConn.disconnect(); + return contentLength; + } else { + throw new ConnectionException("server replied HTTP code: " + responseCode); + } + } catch (IOException e) { + throw new ConnectionException(e); + } + } +} \ No newline at end of file From 4f9682a6c00fd76663bb9b17fe081991514b2171 Mon Sep 17 00:00:00 2001 From: Alvin Date: Fri, 10 Mar 2017 00:32:36 -0800 Subject: [PATCH 228/646] Homework 3rd --- .../coderising/download/DownloadThread.java | 9 ++++- .../coderising/download/FileDownloader.java | 28 ++++++++++----- .../download/FileDownloaderTest.java | 12 ++++--- .../coderising/download/api/Connection.java | 10 +++--- .../download/api/ConnectionException.java | 2 +- .../download/api/ConnectionManager.java | 9 ++--- .../download/api/DownloadListener.java | 2 +- .../download/impl/ConnectionImpl.java | 36 ++++++++++++++----- .../download/impl/ConnectionManagerImpl.java | 19 ++-------- .../download/utils/FileDownloadUtil.java | 20 +++++++++++ 10 files changed, 93 insertions(+), 54 deletions(-) create mode 100644 group20/404130810/src/com/coderising/download/utils/FileDownloadUtil.java diff --git a/group20/404130810/src/com/coderising/download/DownloadThread.java b/group20/404130810/src/com/coderising/download/DownloadThread.java index d71540b497..1bbba90c30 100644 --- a/group20/404130810/src/com/coderising/download/DownloadThread.java +++ b/group20/404130810/src/com/coderising/download/DownloadThread.java @@ -1,5 +1,7 @@ package com.coderising.download; +import java.io.IOException; + import com.coderising.download.api.Connection; public class DownloadThread extends Thread{ @@ -15,6 +17,11 @@ public DownloadThread( Connection conn, int startPos, int endPos){ this.endPos = endPos; } public void run(){ - + try { + conn.read(startPos, endPos); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/FileDownloader.java b/group20/404130810/src/com/coderising/download/FileDownloader.java index 3a4bcd8d9e..5193eaba99 100644 --- a/group20/404130810/src/com/coderising/download/FileDownloader.java +++ b/group20/404130810/src/com/coderising/download/FileDownloader.java @@ -1,13 +1,17 @@ package com.coderising.download; +import java.io.IOException; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; +import com.coderising.download.utils.FileDownloadUtil; public class FileDownloader { - String url; + String url = "http://localhost:8080/MyServer/test.exe"; DownloadListener listener; @@ -15,10 +19,10 @@ public class FileDownloader { public FileDownloader(String _url) { this.url = _url; - + cm = new ConnectionManagerImpl(); } - public void execute() { + public void execute() throws IOException { // 在这里实现你的代码, 注意: 需要用多线程实现下载 // 这个类依赖于其他几个接口, 你需要写这几个接口的实现代码 // (1) ConnectionManager , 可以打开一个连接,通过Connection可以读取其中的一段(用startPos, @@ -36,12 +40,16 @@ public void execute() { // 下面的代码是示例代码, 也就是说只有一个线程, 你需要改造成多线程的。 Connection conn = null; try { - - conn = cm.open(this.url); - + conn = cm.open(url); int length = conn.getContentLength(); - - new DownloadThread(conn, 0, length - 1).start(); + int[] posArr = FileDownloadUtil.generateDownloadPosArr(length); + for (int i = 0; i < posArr.length; i++) { + if(i == posArr.length - 1){ + new DownloadThread(cm.open(url), posArr[i], length).start(); + }else{ + new DownloadThread(cm.open(url), posArr[i], posArr[i + 1] - 1).start(); + } + } } catch (ConnectionException e) { e.printStackTrace(); @@ -65,4 +73,8 @@ public DownloadListener getListener() { return this.listener; } + public static void main(String[] args) throws IOException { + new FileDownloader("http://localhost:8080/MyServer/Test.mp3").execute(); + } + } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/FileDownloaderTest.java b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java index 4a781d87c3..46444c9710 100644 --- a/group20/404130810/src/com/coderising/download/FileDownloaderTest.java +++ b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java @@ -1,5 +1,7 @@ package com.coderising.download; +import java.io.IOException; + import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -19,7 +21,7 @@ public void tearDown() throws Exception { } @Test - public void testDownload() { + public void testDownload() throws IOException { String url = "http://localhost:8080/test.jpg"; @@ -40,17 +42,17 @@ public void notifyFinished() { downloader.execute(); - // 等待多线程下载程序执行完毕 + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 while (!downloadFinished) { try { - System.out.println("还没有下载完成,休眠五秒"); - //休眠5秒 + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } - System.out.println("下载完成!"); + System.out.println("涓嬭浇瀹屾垚锛"); diff --git a/group20/404130810/src/com/coderising/download/api/Connection.java b/group20/404130810/src/com/coderising/download/api/Connection.java index 911ee46891..249da5d667 100644 --- a/group20/404130810/src/com/coderising/download/api/Connection.java +++ b/group20/404130810/src/com/coderising/download/api/Connection.java @@ -4,20 +4,20 @@ public interface Connection { /** - * 给定开始和结束位置, 读取数据, 返回值是字节数组 - * @param startPos 开始位置, 从0开始 - * @param endPos 结束位置 + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 * @return */ public byte[] read(int startPos,int endPos) throws IOException; /** - * 得到数据内容的长度 + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 * @return */ public int getContentLength(); /** - * 关闭连接 + * 鍏抽棴杩炴帴 */ public void close(); } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/api/ConnectionException.java b/group20/404130810/src/com/coderising/download/api/ConnectionException.java index 7e13414c73..8dbfe95dda 100644 --- a/group20/404130810/src/com/coderising/download/api/ConnectionException.java +++ b/group20/404130810/src/com/coderising/download/api/ConnectionException.java @@ -2,4 +2,4 @@ public class ConnectionException extends Exception { -} \ No newline at end of file +} diff --git a/group20/404130810/src/com/coderising/download/api/ConnectionManager.java b/group20/404130810/src/com/coderising/download/api/ConnectionManager.java index e274234679..aba5b931e4 100644 --- a/group20/404130810/src/com/coderising/download/api/ConnectionManager.java +++ b/group20/404130810/src/com/coderising/download/api/ConnectionManager.java @@ -1,10 +1,5 @@ package com.coderising.download.api; public interface ConnectionManager { - /** - * 给定一个url , 打开一个连接 - * @param url - * @return - */ - public Connection open(String url) throws ConnectionException; -} \ No newline at end of file + public Connection open(String url) throws ConnectionException; +} diff --git a/group20/404130810/src/com/coderising/download/api/DownloadListener.java b/group20/404130810/src/com/coderising/download/api/DownloadListener.java index a6589e52f5..4cd0b3eab1 100644 --- a/group20/404130810/src/com/coderising/download/api/DownloadListener.java +++ b/group20/404130810/src/com/coderising/download/api/DownloadListener.java @@ -2,4 +2,4 @@ public interface DownloadListener { public void notifyFinished(); -} \ No newline at end of file +} diff --git a/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java index 0c62ee1711..33f693bc96 100644 --- a/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,31 +1,49 @@ package com.coderising.download.impl; import java.io.IOException; +import java.io.InputStream; +import java.io.RandomAccessFile; +import java.net.HttpURLConnection; +import java.net.URL; import com.coderising.download.api.Connection; -public class ConnectionImpl implements Connection{ +public class ConnectionImpl implements Connection { - private byte[] fileContent; + private HttpURLConnection httpConn; + + public ConnectionImpl(String urlStr) { + URL url; + try { + url = new URL(urlStr); + httpConn = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + } @Override public byte[] read(int startPos, int endPos) throws IOException { + int length = endPos - startPos; + byte[] rtnByte = new byte[length]; - return null; + RandomAccessFile raf = new RandomAccessFile("test.mp3", "rw"); + raf.seek(startPos); + InputStream is = httpConn.getInputStream(); + while ((length = is.read(rtnByte)) != -1) { + raf.write(rtnByte, 0, length); + } + return rtnByte; } @Override public int getContentLength() { - return fileContent.length; + return httpConn.getContentLength(); } @Override public void close() { - - } - - public void setFileContent(byte[] fileContent) { - this.fileContent = fileContent; + httpConn.disconnect(); } } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java index b92d7d6c8f..9b9a93a9ea 100644 --- a/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group20/404130810/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -1,28 +1,13 @@ package com.coderising.download.impl; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; - import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; public class ConnectionManagerImpl implements ConnectionManager { - - @Override public Connection open(String urlStr) throws ConnectionException { - URL url; - try { - url = new URL(urlStr); - HttpURLConnection conn = (HttpURLConnection)url.openConnection(); - } catch (IOException e) { - e.printStackTrace(); - } - - return null; + Connection conn = new ConnectionImpl(urlStr); + return conn; } - } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/utils/FileDownloadUtil.java b/group20/404130810/src/com/coderising/download/utils/FileDownloadUtil.java new file mode 100644 index 0000000000..3f8d727d59 --- /dev/null +++ b/group20/404130810/src/com/coderising/download/utils/FileDownloadUtil.java @@ -0,0 +1,20 @@ +package com.coderising.download.utils; + +public class FileDownloadUtil { + + public static int[] generateDownloadPosArr(int length){ + int[] posArr = new int[3]; + int firstPos = length/3; + int secondPos = length/3 * 2; + + posArr[0] = 0; + posArr[1] = firstPos; + posArr[2] = secondPos; + + return posArr; + } + public static void main(String[] args) { + FileDownloadUtil.generateDownloadPosArr(1000); + } + +} From d9c4b4e47e300a8e6beea48060f290156434c814 Mon Sep 17 00:00:00 2001 From: xiongrui Date: Fri, 10 Mar 2017 17:31:30 +0800 Subject: [PATCH 229/646] =?UTF-8?q?simple=20complete=20LinkedList=EF=BC=8C?= =?UTF-8?q?last=20TODO=20intersection()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/LinkedList.java | 218 ++++++++++++++---- .../627559964/src/com/coding/basic/Queue.java | 11 +- group22/627559964/src/demo/Demo.java | 55 ++++- 3 files changed, 235 insertions(+), 49 deletions(-) diff --git a/group22/627559964/src/com/coding/basic/LinkedList.java b/group22/627559964/src/com/coding/basic/LinkedList.java index 0296f1019b..dcae1fb835 100644 --- a/group22/627559964/src/com/coding/basic/LinkedList.java +++ b/group22/627559964/src/com/coding/basic/LinkedList.java @@ -7,9 +7,10 @@ * */ public class LinkedList implements List { - + /** * 定义链表节点结构 + * * @author xiongrui233 * */ @@ -17,20 +18,23 @@ private static class Node { Object data; Node next; } - //链表节点 + + // 链表节点 private Node head = new Node(); + private int size = 0; + + public LinkedList() { + head.next = head; + } + /** * 添加元素 * * @param o */ public void add(Object o) { - Node node = head; - while (node.data != null) { - node = node.next; - } - node.data = o; + addLast(o); } /** @@ -40,18 +44,23 @@ public void add(Object o) { * @param o */ public void add(int index, Object o) { + if (index < 0 || index > size) { + throw new ArrayIndexOutOfBoundsException(); + } Node node = head; - Node oldNode = head; - Node newNode = new Node(); - for (int i = 0; i <= index; i++) { - if (i == index - 1) { - oldNode = node.next; - } + Node temp = new Node(); + for (int i = 0; i < index; i++) { node = node.next; } - newNode.data = o; - newNode.next = node; - oldNode.next = newNode; + temp.data = o; + if (index == size -1) { + node.next = temp; + temp.next = head; + } else { + temp.next = node.next; + node.next = temp; + } + size ++; } /** @@ -73,57 +82,117 @@ public Object get(int index) { * @param index */ public Object remove(int index) { + if (index < 0 || index > size) { + throw new ArrayIndexOutOfBoundsException(); + } Node node = head; - Node oldNode = head; - Node newNode = new Node(); - for (int i = 0; i <= index; i++) { - if (i == index - 1) { - oldNode = node.next; - } + Node temp = new Node(); + for (int i = 0; i <= index - 1; i++) { node = node.next; } - if (node.next != null) { - newNode = node.next; + if (index == size -1) { + temp = node.next; + node.next = head; } else { - newNode = node; + temp = node.next; + node.next = node.next.next; } - oldNode.next = newNode; - return node.data; + size --; + return temp.data; } + /** + * 返回LinkedList的大小 + * + * @return size + */ public int size() { - int size = 0; - while (head.next != null) { - size ++; - } return size; } + /** + * 在LinkedList第一的位置添加元素 + * + * @param o + */ public void addFirst(Object o) { - + add(0, o); } + /** + * 在LinkedList最后添加元素 + * @param o + */ public void addLast(Object o) { - + Node node = head; + Node temp = new Node(); + for (int i = 0; i < size; i++) { + node = node.next; + } + temp.data = o; + node.next = temp; + size ++; } + /** + * 移除链表第一位元素 + * + * @return obj + */ public Object removeFirst() { - return null; + return remove(0); } + /** + * 移除链表最后一位元素 + * + * @return obj + */ public Object removeLast() { - return null; + return remove(size - 1); } + /** + * 实现Iterator接口 + * + * @return Iterator + */ public Iterator iterator() { - return null; + + class IteratorImpl implements Iterator { + + private Node node = head.next; + + private Object temp = null; + + @Override + public boolean hasNext() { + if (node != null && node.data != null) { + temp = node.data; + node = node.next; + return true; + } + return false; + } + + @Override + public Object next() { + return temp; + } + + } + return new IteratorImpl(); } /** * 把该链表逆置 例如链表为 3->7->10 , 逆置后变为 10->7->3 */ - public void reverse() { - + public LinkedList reverse() { + LinkedList lis = new LinkedList(); + for (int i = this.size - 1; i >= 0; i--) { + lis.add(this.get(i)); + } + return lis; } /** @@ -131,7 +200,10 @@ public void reverse() { * ,删除以后的值为7,8,10 */ public void removeFirstHalf() { - + int mid = size/2; + for (int i = 0; i < mid; i++) { + remove(0); + } } /** @@ -141,7 +213,15 @@ public void removeFirstHalf() { * @param length */ public void remove(int i, int length) { - + if (i > length) { + throw new IllegalArgumentException(); + } + if (i < 0 || i > size) { + throw new ArrayIndexOutOfBoundsException(); + } + for (int j = i; j <= length; j++) { + remove(i); + } } /** @@ -151,8 +231,15 @@ public void remove(int i, int length) { * * @param list */ - public static int[] getElements(LinkedList list) { - return null; + public int[] getElements(LinkedList list) { + if (this.size < (Integer)list.get(list.size - 1)) { + throw new IllegalArgumentException(); + } + int[] elements = new int[list.size]; + for (int i = 0; i < elements.length; i++) { + elements[i] = (Integer) this.get((Integer)list.get(i)); + } + return elements; } /** @@ -162,14 +249,30 @@ public static int[] getElements(LinkedList list) { */ public void subtract(LinkedList list) { - + Iterator it = list.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + for (int i = 0; i < this.size; i++) { + if (obj.equals(this.get(i))) { + this.remove(i); + } + } + } } /** * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) */ public void removeDuplicateValues() { - + for (int i = 0; i < this.size; i++) { + if (i + 1 >= this.size) { + return; + } + if (this.get(i).equals(this.get(i+1))) { + remove(i+1); + i--; + } + } } /** @@ -179,16 +282,39 @@ public void removeDuplicateValues() { * @param max */ public void removeRange(int min, int max) { - + if (min >= max) { + throw new IllegalArgumentException(); + } + for (int i = 0; i < this.size; i++) { + if ((Integer)this.get(i) > max) { + remove(i, this.size-1); + } + } } /** * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 - * + * TODO * @param list */ public LinkedList intersection(LinkedList list) { return null; } + + @Override + public String toString() { + StringBuffer list = new StringBuffer(); + list.append("List:["); + Node node = head.next; + for (int i = 0; i < size; i++) { + list.append(node.data); + node = node.next; + if (i != size -1) { + list.append(", "); + } + } + list.append("]"); + return list.toString(); + } } \ No newline at end of file diff --git a/group22/627559964/src/com/coding/basic/Queue.java b/group22/627559964/src/com/coding/basic/Queue.java index 0cc28034fe..90f845e6cd 100644 --- a/group22/627559964/src/com/coding/basic/Queue.java +++ b/group22/627559964/src/com/coding/basic/Queue.java @@ -1,10 +1,19 @@ package com.coding.basic; +/** + * 自定义队列 + * + * @author xiongrui233 + * + */ public class Queue { + + private Object[] queue = new Object[10]; - private Object[] queue; + private int size = 0; public void enQueue(Object o) { + } public Object deQueue() { diff --git a/group22/627559964/src/demo/Demo.java b/group22/627559964/src/demo/Demo.java index 10e4fbe402..4fbb5c6b40 100644 --- a/group22/627559964/src/demo/Demo.java +++ b/group22/627559964/src/demo/Demo.java @@ -1,5 +1,6 @@ package demo; +import java.util.Arrays; import java.util.PriorityQueue; import com.coding.basic.ArrayList; @@ -24,12 +25,62 @@ public static void main(String[] args) { // System.out.println(it.next()); // } - List list = new LinkedList(); + LinkedList list = new LinkedList(); list.add(1); list.add(2); list.add(3); -// list.add(0, 0); + list.add(5); + list.add(0, 0); + list.add(2, 4); + + System.out.println(list); + + System.out.println(list.size()); + + System.out.println(list.get(4)); + + System.out.println(list.remove(4)); + + System.out.println(list); + + System.out.println(list.reverse()); + + Iterator it = list.iterator(); + while (it.hasNext()) { + System.out.print(it.next() + " "); + } + System.out.println(); + + list.removeFirstHalf(); + System.out.println(list); + + list.remove(0, 1); + System.out.println(list); + + LinkedList ls = new LinkedList(); + list.add(6); + list.add(7); + list.add(8); + ls.add(1); + ls.add(2); + System.out.println(list); + System.out.println(ls); + System.out.println(Arrays.toString(list.getElements(ls))); + + ls.add(6); + list.subtract(ls); + System.out.println(list); + + list.add(1, 6); +// list.add(1, 6); + System.out.println(list); +// list.removeDuplicateValues(); +// System.out.println(list); System.out.println("End"); + + list.removeRange(4, 7); + System.out.println(list); + } } From e05c3d321cdcad609c081b000245052260a86acb Mon Sep 17 00:00:00 2001 From: myThinkPad <1252327158@qq.com> Date: Fri, 10 Mar 2017 17:33:44 +0800 Subject: [PATCH 230/646] =?UTF-8?q?=E6=94=B9=E8=BF=9BLinkedList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/ArrayList.java | 1 - .../src/com/coding/LinkedList.java | 139 ++++++++++++------ .../src/com/coding/LinkedListTest.java | 92 ++++++++++++ .../task1_20170312/src/com/coding/List.java | 1 - 4 files changed, 184 insertions(+), 49 deletions(-) create mode 100644 group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java index 735a720074..d182395643 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -77,7 +77,6 @@ public int size(){ return size; } - @Override public Iterator iterator(){ return new Iter(); } diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java index 84895b8aa6..416a82c345 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java @@ -1,31 +1,21 @@ package com.coding; public class LinkedList implements List { - + private int size; - + private Node head; - + public LinkedList(){ size = 0; head = null; } - + @Override public void add(T o){ - Node item = new Node(o, null); - if(head == null) { - head = item; - } else { - Node tag = head; - while (tag.next != null) { - tag = tag.next; - } - tag.next = item; - } - size++; + addFirst(o); } - + @Override public void add(int index , T o){ if (index > size || index < 0) { @@ -45,7 +35,7 @@ public void add(int index , T o){ } size++; } - + @Override public T get(int index){ if (index >= size || index < 0) { @@ -57,52 +47,107 @@ public T get(int index){ } return result.data; } - + @Override public T remove(int index){ - return null; + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException(); + } + Node result = head; + if (index == 0) { + head = head.next; + } else { + Node temp = head; + for (int i = 1; i < index; i++) { + temp = temp.next; + } + result = temp.next; + temp.next = temp.next.next; + } + size--; + return result.data; } - + @Override public int size(){ return size; } - + public void addFirst(T o){ - + Node item = new Node(o, null); + if (head == null) { + head = item; + } else { + item.next = head; + head = item; + } + size++; } + public void addLast(T o){ - + Node item = new Node(o, null); + if(head == null) { + head = item; + } else { + Node tag = head; + while (tag.next != null) { + tag = tag.next; + } + tag.next = item; + } + size++; } + public T removeFirst(){ - return null; + if (size == 0) { + throw new IndexOutOfBoundsException(); /////////////////////////////////// + } + Node result = head; + head = head.next; + size--; + return result.data; } + public T removeLast(){ - return null; + if (size == 0) { + throw new IndexOutOfBoundsException(); /////////////////////////////////// + } + Node result = head; + if (size == 1) { + head = null; + } else { + Node temp = head; + while (result.next != null) { + temp = result; + result = result.next; + } + temp.next = null; + } + size--; + return result.data; } - - @Override - public Iterator iterator(){ + + public Iterator iterator(){ return null; } - + private static class Node{ T data; - Node next; + Node next; public Node(T data, Node node) { this.data = data; this.next = node; } } - + /** * 鎶婅閾捐〃閫嗙疆 * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ - public void reverse(){ - + public void reverse(){ + } - + /** * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 @@ -110,48 +155,48 @@ public void reverse(){ */ public void removeFirstHalf(){ - + } - + /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * @param i * @param length */ public void remove(int i, int length){ - + } /** * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list */ public static int[] getElements(LinkedList list){ return null; } - + /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 * @param list */ - + public void subtract(LinkedList list){ - + } - + /** * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ public void removeDuplicateValues(){ - + } - + /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 @@ -159,9 +204,9 @@ public void removeDuplicateValues(){ * @param max */ public void removeRange(int min, int max){ - + } - + /** * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java new file mode 100644 index 0000000000..37a7a48191 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java @@ -0,0 +1,92 @@ +package com.coding; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class LinkedListTest { + LinkedList list; + + @Before + public void setUp() throws Exception { + list = new LinkedList(); + list.add("first"); + list.add("second"); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testAddT() { + list.add("third"); + Assert.assertEquals("second", list.get(1)); + Assert.assertEquals("first", list.get(2)); + } + + @Test + public void testAddIntT() { + list.add(1,"third"); + Assert.assertEquals("third", list.get(1)); + Assert.assertEquals("first", list.get(2)); + } + + @Test + public void testGet() { + Assert.assertEquals("second", list.get(0)); + } + + @Test + public void testRemoveInt() { + list.remove(0); + list.add("third"); + list.add("forth"); + list.remove(1); + Assert.assertEquals("forth", list.get(0)); + Assert.assertEquals("first", list.get(1)); + } + + @Test + public void testSize() { + list.remove(0); + list.add("third"); + list.add("forth"); + list.remove(1); + Assert.assertEquals(2, list.size()); + } + + @Test + public void testAddFirst() { + list.addFirst("third"); + Assert.assertEquals("third", list.get(0)); + Assert.assertEquals("second", list.get(1)); + } + + @Test + public void testAddLast() { + list.addLast("third"); + Assert.assertEquals("third", list.get(2)); + } + + @Test + public void testRemoveFirst() { + list.removeFirst(); + Assert.assertEquals("first", list.get(0)); + } + + @Test + public void testRemoveLast() { + list.removeLast(); + Assert.assertEquals(1, list.size()); + } + + @Test + public void testIterator() { + fail("Not yet implemented"); + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/List.java b/group27/1252327158/task1_20170312/src/com/coding/List.java index eefd43a1d2..0cd05a3bae 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/List.java +++ b/group27/1252327158/task1_20170312/src/com/coding/List.java @@ -6,5 +6,4 @@ public interface List { public T get(int index); public T remove(int index); public int size(); - public Iterator iterator(); } From c8259cab5194eb8231df54b2d2d9c3b609c4ca69 Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 10 Mar 2017 17:45:35 +0800 Subject: [PATCH 231/646] update ArrayUtil and ArrayUtilTest --- .../HarryHook/coding2017/array/ArrayUtil.java | 171 ++++++++++-------- .../coding2017/array/ArrayUtilTest.java | 25 ++- 2 files changed, 116 insertions(+), 80 deletions(-) diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/array/ArrayUtil.java b/group02/727171008/src/com/github/HarryHook/coding2017/array/ArrayUtil.java index a29fcdd193..d5cca25bf4 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/array/ArrayUtil.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/array/ArrayUtil.java @@ -1,5 +1,9 @@ package com.github.HarryHook.coding2017.array; +import java.util.Arrays; + +import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.Array; + public class ArrayUtil { @@ -11,7 +15,12 @@ public class ArrayUtil * @return */ public void reverseArray(int[] origin) - { + { + if(origin == null || origin.length == 0) + { + return ; + } + for(int i=0, j = origin.length-1; i= max) + { break; + } + else + { + count++; + } } - int[] newArray = new int[j]; - System.arraycopy(a, 0, newArray, 0, j); - return newArray; + return Arrays.copyOf(a, count); } /** @@ -171,33 +184,35 @@ public int[] getPrimes(int max) */ //max灏忎簬3鏃讹紝杩斿洖绌烘暟缁 if(max < 3) + { return new int[0]; - int[] Array = new int[max]; - int count = 0; // - int n = 0; - //鍒ゆ柇灏忎簬max鐨勬暟鏈夊摢浜涙槸绱犳暟 - for(n = 2; n < max; n++) + } + int[] array = new int[max]; + int count = 0; + + for(int n = 2; n < max; n++) { - if( count < max) - { - //鍒ゆ柇褰撳墠n鏄笉鏄礌鏁 - int i = 2; - while(i < n) - { - if(n % i == 0) - break; - if(n % i != 0) - i++; - } - if(i == n) - { //灏嗙礌鏁扮粺璁″嚭鏉 - Array[count++] = n; - } + if(isPrime(n)) + { + array[count++] = n; } } - int[] newArray = new int[count]; - System.arraycopy(Array, 0, newArray, 0, count); - return newArray; + + return Arrays.copyOf(array, count); + } + + private boolean isPrime(int n) + { + //鍒ゆ柇褰撳墠n鏄笉鏄礌鏁 + int i = 2; + while(i < n) + { + if(n % i == 0) + break; + if(n % i != 0) + i++; + } + return i == n; } /** @@ -207,27 +222,29 @@ public int[] getPrimes(int max) * @return */ public int[] getPerfectNumbers(int max) - { - int[] Array = new int[max]; - - int n = 0; + { + if(max < 0) + { + return null; + } + int[] array = new int[max]; int count = 0; - int i = 0; - for(n = 2; n < max; n++) + + for(int n = 2; n < max; n++) { int sum = 0; - for(i=1; i 1) + } + + StringBuilder buffer = new StringBuilder(); + for(int i=0; i Date: Fri, 10 Mar 2017 17:55:28 +0800 Subject: [PATCH 232/646] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/mahone2017/123.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 group26/mahone2017/123.txt diff --git a/group26/mahone2017/123.txt b/group26/mahone2017/123.txt new file mode 100644 index 0000000000..e69de29bb2 From 0d834083eef96e49b6ec067e95dd03dd5ff8795c Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 10 Mar 2017 17:58:33 +0800 Subject: [PATCH 233/646] init --- group24/626451284Learning/pom.xml | 12 ++ .../wdn/coding2017/basic/ArrayList.java | 32 +++++ .../wdn/coding2017/basic/BinaryTreeNode.java | 32 +++++ .../github/wdn/coding2017/basic/Iterator.java | 7 + .../wdn/coding2017/basic/LinkedList.java | 124 ++++++++++++++++++ .../com/github/wdn/coding2017/basic/List.java | 9 ++ .../github/wdn/coding2017/basic/Queue.java | 19 +++ .../github/wdn/coding2017/basic/Stack.java | 22 ++++ .../coderising/array/ArrayUtil.java | 96 ++++++++++++++ .../coderising/download/DownloadThread.java | 20 +++ .../coderising/download/FileDownloader.java | 73 +++++++++++ .../download/FileDownloaderTest.java | 59 +++++++++ .../coderising/download/api/Connection.java | 23 ++++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++++ .../download/impl/ConnectionManagerImpl.java | 15 +++ .../coderising/litestruts/LoginAction.java | 39 ++++++ .../coderising/litestruts/Struts.java | 34 +++++ .../coderising/litestruts/StrutsTest.java | 43 ++++++ .../coderising/litestruts/View.java | 23 ++++ .../coderising/litestruts/struts.xml | 11 ++ 23 files changed, 740 insertions(+) create mode 100644 group24/626451284Learning/pom.xml create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java create mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml diff --git a/group24/626451284Learning/pom.xml b/group24/626451284Learning/pom.xml new file mode 100644 index 0000000000..534ff39232 --- /dev/null +++ b/group24/626451284Learning/pom.xml @@ -0,0 +1,12 @@ + + + 4.0.0 + + com.github.wdn + coding2017 + 1.0-SNAPSHOT + + + \ No newline at end of file diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..bfd96d3202 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java @@ -0,0 +1,32 @@ +package com.github.wdn.coding2017.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..39d4e62c93 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.github.wdn.coding2017.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..f601a50c7b --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.github.wdn.coding2017.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..ba5b32cb90 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java @@ -0,0 +1,124 @@ +package com.github.wdn.coding2017.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java new file mode 100644 index 0000000000..d6c9e95cb0 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java @@ -0,0 +1,9 @@ +package com.github.wdn.coding2017.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java new file mode 100644 index 0000000000..627f2d3a87 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java @@ -0,0 +1,19 @@ +package com.github.wdn.coding2017.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java new file mode 100644 index 0000000000..a5970ed4c7 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java @@ -0,0 +1,22 @@ +package com.github.wdn.coding2017.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..45c32815f4 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java @@ -0,0 +1,96 @@ +package com.github.wdn.coding2017.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..cc0e750c98 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.github.wdn.coding2017.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..a5c19a7d77 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.github.wdn.coding2017.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..490db5c08b --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.github.wdn.coding2017.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java new file mode 100644 index 0000000000..91e8aa463b --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.github.wdn.coding2017.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..5c90080401 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.github.wdn.coding2017.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..f814016839 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.github.wdn.coding2017.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..078b14365d --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.github.wdn.coding2017.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..e2bc4dcd10 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.github.wdn.coding2017.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..082e2af8fd --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.github.wdn.coding2017.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..b342a51061 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.github.wdn.coding2017.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..cf3d0564f1 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.github.wdn.coding2017.coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..9fee464283 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.github.wdn.coding2017.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java new file mode 100644 index 0000000000..31e1805dc7 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.github.wdn.coding2017.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..171848ecd1 --- /dev/null +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + From 5552a0a53ddb0c9e92f8aba084efd482ccff1d95 Mon Sep 17 00:00:00 2001 From: TonyHui Date: Fri, 10 Mar 2017 18:17:10 +0800 Subject: [PATCH 234/646] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group01/954958168/.gitignore | 9 + .../com/aaront/exercise/basic/LinkedList.java | 194 +++++++++++++++++- .../aaront/execrise/basic/LinkListTest.java | 102 +++++++++ .../class03/MultiThreadDownload/pom.xml | 32 +++ .../com/aaront/exercise/DownloadThread.java | 32 +++ .../com/aaront/exercise/FileDownloader.java | 90 ++++++++ .../aaront/exercise/FileDownloaderTest.java | 41 ++++ .../com/aaront/exercise/api/Connection.java | 26 +++ .../exercise/api/ConnectionException.java | 16 ++ .../exercise/api/ConnectionManager.java | 10 + .../aaront/exercise/api/DownloadListener.java | 5 + .../aaront/exercise/impl/ConnectionImpl.java | 42 ++++ .../exercise/impl/ConnectionManagerImpl.java | 28 +++ .../src/main/resources/test.jpg | Bin 0 -> 20442 bytes 14 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 group01/954958168/.gitignore create mode 100644 group01/954958168/class03/MultiThreadDownload/pom.xml create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/DownloadThread.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloader.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloaderTest.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/Connection.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionException.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionManager.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/DownloadListener.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionImpl.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionManagerImpl.java create mode 100644 group01/954958168/class03/MultiThreadDownload/src/main/resources/test.jpg diff --git a/group01/954958168/.gitignore b/group01/954958168/.gitignore new file mode 100644 index 0000000000..e8b4e006b1 --- /dev/null +++ b/group01/954958168/.gitignore @@ -0,0 +1,9 @@ +build +target/ +*.class +# ide +.settings/ +.project +.classpath +.idea/ +*.iml diff --git a/group01/954958168/class01/BasicDataStructure/src/main/java/com/aaront/exercise/basic/LinkedList.java b/group01/954958168/class01/BasicDataStructure/src/main/java/com/aaront/exercise/basic/LinkedList.java index 504e73580b..b4e5fe5027 100644 --- a/group01/954958168/class01/BasicDataStructure/src/main/java/com/aaront/exercise/basic/LinkedList.java +++ b/group01/954958168/class01/BasicDataStructure/src/main/java/com/aaront/exercise/basic/LinkedList.java @@ -84,7 +84,7 @@ public Object[] toArray() { Object[] objects = new Object[size]; Node first = head.next; int pos = 0; - while (first!= null) { + while (first != null) { objects[pos++] = first.data; first = first.next; } @@ -126,4 +126,196 @@ private Node(Object data) { this.data = data; } } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node newHead = new Node(null); + Node node = head.next; + while (node != null) { + Node temp = node.next; + node.next = newHead.next; + newHead.next = node; + node = temp; + } + head = newHead; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + int removeLen = size / 2; + if (size <= 1) { + head.next = null; + size = 0; + return; + } + for (int i = 0; i < removeLen; i++) { + Node point = head.next; + head.next = point.next; + point.next = null; + size--; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (i < 0 || i >= size || length < 1) throw new IndexOutOfBoundsException("绱㈠紩瓒呭嚭鑼冨洿"); + int endIndex = Math.min(i + length, size); + Node preNode = head; + Node endNode = head.next; + for (int index = 0; index < endIndex; index++) { + if (index < i) { + preNode = endNode; + } + endNode = endNode.next; + } + + preNode.next = endNode; + size = size - (endIndex - i); + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if (list == null) return new int[0]; + Iterator iterator = list.iterator(); + int[] result = new int[list.size()]; + int index = 0; + while (iterator.hasNext()) { + Integer next = (Integer) iterator.next(); + result[index] = (Integer) this.get(next); + index++; + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + if (list == null) return; + Iterator iterator = this.iterator(); + while (iterator.hasNext()) { + Object element = iterator.next(); + if (contain(element, list)) { + iterator.remove(); + } + } + } + + private boolean contain(Object element, LinkedList list) { + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + Object next = iterator.next(); + if (next == element) return true; + } + return false; + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node pre = head; + Node cur = head.next; + while (cur != null) { + if (pre.data == cur.data) { + Node node = cur.next; + while (node != null && node.data == pre.data) { + node = node.next; + size--; + } + pre.next = node; + cur = node; + size--; + } else { + pre = cur; + cur = cur.next; + } + } + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if (min >= max) return; + Node cur = head; + Node start = null; + Node end = null; + Integer startIndex = null; + Integer endIndex = size - 1; + Integer index = -1; + while (cur.next != null) { + if (start == null && (Integer) cur.next.data > min) { + start = cur; + startIndex = index; + } + if ((Integer) cur.next.data >= max) { + end = cur.next; + endIndex = index; + break; + } + cur = cur.next; + index++; + } + if (start != null) { + start.next = end; + size = size - (endIndex - startIndex); + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + if (list == null) return this; + LinkedList intersection = new LinkedList(); + Node node1 = this.head.next; + Node node2 = list.head.next; + while (node1 != null && node2 != null) { + if((Integer)node1.data < (Integer)node2.data) { + node1 = node1.next; + } else if((Integer)node1.data > (Integer)node2.data) { + node2 = node2.next; + } else { + intersection.add(node1.data); + node1 = node1.next; + node2 = node2.next; + } + } + + return intersection; + } } diff --git a/group01/954958168/class01/BasicDataStructure/src/test/java/com/aaront/execrise/basic/LinkListTest.java b/group01/954958168/class01/BasicDataStructure/src/test/java/com/aaront/execrise/basic/LinkListTest.java index b1bfc6f1b8..508eaba5f9 100644 --- a/group01/954958168/class01/BasicDataStructure/src/test/java/com/aaront/execrise/basic/LinkListTest.java +++ b/group01/954958168/class01/BasicDataStructure/src/test/java/com/aaront/execrise/basic/LinkListTest.java @@ -19,6 +19,8 @@ public void init() { linkedList.add(1); linkedList.add(2); linkedList.add(3); + linkedList.add(4); + linkedList.add(5); } @Test @@ -78,4 +80,104 @@ public void testIterator() { } Assert.assertArrayEquals(new Object[]{}, linkedList.toArray()); } + + @Test + public void testReverse() { + linkedList.reverse(); + Assert.assertArrayEquals(new Object[]{3, 2, 1}, linkedList.toArray()); + } + + @Test + public void testRemoveFirstHalf() { + linkedList.removeFirstHalf(); + Assert.assertArrayEquals(new Object[]{2, 3}, linkedList.toArray()); + } + + @Test + public void testRangeRemove() { + linkedList.remove(1, 4); + Assert.assertArrayEquals(new Object[]{1}, linkedList.toArray()); + } + + @Test + public void testGetElements() { + LinkedList sub = new LinkedList(); + sub.add(1); + sub.add(3); + sub.add(4); + int[] result = linkedList.getElements(sub); + Assert.assertArrayEquals(new int[]{2, 4, 5}, result); + } + + @Test + public void testSubtract() { + LinkedList sub = new LinkedList(); + sub.add(1); + sub.add(2); + sub.add(10); + linkedList.subtract(sub); + Assert.assertArrayEquals(new Object[]{3, 4, 5}, linkedList.toArray()); + } + + @Test + public void testRemoveDuplicateValues() { + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(2); + list.add(2); + list.add(3); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(6); + list.add(7); + list.add(7); + list.add(7); + list.add(7); + list.add(7); + list.removeDuplicateValues(); + Assert.assertArrayEquals(new Object[]{1, 2, 3, 4, 5, 6, 7}, list.toArray()); + } + + @Test + public void testRemoveRange() { + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + list.add(7); + list.add(8); + list.removeRange(1, 4); + Assert.assertArrayEquals(new Object[]{1, 4, 5, 6, 7, 7, 8}, list.toArray()); + } + + @Test + public void testIntersection() { + LinkedList list1 = new LinkedList(); + list1.add(1); + list1.add(3); + list1.add(5); + list1.add(7); + list1.add(9); + LinkedList list2 = new LinkedList(); + list2.add(3); + list2.add(4); + list2.add(5); + list2.add(6); + list2.add(7); + list2.add(8); + list2.add(10); + list2.add(11); + list2.add(12); + LinkedList intersection = list1.intersection(list2); + Assert.assertArrayEquals(new Object[]{3, 5, 7}, intersection.toArray()); + } + } diff --git a/group01/954958168/class03/MultiThreadDownload/pom.xml b/group01/954958168/class03/MultiThreadDownload/pom.xml new file mode 100644 index 0000000000..4d94b30e33 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + com.aaront.exercise + multithread-download + 1.0.0-SNAPSHOT + + + junit + junit + 4.12 + + + + + + multiThreadDownload + + true + + + UTF-8 + 1.8 + 1.8 + + + + + \ No newline at end of file diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/DownloadThread.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/DownloadThread.java new file mode 100644 index 0000000000..8dcf538f42 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/DownloadThread.java @@ -0,0 +1,32 @@ +package com.aaront.exercise; + +import com.aaront.exercise.api.Connection; + +import java.io.IOException; + +public class DownloadThread extends Thread { + + Connection conn; + int startPos; + int endPos; + byte[] content; + + public DownloadThread(Connection conn, int startPos, int endPos) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + public void run() { + try { + content = conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public byte[] getContent() { + return this.content; + } +} \ No newline at end of file diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloader.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloader.java new file mode 100644 index 0000000000..128292ea8e --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloader.java @@ -0,0 +1,90 @@ +package com.aaront.exercise; + + +import com.aaront.exercise.api.Connection; +import com.aaront.exercise.api.ConnectionManager; +import com.aaront.exercise.api.DownloadListener; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + + Connection conn = cm.open(this.url); + int length = conn.getContentLength(); + conn.close(); + List threads = new ArrayList<>(); + int i; + for (i = 0; i < 3; i++) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), (i + 1) * (length / 3) - 1); + threads.add(thread); + thread.start(); + } + if (i * (length / 3) < length) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), length - 1); + threads.add(thread); + thread.start(); + } + + try { + for (DownloadThread thread : threads) { + thread.join(); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + + try (FileOutputStream fos = new FileOutputStream(new File("temp.jpg"))) { + for(DownloadThread thread : threads) { + fos.write(thread.getContent()); + } + } catch (IOException e) { + e.printStackTrace(); + } + + this.listener.notifyFinished(); + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloaderTest.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloaderTest.java new file mode 100644 index 0000000000..6f75b3cd6c --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/FileDownloaderTest.java @@ -0,0 +1,41 @@ +package com.aaront.exercise; + +import com.aaront.exercise.api.ConnectionManager; +import com.aaront.exercise.impl.ConnectionManagerImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + String url = "http://localhost:8080/test.jpg"; + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(() -> downloadFinished = true); + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/Connection.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/Connection.java new file mode 100644 index 0000000000..64e0573bf5 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/Connection.java @@ -0,0 +1,26 @@ +package com.aaront.exercise.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionException.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionException.java new file mode 100644 index 0000000000..d70dffce34 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionException.java @@ -0,0 +1,16 @@ +package com.aaront.exercise.api; + +public class ConnectionException extends RuntimeException { + + public ConnectionException(String message) { + super(message); + } + + public ConnectionException(String message, Throwable cause) { + super(message, cause); + } + + public ConnectionException(Throwable cause) { + super(cause); + } +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionManager.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionManager.java new file mode 100644 index 0000000000..7d7e027b02 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.aaront.exercise.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/DownloadListener.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/DownloadListener.java new file mode 100644 index 0000000000..3a1defa2ca --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.aaront.exercise.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionImpl.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionImpl.java new file mode 100644 index 0000000000..5ad971c7c3 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionImpl.java @@ -0,0 +1,42 @@ +package com.aaront.exercise.impl; + +import com.aaront.exercise.api.Connection; +import com.aaront.exercise.api.ConnectionException; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +public class ConnectionImpl implements Connection { + + private FileInputStream fis; + private File file; + + public ConnectionImpl(String source) throws FileNotFoundException { + file = new File(getClass().getClassLoader().getResource(source).getFile()); + fis = new FileInputStream(file); + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + fis.skip(startPos); + byte[] content = new byte[endPos - startPos + 1]; + fis.read(content, 0, content.length); + return content; + } + + @Override + public int getContentLength() { + return (int)file.length(); + } + + @Override + public void close() { + try { + fis.close(); + } catch (IOException e) { + throw new ConnectionException("杩炴帴鍏抽棴澶辫触"); + } + } +} \ No newline at end of file diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionManagerImpl.java b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..a80c293176 --- /dev/null +++ b/group01/954958168/class03/MultiThreadDownload/src/main/java/com/aaront/exercise/impl/ConnectionManagerImpl.java @@ -0,0 +1,28 @@ +package com.aaront.exercise.impl; + +import com.aaront.exercise.api.Connection; +import com.aaront.exercise.api.ConnectionException; +import com.aaront.exercise.api.ConnectionManager; + +import java.io.FileNotFoundException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + try { + return new ConnectionImpl(parse(url)); + } catch (FileNotFoundException e) { + throw new ConnectionException("鍒涘缓杩炴帴澶辫触"); + } + } + + private String parse(String url) { + String pattern = "(http|https)://[a-zA-Z0-9]+:[0-9]+/([a-zA-Z0-9.]+)"; + Matcher compile = Pattern.compile(pattern).matcher(url); + if(!compile.matches()) throw new ConnectionException("璧勬簮url涓嶅悎娉"); + return compile.group(2); + } +} diff --git a/group01/954958168/class03/MultiThreadDownload/src/main/resources/test.jpg b/group01/954958168/class03/MultiThreadDownload/src/main/resources/test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0eb7a002d8d65b343682b73c4f1c508a405e860e GIT binary patch literal 20442 zcmY(qbyS?OyDdDpyZd0JxZB|FQi{8~yL*x1PATs06n7}@GPt(5!{BoJJLi1oyEkhk zZ}Mbk?>zY<@@6GkRapiNnHU)W0HDdqN~-<)n*WOmi17c?2tuk>006nxMnXbWPC^2x z>gr@^V{ZWf$VR87BdCAXAs)H(W9^>BrplQWn6J7c?r_IUOH>t)ro>dYk3x;_(^gF? z{mh40xKoZxBsCQ3pjvNCktiifgn+`Meh;OvvMSW+cb|9L{UTs=@zQ&_>2=9Z0Z2u# z4*}w(Lj&XT=uz)oEu^KTIIqJ1(1?iuF5{sCb42~n&{sg^({5i=g?>Fs-+%_H;bkwOgZn7dQCfTkZ$MX z;1Hih+T-aT*TwKNGCnvPc!%3-ru$pmf%JZ$ zi6ce4o4_^-7d#l}^?-T!WU}`Zs;Jda2IRIbcvok25vFF8^mqEy(SN}I;~b}X2ZzRx zVh3F?nBv(il+75PDVW|Df&k(Z6iGEm&wZPU8>O8O4xl?1K&hfXYC{es%7Go6P8u(p$(=Dcsb3!q zO9MqV3WJvqF4j`new3Srl6qM!cT58sVpy@MlQ|O zn2~)+ZlpW+YD913r9d<&%;0|6UfT9lxS*qD@! zSoEUuiMGX9HZmPa0;2$qc>mu!Y+R@~X5kGZ-ev=Aq>3O*>Qcn7@fCy3#w;cm#_;So znU~rOnn-rRErX5qNh^|Pw)VomVD(}gejEPY8bmh}*>UEBS4OakyZtS-o9uGxEY=g|K3jWzoAYl}y-$J98DdcJW6V?;nqs|sL=CA-<`(A6=7SdCQO(iZ6f$EVssnsX()db0-&otsW23B3 z(nR5-)H*&l%Zc9I7v(S0IxL2@qP21txf=vNrCpK!-(OjtG@r_l3E=|1l^|E)p?}ub zB-AQqTw`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N56t64?x?_xCvY5~G;jw!- zfev2vdXL8?LRL5n^Nhw9rWj5+3-hsL@Z5YI0WMs_vQZsZeiw)K>;rJ!HgHtLtxl|{ zVTe=_RW>f1hvvaqnzfM;nZl8G-bRSCD;!0GaLbP zpwv*fry zOUu?4Vy$MlFlPt%BMXva;9eT?EU4x+oU><)3y-u_JP?nBmxV!xd%oV(#&>zvO4`*O zwys$5gS#0t)JtrtnOr38<{q6}eZP*E4(UXh1tijR(pVie7M;xYVL%3A8<2F@F7C^H zw+`*dEk3^Z<#Qftjp%uWzSBi$@IYwg9cOBq& z_Mv~I(-vC;S>>E&!_%g&9aQg~F^2^1;AK|oem3YJUI0S;0Kji4p8y2E*`GiHoER}1 z!)cAmhfwXWcDdHhycCKBC_jnctk0sv@#JdD?Dt@!eEl;zR(!LLtc@}%%w9;V!Kzce zwE$!V7dSMclJ*NWj_#eQ^UWs=AtI2-o2J5bZHn-@A?SHT51M4Joww_0wow9Aw)^)S zT7@eAG+*d10NeawbC;=kMBp*V5ytJXe9$A*_>rLWeWY;%`EB)R{p|nRFUQgU7Jx_zBBR83Xd4{vE-G{yI_Jvc3732s z@O;Ai5QneFAyJ(lqA>Bm1U_wD`|z65<`7yn@pq!a6M^$QK7fvOXlBNL1;7r^*iVV> zSpftQ#6W#N{1Ba&KY%AdOgb z?yLI`lQp?{9DE`w_YD`WxfKm0R778lGdPF7GD1Arc02b$31e=Zw-FMW_^Z{{uZ=Ez z{K*n-hRV>~efb~ou#ejU9bMTOv~gf35@ipk8MfwTFCEzLvtSJG;-0yt$%>&FBYyde Z{y$fArVM(bw#EPe002ovPDHLkV1fvtqmlps literal 0 HcmV?d00001 From 170ad340bc4866dda0f7649bda50764345c1861f Mon Sep 17 00:00:00 2001 From: cjl1407 <115847486@qq.com> Date: Fri, 10 Mar 2017 18:37:33 +0800 Subject: [PATCH 235/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/TestCollection/ArrayList.java | 42 ++++ .../src/TestCollection/LinkedList.java | 184 ++++++++++++++++++ .../1158477486/src/TestCollection/Queue.java | 38 ++++ .../1158477486/src/TestCollection/Stack.java | 36 ++++ 4 files changed, 300 insertions(+) create mode 100644 group22/1158477486/src/TestCollection/ArrayList.java create mode 100644 group22/1158477486/src/TestCollection/LinkedList.java create mode 100644 group22/1158477486/src/TestCollection/Queue.java create mode 100644 group22/1158477486/src/TestCollection/Stack.java diff --git a/group22/1158477486/src/TestCollection/ArrayList.java b/group22/1158477486/src/TestCollection/ArrayList.java new file mode 100644 index 0000000000..b097267d50 --- /dev/null +++ b/group22/1158477486/src/TestCollection/ArrayList.java @@ -0,0 +1,42 @@ +package TestCollection; + +public class ArrayList implements List { + + + + private Object[] elementData = new Object[100]; + private int size ; + public void add(Object o){ + if(size==elementData.length){ + Object[]newData=new Object[size*2+1];//将数组扩容 + System.arraycopy(elementData, 0, newData, 0, elementData.length); + elementData=newData; + } + elementData[size++]=o; + + } + public void add(int index, Object o){ + System.arraycopy(elementData, index, elementData,index+1 , size-index); + elementData[index]=o; + size++; + } + + public Object get(int index){ + return elementData[index]; + } + + public Object remove(int index){ + System.arraycopy(elementData, index+1, elementData, index, size-index-1); + elementData[--size]=null; + return null; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group22/1158477486/src/TestCollection/LinkedList.java b/group22/1158477486/src/TestCollection/LinkedList.java new file mode 100644 index 0000000000..6e1feda532 --- /dev/null +++ b/group22/1158477486/src/TestCollection/LinkedList.java @@ -0,0 +1,184 @@ +package TestCollection; + + + +public class LinkedList implements List { + + private Node head=new Node();; + private int size; + public Node node(int a){//鍒涘缓寰楀埌a浣嶇疆鑺傜偣鐨勬柟娉 + Node teamp=null; + + if(head!=null){ + if(a<=size ){ + teamp=head; + for(int i=0;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} + + \ No newline at end of file diff --git a/group22/1158477486/src/TestCollection/Queue.java b/group22/1158477486/src/TestCollection/Queue.java new file mode 100644 index 0000000000..4699235e98 --- /dev/null +++ b/group22/1158477486/src/TestCollection/Queue.java @@ -0,0 +1,38 @@ +package TestCollection; + + ; + +public class Queue { + private LinkedList list=new LinkedList(); + + public void enQueue(Object o){ + list.addLast ( o) ;//问题用add(index, o)出错 + } + + public Object deQueue(){ + Object o=list.get(1); + list.remove(1); + return o; + } + + public boolean isEmpty(){ + if(list.size()!=0){ + return false;}else + return true; + } + + public int size(){ + return list.size(); + } + public static void main(String[] args) { + Queue q=new Queue(); + q.enQueue("1"); + q.enQueue("2"); + q.enQueue("3"); + System.out.println(q.size()); + Object o=q.deQueue(); + System.out.println(o); + System.out.println(q.size()); + + } +} diff --git a/group22/1158477486/src/TestCollection/Stack.java b/group22/1158477486/src/TestCollection/Stack.java new file mode 100644 index 0000000000..35fdc6f31b --- /dev/null +++ b/group22/1158477486/src/TestCollection/Stack.java @@ -0,0 +1,36 @@ +package TestCollection; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.get(elementData.size()-1) ; + } + + public Object peek(){ + elementData.remove(elementData.size()-1); + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + if(elementData.size()!=0){ + return false;} + return true; + } + public int size(){ + return elementData.size(); + } + public static void main(String[] args) { + Stack s=new Stack(); + s.push("111"); + s.push("211"); + s.push("311"); + System.out.println(s.size());//3 + System.out.println(s.pop()); + System.out.println(s.size()); + System.out.println(s.peek()); + System.out.println(s.size()); + }} From f0284b7cde7b9eea489136e82776cf7f3776f5ca Mon Sep 17 00:00:00 2001 From: cjl1407 <2832829901@qq.com> Date: Fri, 10 Mar 2017 18:42:13 +0800 Subject: [PATCH 236/646] Delete Test.java --- group22/1158477486/src/Test.java | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 group22/1158477486/src/Test.java diff --git a/group22/1158477486/src/Test.java b/group22/1158477486/src/Test.java deleted file mode 100644 index f106f0d3df..0000000000 --- a/group22/1158477486/src/Test.java +++ /dev/null @@ -1,9 +0,0 @@ - -public class Test { - - public static void main(String[] args) { - // TODO Auto-generated method stub -System.out.println("测试中------------"); - } - -} From a2a3d252f1dbb1b17420f50a20d181162129a364 Mon Sep 17 00:00:00 2001 From: cjl1407 <2832829901@qq.com> Date: Fri, 10 Mar 2017 18:42:33 +0800 Subject: [PATCH 237/646] Delete my.txt --- group22/1158477486/src/my.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 group22/1158477486/src/my.txt diff --git a/group22/1158477486/src/my.txt b/group22/1158477486/src/my.txt deleted file mode 100644 index 605f61fe72..0000000000 --- a/group22/1158477486/src/my.txt +++ /dev/null @@ -1 +0,0 @@ -这是我的一个Git \ No newline at end of file From 1203ca2ef020d297e5cf221c911fb8dcb7ce5f4f Mon Sep 17 00:00:00 2001 From: cjl1407 <2832829901@qq.com> Date: Fri, 10 Mar 2017 18:42:49 +0800 Subject: [PATCH 238/646] Delete myFist.java --- group22/1158477486/src/myFist.java | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 group22/1158477486/src/myFist.java diff --git a/group22/1158477486/src/myFist.java b/group22/1158477486/src/myFist.java deleted file mode 100644 index 136079fbac..0000000000 --- a/group22/1158477486/src/myFist.java +++ /dev/null @@ -1,6 +0,0 @@ - -public class myFist { -public static void main(String[] args) { - System.out.println("hello my love"); -} -} From 0c25128fb487b3fdaae904b504f724dc03b39dda Mon Sep 17 00:00:00 2001 From: "2474600377@qq.com" <2474600377@qq.com> Date: Fri, 10 Mar 2017 19:35:22 +0800 Subject: [PATCH 239/646] =?UTF-8?q?linked=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/LinkedList.java | 673 +++++++++++------- .../src/com/coding/test/LinkedListTest.java | 147 ++++ .../904627477/src/com/coding/test/Test.java | 2 +- 3 files changed, 555 insertions(+), 267 deletions(-) diff --git a/group10/904627477/src/com/coding/basic/LinkedList.java b/group10/904627477/src/com/coding/basic/LinkedList.java index 5758a12d8c..9cef8d05b7 100644 --- a/group10/904627477/src/com/coding/basic/LinkedList.java +++ b/group10/904627477/src/com/coding/basic/LinkedList.java @@ -1,266 +1,407 @@ -package com.coding.basic; - -import java.util.NoSuchElementException; - -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - addLast(o); - } - - public void add(int index , Object o){ - Node node = new Node(); - node.data = o; - if(index==0){ - addFirst(o); - return ; - } - Node before = getNode(index-1); - Node next = before.next; - before.next = node; - node.next = next; - } - - private Node getLastNode(){ - Node temp = head; - if(head!=null){ - while(true){ - if(temp.next!=null){ - temp = temp.next; - }else{ - break; - } - } - }else{ - throw new NoSuchElementException(); - } - return temp; - } - - private Node getNode(int index){ - if(index<0){ - throw new IndexOutOfBoundsException(); - } - int i = 0; - Node temp = head; - while(true){ - if(temp==null){ - throw new IndexOutOfBoundsException(); - } - if(i==index){ - break; - }else{ - i++; - temp = temp.next; - } - } - return temp; - } - - public Object get(int index){ - Node node = getNode(index); - return node.data; - } - - public Object remove(int index){ - if(index==0){ - removeFirst(); - } - Node before = getNode(index-1); - Node temp = getNode(index); - before.next = temp.next; - return temp.data; - } - - public int size(){ - int size = 0; - Node temp = head; - while(true){ - if(temp==null){ - break; - }else{ - size++; - temp = temp.next; - } - } - return size; - } - - public void addFirst(Object o){ - Node node = new Node(); - node.data = o; - node.next = head; - head = node; - } - - public void addLast(Object o){ - Node node = new Node(); - node.data = o; - if(head==null){ - head = node; - return; - } - Node last = getLastNode(); - last.next = node; - } - public Object removeFirst(){ - if(head == null){ - throw new NoSuchElementException(); - } - Object obj = head.data; - head = head.next; - return obj; - } - public Object removeLast(){ - if(head == null){ - throw new NoSuchElementException(); - } - if(head.next == null){ - return removeFirst(); - } - Node before = head; - Node temp = head.next; - while(true){ - if(temp.next==null){ - break; - }else{ - before = temp; - temp = temp.next; - } - } - before.next = null; - return temp.data; - } - - public Iterator iterator(){ - return new LinkedIterator(); - } - - - private static class Node{ - Object data; - Node next; - } - - private class LinkedIterator implements Iterator{ - - private Node node; - - public LinkedIterator(){ - node = head; - } - - @Override - public boolean hasNext() { - if(node!=null){ - return true; - } - return false; - } - - @Override - public Object next() { - if(node==null){ - throw new NoSuchElementException(); - }else{ - Object obj = node.data; - node = node.next; - return obj; - } - } - - } - - - /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - if(head==null||head.next==null){ - return ; - } - Node temp = head.next; - Node newHead = this.head; - newHead.next = null; - while(temp!=null){ - Node next = temp.next; - temp.next = newHead; - newHead = temp; - temp = next; - } - this.head = newHead; - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } -} +package com.coding.basic; + +import java.util.NoSuchElementException; + +import com.coding.array.ArrayUtil; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o) { + addLast(o); + } + + public void add(int index, Object o) { + Node node = new Node(); + node.data = o; + if (index == 0) { + addFirst(o); + return; + } + Node before = getNode(index - 1); + Node next = before.next; + before.next = node; + node.next = next; + } + + private Node getLastNode() { + Node temp = head; + if (head != null) { + while (true) { + if (temp.next != null) { + temp = temp.next; + } else { + break; + } + } + } else { + throw new NoSuchElementException(); + } + return temp; + } + + private Node getNode(int index) { + if (index < 0) { + throw new IndexOutOfBoundsException(); + } + int i = 0; + Node temp = head; + while (true) { + if (temp == null) { + throw new IndexOutOfBoundsException(); + } + if (i == index) { + break; + } else { + i++; + temp = temp.next; + } + } + return temp; + } + + public Object get(int index) { + Node node = getNode(index); + return node.data; + } + + public Object remove(int index) { + if (index == 0) { + removeFirst(); + } + Node before = getNode(index - 1); + Node temp = getNode(index); + before.next = temp.next; + return temp.data; + } + + public int size() { + int size = 0; + Node temp = head; + while (true) { + if (temp == null) { + break; + } else { + size++; + temp = temp.next; + } + } + return size; + } + + public void addFirst(Object o) { + Node node = new Node(); + node.data = o; + node.next = head; + head = node; + } + + public void addLast(Object o) { + Node node = new Node(); + node.data = o; + if (head == null) { + head = node; + return; + } + Node last = getLastNode(); + last.next = node; + } + + public Object removeFirst() { + if (head == null) { + throw new NoSuchElementException(); + } + Object obj = head.data; + head = head.next; + return obj; + } + + public Object removeLast() { + if (head == null) { + throw new NoSuchElementException(); + } + if (head.next == null) { + return removeFirst(); + } + Node before = head; + Node temp = head.next; + while (true) { + if (temp.next == null) { + break; + } else { + before = temp; + temp = temp.next; + } + } + before.next = null; + return temp.data; + } + + public Iterator iterator() { + return new LinkedIterator(); + } + + private static class Node { + Object data; + Node next; + + } + + private class LinkedIterator implements Iterator { + + private Node node; + + public LinkedIterator() { + node = head; + } + + @Override + public boolean hasNext() { + if (node != null) { + return true; + } + return false; + } + + @Override + public Object next() { + if (node == null) { + throw new NoSuchElementException(); + } else { + Object obj = node.data; + node = node.next; + return obj; + } + } + + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (head == null || head.next == null) { + return; + } + Node temp = head.next; + Node newHead = this.head; + newHead.next = null; + while (temp != null) { + Node next = temp.next; + temp.next = newHead; + newHead = temp; + temp = next; + } + this.head = newHead; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + if (head == null || head.next == null) { + return; + } + int len = size(); + for (int i = 0; i < len / 2; i++) { + head = head.next; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (i < 0 || i >= size()) { + throw new IndexOutOfBoundsException(); + } + if(head==null){ + return; + } + Node ni = head; + Node temp = head; + for (int j = 0; j < i + length; j++) { + if (temp == null) { + break; + } + if (j + 1 == i) { + ni = temp; + } + temp = temp.next; + } + ni.next = temp; + if (i == 0) { + head = temp; + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if(list==null||head==null||list.head==null){ + return new int[0]; + } + int[] arr = new int[0]; + Node tempA = head; + Node tempB = list.head; + int index=0; + while(tempA!=null&&tempB!=null){ + int len = (int)tempB.data - index; + int i = 0; + for(i=0;i=max){ + return ; + } + Node temp = new Node(); + temp.next = head; + while(temp.next!=null){ + if(temp.next.data==null){ + temp = temp.next; + continue; + } + int d = (int) temp.next.data; + if(d>min&&d=max){ + break; + } + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList link = new LinkedList(); + if(list==null||head==null||list.head==null){ + return link; + } + Node tempA = new Node(); + tempA.next = head; + Node tempB = new Node(); + tempB.next = list.head; + while(tempA.next!=null&&tempB.next!=null){ + if(tempA.next.data==null){ + tempA = tempA.next; + continue; + } + if(tempB.next.data==null){ + tempB = tempB.next; + continue; + } + int a = (int)tempA.next.data; + int b = (int)tempB.next.data; + if(ab){ + tempB = tempB.next; + }else{ + link.add(tempA.next.data); + tempA = tempA.next; + tempB = tempB.next; + } + } + return link; + } +} diff --git a/group10/904627477/src/com/coding/test/LinkedListTest.java b/group10/904627477/src/com/coding/test/LinkedListTest.java index 174fdeb583..81d8632cfe 100644 --- a/group10/904627477/src/com/coding/test/LinkedListTest.java +++ b/group10/904627477/src/com/coding/test/LinkedListTest.java @@ -114,5 +114,152 @@ public void testIterator() { assertEquals("333", it.next()); assertEquals(false, it.hasNext()); } + + @Test + public void testReverse(){ + link.reverse(); + assertEquals(3, link.size()); + assertEquals("333", link.get(0)); + assertEquals("222", link.get(1)); + assertEquals("111", link.get(2)); + } + + @Test + public void testRemoveFirstHalf(){ + link.add("444"); + link.add("555"); + link.removeFirstHalf(); + assertEquals(3, link.size()); + assertEquals("333", link.get(0)); + link.add("666"); + link.removeFirstHalf(); + assertEquals(2, link.size()); + assertEquals("555", link.get(0)); + } + + @Test + public void testRemoveForIndex(){ + link.add("444"); + link.add("555"); + link.remove(1, 2); + assertEquals(3, link.size()); + assertEquals("444", link.get(1)); + + link.remove(2, 5); + assertEquals(2, link.size()); + + link.remove(0,1); + assertEquals(1, link.size()); + assertEquals("444", link.get(0)); + } + + @Test + //11->101->201->301->401->501->601->701 listB = 1->3->4->6 [101,301,401,601] + public void testGetElements(){ + link = new LinkedList(); + link.add(11); + link.add(101); + link.add(201); + link.add(301); + link.add(401); + link.add(501); + link.add(601); + link.add(701); + LinkedList linkB = new LinkedList(); + linkB.add(1); + linkB.add(3); + linkB.add(4); + linkB.add(6); + int[] eles = link.getElements(linkB); + assertEquals(4, eles.length); + assertEquals(101, eles[0]); + assertEquals(301, eles[1]); + assertEquals(401, eles[2]); + assertEquals(601, eles[3]); + } + + @Test + public void testSubtract(){ + link = new LinkedList(); + link.add(11); + link.add(101); + link.add(201); + link.add(301); + link.add(401); + link.add(501); + link.add(601); + link.add(701); + LinkedList linkB = new LinkedList(); + linkB.add(401); + linkB.add(201); + linkB.add(601); + link.subtract(linkB); + assertEquals(5, link.size()); + assertEquals(11, link.get(0)); + assertEquals(101, link.get(1)); + assertEquals(301, link.get(2)); + assertEquals(501, link.get(3)); + assertEquals(701, link.get(4)); + } + @Test + public void testRemoveDuplicateValues(){ + link = new LinkedList(); + link.add(11); + link.add(101); + link.add(101); + link.add(301); + link.add(401); + link.add(401); + link.removeDuplicateValues(); + assertEquals(4, link.size()); + assertEquals(11, link.get(0)); + assertEquals(101, link.get(1)); + assertEquals(301, link.get(2)); + assertEquals(401, link.get(3)); + } + + @Test + public void testRemoveRange(){ + link = new LinkedList(); + link.add(11); + link.add(101); + link.add(201); + link.add(301); + link.add(401); + link.add(501); + link.add(601); + link.add(701); + link.removeRange(200, 600); + assertEquals(4, link.size()); + assertEquals(11, link.get(0)); + assertEquals(101, link.get(1)); + assertEquals(601, link.get(2)); + assertEquals(701, link.get(3)); + } + + @Test + public void testIntersection(){ + link = new LinkedList(); + link.add(11); + link.add(101); + link.add(201); + link.add(301); + link.add(401); + link.add(501); + link.add(601); + link.add(701); + LinkedList linkB = new LinkedList(); + linkB.add(201); + linkB.add(305); + linkB.add(401); + linkB.add(504); + linkB.add(601); + LinkedList linkC = link.intersection(linkB); + assertEquals(3, linkC.size()); + assertEquals(201, linkC.get(0)); + assertEquals(401, linkC.get(1)); + assertEquals(601, linkC.get(2)); + } + } diff --git a/group10/904627477/src/com/coding/test/Test.java b/group10/904627477/src/com/coding/test/Test.java index 475c213362..bebef536da 100644 --- a/group10/904627477/src/com/coding/test/Test.java +++ b/group10/904627477/src/com/coding/test/Test.java @@ -10,7 +10,7 @@ public class Test { public static void main(String[] args) { LinkedList link = new LinkedList(); - link.add("aaa"); + link.add(1); link.add("bbb"); link.add("ccc"); link.reverse(); From e47a61b1f313f2de58c24f6ea8279718c1ffea72 Mon Sep 17 00:00:00 2001 From: Haochen Date: Fri, 10 Mar 2017 21:38:12 +0800 Subject: [PATCH 240/646] bug fixes: online files downloading --- .../code/src/download/DownloadThread.java | 23 +++++++++-------- .../code/src/download/FileDownloader.java | 25 +++++++++++-------- .../code/src/download/FileDownloaderTest.java | 3 ++- .../src/download/impl/ConnectionImpl.java | 2 +- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/group01/895457260/code/src/download/DownloadThread.java b/group01/895457260/code/src/download/DownloadThread.java index 3f132c3518..ba97d173a7 100644 --- a/group01/895457260/code/src/download/DownloadThread.java +++ b/group01/895457260/code/src/download/DownloadThread.java @@ -9,16 +9,16 @@ import java.io.IOException; public class DownloadThread extends Thread { - Connection conn; - int startPos; - int endPos; + private Connection conn; + private int startPos; + private int endPos; - File tempFile; - OnCompleteListener onComplete; - OnFailListener onFail; + private File tempFile; + private OnCompleteListener onComplete; + private OnFailListener onFail; - public DownloadThread(Connection conn, int startPos, int endPos, File tempFile, + DownloadThread(Connection conn, int startPos, int endPos, File tempFile, OnCompleteListener onComplete, OnFailListener onFail) { this.conn = conn; this.startPos = startPos; @@ -49,10 +49,12 @@ public void run() { } private void callback(boolean success) { - if (onComplete != null) { - if (success) { + if (success) { + if (onComplete != null) { onComplete.onComplete(); - } else { + } + } else { + if (onFail != null) { onFail.onFail(); } } @@ -67,6 +69,7 @@ private boolean tryDownload() throws DownloadException { } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { + e.printStackTrace(); throw new DownloadException(); } finally { if (fos != null) { diff --git a/group01/895457260/code/src/download/FileDownloader.java b/group01/895457260/code/src/download/FileDownloader.java index d9b1c4f0f7..66cc678a08 100644 --- a/group01/895457260/code/src/download/FileDownloader.java +++ b/group01/895457260/code/src/download/FileDownloader.java @@ -7,9 +7,9 @@ public class FileDownloader { - String url; - DownloadListener listener; - ConnectionManager manager; + private String url; + private DownloadListener listener; + private ConnectionManager manager; private final int[] completedThreadCount = new int[1]; @@ -41,6 +41,7 @@ public void execute() { waitForComplete(threadCount); mergeTempFiles(tempFiles); + removeTempFiles(tempFiles); for (Connection c : connections) { if (c != null) { @@ -53,6 +54,12 @@ public void execute() { }).start(); } + private void removeTempFiles(File[] tempFiles) { + for (File tempFile : tempFiles) { + tempFile.delete(); // 鍙垹闄や复鏃舵枃浠讹紝涓嶅垹闄や复鏃剁洰褰 + } + } + private void mergeTempFiles(File[] tempFiles) { String[] split = url.replaceAll("/+", "/").split("/"); File saveFile = new File(Config.targetDirectory, split[split.length - 1]); @@ -61,7 +68,6 @@ private void mergeTempFiles(File[] tempFiles) { fos = new FileOutputStream(saveFile); for (File tempFile : tempFiles) { write(tempFile, fos); - tempFile.delete(); // 鍙垹闄や复鏃舵枃浠讹紝涓嶅垹闄や复鏃剁洰褰 } } catch (FileNotFoundException e) { e.printStackTrace(); @@ -109,7 +115,7 @@ private void createMultiThread(int threadCount, File[] tempFiles, Connection[] c } }, () -> { try { - downloadFailed(connections); + downloadFailed(connections, tempFiles); } catch (DownloadException e) { e.printStackTrace(); } @@ -137,10 +143,11 @@ private void initDirectories() { } } - private void downloadFailed(Connection[] connections) throws DownloadException { + private void downloadFailed(Connection[] connections, File[] tempFiles) throws DownloadException { for (Connection c : connections) { c.close(); } + removeTempFiles(tempFiles); throw new DownloadException(); } @@ -172,11 +179,7 @@ public void setListener(DownloadListener listener) { this.listener = listener; } - public void setConnectionManager(ConnectionManager manager){ + public void setConnectionManager(ConnectionManager manager) { this.manager = manager; } - - public DownloadListener getListener(){ - return this.listener; - } } diff --git a/group01/895457260/code/src/download/FileDownloaderTest.java b/group01/895457260/code/src/download/FileDownloaderTest.java index 0615c47702..0792e6c0ba 100644 --- a/group01/895457260/code/src/download/FileDownloaderTest.java +++ b/group01/895457260/code/src/download/FileDownloaderTest.java @@ -30,7 +30,8 @@ public void testDownload() { // String url = "http://localhost:8080/test.jpg"; // String url = "file:///E:/Video/download/88993.mp4"; - String url = "file:///E:/Pictures/Clannad/Clannad楂樻竻鍥剧墖/38.jpg"; +// String url = "file:///E:/Pictures/Clannad/Clannad楂樻竻鍥剧墖/38.jpg"; + String url = "http://pic6.huitu.com/res/20130116/84481_20130116142820494200_1.jpg"; FileDownloader downloader = new FileDownloader(url); diff --git a/group01/895457260/code/src/download/impl/ConnectionImpl.java b/group01/895457260/code/src/download/impl/ConnectionImpl.java index 74f3d169d7..b9bcc3b3e6 100644 --- a/group01/895457260/code/src/download/impl/ConnectionImpl.java +++ b/group01/895457260/code/src/download/impl/ConnectionImpl.java @@ -18,7 +18,7 @@ public class ConnectionImpl implements Connection { private void init(String url) { try { connection = new URL(url).openConnection(); - inputStream = connection.getInputStream(); + inputStream = new BufferedInputStream(connection.getInputStream()); inputStream.mark(connection.getContentLength()); // 鏍囪鍦ㄥ紑澶 } catch (IOException e) { e.printStackTrace(); From 8ed4ddefb57c6bef6c6329c5372642d1666f29d4 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:01:43 +0800 Subject: [PATCH 241/646] =?UTF-8?q?arraylist=E7=9A=84=E8=87=AA=E6=88=91?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/mahone2017/mahone/.classpath | 22 ++++ group26/mahone2017/mahone/.project | 23 ++++ .../org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.m2e.core.prefs | 4 + group26/mahone2017/mahone/pom.xml | 25 ++++ .../main/java/com/coding/basic/ArrayList.java | 77 +++++++++++ .../java/com/coding/basic/BinaryTreeNode.java | 32 +++++ .../main/java/com/coding/basic/Iterator.java | 7 + .../java/com/coding/basic/LinkedList.java | 122 ++++++++++++++++++ .../src/main/java/com/coding/basic/List.java | 9 ++ .../src/main/java/com/coding/basic/Queue.java | 19 +++ .../src/main/java/com/coding/basic/Stack.java | 22 ++++ .../src/main/java/study/mahone/App.java | 13 ++ .../src/test/java/study/mahone/AppTest.java | 38 ++++++ 15 files changed, 422 insertions(+) create mode 100644 group26/mahone2017/mahone/.classpath create mode 100644 group26/mahone2017/mahone/.project create mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs create mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs create mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs create mode 100644 group26/mahone2017/mahone/pom.xml create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/BinaryTreeNode.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Iterator.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/LinkedList.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java create mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java create mode 100644 group26/mahone2017/mahone/src/main/java/study/mahone/App.java create mode 100644 group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java diff --git a/group26/mahone2017/mahone/.classpath b/group26/mahone2017/mahone/.classpath new file mode 100644 index 0000000000..6908d0b2ae --- /dev/null +++ b/group26/mahone2017/mahone/.classpath @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/group26/mahone2017/mahone/.project b/group26/mahone2017/mahone/.project new file mode 100644 index 0000000000..d392a9a466 --- /dev/null +++ b/group26/mahone2017/mahone/.project @@ -0,0 +1,23 @@ + + + mahone + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..f9fe34593f --- /dev/null +++ b/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..abec6ca389 --- /dev/null +++ b/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..f897a7f1cb --- /dev/null +++ b/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/group26/mahone2017/mahone/pom.xml b/group26/mahone2017/mahone/pom.xml new file mode 100644 index 0000000000..c93c90b55d --- /dev/null +++ b/group26/mahone2017/mahone/pom.xml @@ -0,0 +1,25 @@ + + 4.0.0 + + study + mahone + 0.0.1-SNAPSHOT + jar + + mahone + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..613513b9a6 --- /dev/null +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java @@ -0,0 +1,77 @@ +package com.coding.basic; + +/** + * + * @author Mahone Wu + * @data:2017-03-10 + * @description:ArrayList鐨勮嚜鎴戝疄鐜 + * @version锛1.0.0 + */ + +public class ArrayList implements List { + + //鏁扮粍瀛樺偍鏁版嵁澶у皬 + private int size = 0; + + //鏁扮粍 + private Object[] elementData = new Object[100]; + + /** + * 鏂板鍏冪礌 + */ + public void add(Object o){ + elementData[size] = o; + size++; + } + + /** + * 鎸囧畾浣嶇疆鏂板鏁版嵁 + */ + public void add(int index, Object o){ + //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 + Object temp =elementData[index]; + + //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 + if(elementData.length == size){ + //TODO + } + //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 + for (int i =size;i>index;i--){ + elementData[i] = elementData[i-1]; + } + //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 + elementData[index] = o; + size++; + } + + /** + * 鑾峰彇鏁版嵁 + */ + public Object get(int index){ + if(index > elementData.length){ + return null; + } + return elementData[index]; + } + + //杩斿洖瑕佸垹闄ょ殑鏁版嵁 + public Object remove(int index){ + //瑕佽鍒犻櫎鐨勬暟鎹 + Object data = elementData[index]; + for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java new file mode 100644 index 0000000000..396b1f6416 --- /dev/null +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java new file mode 100644 index 0000000000..08d2d86b14 --- /dev/null +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java new file mode 100644 index 0000000000..4bfe28057f --- /dev/null +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} diff --git a/group26/mahone2017/mahone/src/main/java/study/mahone/App.java b/group26/mahone2017/mahone/src/main/java/study/mahone/App.java new file mode 100644 index 0000000000..dea63bd7b5 --- /dev/null +++ b/group26/mahone2017/mahone/src/main/java/study/mahone/App.java @@ -0,0 +1,13 @@ +package study.mahone; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java b/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java new file mode 100644 index 0000000000..99142c8e03 --- /dev/null +++ b/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java @@ -0,0 +1,38 @@ +package study.mahone; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} From afe888bb28fb69e90c49dba5efbf10cbc409a1c1 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:10:59 +0800 Subject: [PATCH 242/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=BF=BD=E8=A7=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 6945ca9d30..4f78db6dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,8 @@ rebel.* .rebel.* target +*.DS_Store +liuxin/.DS_Store +liuxin/src/.DS_Store + From 8744a431ea514a9e852abd7bd0ed29b9db2d1d41 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:13:37 +0800 Subject: [PATCH 243/646] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mahone/src/main/java/com/coding/basic/ArrayList.java | 1 + 1 file changed, 1 insertion(+) diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java index 613513b9a6..36955853aa 100644 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java @@ -54,6 +54,7 @@ public Object get(int index){ return elementData[index]; } + //杩斿洖瑕佸垹闄ょ殑鏁版嵁 public Object remove(int index){ //瑕佽鍒犻櫎鐨勬暟鎹 From 951a824ef566e3d13e4119fc55b2a7280e727c67 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:15:16 +0800 Subject: [PATCH 244/646] hah --- .../mahone/src/main/java/com/coding/basic/ArrayList.java | 1 - 1 file changed, 1 deletion(-) diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java index 36955853aa..613513b9a6 100644 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java @@ -54,7 +54,6 @@ public Object get(int index){ return elementData[index]; } - //杩斿洖瑕佸垹闄ょ殑鏁版嵁 public Object remove(int index){ //瑕佽鍒犻櫎鐨勬暟鎹 From 540a596a7f4a4d253148db6b47b7436627f96f4b Mon Sep 17 00:00:00 2001 From: Haochen Date: Fri, 10 Mar 2017 22:16:39 +0800 Subject: [PATCH 245/646] bug fixes: online files downloading --- .../895457260/code/src/download/Config.java | 5 ++- .../code/src/download/DownloadThread.java | 29 +++++++++++++---- .../code/src/download/FileDownloader.java | 31 +++++++++++++++++-- .../src/download/api/DownloadListener.java | 3 ++ 4 files changed, 58 insertions(+), 10 deletions(-) diff --git a/group01/895457260/code/src/download/Config.java b/group01/895457260/code/src/download/Config.java index adbf32f40f..a104355cef 100644 --- a/group01/895457260/code/src/download/Config.java +++ b/group01/895457260/code/src/download/Config.java @@ -4,9 +4,12 @@ /** * Created by Haochen on 2017/3/6. - * TODO: + * */ public class Config { + /** + * 淇濆瓨涓嬭浇鏂囦欢鐨勭洰褰 + */ public static File targetDirectory = new File("download/"); public static File tempDirectory = new File(targetDirectory, "temp/"); } diff --git a/group01/895457260/code/src/download/DownloadThread.java b/group01/895457260/code/src/download/DownloadThread.java index ba97d173a7..97b9d66a51 100644 --- a/group01/895457260/code/src/download/DownloadThread.java +++ b/group01/895457260/code/src/download/DownloadThread.java @@ -13,17 +13,28 @@ public class DownloadThread extends Thread { private int startPos; private int endPos; - private File tempFile; + private File targetFile; private OnCompleteListener onComplete; private OnFailListener onFail; - - DownloadThread(Connection conn, int startPos, int endPos, File tempFile, + /** + * + * @param conn url杩炴帴 + * @param startPos 姝ょ嚎绋嬩細浠巙rl鎵鎸囧悜鏂囦欢鐨剆tartPos澶勫紑濮嬩笅杞 + * @param endPos 姝ょ嚎绋嬩細鍦╱rl鎵鎸囧悜鏂囦欢鐨別ndPos澶勫仠姝笅杞 + * @param targetFile 淇濆瓨涓嬭浇鍐呭鐨勬枃浠 + * @param onComplete 涓嬭浇鎴愬姛鍚庤嚜鍔ㄨ皟鐢 + * @param onFail 涓嬭浇澶辫触鍚庤嚜鍔ㄨ皟鐢 + * + * @see OnCompleteListener#onComplete() + * @see OnFailListener#onFail() + */ + DownloadThread(Connection conn, int startPos, int endPos, File targetFile, OnCompleteListener onComplete, OnFailListener onFail) { this.conn = conn; this.startPos = startPos; this.endPos = endPos; - this.tempFile = tempFile; + this.targetFile = targetFile; this.onComplete = onComplete; this.onFail = onFail; } @@ -63,7 +74,7 @@ private void callback(boolean success) { private boolean tryDownload() throws DownloadException { FileOutputStream fos = null; try { - fos = new FileOutputStream(tempFile); + fos = new FileOutputStream(targetFile); download(fos); return true; } catch (FileNotFoundException e) { @@ -85,7 +96,7 @@ private boolean tryDownload() throws DownloadException { private void retry() { try { - recreateFile(tempFile); + recreateFile(targetFile); } catch (IOException e1) { e1.printStackTrace(); } @@ -109,10 +120,16 @@ private void download(FileOutputStream fos) throws IOException { } public interface OnCompleteListener { + /** + * 涓嬭浇鎴愬姛鍚庤嚜鍔ㄨ皟鐢ㄦ鏂规硶 + */ void onComplete(); } public interface OnFailListener { + /** + * 涓嬭浇澶辫触鍚庤嚜鍔ㄨ皟鐢ㄦ鏂规硶 + */ void onFail(); } } diff --git a/group01/895457260/code/src/download/FileDownloader.java b/group01/895457260/code/src/download/FileDownloader.java index 66cc678a08..2086463bbc 100644 --- a/group01/895457260/code/src/download/FileDownloader.java +++ b/group01/895457260/code/src/download/FileDownloader.java @@ -5,18 +5,32 @@ import java.io.*; import java.util.Date; - +/** + * TODO: + */ public class FileDownloader { private String url; private DownloadListener listener; private ConnectionManager manager; + private boolean failed = false; private final int[] completedThreadCount = new int[1]; + /** + * 涓嬭浇鐩綍瑙 Config + * @see Config#targetDirectory + * @see #setConnectionManager(ConnectionManager) + * @see #setListener(DownloadListener) + * @see #execute() + */ public FileDownloader(String url) { this.url = url; } - + + /** + * 寮濮嬩笅杞 + * 璋冪敤杩欎釜鏂规硶鍓嶏紝鍏堣皟鐢▄@link #setConnectionManager(ConnectionManager)}鍜寋@link #setListener(DownloadListener)} + */ public void execute() { // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 @@ -48,7 +62,7 @@ public void execute() { c.close(); } } - if (listener != null) { + if (!failed && listener != null) { listener.notifyFinished(); } }).start(); @@ -148,6 +162,7 @@ private void downloadFailed(Connection[] connections, File[] tempFiles) throws D c.close(); } removeTempFiles(tempFiles); + failed = true; throw new DownloadException(); } @@ -175,10 +190,20 @@ private void write(File inputFile, OutputStream os) { } } + /** + * + * @param listener 涓嬭浇鎴愬姛鍚庝細璋冪敤listener.notifyFinished()锛屽け璐ュ垯涓嶄細璋冪敤 + * @see DownloadListener#notifyFinished() + */ public void setListener(DownloadListener listener) { this.listener = listener; } + /** + * + * @param manager 閫氳繃url锛屾墦寮杩炴帴 + * @see ConnectionManager#open(String) + */ public void setConnectionManager(ConnectionManager manager) { this.manager = manager; } diff --git a/group01/895457260/code/src/download/api/DownloadListener.java b/group01/895457260/code/src/download/api/DownloadListener.java index ed81e70b7c..0acf8ea483 100644 --- a/group01/895457260/code/src/download/api/DownloadListener.java +++ b/group01/895457260/code/src/download/api/DownloadListener.java @@ -1,5 +1,8 @@ package download.api; public interface DownloadListener { + /** + * 涓嬭浇鎴愬姛鍚庤嚜鍔ㄨ皟鐢ㄦ鏂规硶 + */ void notifyFinished(); } From 60cface7d22b5fac678e431505aaba0fefd35d9e Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:18:04 +0800 Subject: [PATCH 246/646] 123 --- .../mahone/src/main/java/com/coding/basic/ArrayList.java | 1 + 1 file changed, 1 insertion(+) diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java index 613513b9a6..36955853aa 100644 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java @@ -54,6 +54,7 @@ public Object get(int index){ return elementData[index]; } + //杩斿洖瑕佸垹闄ょ殑鏁版嵁 public Object remove(int index){ //瑕佽鍒犻櫎鐨勬暟鎹 From 36bbee70c12de122d264556d2b1374b2315ede9b Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Fri, 10 Mar 2017 22:22:09 +0800 Subject: [PATCH 247/646] 123 --- .../mahone/src/main/java/com/coding/basic/ArrayList.java | 1 - 1 file changed, 1 deletion(-) diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java index 36955853aa..613513b9a6 100644 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java +++ b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java @@ -54,7 +54,6 @@ public Object get(int index){ return elementData[index]; } - //杩斿洖瑕佸垹闄ょ殑鏁版嵁 public Object remove(int index){ //瑕佽鍒犻櫎鐨勬暟鎹 From 3baca63d2f32edab36935766f32bca7d4e568524 Mon Sep 17 00:00:00 2001 From: XiangYangHan Date: Sat, 11 Mar 2017 00:01:16 +0800 Subject: [PATCH 248/646] record01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 閲嶅啓List ArrayList Iterator锛 鏈畬鎴怉rrayList --- .../Exercise/src/lesson01/ArrayList.java | 112 ++++++++++++++++++ .../Exercise/src/lesson01/Iterator.java | 11 ++ .../Exercise/src/lesson01/List.java | 48 ++++++++ 3 files changed, 171 insertions(+) create mode 100644 group13/1274639949/Exercise/src/lesson01/ArrayList.java create mode 100644 group13/1274639949/Exercise/src/lesson01/Iterator.java create mode 100644 group13/1274639949/Exercise/src/lesson01/List.java diff --git a/group13/1274639949/Exercise/src/lesson01/ArrayList.java b/group13/1274639949/Exercise/src/lesson01/ArrayList.java new file mode 100644 index 0000000000..c7c17f2c0f --- /dev/null +++ b/group13/1274639949/Exercise/src/lesson01/ArrayList.java @@ -0,0 +1,112 @@ +package lesson01; + +import java.util.Arrays; + +public class ArrayList implements List { + + private static final int DEFAULT_CAPACITY = 20; + private static final int DEFAULT_INCREMENT = 20; + + private int size; + + private Object[] elementData; + + public ArrayList() { + this(DEFAULT_CAPACITY); + } + + public ArrayList(int capacity) { + size = 0; + elementData = new Object[capacity]; + } + + + @Override + public boolean add(E e) { + ensureCapacity(); + elementData[size] = e; + size++; + return true; + } + + private void ensureCapacity() { + if(size == elementData.length){ + elementData = Arrays.copyOf(elementData, elementData.length + DEFAULT_INCREMENT); + } + } + + @Override + public void add(int index, E element) { + if(index < 0 || index > size){ + throw new IndexOutOfBoundsException("Error index :" + index); + } + ensureCapacity(); + System.arraycopy(element, index, element, index + 1, size - index); + elementData[index] = element; + size++; + } + + @Override + + public void clear() { + elementData = new Object[DEFAULT_CAPACITY]; + size = 0; + } + + @Override + public boolean contains(Object o) { + for(int i = 0; i < size; i++){ + + } + return false; + } + + @Override + public int indexOf(Object o) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public E get(int index) { + // TODO Auto-generated method stub + return null; + } + + @Override + public E remove(int index) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean remove(Object o) { + // TODO Auto-generated method stub + return false; + } + + @Override + public E set(int index, E element) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int size() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public Object[] toArray() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Iterator iterator() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/group13/1274639949/Exercise/src/lesson01/Iterator.java b/group13/1274639949/Exercise/src/lesson01/Iterator.java new file mode 100644 index 0000000000..58a50847ac --- /dev/null +++ b/group13/1274639949/Exercise/src/lesson01/Iterator.java @@ -0,0 +1,11 @@ +package lesson01; + +public interface Iterator { + + public boolean hasNext(); + + public E next(); + + public void remove(); + +} diff --git a/group13/1274639949/Exercise/src/lesson01/List.java b/group13/1274639949/Exercise/src/lesson01/List.java new file mode 100644 index 0000000000..a477383b82 --- /dev/null +++ b/group13/1274639949/Exercise/src/lesson01/List.java @@ -0,0 +1,48 @@ +package lesson01; + +public interface List { + /** + * 鍦↙ist鐨勬渶鍚庝竴涓厓绱犲悗娣诲姞涓涓厓绱 + * @param e 娣诲姞鐨勫厓绱 + */ + public boolean add(E e); + /** + * 鍦↙ist鐨刬ndex浣嶇疆鍔犲叆鍏冪礌element + * @param index + * @param element + */ + public void add(int index, E element); + /** + * 娓呯┖璇ist + */ + public void clear(); + /** + * 鍒ゆ柇List涓槸鍚﹀惈鏈夊璞 + * @param o + * @return 濡傛灉o瀛樺湪浜庤List涓垯杩斿洖true锛 鍚﹀垯杩斿洖false + */ + public boolean contains(Object o); + /** + * 濡傛灉o瀛樺湪浜庤List涓紝鍒欒繑鍥炲畠绗竴娆″嚭鐜扮殑浣嶇疆 + * 绗竴涓厓绱犵殑浣嶇疆涓0 + * 涓嶅瓨鍦ㄦ椂杩斿洖-1 + * @param o + * @return 杩斿洖o鍦↙ist涓殑浣嶇疆鎴-1 + */ + public int indexOf(Object o); + + public E get(int index); + + public E remove(int index); + + public boolean remove(Object o); + + public E set(int index, E element); + + public int size(); + + public Object[] toArray(); + + public Iterator iterator(); + +} From 06a03dae118a7610fd67d978369855001e0d0a83 Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Sat, 11 Mar 2017 07:33:55 +0800 Subject: [PATCH 249/646] 3 --- .../coderising/download/DownloadThread.java | 27 ++-- .../com/coderising/download/DownloadUtil.java | 73 +++++++++++ .../coderising/download/FileDownloader.java | 119 +++++------------- .../download/FileDownloaderTest.java | 9 +- .../download/impl/DownloadThreadListener.java | 23 ---- .../download/impl/DownloadUtil.java | 47 +++++++ 6 files changed, 171 insertions(+), 127 deletions(-) create mode 100644 group12/382266293/src/com/coderising/download/DownloadUtil.java delete mode 100644 group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java create mode 100644 group12/382266293/src/com/coderising/download/impl/DownloadUtil.java diff --git a/group12/382266293/src/com/coderising/download/DownloadThread.java b/group12/382266293/src/com/coderising/download/DownloadThread.java index 0001e0e628..4731b2f7c8 100644 --- a/group12/382266293/src/com/coderising/download/DownloadThread.java +++ b/group12/382266293/src/com/coderising/download/DownloadThread.java @@ -2,13 +2,11 @@ import java.io.File; import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; + import java.io.RandomAccessFile; import com.coderising.download.api.Connection; -import com.coderising.download.api.DownloadListener; -import com.coderising.download.impl.DownloadThreadListener; + public class DownloadThread extends Thread{ @@ -17,14 +15,6 @@ public class DownloadThread extends Thread{ int endPos; private String dest; private FileDownloader fileDownloader; - - public void setFileDownloader(FileDownloader fileDownloader) { - this.fileDownloader = fileDownloader; - } - - public void notifyFinished() { - fileDownloader.setFinished(); - } public DownloadThread( Connection conn, int startPos, int endPos){ @@ -37,7 +27,6 @@ public void run(){ RandomAccessFile raf = null; try { byte[] buffer = conn.read(startPos, endPos); - System.out.println("buffer length: " + buffer.length); raf = new RandomAccessFile(new File(dest), "rws"); raf.seek(startPos); raf.write(buffer); @@ -47,7 +36,7 @@ public void run(){ } finally { conn.close(); System.out.println(this.getName()+" finished"); - + try { if (raf != null) raf.close(); @@ -58,9 +47,19 @@ public void run(){ } } } + + public void setFileDownloader(FileDownloader fileDownloader) { + this.fileDownloader = fileDownloader; + } + + public void notifyFinished() { + fileDownloader.setThreadFinished(); + } + public void setDest(String dest) { this.dest = dest; } + public void close() { this.conn.close(); diff --git a/group12/382266293/src/com/coderising/download/DownloadUtil.java b/group12/382266293/src/com/coderising/download/DownloadUtil.java new file mode 100644 index 0000000000..11e7c50904 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/DownloadUtil.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +public class DownloadUtil { + + private static final int MIN_CONNECTIONS = 3; + private static final int MAX_CONNECTIONS = 10; + + public static long getCurrentTime() { + return System.currentTimeMillis(); + } + + public static void createTempFile(String tempName, int len) { + File file = new File(tempName); + if (file.exists()) { + System.out.println("tempfile already created"); + return; + } + FileOutputStream temp = null; + try { + temp = new FileOutputStream(tempName); + int length = len; + byte[] buffer = new byte[1024]; + long times = length / 1024; + int left = (int) (length % 1024); + for (int i = 0; i < times; i++) { + temp.write(buffer); + } + temp.write(buffer, 0, left); + System.out.println("tempFile " + tempName + " created"); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + temp.flush(); + temp.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public static int calculateConnects(int length) { + int conns = length / 1024 / 1024 / 25; + if (conns < MIN_CONNECTIONS) { + return MIN_CONNECTIONS; + } else if (conns > MAX_CONNECTIONS) { + return MAX_CONNECTIONS; + } else { + return conns; + } + } + + public static boolean rename(String from, String to) { + File file = new File(from); + if (file.exists()) { + return file.renameTo(new File(to)); + } + System.out.println("rename failed"); + return false; + } + + public static void printDownloadReport(int length, long start, long end) { + int time = (int) ((end - start) / 1000); + float speed = (float)length / 1024 / 1024 / time; + System.out.println("鍏辫楁椂锛" + time + "s锛屼笅杞介熷害锛 " + (float)(Math.round(speed*1000))/1000 + "Mb/s"); + } + +} \ No newline at end of file diff --git a/group12/382266293/src/com/coderising/download/FileDownloader.java b/group12/382266293/src/com/coderising/download/FileDownloader.java index 6e8d10e726..882305bdb4 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloader.java +++ b/group12/382266293/src/com/coderising/download/FileDownloader.java @@ -9,21 +9,20 @@ import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; + public class FileDownloader { + private final static String EXT = "lyj"; - private static final int MIN_CONNECTIONS = 3; - private static final int MAX_CONNECTIONS = 10; private static DownloadThread[] threadPool; private int finishedCount; - public String downloadLocation = "C:\\"; + public String downloadLocation; String url; ConnectionManager cm; DownloadListener listener; - private static boolean finished; private static String fileName; private static String tempName; @@ -49,112 +48,76 @@ public void execute() { // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - int length = 0; long start = getCurrentTime(); try { Connection conn = cm.open(this.url); - length = conn.getContentLength(); - if (length <= 0) { - try { - throw new ConnectionException("file does not exist"); - } catch (ConnectionException e) { - e.printStackTrace(); - return; - } finally { - conn.close(); - } - } + int length = conn.getContentLength(); + checkLength(length, conn); System.out.println("file length:" + length); - - fileName = conn.getFileName(); - setTempName(downloadLocation + fileName); - createTempFile(tempName, length); - - int connNumbers = calculateConnects(length); + setLocation("C:\\"); + + String name = conn.getFileName(); + setFileName(name); + setTempName(name); + + DownloadUtil.createTempFile(tempName,length); + + int connNumbers = DownloadUtil.calculateConnects(length); System.out.println(connNumbers + " Threads will be created."); threadPool = new DownloadThread[connNumbers]; setAndStartThreadPool(conn, threadPool, length); - finished = checkFinish(threadPool.length); + checkFinish(threadPool.length); + listener.notifyFinished(); + DownloadUtil.rename(tempName, fileName); + long end = getCurrentTime(); + DownloadUtil.printDownloadReport(length, start, end); } catch (ConnectionException e) { e.printStackTrace(); } finally { freeDownloadThread(); - if (finished) { - changeName(tempName, fileName); - long end = getCurrentTime(); - printDownloadReport(length, start, end); - } } } - private static void createTempFile(String dest, int len) { - File file = new File(dest); - if (file.exists()) { - System.out.println("tempfile already created"); - return; - } - FileOutputStream temp = null; - try { - temp = new FileOutputStream(dest); - int length = len; - byte[] buffer = new byte[1024]; - long times = length / 1024; - int left = (int) (length % 1024); - for (int i = 0; i < times; i++) { - temp.write(buffer); - } - temp.write(buffer, 0, left); - System.out.println("tempFile " + dest + " created"); - - } catch (Exception e) { - e.printStackTrace(); - } finally { + private void checkLength(int length, Connection conn) { + if (length <= 0) { try { - temp.flush(); - temp.close(); - } catch (IOException e) { + throw new ConnectionException("file does not exist"); + } catch (ConnectionException e) { e.printStackTrace(); + } finally { + conn.close(); } } } - private static void setTempName(String fileName) { - tempName = fileName.substring(0, fileName.lastIndexOf('.') + 1) + EXT; + private void setTempName(String name) { + String temp = name.substring(0,name.lastIndexOf(".")+1) + EXT; + this.tempName = downloadLocation + temp; } - private int calculateConnects(int length) { - int conns = length / 1024 / 1024; - if (conns < MIN_CONNECTIONS) { - return MIN_CONNECTIONS; - } else if (conns > MAX_CONNECTIONS) { - return MAX_CONNECTIONS; - } else { - return conns; - } + private void setFileName(String name) { + this.fileName = downloadLocation + name; } - private void changeName(String from, String to) { - rename(from, downloadLocation + to); + private void setLocation(String downloadLocation) { + this.downloadLocation = downloadLocation; } private boolean checkFinish(int links) { while (finishedCount != links) { try { - Thread.sleep(5000); System.out.println("Unfinshed threads number: " + (links - finishedCount)); - } catch (InterruptedException e) { e.printStackTrace(); } } - return true; } @@ -179,22 +142,6 @@ public DownloadListener getListener() { return this.listener; } - private void printDownloadReport(int length, long start, long end) { - int time = (int) ((end - start) / 1000); - float speed = length / 1024 / 1024 / time; - System.out.println("鍏辫楁椂锛" + time + "s锛屼笅杞介熷害锛 " + speed + "Mb/s"); - } - - public boolean rename(String from, String to) { - System.out.println(from); - System.out.println(to); - File file = new File(from); - if (file.exists()) { - return file.renameTo(new File(to)); - } - System.out.println("rename failed"); - return false; - } private void setAndStartThreadPool(Connection conn, DownloadThread[] threadPool, int length) throws ConnectionException { @@ -226,7 +173,7 @@ public void setConnectionManager(ConnectionManager ucm) { this.cm = ucm; } - public void setFinished() { + public void setThreadFinished() { finishedCount++; } diff --git a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java index 022b6945d2..1dcd26a807 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java +++ b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java @@ -18,16 +18,17 @@ public void setUp() throws Exception { public void tearDown() throws Exception { } - public static String url1 = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; - public static String url2 = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; - public static String url3 = "http://sw.bos.baidu.com/sw-search-sp/software/6c7bb8b6674d0/fm728chb379_7.2.8.379_setup.exe"; + public static String qq = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; + public static String picture = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; + public static String foxmail = "http://sw.bos.baidu.com/sw-search-sp/software/6c7bb8b6674d0/fm728chb379_7.2.8.379_setup.exe"; + public static String office2013 = "http://soft1.xitongzhijia.net:808/201407/Office2013_32_XiTongZhiJia.rar"; @Test public void testDownload() { String url = "http://localhost:8080/test.jpg"; - FileDownloader downloader = new FileDownloader(url2); + FileDownloader downloader = new FileDownloader(office2013); ConnectionManager cm = new ConnectionManagerImpl(); diff --git a/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java b/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java deleted file mode 100644 index b5ae0e5afa..0000000000 --- a/group12/382266293/src/com/coderising/download/impl/DownloadThreadListener.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.coderising.download.impl; - -import com.coderising.download.FileDownloader; -import com.coderising.download.api.DownloadListener; - -public class DownloadThreadListener implements DownloadListener { - - - public DownloadThreadListener() { - } - - private FileDownloader fileDownloader; - public DownloadThreadListener(FileDownloader fileDownloader) { - this.fileDownloader = fileDownloader; - } - - @Override - public void notifyFinished() { - System.out.println("noted"); - fileDownloader.setFinished(); - } - -} diff --git a/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java b/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java new file mode 100644 index 0000000000..ca598f8f03 --- /dev/null +++ b/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java @@ -0,0 +1,47 @@ +package com.coderising.download.impl; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +public class DownloadUtil { + + + public static long getCurrentTime() { + return System.currentTimeMillis(); + } + + + public static void createTempFile(String tempName, int len) { + File file = new File(tempName); + if (file.exists()) { + System.out.println("tempfile already created"); + return; + } + FileOutputStream temp = null; + try { + temp = new FileOutputStream(tempName); + int length = len; + byte[] buffer = new byte[1024]; + long times = length / 1024; + int left = (int) (length % 1024); + for (int i = 0; i < times; i++) { + temp.write(buffer); + } + temp.write(buffer, 0, left); + System.out.println("tempFile " + tempName + " created"); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + temp.flush(); + temp.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + +} From 46cda8d6d6e67b1c8d1f4d9d8b584e40ef4f5aec Mon Sep 17 00:00:00 2001 From: OnlyLYJ <382266293@qq.com> Date: Sat, 11 Mar 2017 09:33:57 +0800 Subject: [PATCH 250/646] Week3 Exs done --- .../coding/basic/collection/AbstractList.java | 21 +- .../coding/basic/collection/Iterator.java | 1 + .../coding/basic/collection/List.java | 11 +- .../basic/collection/concrete/ArrayList.java | 42 +- .../collection/concrete/BinaryTreeNode.java | 113 +++--- .../basic/collection/concrete/LinkedList.java | 378 +++++++++--------- .../basic/collection/concrete/Queue.java | 23 +- .../basic/collection/concrete/Stack.java | 23 +- .../basic/test/collection/ArrayListTest.java | 115 +++--- .../test/collection/BinaryTreeNodeTest.java | 24 +- .../basic/test/collection/LinkedListTest.java | 166 ++++---- .../test/collection/LinkedListTest2.java | 163 +++++--- .../basic/test/collection/QueueTest.java | 26 +- .../basic/test/collection/StackTest.java | 31 +- .../coding/basic/util/ActionXMLreader.java | 51 ++- .../382266293/coding/basic/util/Print.java | 13 +- .../382266293/coding/basic/util/TestUtil.java | 47 +-- group12/382266293/src/array/ArrayUtil.java | 1 - .../382266293/src/array/ArrayUtilTest.java | 1 - .../coderising/download/DownloadThread.java | 1 + .../com/coderising/download/DownloadUtil.java | 4 +- .../coderising/download/FileDownloader.java | 27 +- .../download/FileDownloaderTest.java | 21 +- .../download/impl/ConnectionImpl.java | 5 - .../download/impl/ConnectionManagerImpl.java | 2 - .../download/impl/DownloadUtil.java | 11 +- .../src/litestruts/ConfigurationTest.java | 3 - group12/382266293/src/litestruts/Struts.java | 3 +- group12/382266293/src/test.java | 9 - 29 files changed, 673 insertions(+), 663 deletions(-) diff --git a/group12/382266293/coding/basic/collection/AbstractList.java b/group12/382266293/coding/basic/collection/AbstractList.java index 93da57e1bd..80bdb5329f 100644 --- a/group12/382266293/coding/basic/collection/AbstractList.java +++ b/group12/382266293/coding/basic/collection/AbstractList.java @@ -5,20 +5,21 @@ public abstract class AbstractList implements List { protected static final String PREFIX = "["; protected static final String SUFFIX = "]"; protected static final String SEPERATOR = ", "; - protected static final int MAX_SIZE = Integer.MAX_VALUE/3; - + protected static final int MAX_SIZE = Integer.MAX_VALUE / 3; + protected void checkIndex(int i) { - if( i < 0 || i > Math.min(size(), MAX_SIZE)) - throw new IndexOutOfBoundsException("Size :" + size()+", Index: " + i); + if (i < 0 || i > Math.min(size(), MAX_SIZE)) + throw new IndexOutOfBoundsException("Size :" + size() + ", Index: " + i); } - + + @Override public boolean isEmpty() { return size() == 0; } - + @Override public int indexOf(E e) { - for (int i = 0; i < size()-1; i++) { + for (int i = 0; i < size() - 1; i++) { if (get(i).equals(e)) return i; } @@ -26,18 +27,18 @@ public int indexOf(E e) { } protected abstract Iterator iterator(); - + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(PREFIX); for (int i = 0; i < size(); i++) { sb.append(get(i)); - if (i < size()-1) + if (i < size() - 1) sb.append(SEPERATOR); } sb.append(SUFFIX); return sb.toString(); } - + } diff --git a/group12/382266293/coding/basic/collection/Iterator.java b/group12/382266293/coding/basic/collection/Iterator.java index 79955745cd..01d805b630 100644 --- a/group12/382266293/coding/basic/collection/Iterator.java +++ b/group12/382266293/coding/basic/collection/Iterator.java @@ -3,5 +3,6 @@ public interface Iterator { public boolean hasNext(); + public E next(); } diff --git a/group12/382266293/coding/basic/collection/List.java b/group12/382266293/coding/basic/collection/List.java index 5fdc0de9ab..a1652bddd8 100644 --- a/group12/382266293/coding/basic/collection/List.java +++ b/group12/382266293/coding/basic/collection/List.java @@ -1,16 +1,15 @@ package collection; public interface List { - + public void add(E e); - + public int size(); - + public E get(int index); - + public boolean isEmpty(); - + public int indexOf(E e); - } diff --git a/group12/382266293/coding/basic/collection/concrete/ArrayList.java b/group12/382266293/coding/basic/collection/concrete/ArrayList.java index 449cdf4e1a..3eeca56fee 100644 --- a/group12/382266293/coding/basic/collection/concrete/ArrayList.java +++ b/group12/382266293/coding/basic/collection/concrete/ArrayList.java @@ -12,12 +12,11 @@ public class ArrayList extends AbstractList { private int size; private static final int INITIAL_SIZE = 16; - public ArrayList() { elements = (E[]) new Object[INITIAL_SIZE]; size = 0; } - + @Override public void add(E e) { checkCapacity(); @@ -27,21 +26,21 @@ public void add(E e) { private void checkCapacity() { if (size >= MAX_SIZE) throw new IndexOutOfBoundsException("Reached max size"); - + if (elements.length - size < INITIAL_SIZE) grow(); } synchronized private void grow() { - + int newCapacity = size * 2; newCapacity = (newCapacity < 0 || newCapacity - MAX_SIZE > 0) ? MAX_SIZE : newCapacity; E[] target = (E[]) new Object[newCapacity]; System.arraycopy(elements, 0, target, 0, size); elements = target; - + } - + public void add(int index, E e) { checkCapacity(); if (index == size) { @@ -50,46 +49,44 @@ public void add(int index, E e) { } checkIndex(index); synchronized (this) { - System.arraycopy(elements, index, elements, index+1, size-index+1); + System.arraycopy(elements, index, elements, index + 1, size - index + 1); elements[index] = e; size++; } } - + @Override public E get(int index) { checkIndex(index); - return elements[index]; + return elements[index]; } - public E getLast() { - return get(size-1); + return get(size - 1); } - + public void addLast(E e) { - add(e); + add(e); } - + public E removeLast() { return elements[--size]; } - + public E remove(int index) { checkIndex(index); E result = elements[index]; synchronized (this) { - System.arraycopy(elements, index+1, elements, index, size-index-1); + System.arraycopy(elements, index + 1, elements, index, size - index - 1); elements[--size] = null; } return result; } - + @Override public int size() { return size; } - @Override public int hashCode() { @@ -116,15 +113,16 @@ public boolean equals(Object obj) { return true; } - public Iterator iterator(){ + @Override + public Iterator iterator() { return new ArrayListIterator(this); } - + private class ArrayListIterator implements Iterator { private ArrayList myArrayList; private int pos; - + public ArrayListIterator(ArrayList arrayList) { myArrayList = arrayList; pos = 0; @@ -143,6 +141,4 @@ public E next() { } } - - } diff --git a/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java b/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java index 442b06b1c9..3957711eb1 100644 --- a/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java +++ b/group12/382266293/coding/basic/collection/concrete/BinaryTreeNode.java @@ -1,77 +1,73 @@ package collection.concrete; public class BinaryTreeNode> { - + private E data; private BinaryTreeNode left; private BinaryTreeNode right; private int size; private ArrayList myList; - - public BinaryTreeNode() { this.data = null; this.left = null; this.right = null; } - + public BinaryTreeNode(E data) { this.data = data; this.left = null; this.right = null; } - - public boolean isEmpty() { - return data == null; - } - - public int size() { - return size; - } - - public BinaryTreeNode insert(E o) { - BinaryTreeNode res; - if (isEmpty()) { - data = o; - size++; - return this; - } else { - BinaryTreeNode p = this; - res = new BinaryTreeNode(o); - while (true) { - if (res.getData().compareTo(p.getData()) < 0) { - if (p.left == null) { - p.setLeft(res); - break; - } - p = p.left; - } else if (res.getData().compareTo(p.getData()) > 0) { - if (p.right == null) { - p.setRight(res); - break; - } - p = p.right; - } else { - return null; - } - } - size++; - } - return res; - } - - - - public ArrayList preOrderTraversal(BinaryTreeNode node) { - - if (node != null) { - preOrderTraversal(node.left); - myList.add(node.data); - preOrderTraversal(node.right); - } - return myList; - } + + public boolean isEmpty() { + return data == null; + } + + public int size() { + return size; + } + + public BinaryTreeNode insert(E o) { + BinaryTreeNode res; + if (isEmpty()) { + data = o; + size++; + return this; + } else { + BinaryTreeNode p = this; + res = new BinaryTreeNode(o); + while (true) { + if (res.getData().compareTo(p.getData()) < 0) { + if (p.left == null) { + p.setLeft(res); + break; + } + p = p.left; + } else if (res.getData().compareTo(p.getData()) > 0) { + if (p.right == null) { + p.setRight(res); + break; + } + p = p.right; + } else { + return null; + } + } + size++; + } + return res; + } + + public ArrayList preOrderTraversal(BinaryTreeNode node) { + + if (node != null) { + preOrderTraversal(node.left); + myList.add(node.data); + preOrderTraversal(node.right); + } + return myList; + } @Override public String toString() { @@ -82,18 +78,23 @@ public String toString() { public E getData() { return data; } + public void setData(E data) { this.data = data; } + public BinaryTreeNode getLeft() { return left; } + public void setLeft(BinaryTreeNode left) { this.left = left; } + public BinaryTreeNode getRight() { return right; } + public void setRight(BinaryTreeNode right) { this.right = right; } @@ -105,7 +106,7 @@ public int hashCode() { result = prime * result + ((data == null) ? 0 : data.hashCode()); return result; } - + @Override public boolean equals(Object obj) { if (this == obj) diff --git a/group12/382266293/coding/basic/collection/concrete/LinkedList.java b/group12/382266293/coding/basic/collection/concrete/LinkedList.java index 8b14bedf57..341149e0f8 100644 --- a/group12/382266293/coding/basic/collection/concrete/LinkedList.java +++ b/group12/382266293/coding/basic/collection/concrete/LinkedList.java @@ -1,6 +1,5 @@ package collection.concrete; -import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Objects; @@ -9,114 +8,118 @@ import collection.AbstractList; import collection.Iterator; - public class LinkedList extends AbstractList { private Node head; private int size; - + public LinkedList() { this.head = new Node(null); this.size = 0; } - - + /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ @SuppressWarnings("unchecked") - public void reverse(){ - if(head == null){ - return; - } - Node pre = head; - Node cur = head.next; - Node next; - while (cur != null) { - next = cur.next; - cur.next = pre; - pre = cur; - cur = next; - } - head.next = null; - head = pre; - - } + public void reverse() { + if (head == null) { + return; + } + Node pre = head; + Node cur = head.next; + Node next; + while (cur != null) { + next = cur.next; + cur.next = pre; + pre = cur; + cur = next; + } + head.next = null; + head = pre; - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + } + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * */ - public void removeFirstHalf(){ - int deleteLength = size/2; - remove(0,deleteLength); + public void removeFirstHalf() { + int deleteLength = size / 2; + remove(0, deleteLength); } - + private void clearAndSetNewHead(int deleteIndex) { Node x = head; for (int i = 0; i < deleteIndex; i++) { - Node next = x.next; - x.data = null; - x.next = null; - x = next; - size--; - if (i == deleteIndex-1) - head = next; + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == deleteIndex - 1) + head = next; } } - - private void clearAndSetNewHead(Node node,int deleteLength) { + + private void clearAndSetNewHead(Node node, int deleteLength) { Node x = node; for (int i = 0; i < deleteLength; i++) { - Node next = x.next; - x.data = null; - x.next = null; - x = next; - size--; - if (i == deleteLength-1) - node = next; + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == deleteLength - 1) + node = next; } } /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * * @param i * @param length */ - public void remove(int i, int length){ + public void remove(int i, int length) { + checkIndex(i); + checkIndex(i + length); + if (i == 0) { clearAndSetNewHead(length); return; } - Node pre = getNode(i-1); + Node pre = getNode(i - 1); Node x = pre.next; checkIndex(length + i); for (int j = 0; j < length; j++) { - Node next = x.next; - x.data = null; - x.next = null; - x = next; - size--; - if (i == length-1) - pre.next = next; + Node next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + if (i == length - 1) + pre.next = next; } } /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * * @param list */ - public int[] getElements(LinkedList list){ + public int[] getElements(LinkedList list) { + + if (size() == 0 || list.size() == 0) { + return new int[0]; + } + Iterator it2 = list.iterator(); - int size = list.size(); + int size = list.size(); int[] result = new int[size]; int curr = (int) it2.next(); Node start = getNode(curr); @@ -127,8 +130,8 @@ public int[] getElements(LinkedList list){ next = (int) it2.next(); batch = next - curr; Node p = start; - for(int j = 0; j < batch; j++){ - p = p.next; + for (int j = 0; j < batch; j++) { + p = p.next; } result[i] = (int) p.data; start = p; @@ -137,35 +140,33 @@ public int[] getElements(LinkedList list){ return result; } - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 - + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * * @param list */ - - public void subtract(LinkedList list){ + + public void subtract(LinkedList list) { Node n1 = list.getNode(0); Node n2 = head; int count = list.size(); int index = 0; int iR = 0; while (count != 0 && n1 != null && n2 != null) { - - while(count > 1 && Objects.equals(n1.data, n1.next.data)) { + + while (count > 1 && Objects.equals(n1.data, n1.next.data)) { n1 = n1.next; count--; } - - while(Objects.equals(n1.data, n2.data) == false) { + + while (Objects.equals(n1.data, n2.data) == false) { index++; if (index > size() - 1) return; n2 = n2.next; } iR = index; - + while (n2 != null && Objects.equals(n1.data, n2.data)) { remove(iR); count--; @@ -177,122 +178,112 @@ public void subtract(LinkedList list){ } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ - public void removeDuplicateValues(){ + public void removeDuplicateValues() { Node n1 = head; - //Node next; int count = size(); int index = 0; int iR = 0; while (count > 1 && n1 != null) { - while(count > 1 && Objects.equals(n1.data, n1.next.data) == false) { + while (count > 1 && Objects.equals(n1.data, n1.next.data) == false) { n1 = n1.next; index++; count--; } iR = index; - //next = n1.next.next; - - while(count > 1 && Objects.equals(n1.data, n1.next.data)) { + + while (count > 1 && Objects.equals(n1.data, n1.next.data)) { remove(iR); - //n1 = n1.next; - //n1.next = next; - n1 = n1.next; - count--; - } - index = iR; - } - } - - - - public void removeDuplicateValues2(){ - Node n1 = head; - int count = size(); - int index = 0; - int iR = 0; - while (count > 1 && n1 != null) { - while(count > 1 && Objects.equals(n1.data, n1.next.data) == false) { n1 = n1.next; - index++; - count--; - } - iR = index; - - while(count > 1 && Objects.equals(n1.data, n1.next.data)) { - Node next = n1.next.next; - n1.next.data = null; - n1.next = null; - n1 = n1.next; - n1.next = next; count--; } index = iR; - } } - + /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * * @param min * @param max */ - public void removeRange(int min, int max){ - + public void removeRange(int min, int max) { + if (min >= max) { + throw new IllegalArgumentException(min + " is greater than " + max); + } + + if (size() == 0) { + return; + } + + Node curr = head; + if ((int) head.data > min) { + curr = curr.next; + } + + Node p = head; + while ((int) curr.data <= min) { + p = curr; + curr = curr.next; + } + + Node next = curr; + for (Node x = curr; (int) x.data < max;) { + next = x.next; + x.data = null; + x.next = null; + x = next; + size--; + } + + if ((int) p.data > min) { + head = next; + size--; + } else { + p.next = next; + } } - + public static void main(String args[]) { LinkedList myLL = new LinkedList(); myLL.add(0); - addIntWithNatureOrder(myLL,10); + addIntWithNatureOrder(myLL, 10); myLL.add(10); - myLL.add(12); - myLL.add(13); - myLL.add(24); + myLL.add(89); + println(myLL); + myLL.removeRange(2, 10); println(myLL); - LinkedList list = new LinkedList(); - list.add(0); - list.add(5); - list.add(10); - - LinkedList result = myLL.intersection(list); - println(result); } - - - - - + /** * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * * @param list */ - public LinkedList intersection(LinkedList list){ + public LinkedList intersection(LinkedList list) { + + LinkedList result = new LinkedList(); Node n1 = list.getNode(0); Node n2 = head; - LinkedList result = new LinkedList(); + int count = list.size(); int index = 0; int iR = 0; while (count != 0 && n1 != null && n2 != null) { - while(Objects.equals(n1.data, n2.data) == false) { + while (Objects.equals(n1.data, n2.data) == false) { index++; if (index > size() - 1) return result; n2 = n2.next; } iR = index; - + if (n2 != null && Objects.equals(n1.data, n2.data)) { result.add(n1.data); count--; @@ -301,55 +292,78 @@ public LinkedList intersection(LinkedList list){ index = iR; n1 = n1.next; } - + return result; } - - + + public void removeDuplicateValues2() { + Node n1 = head; + int count = size(); + int index = 0; + int iR = 0; + while (count > 1 && n1 != null) { + while (count > 1 && Objects.equals(n1.data, n1.next.data) == false) { + n1 = n1.next; + index++; + count--; + } + iR = index; + + while (count > 1 && Objects.equals(n1.data, n1.next.data)) { + Node next = n1.next.next; + n1.next.data = null; + n1.next = null; + n1 = n1.next; + n1.next = next; + count--; + } + index = iR; + + } + } + @Override public void add(E e) { addLast(e); } - - + @Override public E get(int index) { checkIndex(index); return getNode(index).data; } - + public E getFirst() { return get(0); } - + public E getLast() { - return get(size-1); + return get(size - 1); } - - - public void add(int index, E e) { + + public void add(int index, E e) { if (index == size) { addLast(e); return; - } - + } + if (index == 0) { addFirst(e); return; } - + checkIndex(index); Node pNode = new Node(e); Node p = getNode(index); synchronized (this) { - getNode(index-1).next = pNode; + getNode(index - 1).next = pNode; pNode.next = p; size++; } } - public void addFirst(E e){ + public void addFirst(E e) { checkCapacity(); Node pNode = new Node(e); Node oldHead = head; @@ -358,25 +372,26 @@ public void addFirst(E e){ size++; return; } - - public void addLast(E e){ + + public void addLast(E e) { if (size == 0) { addFirst(e); return; } - + checkCapacity(); Node res = new Node(e); setLastNode(res); size++; return; } - - public E removeFirst(){ + + public E removeFirst() { return remove(0); } - public E removeLast(){ - return remove(size-1); + + public E removeLast() { + return remove(size - 1); } @SuppressWarnings("unchecked") @@ -386,18 +401,18 @@ public E remove(int index) { E data = null; if (index == 0) { data = (E) head.data; - head = head.next; - } else if (index == size-1) { + head = head.next; + } else if (index == size - 1) { pNode = getNode(index - 1); data = (E) pNode.next.data; pNode.next = null; } else { pNode = head; - for ( int i = 0; i < index - 1 ; i++) { + for (int i = 0; i < index - 1; i++) { pNode = pNode.next; } data = (E) pNode.next.data; - pNode.next =pNode.next.next; + pNode.next = pNode.next.next; } size--; return data; @@ -407,35 +422,36 @@ public E remove(int index) { public int size() { return size; } - - public Iterator iterator(){ + + @Override + public Iterator iterator() { return new LinkedListIterator(this); } private void checkCapacity() { if (size > MAX_SIZE) - throw new IndexOutOfBoundsException("Reached max capacity: "+ MAX_SIZE); - } + throw new IndexOutOfBoundsException("Reached max capacity: " + MAX_SIZE); + } private Node getNode(int index) { if (size == 0) return head; - + Node pNode = head; - for ( int i = 0; i < index ; i++) { + for (int i = 0; i < index; i++) { pNode = pNode.next; } return pNode; } - + private void setLastNode(Node res) { - getNode(size-1).next = res; + getNode(size - 1).next = res; } private static class Node { E data; Node next; - + public Node(E data) { this.data = data; this.next = null; @@ -471,13 +487,13 @@ public boolean equals(Object obj) { return true; } } - + @SuppressWarnings("hiding") private class LinkedListIterator implements Iterator { private LinkedList myLinkedList; private int pos; - + public LinkedListIterator(LinkedList linkedList) { myLinkedList = linkedList; pos = 0; diff --git a/group12/382266293/coding/basic/collection/concrete/Queue.java b/group12/382266293/coding/basic/collection/concrete/Queue.java index 0875d8286a..d9313b1c6e 100644 --- a/group12/382266293/coding/basic/collection/concrete/Queue.java +++ b/group12/382266293/coding/basic/collection/concrete/Queue.java @@ -1,22 +1,21 @@ package collection.concrete; -import java.util.NoSuchElementException; import collection.AbstractList; import collection.Iterator; public class Queue extends AbstractList { - + private LinkedList myList; public Queue() { this.myList = new LinkedList(); } - - public void enQueue(E e){ + + public void enQueue(E e) { myList.addLast(e); } - - public E deQueue(){ + + public E deQueue() { if (0 == size()) return null; return myList.removeFirst(); @@ -26,26 +25,25 @@ public E deQueue(){ public void add(E e) { enQueue(e); } - + @Override public E get(int index) { if (0 == size()) return null; return myList.get(index); } - + public E element() { if (0 == size()) return null; return myList.getFirst(); } - @Override public int size() { return myList.size(); } - + @Override protected Iterator iterator() { return myList.iterator(); @@ -76,9 +74,4 @@ public boolean equals(Object obj) { return true; } - - - - - } diff --git a/group12/382266293/coding/basic/collection/concrete/Stack.java b/group12/382266293/coding/basic/collection/concrete/Stack.java index ecc0994273..6fe1e20d47 100644 --- a/group12/382266293/coding/basic/collection/concrete/Stack.java +++ b/group12/382266293/coding/basic/collection/concrete/Stack.java @@ -7,33 +7,34 @@ import collection.Iterator; public class Stack extends AbstractList { - + private ArrayList myList; public Stack() { this.myList = new ArrayList(); } - public void push(E e){ + public void push(E e) { myList.addLast(e); } - - public E pop(){ + + public E pop() { checkEmpty(); return myList.removeLast(); } - + private void checkEmpty() { if (0 == size()) throw new EmptyStackException(); } - public E peek(){ + public E peek() { checkEmpty(); return myList.getLast(); } - public int size(){ + @Override + public int size() { return myList.size(); } @@ -47,7 +48,7 @@ public E get(int index) { checkEmpty(); return myList.get(size() - index - 1); } - + @Override protected Iterator iterator() { return new StackIterator(myList); @@ -77,12 +78,12 @@ public boolean equals(Object obj) { return false; return true; } - + private class StackIterator implements Iterator { private ArrayList myArrayList; private int pos; - + public StackIterator(ArrayList myList) { myArrayList = myList; pos = 0; @@ -101,6 +102,4 @@ public E next() { } } - - } diff --git a/group12/382266293/coding/basic/test/collection/ArrayListTest.java b/group12/382266293/coding/basic/test/collection/ArrayListTest.java index 74a3a14212..f57167bbd3 100644 --- a/group12/382266293/coding/basic/test/collection/ArrayListTest.java +++ b/group12/382266293/coding/basic/test/collection/ArrayListTest.java @@ -1,6 +1,5 @@ package test.collection; -import static util.Print.*; import static util.TestUtil.*; import java.util.Date; import java.util.NoSuchElementException; @@ -17,18 +16,19 @@ public class ArrayListTest extends TestCase { - private ArrayList myAL; private static Random rnd = new Random(); - + + @Override @Before public void setUp() throws Exception { - + myAL = new ArrayList(); - assertEquals(true,myAL.isEmpty()); - + assertEquals(true, myAL.isEmpty()); + } + @Override @After public void tearDown() throws Exception { myAL = null; @@ -36,7 +36,7 @@ public void tearDown() throws Exception { @Test public void testRawTypeArrayList() { - + List rawList = new ArrayList(); assertEquals(rawList.size(), 0); rawList.add(new Date()); @@ -45,49 +45,49 @@ public void testRawTypeArrayList() { @Test public void testEmpty() { - - assertEquals(true,myAL.isEmpty()); - + + assertEquals(true, myAL.isEmpty()); + myAL.add(5); - assertEquals(false,myAL.isEmpty()); - + assertEquals(false, myAL.isEmpty()); + int num = getRandomNumber(); addIntWithNatureOrder(myAL, num); - assertEquals(false,myAL.isEmpty()); - + assertEquals(false, myAL.isEmpty()); + } @Test public void testAddIntAutoBoxing() { - + myAL.add(5); myAL.add(5); myAL.add(5); - myAL.add(1,10); + myAL.add(1, 10); int c = myAL.get(1); - assertEquals(10,c); - - assertEquals(4,myAL.size()); - myAL.add(4,15); + assertEquals(10, c); + + assertEquals(4, myAL.size()); + myAL.add(4, 15); int a = myAL.get(0); Integer b = myAL.get(1); - c = myAL.get(2); + c = myAL.get(2); int d = myAL.get(3); int e = myAL.get(4); - assertEquals(5,a); - assertEquals(new Integer(10),b); - assertEquals(5,c); - assertEquals(5,d); - assertEquals(15,e); + assertEquals(5, a); + assertEquals(new Integer(10), b); + assertEquals(5, c); + assertEquals(5, d); + assertEquals(15, e); } - + @Test public void testGet() { - + int[] result = addRandomInt(myAL, getRandomNumber()); - - int actual,expected; - + + int actual, expected; + for (int i = 0; i < result.length; i++) { actual = myAL.get(i); expected = result[i]; @@ -100,7 +100,7 @@ public void testGet() { public void testRemove() { addIntWithNatureOrder(myAL, 100); - + testRemoveAndGetFromTail(myAL); try { myAL.remove(10); @@ -113,59 +113,56 @@ public void testRemove() { @Test public void testSize() { - - assertEquals(0,myAL.size()); + + assertEquals(0, myAL.size()); int num = getRandomNumber(); addIntWithNatureOrder(myAL, num); - assertEquals(num,myAL.size()); + assertEquals(num, myAL.size()); } - - @Test public void testGrow() { - + int actualSize = 12345; - + addIntWithNatureOrder(myAL, actualSize); - - assertEquals(actualSize,myAL.size()); + + assertEquals(actualSize, myAL.size()); } - @Test public void testIterator() { - - addIntWithNatureOrder(myAL,100); - + + addIntWithNatureOrder(myAL, 100); + Iterator it = myAL.iterator(); - for(int i = 0; it.hasNext(); i++){ + for (int i = 0; it.hasNext(); i++) { int actual = it.next(); - assertEquals(i,actual); + assertEquals(i, actual); } - - try { + + try { it.next(); - } catch (NoSuchElementException ex) { - assertEquals(ex.getClass(),NoSuchElementException.class); - } + } catch (NoSuchElementException ex) { + assertEquals(ex.getClass(), NoSuchElementException.class); + } } - + @Test public void testIndexOf() { - + int num = 200; - addIntWithNatureOrder(myAL,num); + addIntWithNatureOrder(myAL, num); - int expected,actual; - for (int i = 0; i < num-1; i++) { + int expected, actual; + for (int i = 0; i < num - 1; i++) { expected = i; actual = myAL.indexOf(i); assertEquals(expected, actual); } - - assertEquals(-1, myAL.indexOf(-1*getRandomNumber())); + + assertEquals(-1, myAL.indexOf(-1 * getRandomNumber())); } diff --git a/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java b/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java index 161d29298a..0aeda8dc03 100644 --- a/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java +++ b/group12/382266293/coding/basic/test/collection/BinaryTreeNodeTest.java @@ -1,7 +1,5 @@ package test.collection; -import static util.Print.*; -import java.util.Random; import java.util.Set; import java.util.TreeSet; import static util.TestUtil.*; @@ -15,13 +13,15 @@ public class BinaryTreeNodeTest extends TestCase { private BinaryTreeNode myTree; - + + @Override @Before public void setUp() throws Exception { myTree = new BinaryTreeNode(); assertEquals(0, myTree.size()); } + @Override @After public void tearDown() throws Exception { myTree = null; @@ -29,26 +29,26 @@ public void tearDown() throws Exception { @Test public void testInsert() { - Set expected = new TreeSet(); + Set expected = new TreeSet(); int size = getRandomNumber(); - int j = 0 ; + int j = 0; while (expected.size() != size) { j = getRandomNumber(); expected.add(j); myTree.insert(j); } - - assertEquals(size,myTree.size()); - assertEquals(expected.toString(),myTree.toString()); + + assertEquals(size, myTree.size()); + assertEquals(expected.toString(), myTree.toString()); } - + public void testSize() { - + for (int i = 0; i < getRandomNumber(); i++) { myTree.insert(18); myTree.insert(-19); myTree.insert(1); - assertEquals(3,myTree.size()); - } + assertEquals(3, myTree.size()); + } } } \ No newline at end of file diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest.java b/group12/382266293/coding/basic/test/collection/LinkedListTest.java index 2613aed28f..779216d810 100644 --- a/group12/382266293/coding/basic/test/collection/LinkedListTest.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest.java @@ -1,7 +1,6 @@ package test.collection; -import static util.Print.*; -import static util.TestUtil.*; +import static util.TestUtil.*; import java.util.Date; import java.util.NoSuchElementException; import org.junit.After; @@ -13,24 +12,22 @@ import collection.concrete.LinkedList; import junit.framework.TestCase; - public class LinkedListTest extends TestCase { LinkedList myLL; - + + @Override @Before public void setUp() throws Exception { myLL = new LinkedList(); - assertEquals(0,myLL.size()); + assertEquals(0, myLL.size()); } + @Override @After public void tearDown() throws Exception { myLL = null; } - - - @Test public void testLinkedList() { @@ -38,197 +35,192 @@ public void testLinkedList() { assertEquals(rawList.size(), 0); rawList.add(new Date()); assertEquals(1, rawList.size()); - + } - @Test public void testReverse() { - addString(myLL,5); + addString(myLL, 5); myLL.reverse(); } - - + @Test public void testRemoveFirstHalf() { - addString(myLL,5); + addString(myLL, 5); myLL.removeFirstHalf(); - assertEquals(3,myLL.size()); - assertEquals("2",myLL.get(0)); - assertEquals("3",myLL.get(1)); - assertEquals("4",myLL.get(2)); + assertEquals(3, myLL.size()); + assertEquals("2", myLL.get(0)); + assertEquals("3", myLL.get(1)); + assertEquals("4", myLL.get(2)); } - + @Test public void testAddE() { myLL.add("s"); - assertEquals(1,myLL.size()); - assertEquals(false,myLL.isEmpty()); + assertEquals(1, myLL.size()); + assertEquals(false, myLL.isEmpty()); } @Test public void testAddStringE() { String a; - - addString(myLL,30); -// for (int i = 0 ; i < 29; i++) { -// a = "" + i; -// assertEquals(myLL.get(i),a); -// } + addString(myLL, 30); + + // for (int i = 0 ; i < 29; i++) { + // a = "" + i; + // assertEquals(myLL.get(i),a); + // } } - + @Test public void testAddIndex() { String a; - for (int i = 0 ; i < 30; i++) { + for (int i = 0; i < 30; i++) { a = "" + i; myLL.add(a); } - + String ss = "ss"; - myLL.add(3,ss); + myLL.add(3, ss); assertEquals(myLL.get(3), ss); assertEquals(myLL.get(2), "2"); assertEquals(myLL.get(4), "3"); - + } - + public void testAddFirst() { String a; - for (int i = 0 ; i < 20; i++) { + for (int i = 0; i < 20; i++) { a = "" + i; myLL.add(a); } - + String ss = "bba"; myLL.addFirst(ss); - assertEquals(ss,myLL.get(0)); + assertEquals(ss, myLL.get(0)); assertEquals(21, myLL.size()); - + ; - for (int i = 1 ; i < myLL.size(); i++) { - a = (i-1) + ""; + for (int i = 1; i < myLL.size(); i++) { + a = (i - 1) + ""; assertEquals(a, myLL.get(i)); - } + } } - + public void testAddLast() { String a; - for (int i = 0 ; i < 25; i++) { + for (int i = 0; i < 25; i++) { a = "" + i; myLL.add(a); } - + String ss = "25"; myLL.addLast(ss); int size = myLL.size(); assertEquals(26, size); - for (int i = 0 ; i < size; i++) { + for (int i = 0; i < size; i++) { a = i + ""; assertEquals(a, myLL.get(i)); - } + } } - + @Test public void testRemoveFirst() { - + String a = ""; String result = ""; - for(int i = 0; i < 10; i++) { - myLL.add(i+""); + for (int i = 0; i < 10; i++) { + myLL.add(i + ""); } - + myLL.removeFirst(); assertEquals(9, myLL.size()); - for(int i = 0; i < myLL.size(); i++) { - a = i+1 + ""; + for (int i = 0; i < myLL.size(); i++) { + a = i + 1 + ""; assertEquals(a, myLL.get(i)); } - + int size = myLL.size(); - for(int i = 0; i < size; i++) { - a = i+1 +""; + for (int i = 0; i < size; i++) { + a = i + 1 + ""; result = myLL.removeFirst(); assertEquals(a, result); } - + assertEquals(0, myLL.size()); } - + @Test public void testRemoveLast() { - + String a = ""; String result = ""; - for(int i = 0; i < 10; i++) { - myLL.add(i+""); + for (int i = 0; i < 10; i++) { + myLL.add(i + ""); } - + myLL.removeLast(); assertEquals(9, myLL.size()); - for(int i = 0; i < myLL.size(); i++) { + for (int i = 0; i < myLL.size(); i++) { a = i + ""; assertEquals(a, myLL.get(i)); } - + int size = myLL.size(); - for(int i = 0; i < size; i++) { - a = myLL.size()-1 +""; + for (int i = 0; i < size; i++) { + a = myLL.size() - 1 + ""; result = myLL.removeLast(); assertEquals(a, result); } - + assertEquals(0, myLL.size()); - + } - @Test public void testRemove() { - + String res = ""; String a = ""; - for(int i = 0; i < 10; i++) { - myLL.add(i+""); + for (int i = 0; i < 10; i++) { + myLL.add(i + ""); } - for(int i = myLL.size()-1; i >= 0; i--) { + for (int i = myLL.size() - 1; i >= 0; i--) { a = myLL.get(i); res = myLL.remove(i); assertEquals(i, myLL.size()); - assertEquals(a,res); + assertEquals(a, res); } - + } - @Test public void testSize() { - assertEquals(0,myLL.size()); + assertEquals(0, myLL.size()); } @Test public void testIterator() { - for(int i = 0; i<10; i++) { - myLL.add(i+""); + for (int i = 0; i < 10; i++) { + myLL.add(i + ""); } Iterator it = myLL.iterator(); - - for(int i = 0; it.hasNext(); i++){ + + for (int i = 0; it.hasNext(); i++) { String res = it.next(); - assertEquals(i+"",res); + assertEquals(i + "", res); } - - try { + + try { it.next(); - } catch (NoSuchElementException ex) { - assertEquals(ex.getClass(),NoSuchElementException.class); - } + } catch (NoSuchElementException ex) { + assertEquals(ex.getClass(), NoSuchElementException.class); + } } - } diff --git a/group12/382266293/coding/basic/test/collection/LinkedListTest2.java b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java index 2dfbdb9ea8..c24c93be14 100644 --- a/group12/382266293/coding/basic/test/collection/LinkedListTest2.java +++ b/group12/382266293/coding/basic/test/collection/LinkedListTest2.java @@ -3,122 +3,151 @@ import static util.Print.*; import static util.TestUtil.*; -import java.util.Arrays; -import java.util.Date; -import java.util.NoSuchElementException; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import collection.Iterator; -import collection.List; import collection.concrete.LinkedList; import junit.framework.TestCase; - public class LinkedListTest2 extends TestCase { LinkedList myLL; - + + @Override @Before public void setUp() throws Exception { myLL = new LinkedList(); - assertEquals(0,myLL.size()); + assertEquals(0, myLL.size()); } + @Override @After public void tearDown() throws Exception { myLL = null; } - - @Test public void testReverse() { - addIntWithNatureOrder(myLL,5); + addIntWithNatureOrder(myLL, 5); myLL.reverse(); for (int i = 0; i < 5; i++) { int acutal = myLL.get(i); - assertEquals(4-i,acutal); + assertEquals(4 - i, acutal); } } - - + @Test public void testRemoveFirstHalf() { - addIntWithNatureOrder(myLL,5); + myLL = new LinkedList(); + addIntWithNatureOrder(myLL, 5); + myLL.removeFirstHalf(); + assertEquals(3, myLL.size()); + assertEquals(2, (int) myLL.get(0)); + assertEquals(3, (int) myLL.get(1)); + assertEquals(4, (int) myLL.get(2)); + + myLL = new LinkedList(); myLL.removeFirstHalf(); - assertEquals(3,myLL.size()); - assertEquals(2,(int)myLL.get(0)); - assertEquals(3,(int)myLL.get(1)); - assertEquals(4,(int)myLL.get(2)); + println(myLL); + assertEquals(0, myLL.size()); + } - + @Test public void testRemove2() { - addIntWithNatureOrder(myLL,5); - myLL.remove(1,2); - assertEquals(3,myLL.size()); - assertEquals(0,(int)myLL.get(0)); - assertEquals(3,(int)myLL.get(1)); - assertEquals(4,(int)myLL.get(2)); + addIntWithNatureOrder(myLL, 5); + myLL.remove(1, 2); + assertEquals(3, myLL.size()); + assertEquals(0, (int) myLL.get(0)); + assertEquals(3, (int) myLL.get(1)); + assertEquals(4, (int) myLL.get(2)); + + myLL = new LinkedList(); + try { + myLL.remove(1, 2); + } catch (IndexOutOfBoundsException e) { + + } + + println(myLL); + assertEquals(0, myLL.size()); + } - + @Test public void testGetElements() { - addIntWithNatureOrder(myLL,10); + addIntWithNatureOrder(myLL, 10); LinkedList list = new LinkedList(); list.add(0); list.add(2); list.add(7); - int[] result = myLL.getElements(list); + int[] result = myLL.getElements(list); for (int i = 0; i < result.length; i++) { int expected = list.get(i); int actual = result[i]; - assertEquals(expected,actual); + assertEquals(expected, actual); } + myLL = new LinkedList(); + result = myLL.getElements(list); + println(myLL); + assertEquals(0, myLL.size()); + } - + @Test public void testSubstract() { LinkedList myLL = new LinkedList(); - addIntWithNatureOrder(myLL,10); + addIntWithNatureOrder(myLL, 10); myLL.add(10); myLL.add(10); myLL.add(12); LinkedList list = new LinkedList(); list.add(0); list.add(0); - addIntWithNatureOrder(list,10); + addIntWithNatureOrder(list, 10); list.add(10); list.add(12); list.add(22); myLL.subtract(list); - assertEquals(0,myLL.size()); + assertEquals(0, myLL.size()); + + myLL = new LinkedList(); + list = new LinkedList(); + myLL.subtract(list); + assertEquals(0, myLL.size()); + } - + @Test public void testIntersection() { - addIntWithNatureOrder(myLL,10); + LinkedList list = new LinkedList(); + LinkedList result = myLL.intersection(list); + assertEquals(0, result.size()); + + addIntWithNatureOrder(myLL, 10); myLL.add(10); myLL.add(12); myLL.add(13); myLL.add(24); - LinkedList list = new LinkedList(); + list.add(0); list.add(5); list.add(10); - LinkedList result = myLL.intersection(list); - assertEquals(0,(int)result.get(0)); - assertEquals(5,(int)result.get(1)); - assertEquals(10,(int)result.get(2)); + result = myLL.intersection(list); + assertEquals(0, (int) result.get(0)); + assertEquals(5, (int) result.get(1)); + assertEquals(10, (int) result.get(2)); + + myLL = new LinkedList(); + result = new LinkedList(); + myLL.intersection(list); + assertEquals(0, result.size()); } - - + @Test public void testRemoveDuplicateValues() { @@ -128,13 +157,45 @@ public void testRemoveDuplicateValues() { myLL.add(1); myLL.add(10); myLL.removeDuplicateValues(); - assertEquals(3,myLL.size()); - assertEquals(0,(int)myLL.get(0)); - assertEquals(1,(int)myLL.get(1)); - assertEquals(10,(int)myLL.get(2)); + assertEquals(3, myLL.size()); + assertEquals(0, (int) myLL.get(0)); + assertEquals(1, (int) myLL.get(1)); + assertEquals(10, (int) myLL.get(2)); + + myLL = new LinkedList(); + myLL.removeDuplicateValues(); + assertEquals(0, myLL.size()); + + } + + @Test + public void testRemoveRange() { + + myLL.add(0); + addIntWithNatureOrder(myLL, 10); + myLL.add(9); + myLL.add(10); + myLL.add(12); + myLL.add(13); + myLL.add(24); + + myLL.removeRange(-5, 3); + assertEquals(3, (int) myLL.get(0)); + + myLL.removeRange(3, 4); + assertEquals(3, (int) myLL.get(0)); + + myLL.removeRange(3, 5); + assertEquals(3, (int) myLL.get(0)); + assertEquals(5, (int) myLL.get(1)); + + myLL.removeRange(-3, 11); + assertEquals(12, (int) myLL.get(0)); + + myLL = new LinkedList(); + myLL.removeRange(-1, 10); + assertEquals(0, myLL.size()); + } - - - } diff --git a/group12/382266293/coding/basic/test/collection/QueueTest.java b/group12/382266293/coding/basic/test/collection/QueueTest.java index bbbd076f7d..f52c0d1563 100644 --- a/group12/382266293/coding/basic/test/collection/QueueTest.java +++ b/group12/382266293/coding/basic/test/collection/QueueTest.java @@ -1,6 +1,5 @@ package test.collection; -import static util.Print.*; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -14,12 +13,14 @@ public class QueueTest extends TestCase { private Queue myQueue; - + + @Override @Before public void setUp() throws Exception { - myQueue= new Queue(); + myQueue = new Queue(); } + @Override @After public void tearDown() throws Exception { myQueue = null; @@ -36,20 +37,20 @@ public void testIsEmpty() { public void testEnQueue() { enQueueIntWithNatureOrder(myQueue, getRandomNumber()); - + } @Test public void testDeQueue() { enQueueIntWithNatureOrder(myQueue, getRandomNumber()); int size = myQueue.size(); - for (int i = 0; i < size ; i++) { - assertEquals(size-i, myQueue.size()); + for (int i = 0; i < size; i++) { + assertEquals(size - i, myQueue.size()); int expect = i; int actual = myQueue.deQueue(); assertEquals(expect, actual); } - + assertEquals(null, myQueue.deQueue()); assertEquals(null, myQueue.element()); assertEquals(null, myQueue.get(0)); @@ -58,25 +59,25 @@ public void testDeQueue() { @Test public void testelement() { - + int expected = 0; int element1 = 0; int repeated = 0; - + for (int i = 0; i < 10; i++) { myQueue.enQueue(i); expected = i; - + element1 = myQueue.element(); assertEquals(expected, element1); - + for (int j = 0; j < i; j++) { repeated = myQueue.element(); assertEquals(expected, repeated); } myQueue.deQueue(); } - + } @Test @@ -97,5 +98,4 @@ public void testAdd() { } } - } diff --git a/group12/382266293/coding/basic/test/collection/StackTest.java b/group12/382266293/coding/basic/test/collection/StackTest.java index d64b3e60f3..75b3732511 100644 --- a/group12/382266293/coding/basic/test/collection/StackTest.java +++ b/group12/382266293/coding/basic/test/collection/StackTest.java @@ -1,7 +1,5 @@ package test.collection; -import static util.Print.*; - import java.util.EmptyStackException; import static util.TestUtil.*; import org.junit.After; @@ -14,12 +12,14 @@ public class StackTest extends TestCase { Stack myStack; - + + @Override @Before public void setUp() throws Exception { - myStack= new Stack(); + myStack = new Stack(); } + @Override @After public void tearDown() throws Exception { myStack = null; @@ -46,12 +46,12 @@ public void testPop() { int size = myStack.size(); for (int i = size; i > 0; i--) { assertEquals(i, myStack.size()); - int expect = i-1; + int expect = i - 1; assertEquals(i, myStack.size()); int actual = myStack.pop(); assertEquals(expect, actual); } - + try { myStack.pop(); fail("no exception throw"); @@ -62,36 +62,35 @@ public void testPop() { @Test public void testPeek() { - + int expected = 0; int peek1 = 0; int repeated = 0; - + for (int i = 0; i < 10; i++) { myStack.push(i); expected = i; - + peek1 = myStack.peek(); assertEquals(expected, peek1); - + for (int j = 0; j < i; j++) { repeated = myStack.peek(); assertEquals(expected, repeated); } } - + } - - + public void testGet() { - + try { myStack.get(getRandomNumber()); fail("no exception throw"); } catch (Exception e) { assertEquals(EmptyStackException.class, e.getClass()); } - + } @Test @@ -113,7 +112,7 @@ public void testAdd() { expected[i] = actual; myStack.add(actual); } - + int expectedInt; for (int i = 0; i < size; i++) { expectedInt = expected[size - i - 1]; diff --git a/group12/382266293/coding/basic/util/ActionXMLreader.java b/group12/382266293/coding/basic/util/ActionXMLreader.java index 8f6e0eb497..23e024c088 100644 --- a/group12/382266293/coding/basic/util/ActionXMLreader.java +++ b/group12/382266293/coding/basic/util/ActionXMLreader.java @@ -7,14 +7,12 @@ import org.dom4j.Node; import org.dom4j.io.SAXReader; -import static util.Print.*; - public class ActionXMLreader { - public Node getRootNode(String add) { - SAXReader reader = new SAXReader(); - Document document = null; - Node root = null; + public Node getRootNode(String add) { + SAXReader reader = new SAXReader(); + Document document = null; + Node root = null; try { document = reader.read(add); root = document.getRootElement(); @@ -22,32 +20,31 @@ public Node getRootNode(String add) { e.printStackTrace(); } return root; - } + } - public String parseClass(Node root, String attr) { + public String parseClass(Node root, String attr) { - @SuppressWarnings("rawtypes") + @SuppressWarnings("rawtypes") List list = root.selectNodes("action[@name='" + attr + "']"); - String clazz = null; - for(Object o:list){ - Element e = (Element) o; - clazz = e.attributeValue("class"); - } + String clazz = null; + for (Object o : list) { + Element e = (Element) o; + clazz = e.attributeValue("class"); + } return clazz; - } - - public String parseResult(Node root, String attr, String result) { + } + + public String parseResult(Node root, String attr, String result) { - @SuppressWarnings("rawtypes") + @SuppressWarnings("rawtypes") List list = root.selectNodes("action[@name='" + attr + "']/result[@name='" + result + "']"); - - String jsp = null; - for(Object o:list){ - Element e = (Element) o; - jsp = e.getTextTrim(); - } + + String jsp = null; + for (Object o : list) { + Element e = (Element) o; + jsp = e.getTextTrim(); + } return jsp; - } - - + } + } diff --git a/group12/382266293/coding/basic/util/Print.java b/group12/382266293/coding/basic/util/Print.java index 403339f9aa..db18c2a019 100644 --- a/group12/382266293/coding/basic/util/Print.java +++ b/group12/382266293/coding/basic/util/Print.java @@ -3,18 +3,17 @@ import java.util.Arrays; public class Print { - - public static void print(Object o){ + + public static void print(Object o) { System.out.print(o); } - - public static void println(Object o){ + + public static void println(Object o) { System.out.println(o); } - - public static void printArr(Object[] arr) { + + public static void printArr(Object[] arr) { println(Arrays.toString(arr)); } - } diff --git a/group12/382266293/coding/basic/util/TestUtil.java b/group12/382266293/coding/basic/util/TestUtil.java index 009e67ca26..3b607378b5 100644 --- a/group12/382266293/coding/basic/util/TestUtil.java +++ b/group12/382266293/coding/basic/util/TestUtil.java @@ -1,6 +1,5 @@ package util; -import java.util.Arrays; import java.util.Random; import collection.List; @@ -9,16 +8,12 @@ import collection.concrete.Queue; import junit.framework.TestCase; - public class TestUtil extends TestCase { - + private static Random random = new Random(); - private static final int RANDOM_BOUND = 2<<15; + private static final int RANDOM_BOUND = 2 << 15; private static final int RANDOM_SIZE = 500; - - - public static int[] getRandomIntArray(int number) { int[] arr = new int[number]; for (int i = 0; i < arr.length; i++) { @@ -26,27 +21,27 @@ public static int[] getRandomIntArray(int number) { } return arr; } - + public static int getRandomNumber() { return random.nextInt(RANDOM_SIZE); } - + public static int getRandomNumber(int bound) { return random.nextInt(bound); } - + public static void addIntWithNatureOrder(List myList, int numbers) { - - for (int acutal = 0; acutal < numbers ; acutal++) { + + for (int acutal = 0; acutal < numbers; acutal++) { myList.add(acutal); } } - + public static int[] addRandomInt(List myList, int numbers) { - + int actual = 0; int[] result = new int[numbers]; - for (int i = 0; i < numbers ; i++) { + for (int i = 0; i < numbers; i++) { actual = random.nextInt(RANDOM_BOUND); result[i] = actual; myList.add(actual); @@ -55,39 +50,39 @@ public static int[] addRandomInt(List myList, int numbers) { } public static void addString(List myList, int num) { - + String actual; - for (int index = 0; index < num ; index++) { + for (int index = 0; index < num; index++) { actual = index + ""; myList.add(actual); } } - + public static void testRemoveAndGetFromTail(ArrayList myList) { E get; E remove; - for(int i = myList.size()-1; i >= 0; i--) { + for (int i = myList.size() - 1; i >= 0; i--) { get = myList.get(i); remove = myList.remove(i); - assertEquals(get,remove); + assertEquals(get, remove); } } - + public static void testRemoveAndGetFromTail(LinkedList myList) { E get; E remove; - for(int i = myList.size()-1; i >= 0; i--) { + for (int i = myList.size() - 1; i >= 0; i--) { get = myList.get(i); remove = myList.remove(i); - assertEquals(get,remove); + assertEquals(get, remove); } } public static void enQueueIntWithNatureOrder(Queue myQueue, int numbers) { - - for (int acutal = 0; acutal < numbers ; acutal++) { + + for (int acutal = 0; acutal < numbers; acutal++) { myQueue.enQueue(acutal); } } - + } diff --git a/group12/382266293/src/array/ArrayUtil.java b/group12/382266293/src/array/ArrayUtil.java index 85df44e987..8412a68f48 100644 --- a/group12/382266293/src/array/ArrayUtil.java +++ b/group12/382266293/src/array/ArrayUtil.java @@ -1,6 +1,5 @@ package array; -import static util.Print.*; import java.util.Arrays; import java.util.BitSet; diff --git a/group12/382266293/src/array/ArrayUtilTest.java b/group12/382266293/src/array/ArrayUtilTest.java index 22a3250613..42085c1e25 100644 --- a/group12/382266293/src/array/ArrayUtilTest.java +++ b/group12/382266293/src/array/ArrayUtilTest.java @@ -5,7 +5,6 @@ import java.util.Arrays; import java.util.Iterator; import java.util.TreeSet; -import static util.Print.*; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/group12/382266293/src/com/coderising/download/DownloadThread.java b/group12/382266293/src/com/coderising/download/DownloadThread.java index 4731b2f7c8..d1e1f04c47 100644 --- a/group12/382266293/src/com/coderising/download/DownloadThread.java +++ b/group12/382266293/src/com/coderising/download/DownloadThread.java @@ -22,6 +22,7 @@ public DownloadThread( Connection conn, int startPos, int endPos){ this.startPos = startPos; this.endPos = endPos; } + @Override public void run(){ System.out.println(this.getName()+" is running"); RandomAccessFile raf = null; diff --git a/group12/382266293/src/com/coderising/download/DownloadUtil.java b/group12/382266293/src/com/coderising/download/DownloadUtil.java index 11e7c50904..8e8f2de727 100644 --- a/group12/382266293/src/com/coderising/download/DownloadUtil.java +++ b/group12/382266293/src/com/coderising/download/DownloadUtil.java @@ -25,7 +25,7 @@ public static void createTempFile(String tempName, int len) { int length = len; byte[] buffer = new byte[1024]; long times = length / 1024; - int left = (int) (length % 1024); + int left = length % 1024; for (int i = 0; i < times; i++) { temp.write(buffer); } @@ -67,7 +67,7 @@ public static boolean rename(String from, String to) { public static void printDownloadReport(int length, long start, long end) { int time = (int) ((end - start) / 1000); float speed = (float)length / 1024 / 1024 / time; - System.out.println("鍏辫楁椂锛" + time + "s锛屼笅杞介熷害锛 " + (float)(Math.round(speed*1000))/1000 + "Mb/s"); + System.out.println("鍏辫楁椂锛" + time + "s锛屼笅杞介熷害锛 " + (float)(Math.round(speed*100))/100 + "Mb/s"); } } \ No newline at end of file diff --git a/group12/382266293/src/com/coderising/download/FileDownloader.java b/group12/382266293/src/com/coderising/download/FileDownloader.java index 882305bdb4..cc77b380a9 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloader.java +++ b/group12/382266293/src/com/coderising/download/FileDownloader.java @@ -1,25 +1,17 @@ package com.coderising.download; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; - import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; - public class FileDownloader { - - - private final static String EXT = "lyj"; private static DownloadThread[] threadPool; private int finishedCount; public String downloadLocation; - + String url; ConnectionManager cm; DownloadListener listener; @@ -56,12 +48,12 @@ public void execute() { System.out.println("file length:" + length); setLocation("C:\\"); - + String name = conn.getFileName(); setFileName(name); setTempName(name); - - DownloadUtil.createTempFile(tempName,length); + + DownloadUtil.createTempFile(tempName, length); int connNumbers = DownloadUtil.calculateConnects(length); System.out.println(connNumbers + " Threads will be created."); @@ -96,16 +88,16 @@ private void checkLength(int length, Connection conn) { } private void setTempName(String name) { - String temp = name.substring(0,name.lastIndexOf(".")+1) + EXT; - this.tempName = downloadLocation + temp; + String temp = name.substring(0, name.lastIndexOf(".") + 1) + EXT; + FileDownloader.tempName = downloadLocation + temp; } private void setFileName(String name) { - this.fileName = downloadLocation + name; + FileDownloader.fileName = downloadLocation + name; } private void setLocation(String downloadLocation) { - this.downloadLocation = downloadLocation; + this.downloadLocation = downloadLocation; } private boolean checkFinish(int links) { @@ -142,7 +134,6 @@ public DownloadListener getListener() { return this.listener; } - private void setAndStartThreadPool(Connection conn, DownloadThread[] threadPool, int length) throws ConnectionException { int connectionNumbers = threadPool.length; @@ -162,7 +153,7 @@ private void setAndStartThreadPool(Connection conn, DownloadThread[] threadPool, setAndStartThread(threadPool[i], tempName); } } - + private void setAndStartThread(DownloadThread downloadThread, String dest) { downloadThread.setDest(dest); downloadThread.setFileDownloader(this); diff --git a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java index 1dcd26a807..ae24faa19f 100644 --- a/group12/382266293/src/com/coderising/download/FileDownloaderTest.java +++ b/group12/382266293/src/com/coderising/download/FileDownloaderTest.java @@ -10,6 +10,7 @@ public class FileDownloaderTest { boolean downloadFinished = false; + @Before public void setUp() throws Exception { } @@ -18,22 +19,21 @@ public void setUp() throws Exception { public void tearDown() throws Exception { } - public static String qq = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; + public static String qq = "http://sw.bos.baidu.com/sw-search-sp/software/89179b0b248b1/QQ_8.9.20026.0_setup.exe"; public static String picture = "http://image.beekka.com/blog/201304/bg2013042401.jpg"; public static String foxmail = "http://sw.bos.baidu.com/sw-search-sp/software/6c7bb8b6674d0/fm728chb379_7.2.8.379_setup.exe"; - public static String office2013 = "http://soft1.xitongzhijia.net:808/201407/Office2013_32_XiTongZhiJia.rar"; + @Test public void testDownload() { - + String url = "http://localhost:8080/test.jpg"; - FileDownloader downloader = new FileDownloader(office2013); + FileDownloader downloader = new FileDownloader(foxmail); - ConnectionManager cm = new ConnectionManagerImpl(); downloader.setConnectionManager(cm); - + downloader.setListener(new DownloadListener() { @Override public void notifyFinished() { @@ -42,22 +42,19 @@ public void notifyFinished() { }); - downloader.execute(); - + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 while (!downloadFinished) { try { System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 + // 浼戠湢5绉 Thread.sleep(15000); - } catch (InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println("涓嬭浇瀹屾垚锛"); - - } diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java index f34abb3b05..05f31103de 100644 --- a/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,16 +1,11 @@ package com.coderising.download.impl; -import static util.Print.println; - import java.io.ByteArrayOutputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; import java.net.URL; import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import sun.net.www.protocol.http.HttpURLConnection; diff --git a/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java index a50884c256..4d44301b0d 100644 --- a/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group12/382266293/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -7,8 +7,6 @@ import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; -import sun.net.www.protocol.http.HttpURLConnection; - public class ConnectionManagerImpl implements ConnectionManager { private int connections = 0; diff --git a/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java b/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java index ca598f8f03..834a68d702 100644 --- a/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java +++ b/group12/382266293/src/com/coderising/download/impl/DownloadUtil.java @@ -5,13 +5,11 @@ import java.io.IOException; public class DownloadUtil { - - + public static long getCurrentTime() { return System.currentTimeMillis(); } - - + public static void createTempFile(String tempName, int len) { File file = new File(tempName); if (file.exists()) { @@ -24,7 +22,7 @@ public static void createTempFile(String tempName, int len) { int length = len; byte[] buffer = new byte[1024]; long times = length / 1024; - int left = (int) (length % 1024); + int left = length % 1024; for (int i = 0; i < times; i++) { temp.write(buffer); } @@ -42,6 +40,5 @@ public static void createTempFile(String tempName, int len) { } } } - - + } diff --git a/group12/382266293/src/litestruts/ConfigurationTest.java b/group12/382266293/src/litestruts/ConfigurationTest.java index ac86e30695..1b5d2f43e1 100644 --- a/group12/382266293/src/litestruts/ConfigurationTest.java +++ b/group12/382266293/src/litestruts/ConfigurationTest.java @@ -1,12 +1,9 @@ package litestruts; -import static org.junit.Assert.*; - import java.util.HashMap; import java.util.Map; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/group12/382266293/src/litestruts/Struts.java b/group12/382266293/src/litestruts/Struts.java index cb7593c657..df9c4ed535 100644 --- a/group12/382266293/src/litestruts/Struts.java +++ b/group12/382266293/src/litestruts/Struts.java @@ -10,7 +10,6 @@ import java.util.HashMap; import java.util.Map; import org.dom4j.Node; -import static util.Print.*; public class Struts { @@ -28,7 +27,7 @@ public static View runAction(String actionName, Map parameters){ PropertyDescriptor[] pd = bi.getPropertyDescriptors(); setParameters(actionObj, pd, parameters); - String executeResult = (String) getResult(actionObj, bi, "execute"); + String executeResult = getResult(actionObj, bi, "execute"); String jsp = reader.parseResult(root, actionName, executeResult); Map readParamters = getReadParameters(actionObj, pd); diff --git a/group12/382266293/src/test.java b/group12/382266293/src/test.java index ea1c6646cd..a705772df2 100644 --- a/group12/382266293/src/test.java +++ b/group12/382266293/src/test.java @@ -1,20 +1,11 @@ import static util.Print.println; -import java.io.BufferedInputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.FileNameMap; import java.net.URL; -import java.net.URLDecoder; import java.util.LinkedList; -import java.util.List; -import java.util.Map; - import sun.net.www.protocol.http.HttpURLConnection; public class test { From 2c5aeefc6be7c4d0bf216c04a3d6a9439d21330d Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Sat, 11 Mar 2017 09:48:24 +0800 Subject: [PATCH 251/646] init --- group08/286060098/3-12/pom.xml | 91 +++++++++++++ .../coderising/download/DownloadThread.java | 20 +++ .../coderising/download/FileDownloader.java | 73 +++++++++++ .../download/FileDownloaderTest.java | 59 +++++++++ .../coderising/download/api/Connection.java | 23 ++++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++++ .../download/impl/ConnectionManagerImpl.java | 15 +++ .../3-12/src/com/coding/basic/Iterator.java | 6 + .../3-12/src/com/coding/basic/LinkedList.java | 124 ++++++++++++++++++ .../3-12/src/com/coding/basic/List.java | 9 ++ 13 files changed, 467 insertions(+) create mode 100644 group08/286060098/3-12/pom.xml create mode 100644 group08/286060098/3-12/src/com/coderising/download/DownloadThread.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/FileDownloader.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/api/Connection.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/api/ConnectionException.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/api/DownloadListener.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group08/286060098/3-12/src/com/coding/basic/Iterator.java create mode 100644 group08/286060098/3-12/src/com/coding/basic/LinkedList.java create mode 100644 group08/286060098/3-12/src/com/coding/basic/List.java diff --git a/group08/286060098/3-12/pom.xml b/group08/286060098/3-12/pom.xml new file mode 100644 index 0000000000..7097bcd0ec --- /dev/null +++ b/group08/286060098/3-12/pom.xml @@ -0,0 +1,91 @@ + + + + 3-12 + 3-05 + 1.0.0- + + 4.0.0 + + + 4.1 + 3.5 + 19.0 + + 1.7 + 1.7 + + 1.7.5 + + true + 4.11 + 1.6.1 + 2.0.1 + + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + + com.google.guava + guava + ${guava.version} + + + + junit + junit-dep + ${junit-dep.version} + + + + + + org.slf4j + slf4j-api + ${org.slf4j.version} + + + + org.slf4j + jcl-over-slf4j + ${org.slf4j.version} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${jdk.source.version} + ${jdk.target.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${maven-surefire-plugin.skip} + + + + + + + \ No newline at end of file diff --git a/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java b/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..1456314140 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java b/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..f5d7999eb4 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java b/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..8171ee5763 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group08/286060098/3-12/src/com/coderising/download/api/Connection.java b/group08/286060098/3-12/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..091c5c97ce --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group08/286060098/3-12/src/com/coderising/download/api/ConnectionException.java b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group08/286060098/3-12/src/com/coderising/download/api/DownloadListener.java b/group08/286060098/3-12/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..32f03efdc7 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..046f7c49a4 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group08/286060098/3-12/src/com/coding/basic/Iterator.java b/group08/286060098/3-12/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..e7cbd474ec --- /dev/null +++ b/group08/286060098/3-12/src/com/coding/basic/Iterator.java @@ -0,0 +1,6 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); +} diff --git a/group08/286060098/3-12/src/com/coding/basic/LinkedList.java b/group08/286060098/3-12/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..d6f6ffebec --- /dev/null +++ b/group08/286060098/3-12/src/com/coding/basic/LinkedList.java @@ -0,0 +1,124 @@ +package com.coding.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group08/286060098/3-12/src/com/coding/basic/List.java b/group08/286060098/3-12/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group08/286060098/3-12/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} From 4c583ee9e565a2169eb95a08421147ff701516d2 Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Sat, 11 Mar 2017 11:04:50 +0800 Subject: [PATCH 252/646] linklist --- .../3-12/src/com/coding/basic/LinkedList.java | 470 +++++++++++++----- .../3-12/src/com/coding/basic/List.java | 10 +- 2 files changed, 356 insertions(+), 124 deletions(-) diff --git a/group08/286060098/3-12/src/com/coding/basic/LinkedList.java b/group08/286060098/3-12/src/com/coding/basic/LinkedList.java index d6f6ffebec..9776a51dff 100644 --- a/group08/286060098/3-12/src/com/coding/basic/LinkedList.java +++ b/group08/286060098/3-12/src/com/coding/basic/LinkedList.java @@ -1,124 +1,356 @@ package com.coding.basic; +import java.util.Date; +import java.util.Objects; +@SuppressWarnings("unchecked") +public class LinkedList implements List { -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - - } - public void add(int index , Object o){ - - } - public Object get(int index){ - return null; - } - public Object remove(int index){ - return null; - } - - public int size(){ - return -1; - } - - public void addFirst(Object o){ - - } - public void addLast(Object o){ - - } - public Object removeFirst(){ - return null; - } - public Object removeLast(){ - return null; - } - public Iterator iterator(){ - return null; - } - - - private static class Node{ - Object data; - Node next; - - } - - /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public static int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } + private Node head; + + private int size = 0; + + public void add(T data) { + if (head == null) { + head = new Node(data); + } + Node tmp = head; + while (tmp.next != null) { + tmp = tmp.next; + } + tmp.next = new Node(data); + size++; + } + + public void add(int index, T data) { + if (head == null || index > size - 1 || index < 0) { + throw new IndexOutOfBoundsException(); + } + if (index == 0) { + head.setNext(new Node(data)); + } + Node tmp = head; + for (int i = 1; i < index; i++) { + tmp = tmp.next; + } + tmp.setNext(new Node(data)); + size++; + } + + public T get(int index) { + if (head == null || index > size - 1 || index < 0) { + throw new IndexOutOfBoundsException(); + } + if (index == 0) { + return (T) head.getData(); + } + Node tmp = head; + for (int i = 1; i < index; i++) { + tmp = tmp.next; + } + return (T) tmp.getData(); + } + + public T remove(int index) { + if (head == null || index > size - 1 || index < 0) { + throw new IndexOutOfBoundsException(); + } + if (index == 0) { + head = head.next; + return (T) head.getData(); + } + Node tmp = head; + for (int i = 1; i <= index - 1; i++) { + tmp = tmp.next; + } + T result = (T) tmp.next.data; + tmp.setNext(tmp.next.next); + size--; + return result; + } + + public int size() { + return size; + } + + public void addFirst(T data) { + if (head == null) { + throw new IndexOutOfBoundsException(); + } + Node nHead = new Node(data); + nHead.setNext(head); + head = nHead; + size++; + } + + public void addLast(T data) { + if (head == null) { + throw new IndexOutOfBoundsException(); + } + Node tmp = head; + while (tmp.next != null) { + tmp = tmp.next; + } + tmp.setNext(new Node(data)); + size++; + } + + public T removeFirst() { + if (head == null) { + throw new IndexOutOfBoundsException(); + } + T result = (T) head.data; + head = head.next; + size--; + return result; + } + + public T removeLast() { + if (head == null) { + throw new IndexOutOfBoundsException(); + } + Node tmp = head; + while (tmp.next.next != null) { + tmp = tmp.next; + } + T result = (T) tmp.data; + tmp.setNext(null); + size--; + return result; + } + + public Iterator iterator() { + return new LinkListIterator(head); + } + + private class LinkListIterator implements Iterator { + + private Node cache; + + LinkListIterator(Node cache) { + cache = head; + } + + @Override + public boolean hasNext() { + return cache.getNext() == null; + } + + @Override + public Node next() { + return cache.getNext(); + } + } + + private static class Node { + + T data; + + Node next; + + Node() { + + } + + Node(T data) { + this.data = data; + this.next = null; + } + + Node(T data, Node next) { + this.data = data; + this.next = next; + } + + public Node getNext() { + return next; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + public void setNext(Node next) { + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (size <= 1) { + return; + } + Node tmp = head; + Node tail = new Node(head.data); + Node cache = null; + while (tmp.next != null) { + cache = new Node(head.next.data); + cache.next = tail; + tail = cache; + } + head = cache; + } + + /** + *
+     * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 ,
+     * 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10
+     * 
+ */ + public void removeFirstHalf() { + for (int i = 0; i < size / 2; i++) { + head = head.next; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (i + length > size) { + throw new IndexOutOfBoundsException(); + } + Node tmp = head; + for (int index = 0; index < i; index++) { + tmp = tmp.next; + } + Node cache = tmp; + for (int index = 0; index < length; index++) { + cache = cache.next; + } + tmp.next = cache.next; + } + + /** + *
+     * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 
+     * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 listB = 1->3->4->6
+     * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601]
+     * 
+ * + */ + public T[] getElements(LinkedList list) { + Iterator iterator = list.iterator(); + int index = 0; + int flag = 0; + T[] result = (T[]) new Object[list.size]; + while (iterator.hasNext()) { + Node next = (Node) iterator.next(); + index = (int) next.getData(); + result[flag++] = get(index); + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + T data = (T) iterator.next(); + Node tmp = head; + if (Objects.equals(tmp.data, data)) { + head = head.next; + } else { + Node cache = tmp.next; + while (tmp.next != null) { + if (Objects.equals(cache.data, data)) { + cache = cache.next; + } + } + } + } + } + + /** + *
+     * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 
+     * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級
+     * 
+ */ + public void removeDuplicateValues() { + if (size <= 1) { + return; + } + Node tmp = head; + T data = (T) tmp.data; + while (tmp != null && tmp.next != null) { + if (Objects.equals(data, tmp.next.data)) { + tmp = tmp.next.next; + } + } + } + + /** + *
+     * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝
+     * 鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛
+     * 
+ * + * @param min + * @param max + */ + public void removeRange(T min, T max) { + Node tmp = head; + Node begin = null; + Node end = null; + if (((T) head.data).compareTo(min) < 0) { + tmp = head.next; + while (tmp.next != null) { + if (begin == null && ((T) tmp.next.data).compareTo(min) > 0) { + begin = tmp; + } else if (((T) tmp.next.data).compareTo(min) < 0) { + end = tmp; + } + } + } else { + begin = head; + } + if (Objects.equals(begin, tmp)) { + head = end.next == null ? null : end.next; + } else { + head = begin; + } + } + + /** + *
+     * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級
+     * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪
+     * 
+ * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList intersection = new LinkedList(); + int leftIndex = 0; + int rightIndex = 0; + while (leftIndex < size && rightIndex < list.size) { + T left = get(leftIndex); + T right = list.get(rightIndex); + if (left.compareTo(right) == 0) { + intersection.add(left); + leftIndex++; + rightIndex++; + } else if (left.compareTo(right) > 0) { + rightIndex++; + } else { + leftIndex++; + } + } + return intersection; + } } diff --git a/group08/286060098/3-12/src/com/coding/basic/List.java b/group08/286060098/3-12/src/com/coding/basic/List.java index 10d13b5832..7189fc9e8c 100644 --- a/group08/286060098/3-12/src/com/coding/basic/List.java +++ b/group08/286060098/3-12/src/com/coding/basic/List.java @@ -1,9 +1,9 @@ package com.coding.basic; -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); +public interface List { + public void add(T o); + public void add(int index, T o); + public T get(int index); + public T remove(int index); public int size(); } From dcc67bfecbfca2b73d5fa05aa4c9d946161b99e4 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:15:53 +0800 Subject: [PATCH 253/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/mahone2017/123.txt | 0 group26/mahone2017/mahone/.classpath | 22 ---- group26/mahone2017/mahone/.project | 23 ---- .../org.eclipse.core.resources.prefs | 4 - .../.settings/org.eclipse.jdt.core.prefs | 5 - .../.settings/org.eclipse.m2e.core.prefs | 4 - group26/mahone2017/mahone/pom.xml | 25 ---- .../main/java/com/coding/basic/ArrayList.java | 77 ----------- .../java/com/coding/basic/BinaryTreeNode.java | 32 ----- .../main/java/com/coding/basic/Iterator.java | 7 - .../java/com/coding/basic/LinkedList.java | 122 ------------------ .../src/main/java/com/coding/basic/List.java | 9 -- .../src/main/java/com/coding/basic/Queue.java | 19 --- .../src/main/java/com/coding/basic/Stack.java | 22 ---- .../src/main/java/study/mahone/App.java | 13 -- .../src/test/java/study/mahone/AppTest.java | 38 ------ 16 files changed, 422 deletions(-) delete mode 100644 group26/mahone2017/123.txt delete mode 100644 group26/mahone2017/mahone/.classpath delete mode 100644 group26/mahone2017/mahone/.project delete mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs delete mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs delete mode 100644 group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs delete mode 100644 group26/mahone2017/mahone/pom.xml delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/BinaryTreeNode.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Iterator.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/LinkedList.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java delete mode 100644 group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java delete mode 100644 group26/mahone2017/mahone/src/main/java/study/mahone/App.java delete mode 100644 group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java diff --git a/group26/mahone2017/123.txt b/group26/mahone2017/123.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/group26/mahone2017/mahone/.classpath b/group26/mahone2017/mahone/.classpath deleted file mode 100644 index 6908d0b2ae..0000000000 --- a/group26/mahone2017/mahone/.classpath +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/group26/mahone2017/mahone/.project b/group26/mahone2017/mahone/.project deleted file mode 100644 index d392a9a466..0000000000 --- a/group26/mahone2017/mahone/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mahone - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index f9fe34593f..0000000000 --- a/group26/mahone2017/mahone/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/test/java=UTF-8 -encoding/=UTF-8 diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index abec6ca389..0000000000 --- a/group26/mahone2017/mahone/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs b/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/group26/mahone2017/mahone/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/group26/mahone2017/mahone/pom.xml b/group26/mahone2017/mahone/pom.xml deleted file mode 100644 index c93c90b55d..0000000000 --- a/group26/mahone2017/mahone/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - 4.0.0 - - study - mahone - 0.0.1-SNAPSHOT - jar - - mahone - http://maven.apache.org - - - UTF-8 - - - - - junit - junit - 3.8.1 - test - - - diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java deleted file mode 100644 index 613513b9a6..0000000000 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/ArrayList.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.coding.basic; - -/** - * - * @author Mahone Wu - * @data:2017-03-10 - * @description:ArrayList鐨勮嚜鎴戝疄鐜 - * @version锛1.0.0 - */ - -public class ArrayList implements List { - - //鏁扮粍瀛樺偍鏁版嵁澶у皬 - private int size = 0; - - //鏁扮粍 - private Object[] elementData = new Object[100]; - - /** - * 鏂板鍏冪礌 - */ - public void add(Object o){ - elementData[size] = o; - size++; - } - - /** - * 鎸囧畾浣嶇疆鏂板鏁版嵁 - */ - public void add(int index, Object o){ - //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 - Object temp =elementData[index]; - - //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 - if(elementData.length == size){ - //TODO - } - //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 - for (int i =size;i>index;i--){ - elementData[i] = elementData[i-1]; - } - //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 - elementData[index] = o; - size++; - } - - /** - * 鑾峰彇鏁版嵁 - */ - public Object get(int index){ - if(index > elementData.length){ - return null; - } - return elementData[index]; - } - - //杩斿洖瑕佸垹闄ょ殑鏁版嵁 - public Object remove(int index){ - //瑕佽鍒犻櫎鐨勬暟鎹 - Object data = elementData[index]; - for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } -} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java deleted file mode 100644 index 396b1f6416..0000000000 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.coding.basic; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java deleted file mode 100644 index 08d2d86b14..0000000000 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Queue.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.coding.basic; - -public class Queue { - - public void enQueue(Object o){ - } - - public Object deQueue(){ - return null; - } - - public boolean isEmpty(){ - return false; - } - - public int size(){ - return -1; - } -} diff --git a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java b/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java deleted file mode 100644 index 4bfe28057f..0000000000 --- a/group26/mahone2017/mahone/src/main/java/com/coding/basic/Stack.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.coding.basic; - -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ - } - - public Object pop(){ - return null; - } - - public Object peek(){ - return null; - } - public boolean isEmpty(){ - return false; - } - public int size(){ - return -1; - } -} diff --git a/group26/mahone2017/mahone/src/main/java/study/mahone/App.java b/group26/mahone2017/mahone/src/main/java/study/mahone/App.java deleted file mode 100644 index dea63bd7b5..0000000000 --- a/group26/mahone2017/mahone/src/main/java/study/mahone/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package study.mahone; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java b/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java deleted file mode 100644 index 99142c8e03..0000000000 --- a/group26/mahone2017/mahone/src/test/java/study/mahone/AppTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package study.mahone; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - /** - * Create the test case - * - * @param testName name of the test case - */ - public AppTest( String testName ) - { - super( testName ); - } - - /** - * @return the suite of tests being tested - */ - public static Test suite() - { - return new TestSuite( AppTest.class ); - } - - /** - * Rigourous Test :-) - */ - public void testApp() - { - assertTrue( true ); - } -} From f5d41e6ce80444bcad7f61b0902110de462a2c85 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:29:17 +0800 Subject: [PATCH 254/646] =?UTF-8?q?=E5=8F=98=E5=8A=A8=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/2070509107/.classpath | 22 +++ group26/2070509107/.project | 23 +++ .../main/java/com/coding/basic/ArrayList.java | 91 ++++++++++++ .../java/com/coding/basic/BinaryTreeNode.java | 32 +++++ .../main/java/com/coding/basic/Iterator.java | 7 + .../java/com/coding/basic/LinkedList.java | 131 ++++++++++++++++++ .../src/main/java/com/coding/basic/List.java | 9 ++ .../src/main/java/com/coding/basic/Queue.java | 20 +++ .../src/main/java/com/coding/basic/Stack.java | 64 +++++++++ .../src/main/java/com/coding/basic/Test.java | 9 ++ .../src/test/java/study/mahone/AppTest.java | 38 +++++ 11 files changed, 446 insertions(+) create mode 100644 group26/2070509107/.classpath create mode 100644 group26/2070509107/.project create mode 100644 group26/2070509107/src/main/java/com/coding/basic/ArrayList.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/Iterator.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/LinkedList.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/List.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/Queue.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/Stack.java create mode 100644 group26/2070509107/src/main/java/com/coding/basic/Test.java create mode 100644 group26/2070509107/src/test/java/study/mahone/AppTest.java diff --git a/group26/2070509107/.classpath b/group26/2070509107/.classpath new file mode 100644 index 0000000000..6908d0b2ae --- /dev/null +++ b/group26/2070509107/.classpath @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/group26/2070509107/.project b/group26/2070509107/.project new file mode 100644 index 0000000000..d392a9a466 --- /dev/null +++ b/group26/2070509107/.project @@ -0,0 +1,23 @@ + + + mahone + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..b59af322f0 --- /dev/null +++ b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java @@ -0,0 +1,91 @@ +package com.coding.basic; + +/** + * + * @author Mahone Wu + * @data:2017-03-10 + * @description:ArrayList鐨勮嚜鎴戝疄鐜 + * @version锛1.0.0 + */ + +public class ArrayList implements List { + + //鏁扮粍瀛樺偍鏁版嵁澶у皬 + private int size = 0; + + //鏁扮粍 + private Object[] elementData = new Object[100]; + + /** + * 鏂板鍏冪礌 + */ + public void add(Object o){ + elementData[size] = o; + size++; + } + + /** + * 鎸囧畾浣嶇疆鏂板鏁版嵁 + */ + public void add(int index, Object o){ + //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 + Object temp =elementData[index]; + + //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 + if(elementData.length == size){ + //TODO + } + //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 + for (int i =size;i>index;i--){ + elementData[i] = elementData[i-1]; + } + //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 + elementData[index] = o; + size++; + } + + /** + * 鑾峰彇鏁版嵁 + */ + public Object get(int index){ + if(index > elementData.length){ + return null; + } + return elementData[index]; + } + + //杩斿洖瑕佸垹闄ょ殑鏁版嵁 + public Object remove(int index){ + //瑕佽鍒犻櫎鐨勬暟鎹 + Object data = elementData[index]; + for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group26/2070509107/src/main/java/com/coding/basic/List.java b/group26/2070509107/src/main/java/com/coding/basic/List.java new file mode 100644 index 0000000000..396b1f6416 --- /dev/null +++ b/group26/2070509107/src/main/java/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Queue.java b/group26/2070509107/src/main/java/com/coding/basic/Queue.java new file mode 100644 index 0000000000..2fb7620fc4 --- /dev/null +++ b/group26/2070509107/src/main/java/com/coding/basic/Queue.java @@ -0,0 +1,20 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Stack.java b/group26/2070509107/src/main/java/com/coding/basic/Stack.java new file mode 100644 index 0000000000..ffbd6a8148 --- /dev/null +++ b/group26/2070509107/src/main/java/com/coding/basic/Stack.java @@ -0,0 +1,64 @@ +package com.coding.basic; + +/** + * + * @author wuhao + * @date:2017-03-11 + * @description:鏍堢殑瀹炵幇锛屾爤鏄厛杩涘悗鍑猴紱 + * @version:1.0.0 + * + */ +public class Stack { + + private ArrayList elementData = new ArrayList(); + + /** + * 瀛樻斁鍏冪礌 + * @param o + */ + public void push(Object o){ + elementData.add(o); + } + + /** + * 寮瑰嚭鍏冪礌锛屼粠鏈鏈熬寮瑰嚭 + * @return + */ + public Object pop(){ + if(elementData.size()==0){ + return null; + } + return elementData.remove(elementData.size()-1); + } + + /** + * 鑾峰彇鏍堝畾鍏冪礌 + * @return + */ + public Object peek(){ + if(elementData.size()==0){ + return null; + } + return elementData.get(elementData.size()); + } + + /** + * 鍒ゆ柇鏄惁涓虹┖ + * @return + */ + public boolean isEmpty(){ + if(0 == elementData.size()){ + return false; + } + return true; + } + + /** + * 鏍堝ぇ灏 + * @return + */ + public int size(){ + return elementData.size(); + } + +} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Test.java b/group26/2070509107/src/main/java/com/coding/basic/Test.java new file mode 100644 index 0000000000..cfbfce7bb7 --- /dev/null +++ b/group26/2070509107/src/main/java/com/coding/basic/Test.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public class Test { + + public static void main(String[] args) { + + } + +} diff --git a/group26/2070509107/src/test/java/study/mahone/AppTest.java b/group26/2070509107/src/test/java/study/mahone/AppTest.java new file mode 100644 index 0000000000..99142c8e03 --- /dev/null +++ b/group26/2070509107/src/test/java/study/mahone/AppTest.java @@ -0,0 +1,38 @@ +package study.mahone; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} From 4c81c479ccfff617984ebc8000299d011aca76dc Mon Sep 17 00:00:00 2001 From: wjwzero <13602573297> Date: Sat, 11 Mar 2017 11:29:49 +0800 Subject: [PATCH 255/646] =?UTF-8?q?=E6=9C=AC=E5=91=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=B8=8D=E5=A4=9A=EF=BC=8C=E7=B2=97=E7=95=A5=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/723161901/.classpath | 7 + group26/723161901/.project | 17 ++ .../src/com/coding/basic/ArrayList.java | 84 +++++++ .../src/com/coding/basic/ArrayListTest.java | 41 ++++ .../src/com/coding/basic/BinaryTreeNode.java | 39 +++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 229 ++++++++++++++++++ .../src/com/coding/basic/LinkedListTest.java | 42 ++++ .../723161901/src/com/coding/basic/List.java | 9 + .../723161901/src/com/coding/basic/Queue.java | 49 ++++ .../src/com/coding/basic/QueueTest.java | 37 +++ .../723161901/src/com/coding/basic/Stack.java | 53 ++++ .../src/com/coding/basic/StackTest.java | 37 +++ 13 files changed, 651 insertions(+) create mode 100644 group26/723161901/.classpath create mode 100644 group26/723161901/.project create mode 100644 group26/723161901/src/com/coding/basic/ArrayList.java create mode 100644 group26/723161901/src/com/coding/basic/ArrayListTest.java create mode 100644 group26/723161901/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group26/723161901/src/com/coding/basic/Iterator.java create mode 100644 group26/723161901/src/com/coding/basic/LinkedList.java create mode 100644 group26/723161901/src/com/coding/basic/LinkedListTest.java create mode 100644 group26/723161901/src/com/coding/basic/List.java create mode 100644 group26/723161901/src/com/coding/basic/Queue.java create mode 100644 group26/723161901/src/com/coding/basic/QueueTest.java create mode 100644 group26/723161901/src/com/coding/basic/Stack.java create mode 100644 group26/723161901/src/com/coding/basic/StackTest.java diff --git a/group26/723161901/.classpath b/group26/723161901/.classpath new file mode 100644 index 0000000000..3e0fb272a8 --- /dev/null +++ b/group26/723161901/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group26/723161901/.project b/group26/723161901/.project new file mode 100644 index 0000000000..e02cb8b932 --- /dev/null +++ b/group26/723161901/.project @@ -0,0 +1,17 @@ + + + 723161901 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group26/723161901/src/com/coding/basic/ArrayList.java b/group26/723161901/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..520dcdfc3a --- /dev/null +++ b/group26/723161901/src/com/coding/basic/ArrayList.java @@ -0,0 +1,84 @@ +package com.coding.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size; + + private Object[] elementData; + + private static Object[] EMPTY_DATA = {}; + + public ArrayList(){ + elementData = EMPTY_DATA; + } + /** + * 鍥哄畾瀹归噺鍒濆鍖 + * @param initialCapacity + */ + public ArrayList(int initialCapacity){ + if(negativeVerify(initialCapacity)){ + throw new IndexOutOfBoundsException(outOfBoundsMsg(initialCapacity)); + } + elementData = new Object[initialCapacity]; + size = initialCapacity; + } + + public void add(Object o){ + elementData = Arrays.copyOf(elementData, elementData.length+1); + elementData[size++] = o; + } + + public void add(int index,Object o){ + indexVerify(index); + elementData = Arrays.copyOf(elementData, elementData.length+1); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = o; + size++; + } + + public int size(){ + return size; + } + + public Object get(int index){ + indexVerify(index); + return elementData[index]; + } + + public Object remove(int index){ + indexVerify(index); + System.arraycopy(elementData, index+1, elementData, index, size-index-1); + size--; + return elementData[index]; + } + /** + * 姝f暣鏁拌竟鐣岄獙璇 + * @param verifiedNo + * @return + */ + private boolean negativeVerify(int verifiedNo){ + return verifiedNo < 0 ? true : false; + } + + private void indexVerify(int verifiedIndex){ + if(negativeVerify(verifiedIndex) && (size <= verifiedIndex)){ + throw new IndexOutOfBoundsException(outOfBoundsMsg(verifiedIndex)); + } + } + + private String outOfBoundsMsg(int verifiedIndex) { + return "浣嶇疆: "+verifiedIndex+", 澶у皬: "+size; + } + + /** + * 鎵╁睍 + * @param growSize + */ + private void grow(int growSize){ + elementData = Arrays.copyOf(elementData, size+growSize); + } + + +} diff --git a/group26/723161901/src/com/coding/basic/ArrayListTest.java b/group26/723161901/src/com/coding/basic/ArrayListTest.java new file mode 100644 index 0000000000..52d671944b --- /dev/null +++ b/group26/723161901/src/com/coding/basic/ArrayListTest.java @@ -0,0 +1,41 @@ +package com.coding.basic; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coding.basic.ArrayList; + +public class ArrayListTest { + ArrayList listExpect = new ArrayList(); + @Before + public void before() throws Exception { + listExpect.add("0"); + listExpect.add("1"); + listExpect.add("2"); + } + @Test + public void test() { + System.out.println("椤哄簭娣诲姞"); + } + @Test + public void test1() { + System.out.println("鎻掑叆"); + listExpect.add(0, "Str1_set"); + } + @Test + public void test2() { + System.out.println("鍒犻櫎"); + listExpect.remove(0); + } + + @After + public void after(){ + for (int i = 0 ;i < listExpect.size(); i++) { + System.out.println(listExpect.get(i)); + } + System.out.println("闀垮害锛"+listExpect.size()); + System.out.println("**************"); + } + +} diff --git a/group26/723161901/src/com/coding/basic/BinaryTreeNode.java b/group26/723161901/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..84e50973e7 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,39 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(Object data,BinaryTreeNode left,BinaryTreeNode right){ + this.data=data; + this.left=left; + this.right=right; + } + + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group26/723161901/src/com/coding/basic/Iterator.java b/group26/723161901/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group26/723161901/src/com/coding/basic/LinkedList.java b/group26/723161901/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..6b140a5bcd --- /dev/null +++ b/group26/723161901/src/com/coding/basic/LinkedList.java @@ -0,0 +1,229 @@ +package com.coding.basic; + + +public class LinkedList implements List { + private Node head; + private Node last; + private int size; + + public LinkedList() { + } + + public void add(Object obj) { + addLast(obj); + } + + public void add(int index, Object o) { + if (index == size) { + addLast(o); + } else { + linkBefor(o, node(index)); + } + } + + public Object get(int index) { + // 鍙岄噸寰幆閾捐〃 size>>1 鍒ゆ柇璺濈鍝竟杩 + // 浠庣涓涓紑濮嬫壘 + return node(index).data; + } + + public Object remove(int index) { + return unlink(node(index)); + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + final Node f = head; + final Node newNode = new Node(null, o, f); + head = newNode; + if (f == null) + last = newNode; + else + f.prev = newNode; + size++; + } + + private void addLast(Object obj) { + Node tempNode = last; + Node newNode = new Node(tempNode, obj, null); + last = newNode; + if (tempNode == null) { + head = newNode; + } else { + tempNode.next = newNode; + } + size++; + } + + public Object removeFirst() { + Node h = head; + Object element = h.data; + Node next = h.next; + h.data = null; + h.next = null; // help GC + head = next; + if (next == null) + last = null; + else + next.prev = null; + size--; + return element; + } + + public Object removeLast() { + Node l = last; + Object element = l.data; + Node prev = l.prev; + l.data = null; + l.prev = null; + last = prev; + if (prev == null) + head = null; + else + prev.next = null; + size--; + return element; + } + + public Iterator iterator() { + return null; + } + + private void linkBefor(Object o, Node node) { + Node pred = node.prev; + Node newNode = new Node(pred, o, node); + node.prev = newNode; + if (pred == null) { + head = newNode; + } else { + pred.next = newNode; + } + size++; + } + + private Object unlink(Node node) { + Node prev = node.prev; + Object obj = node.data; + Node next = node.next; + if (prev == null) { + head = next; + } else { + node.prev = null; + prev.next = next; + } + + if (next == null) { + last = prev; + } else { + next.prev = prev; + node.next = null; + } + node.data = null; + size--; + return obj; + } + + Node node(int index) { + if (index < (size >> 1)) { + Node x = head; + for (int i = 0; i < index; i++) { + x = x.next; + } + return x; + } else { + Node x = last; + for (int i = size - 1; i > index; i--) { + x = x.prev; + } + return x; + } + } + + private static class Node { + Object data; + Node prev; + Node next; + + Node(Node prev, Object data, Node next) { + this.prev = prev; + this.next = next; + this.data = data; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} diff --git a/group26/723161901/src/com/coding/basic/LinkedListTest.java b/group26/723161901/src/com/coding/basic/LinkedListTest.java new file mode 100644 index 0000000000..9a19e64782 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/LinkedListTest.java @@ -0,0 +1,42 @@ +package com.coding.basic; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class LinkedListTest { + LinkedList linkedList = new LinkedList(); + @Before + public void before() throws Exception { + linkedList.add("0"); + linkedList.add("1"); + linkedList.add("2"); + } + + @Test + public void test() { + System.out.println("椤哄簭娣诲姞"); + } + @Test + public void test1() { + System.out.println("鎻掑叆"); + linkedList.add(0, "add_0"); + linkedList.add(1, "add_1"); + linkedList.add(2, "add_2"); + } + @Test + public void test2() { + linkedList.remove(0); + System.out.println("鍒犻櫎"); + } + + @After + public void after(){ + for (int i = 0 ;i < linkedList.size(); i++) { + System.out.println(linkedList.get(i)); + } + System.out.println("闀垮害锛"+linkedList.size()); + System.out.println("**************"); + } + +} diff --git a/group26/723161901/src/com/coding/basic/List.java b/group26/723161901/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group26/723161901/src/com/coding/basic/Queue.java b/group26/723161901/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..21867023c5 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/Queue.java @@ -0,0 +1,49 @@ +package com.coding.basic; + +import java.util.Arrays; + +public class Queue { + + private Object[] elementData = {}; + private int size; + private int currCount; + + public enum CapaCityFlag { + ADD, SUB + } + + public Object enQueue(Object obj) { + addElement(obj); + return obj; + } + + public Object deQueue() { + Object obj = elementData[currCount++]; + grow(CapaCityFlag.SUB); + return obj; + } + + private void addElement(Object obj) { + grow(CapaCityFlag.ADD); + elementData[size++] = obj; + } + + private void grow(CapaCityFlag capaCityFlag) { + int oldElementData = elementData.length; + if (CapaCityFlag.ADD.equals(capaCityFlag)) { + oldElementData++; + elementData = Arrays.copyOf(elementData, oldElementData); + } + if (CapaCityFlag.SUB.equals(capaCityFlag)) { + oldElementData--; + /* + * TODO + * elementData = System.arraycopy(elementData, srcPos, dest, destPos, length) + copyOf(elementData, oldElementData);*/ + } + } + + public int size() { + return size; + } +} diff --git a/group26/723161901/src/com/coding/basic/QueueTest.java b/group26/723161901/src/com/coding/basic/QueueTest.java new file mode 100644 index 0000000000..85fdd6a037 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/QueueTest.java @@ -0,0 +1,37 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class QueueTest { + Queue queue = new Queue(); + @Before + public void before() throws Exception { + System.out.println("鍏ュ垪闃"); + int l = 3; + System.out.println("闀垮害锛"+l); + for(int i = 0; i < l; i++){ + queue.enQueue(i); + System.out.println(i); + } + } + + @Test + public void test() { + + } + + @After + public void after(){ + System.out.println("鍑哄垪闃"); + for (int i = 0 ;i < queue.size(); i++) { + System.out.println(queue.deQueue()); + } + System.out.println("闀垮害锛"+queue.size()); + System.out.println("**************"); + } + +} diff --git a/group26/723161901/src/com/coding/basic/Stack.java b/group26/723161901/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..078ce7c8e8 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/Stack.java @@ -0,0 +1,53 @@ +package com.coding.basic; + +import java.util.Arrays; + +public class Stack { + // private ArrayList elementData = new ArrayList(); + + private Object[] elementData = {}; + private int size; + + public enum CapaCityFlag { + ADD, SUB + } + + public void push(Object o) { + addElement(o); + } + + public Object pop() { + Object obj = elementData[--size]; + grow(CapaCityFlag.SUB); + return obj; + } + + public Object peek() { + // empty + return elementData[size - 1]; + } + + public boolean isEmpty() { + return size() == 0; + } + + public int size() { + return size; + } + + private void addElement(Object obj) { + grow(CapaCityFlag.ADD); + elementData[size++] = obj; + } + + private void grow(CapaCityFlag capaCityFlag) { + int oldElementData = elementData.length; + if (CapaCityFlag.ADD.equals(capaCityFlag)) { + oldElementData++; + } + if (CapaCityFlag.SUB.equals(capaCityFlag)) { + oldElementData--; + } + elementData = Arrays.copyOf(elementData, oldElementData); + } +} diff --git a/group26/723161901/src/com/coding/basic/StackTest.java b/group26/723161901/src/com/coding/basic/StackTest.java new file mode 100644 index 0000000000..009595e867 --- /dev/null +++ b/group26/723161901/src/com/coding/basic/StackTest.java @@ -0,0 +1,37 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class StackTest { + + Stack stack = new Stack(); + @Before + public void before() throws Exception { + System.out.println("鍏ユ爤"); + int l = 3; + System.out.println("闀垮害锛"+l); + for(int i = 0; i < l; i++){ + stack.push(i); + System.out.println(i); + } + } + + @Test + public void test() { + + } + + @After + public void after(){ + System.out.println("鍑烘爤"); + while (!stack.isEmpty()) { + System.out.println(stack.pop()); + } + System.out.println("闀垮害锛"+stack.size()); + System.out.println("**************"); + } +} From b4387e45eda467a45bf86271523208b793489a56 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:33:13 +0800 Subject: [PATCH 256/646] =?UTF-8?q?=E5=BF=BD=E8=A7=86=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/2070509107/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 group26/2070509107/.gitignore diff --git a/group26/2070509107/.gitignore b/group26/2070509107/.gitignore new file mode 100644 index 0000000000..32868bd20c --- /dev/null +++ b/group26/2070509107/.gitignore @@ -0,0 +1,2 @@ +.classpath +.project From 8407f1d22fd2d516c1659d79eee38cc4b24f95cc Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:35:08 +0800 Subject: [PATCH 257/646] 123 --- group26/{2070509107 => 123}/.gitignore | 0 .../main/java/com/coding/basic/ArrayList.java | 0 .../java/com/coding/basic/BinaryTreeNode.java | 0 .../main/java/com/coding/basic/Iterator.java | 0 .../java/com/coding/basic/LinkedList.java | 0 .../src/main/java/com/coding/basic/List.java | 0 .../src/main/java/com/coding/basic/Queue.java | 0 .../src/main/java/com/coding/basic/Stack.java | 0 .../src/main/java/com/coding/basic/Test.java | 0 .../src/test/java/study/mahone/AppTest.java | 0 group26/2070509107/.classpath | 22 ------------------ group26/2070509107/.project | 23 ------------------- 12 files changed, 45 deletions(-) rename group26/{2070509107 => 123}/.gitignore (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/ArrayList.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/BinaryTreeNode.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/Iterator.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/LinkedList.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/List.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/Queue.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/Stack.java (100%) rename group26/{2070509107 => 123}/src/main/java/com/coding/basic/Test.java (100%) rename group26/{2070509107 => 123}/src/test/java/study/mahone/AppTest.java (100%) delete mode 100644 group26/2070509107/.classpath delete mode 100644 group26/2070509107/.project diff --git a/group26/2070509107/.gitignore b/group26/123/.gitignore similarity index 100% rename from group26/2070509107/.gitignore rename to group26/123/.gitignore diff --git a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java b/group26/123/src/main/java/com/coding/basic/ArrayList.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/ArrayList.java rename to group26/123/src/main/java/com/coding/basic/ArrayList.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java b/group26/123/src/main/java/com/coding/basic/BinaryTreeNode.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java rename to group26/123/src/main/java/com/coding/basic/BinaryTreeNode.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/Iterator.java b/group26/123/src/main/java/com/coding/basic/Iterator.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/Iterator.java rename to group26/123/src/main/java/com/coding/basic/Iterator.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/LinkedList.java b/group26/123/src/main/java/com/coding/basic/LinkedList.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/LinkedList.java rename to group26/123/src/main/java/com/coding/basic/LinkedList.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/List.java b/group26/123/src/main/java/com/coding/basic/List.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/List.java rename to group26/123/src/main/java/com/coding/basic/List.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/Queue.java b/group26/123/src/main/java/com/coding/basic/Queue.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/Queue.java rename to group26/123/src/main/java/com/coding/basic/Queue.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/Stack.java b/group26/123/src/main/java/com/coding/basic/Stack.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/Stack.java rename to group26/123/src/main/java/com/coding/basic/Stack.java diff --git a/group26/2070509107/src/main/java/com/coding/basic/Test.java b/group26/123/src/main/java/com/coding/basic/Test.java similarity index 100% rename from group26/2070509107/src/main/java/com/coding/basic/Test.java rename to group26/123/src/main/java/com/coding/basic/Test.java diff --git a/group26/2070509107/src/test/java/study/mahone/AppTest.java b/group26/123/src/test/java/study/mahone/AppTest.java similarity index 100% rename from group26/2070509107/src/test/java/study/mahone/AppTest.java rename to group26/123/src/test/java/study/mahone/AppTest.java diff --git a/group26/2070509107/.classpath b/group26/2070509107/.classpath deleted file mode 100644 index 6908d0b2ae..0000000000 --- a/group26/2070509107/.classpath +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/group26/2070509107/.project b/group26/2070509107/.project deleted file mode 100644 index d392a9a466..0000000000 --- a/group26/2070509107/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mahone - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - From ee6a8d35465408d88d52fc463d0d3c58ad231d5b Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:36:10 +0800 Subject: [PATCH 258/646] =?UTF-8?q?=E6=AD=A3=E6=98=AF=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/{123 => 2070509107}/.gitignore | 0 .../src/main/java/com/coding/basic/ArrayList.java | 0 .../src/main/java/com/coding/basic/BinaryTreeNode.java | 0 .../src/main/java/com/coding/basic/Iterator.java | 0 .../src/main/java/com/coding/basic/LinkedList.java | 0 .../{123 => 2070509107}/src/main/java/com/coding/basic/List.java | 0 .../{123 => 2070509107}/src/main/java/com/coding/basic/Queue.java | 0 .../{123 => 2070509107}/src/main/java/com/coding/basic/Stack.java | 0 .../{123 => 2070509107}/src/main/java/com/coding/basic/Test.java | 0 .../{123 => 2070509107}/src/test/java/study/mahone/AppTest.java | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename group26/{123 => 2070509107}/.gitignore (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/ArrayList.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/BinaryTreeNode.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/Iterator.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/LinkedList.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/List.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/Queue.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/Stack.java (100%) rename group26/{123 => 2070509107}/src/main/java/com/coding/basic/Test.java (100%) rename group26/{123 => 2070509107}/src/test/java/study/mahone/AppTest.java (100%) diff --git a/group26/123/.gitignore b/group26/2070509107/.gitignore similarity index 100% rename from group26/123/.gitignore rename to group26/2070509107/.gitignore diff --git a/group26/123/src/main/java/com/coding/basic/ArrayList.java b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/ArrayList.java rename to group26/2070509107/src/main/java/com/coding/basic/ArrayList.java diff --git a/group26/123/src/main/java/com/coding/basic/BinaryTreeNode.java b/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/BinaryTreeNode.java rename to group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java diff --git a/group26/123/src/main/java/com/coding/basic/Iterator.java b/group26/2070509107/src/main/java/com/coding/basic/Iterator.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/Iterator.java rename to group26/2070509107/src/main/java/com/coding/basic/Iterator.java diff --git a/group26/123/src/main/java/com/coding/basic/LinkedList.java b/group26/2070509107/src/main/java/com/coding/basic/LinkedList.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/LinkedList.java rename to group26/2070509107/src/main/java/com/coding/basic/LinkedList.java diff --git a/group26/123/src/main/java/com/coding/basic/List.java b/group26/2070509107/src/main/java/com/coding/basic/List.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/List.java rename to group26/2070509107/src/main/java/com/coding/basic/List.java diff --git a/group26/123/src/main/java/com/coding/basic/Queue.java b/group26/2070509107/src/main/java/com/coding/basic/Queue.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/Queue.java rename to group26/2070509107/src/main/java/com/coding/basic/Queue.java diff --git a/group26/123/src/main/java/com/coding/basic/Stack.java b/group26/2070509107/src/main/java/com/coding/basic/Stack.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/Stack.java rename to group26/2070509107/src/main/java/com/coding/basic/Stack.java diff --git a/group26/123/src/main/java/com/coding/basic/Test.java b/group26/2070509107/src/main/java/com/coding/basic/Test.java similarity index 100% rename from group26/123/src/main/java/com/coding/basic/Test.java rename to group26/2070509107/src/main/java/com/coding/basic/Test.java diff --git a/group26/123/src/test/java/study/mahone/AppTest.java b/group26/2070509107/src/test/java/study/mahone/AppTest.java similarity index 100% rename from group26/123/src/test/java/study/mahone/AppTest.java rename to group26/2070509107/src/test/java/study/mahone/AppTest.java From f6ecb66f4a8f059bf937992edf0099fb5c51f235 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:37:56 +0800 Subject: [PATCH 259/646] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/study/mahone/AppTest.java | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 group26/2070509107/src/test/java/study/mahone/AppTest.java diff --git a/group26/2070509107/src/test/java/study/mahone/AppTest.java b/group26/2070509107/src/test/java/study/mahone/AppTest.java deleted file mode 100644 index 99142c8e03..0000000000 --- a/group26/2070509107/src/test/java/study/mahone/AppTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package study.mahone; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - /** - * Create the test case - * - * @param testName name of the test case - */ - public AppTest( String testName ) - { - super( testName ); - } - - /** - * @return the suite of tests being tested - */ - public static Test suite() - { - return new TestSuite( AppTest.class ); - } - - /** - * Rigourous Test :-) - */ - public void testApp() - { - assertTrue( true ); - } -} From a8c6e9c64f3909f0a5197b5cab236b42d9ad32d2 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 11:55:33 +0800 Subject: [PATCH 260/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/basic/collections/ArrayList.java | 90 ++++++++++++ .../src/basic/collections/BinaryTreeNode.java | 39 ++++++ .../src/basic/collections/Iterator.java | 7 + .../src/basic/collections/LinkedList.java | 131 ++++++++++++++++++ .../src/basic/collections/List.java | 9 ++ .../src/basic/collections/Queue.java | 20 +++ .../src/basic/collections/Stack.java | 64 +++++++++ .../src/basic/collections/Test.java | 14 ++ .../src/basic/collections/package-info.java | 8 ++ .../main/java/com/coding/basic/ArrayList.java | 3 +- .../java/com/coding/basic/BinaryTreeNode.java | 7 + .../src/main/java/com/coding/basic/Test.java | 11 +- 12 files changed, 398 insertions(+), 5 deletions(-) create mode 100644 group26/2070509107/src/basic/collections/ArrayList.java create mode 100644 group26/2070509107/src/basic/collections/BinaryTreeNode.java create mode 100644 group26/2070509107/src/basic/collections/Iterator.java create mode 100644 group26/2070509107/src/basic/collections/LinkedList.java create mode 100644 group26/2070509107/src/basic/collections/List.java create mode 100644 group26/2070509107/src/basic/collections/Queue.java create mode 100644 group26/2070509107/src/basic/collections/Stack.java create mode 100644 group26/2070509107/src/basic/collections/Test.java create mode 100644 group26/2070509107/src/basic/collections/package-info.java diff --git a/group26/2070509107/src/basic/collections/ArrayList.java b/group26/2070509107/src/basic/collections/ArrayList.java new file mode 100644 index 0000000000..12a622d7f3 --- /dev/null +++ b/group26/2070509107/src/basic/collections/ArrayList.java @@ -0,0 +1,90 @@ +package collections; + +/** + * + * @author Mahone Wu + * @data:2017-03-10 + * @description:ArrayList鐨勮嚜鎴戝疄鐜 + * @version锛1.0.0 + */ + +public class ArrayList implements List { + + //鏁扮粍瀛樺偍鏁版嵁澶у皬 + private int size = 0; + + //鏁扮粍 + private Object[] elementData = new Object[5]; + + /** + * 鏂板鍏冪礌 + */ + public void add(Object o){ + elementData[size] = o; + size++; + } + + /** + * 鎸囧畾浣嶇疆鏂板鏁版嵁 + */ + public void add(int index, Object o){ + //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 + Object temp =elementData[index]; + + //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 + if(elementData.length == size){ + //TODO + } + //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 + for (int i =size;i>index;i--){ + elementData[i] = elementData[i-1]; + } + //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 + elementData[index] = o; + size++; + } + + /** + * 鑾峰彇鏁版嵁 + */ + public Object get(int index){ + if(index > elementData.length){ + return null; + } + return elementData[index]; + } + + //杩斿洖瑕佸垹闄ょ殑鏁版嵁 + public Object remove(int index){ + //瑕佽鍒犻櫎鐨勬暟鎹 + Object data = elementData[index]; + for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group26/2070509107/src/basic/collections/List.java b/group26/2070509107/src/basic/collections/List.java new file mode 100644 index 0000000000..5cc26ff49f --- /dev/null +++ b/group26/2070509107/src/basic/collections/List.java @@ -0,0 +1,9 @@ +package collections; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group26/2070509107/src/basic/collections/Queue.java b/group26/2070509107/src/basic/collections/Queue.java new file mode 100644 index 0000000000..96f22cffd5 --- /dev/null +++ b/group26/2070509107/src/basic/collections/Queue.java @@ -0,0 +1,20 @@ +package collections; + +public class Queue { + + public void enQueue(Object o){ + + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group26/2070509107/src/basic/collections/Stack.java b/group26/2070509107/src/basic/collections/Stack.java new file mode 100644 index 0000000000..7edb4a6553 --- /dev/null +++ b/group26/2070509107/src/basic/collections/Stack.java @@ -0,0 +1,64 @@ +package collections; + +/** + * + * @author wuhao + * @date:2017-03-11 + * @description:鏍堢殑瀹炵幇锛屾爤鏄厛杩涘悗鍑猴紱 + * @version:1.0.0 + * + */ +public class Stack { + + private ArrayList elementData = new ArrayList(); + + /** + * 瀛樻斁鍏冪礌 + * @param o + */ + public void push(Object o){ + elementData.add(o); + } + + /** + * 寮瑰嚭鍏冪礌锛屼粠鏈鏈熬寮瑰嚭 + * @return + */ + public Object pop(){ + if(elementData.size()==0){ + return null; + } + return elementData.remove(elementData.size()-1); + } + + /** + * 鑾峰彇鏍堝畾鍏冪礌 + * @return + */ + public Object peek(){ + if(elementData.size()==0){ + return null; + } + return elementData.get(elementData.size()); + } + + /** + * 鍒ゆ柇鏄惁涓虹┖ + * @return + */ + public boolean isEmpty(){ + if(0 == elementData.size()){ + return false; + } + return true; + } + + /** + * 鏍堝ぇ灏 + * @return + */ + public int size(){ + return elementData.size(); + } + +} diff --git a/group26/2070509107/src/basic/collections/Test.java b/group26/2070509107/src/basic/collections/Test.java new file mode 100644 index 0000000000..f1ed1a5e73 --- /dev/null +++ b/group26/2070509107/src/basic/collections/Test.java @@ -0,0 +1,14 @@ +package collections; + +public class Test { + public static void main(String[] args) { + List list =new ArrayList(); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + System.out.println(list.size()); + } +} diff --git a/group26/2070509107/src/basic/collections/package-info.java b/group26/2070509107/src/basic/collections/package-info.java new file mode 100644 index 0000000000..6228dce816 --- /dev/null +++ b/group26/2070509107/src/basic/collections/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author wuhao + * + */ +package collections; \ No newline at end of file diff --git a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java index b59af322f0..8a527fc8db 100644 --- a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java +++ b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java @@ -14,7 +14,7 @@ public class ArrayList implements List { private int size = 0; //鏁扮粍 - private Object[] elementData = new Object[100]; + private Object[] elementData = new Object[5]; /** * 鏂板鍏冪礌 @@ -79,7 +79,6 @@ public Iterator iterator(){ if(hasNext(current)){ //return elementData[current+1]; } - return null; } diff --git a/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java b/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java index 266eff3d56..e3c6553d59 100644 --- a/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java +++ b/group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java @@ -1,5 +1,12 @@ package com.coding.basic; +/** + * + * @author Mahone Wu + * @data:2017-03-10 + * @description:BinaryTreeNode鐨勮嚜鎴戝疄鐜 + * @version锛1.0.0 + */ public class BinaryTreeNode { private Object data; diff --git a/group26/2070509107/src/main/java/com/coding/basic/Test.java b/group26/2070509107/src/main/java/com/coding/basic/Test.java index cfbfce7bb7..66c3594f62 100644 --- a/group26/2070509107/src/main/java/com/coding/basic/Test.java +++ b/group26/2070509107/src/main/java/com/coding/basic/Test.java @@ -1,9 +1,14 @@ package com.coding.basic; public class Test { - public static void main(String[] args) { - + List list =new ArrayList(); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + list.add(1); + System.out.println(list.size()); } - } From 9c7c32f3364c246b1e28897c7c8ff2ebb06ead03 Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sat, 11 Mar 2017 12:08:26 +0800 Subject: [PATCH 261/646] =?UTF-8?q?arraylist=E5=92=8Cstack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/2070509107/.gitignore | 5 +- .../src/basic/collections/ArrayList.java | 81 +++++------ .../src/basic/collections/BinaryTreeNode.java | 20 +-- .../src/basic/collections/Iterator.java | 1 + .../src/basic/collections/LinkedList.java | 130 ++++++++--------- .../src/basic/collections/List.java | 4 + .../src/basic/collections/Queue.java | 18 +-- .../src/basic/collections/Stack.java | 37 ++--- .../src/basic/collections/Test.java | 3 +- .../src/basic/collections/package-info.java | 8 -- .../main/java/com/coding/basic/ArrayList.java | 90 ------------ .../java/com/coding/basic/BinaryTreeNode.java | 39 ------ .../main/java/com/coding/basic/Iterator.java | 7 - .../java/com/coding/basic/LinkedList.java | 131 ------------------ .../src/main/java/com/coding/basic/List.java | 9 -- .../src/main/java/com/coding/basic/Queue.java | 20 --- .../src/main/java/com/coding/basic/Stack.java | 64 --------- .../src/main/java/com/coding/basic/Test.java | 14 -- 18 files changed, 160 insertions(+), 521 deletions(-) delete mode 100644 group26/2070509107/src/basic/collections/package-info.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/ArrayList.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/BinaryTreeNode.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/Iterator.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/LinkedList.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/List.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/Queue.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/Stack.java delete mode 100644 group26/2070509107/src/main/java/com/coding/basic/Test.java diff --git a/group26/2070509107/.gitignore b/group26/2070509107/.gitignore index 32868bd20c..68dd6977c1 100644 --- a/group26/2070509107/.gitignore +++ b/group26/2070509107/.gitignore @@ -1,2 +1,5 @@ -.classpath .project +.settings +pom.xml +./target +.classpath diff --git a/group26/2070509107/src/basic/collections/ArrayList.java b/group26/2070509107/src/basic/collections/ArrayList.java index 12a622d7f3..233b8f1795 100644 --- a/group26/2070509107/src/basic/collections/ArrayList.java +++ b/group26/2070509107/src/basic/collections/ArrayList.java @@ -4,87 +4,88 @@ * * @author Mahone Wu * @data:2017-03-10 - * @description:ArrayList鐨勮嚜鎴戝疄鐜 - * @version锛1.0.0 + * @description:ArrayList鐨勮嚜鎴戝疄鐜 @version锛1.0.0 */ public class ArrayList implements List { - - //鏁扮粍瀛樺偍鏁版嵁澶у皬 + + // 鏁扮粍瀛樺偍鏁版嵁澶у皬 private int size = 0; - //鏁扮粍 - private Object[] elementData = new Object[5]; - + int cap = 5; + + // 鏁扮粍 + private Object[] elementData = new Object[cap]; + /** * 鏂板鍏冪礌 */ - public void add(Object o){ + public void add(Object o) { elementData[size] = o; size++; } - + /** * 鎸囧畾浣嶇疆鏂板鏁版嵁 */ - public void add(int index, Object o){ - //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 - Object temp =elementData[index]; - - //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 - if(elementData.length == size){ - //TODO + public void add(int index, Object o) { + // 淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 + Object temp = elementData[index]; + + // 濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 + if (elementData.length == size) { + // TODO } - //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 - for (int i =size;i>index;i--){ - elementData[i] = elementData[i-1]; + // 濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 + for (int i = size; i > index; i--) { + elementData[i] = elementData[i - 1]; } - //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 + // 灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 elementData[index] = o; size++; } - + /** * 鑾峰彇鏁版嵁 */ - public Object get(int index){ - if(index > elementData.length){ + public Object get(int index) { + if (index > elementData.length) { return null; } return elementData[index]; } - - //杩斿洖瑕佸垹闄ょ殑鏁版嵁 - public Object remove(int index){ - //瑕佽鍒犻櫎鐨勬暟鎹 + + // 杩斿洖瑕佸垹闄ょ殑鏁版嵁 + public Object remove(int index) { + // 瑕佽鍒犻櫎鐨勬暟鎹 Object data = elementData[index]; - for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ - public void reverse(){ - + public void reverse() { + } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * */ - public void removeFirstHalf(){ - + public void removeFirstHalf() { + } - + /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * * @param i * @param length */ - public void remove(int i, int length){ - + public void remove(int i, int length) { + } + /** - * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * * @param list */ - public int[] getElements(LinkedList list){ + public int[] getElements(LinkedList list) { return null; } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * * @param list */ - - public void subtract(LinkedList list){ - + + public void subtract(LinkedList list) { + } - + /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ - public void removeDuplicateValues(){ - + public void removeDuplicateValues() { + } - + /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * * @param min * @param max */ - public void removeRange(int min, int max){ - + public void removeRange(int min, int max) { + } - + /** * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * * @param list */ - public LinkedList intersection( LinkedList list){ + public LinkedList intersection(LinkedList list) { return null; } } diff --git a/group26/2070509107/src/basic/collections/List.java b/group26/2070509107/src/basic/collections/List.java index 5cc26ff49f..c4401a476d 100644 --- a/group26/2070509107/src/basic/collections/List.java +++ b/group26/2070509107/src/basic/collections/List.java @@ -2,8 +2,12 @@ public interface List { public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); } diff --git a/group26/2070509107/src/basic/collections/Queue.java b/group26/2070509107/src/basic/collections/Queue.java index 96f22cffd5..49c916dbb6 100644 --- a/group26/2070509107/src/basic/collections/Queue.java +++ b/group26/2070509107/src/basic/collections/Queue.java @@ -1,20 +1,20 @@ package collections; public class Queue { - - public void enQueue(Object o){ - + + public void enQueue(Object o) { + } - - public Object deQueue(){ + + public Object deQueue() { return null; } - - public boolean isEmpty(){ + + public boolean isEmpty() { return false; } - - public int size(){ + + public int size() { return -1; } } diff --git a/group26/2070509107/src/basic/collections/Stack.java b/group26/2070509107/src/basic/collections/Stack.java index 7edb4a6553..bec13a4191 100644 --- a/group26/2070509107/src/basic/collections/Stack.java +++ b/group26/2070509107/src/basic/collections/Stack.java @@ -9,56 +9,61 @@ * */ public class Stack { - + private ArrayList elementData = new ArrayList(); - + /** * 瀛樻斁鍏冪礌 + * * @param o */ - public void push(Object o){ + public void push(Object o) { elementData.add(o); } - + /** * 寮瑰嚭鍏冪礌锛屼粠鏈鏈熬寮瑰嚭 + * * @return */ - public Object pop(){ - if(elementData.size()==0){ + public Object pop() { + if (elementData.size() == 0) { return null; } - return elementData.remove(elementData.size()-1); + return elementData.remove(elementData.size() - 1); } - + /** * 鑾峰彇鏍堝畾鍏冪礌 + * * @return */ - public Object peek(){ - if(elementData.size()==0){ + public Object peek() { + if (elementData.size() == 0) { return null; } return elementData.get(elementData.size()); } - + /** * 鍒ゆ柇鏄惁涓虹┖ + * * @return */ - public boolean isEmpty(){ - if(0 == elementData.size()){ + public boolean isEmpty() { + if (0 == elementData.size()) { return false; } return true; } - + /** * 鏍堝ぇ灏 + * * @return */ - public int size(){ + public int size() { return elementData.size(); } - + } diff --git a/group26/2070509107/src/basic/collections/Test.java b/group26/2070509107/src/basic/collections/Test.java index f1ed1a5e73..0cc5316cfa 100644 --- a/group26/2070509107/src/basic/collections/Test.java +++ b/group26/2070509107/src/basic/collections/Test.java @@ -2,8 +2,7 @@ public class Test { public static void main(String[] args) { - List list =new ArrayList(); - list.add(1); + List list = new ArrayList(); list.add(1); list.add(1); list.add(1); diff --git a/group26/2070509107/src/basic/collections/package-info.java b/group26/2070509107/src/basic/collections/package-info.java deleted file mode 100644 index 6228dce816..0000000000 --- a/group26/2070509107/src/basic/collections/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - */ -/** - * @author wuhao - * - */ -package collections; \ No newline at end of file diff --git a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java b/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java deleted file mode 100644 index 8a527fc8db..0000000000 --- a/group26/2070509107/src/main/java/com/coding/basic/ArrayList.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.coding.basic; - -/** - * - * @author Mahone Wu - * @data:2017-03-10 - * @description:ArrayList鐨勮嚜鎴戝疄鐜 - * @version锛1.0.0 - */ - -public class ArrayList implements List { - - //鏁扮粍瀛樺偍鏁版嵁澶у皬 - private int size = 0; - - //鏁扮粍 - private Object[] elementData = new Object[5]; - - /** - * 鏂板鍏冪礌 - */ - public void add(Object o){ - elementData[size] = o; - size++; - } - - /** - * 鎸囧畾浣嶇疆鏂板鏁版嵁 - */ - public void add(int index, Object o){ - //淇濆瓨鐜板湪璇ヤ綅缃湁鐨勫厓绱 - Object temp =elementData[index]; - - //濡傛灉褰撳墠瀛樻斁鏁版嵁绛変簬鍒濆鍖栨暟缁勫ぇ灏忥紝鍒欐暟缁勯渶瑕佽繘琛屾墿瀹规搷浣 - if(elementData.length == size){ - //TODO - } - //濡傛灉娌℃湁瓒呰繃澶у皬锛屽垯鎶婁粠鎻掑叆寮濮嬬偣鐨勬暟鎹兘寰鍚庣Щ涓浣 - for (int i =size;i>index;i--){ - elementData[i] = elementData[i-1]; - } - //灏嗙幇鍦ㄨ祴鍊肩殑鏁版嵁鏀惧埌璇ヤ綅缃 - elementData[index] = o; - size++; - } - - /** - * 鑾峰彇鏁版嵁 - */ - public Object get(int index){ - if(index > elementData.length){ - return null; - } - return elementData[index]; - } - - //杩斿洖瑕佸垹闄ょ殑鏁版嵁 - public Object remove(int index){ - //瑕佽鍒犻櫎鐨勬暟鎹 - Object data = elementData[index]; - for (int i =index;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } -} diff --git a/group26/2070509107/src/main/java/com/coding/basic/List.java b/group26/2070509107/src/main/java/com/coding/basic/List.java deleted file mode 100644 index 396b1f6416..0000000000 --- a/group26/2070509107/src/main/java/com/coding/basic/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.coding.basic; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Queue.java b/group26/2070509107/src/main/java/com/coding/basic/Queue.java deleted file mode 100644 index 2fb7620fc4..0000000000 --- a/group26/2070509107/src/main/java/com/coding/basic/Queue.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.coding.basic; - -public class Queue { - - public void enQueue(Object o){ - - } - - public Object deQueue(){ - return null; - } - - public boolean isEmpty(){ - return false; - } - - public int size(){ - return -1; - } -} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Stack.java b/group26/2070509107/src/main/java/com/coding/basic/Stack.java deleted file mode 100644 index ffbd6a8148..0000000000 --- a/group26/2070509107/src/main/java/com/coding/basic/Stack.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.coding.basic; - -/** - * - * @author wuhao - * @date:2017-03-11 - * @description:鏍堢殑瀹炵幇锛屾爤鏄厛杩涘悗鍑猴紱 - * @version:1.0.0 - * - */ -public class Stack { - - private ArrayList elementData = new ArrayList(); - - /** - * 瀛樻斁鍏冪礌 - * @param o - */ - public void push(Object o){ - elementData.add(o); - } - - /** - * 寮瑰嚭鍏冪礌锛屼粠鏈鏈熬寮瑰嚭 - * @return - */ - public Object pop(){ - if(elementData.size()==0){ - return null; - } - return elementData.remove(elementData.size()-1); - } - - /** - * 鑾峰彇鏍堝畾鍏冪礌 - * @return - */ - public Object peek(){ - if(elementData.size()==0){ - return null; - } - return elementData.get(elementData.size()); - } - - /** - * 鍒ゆ柇鏄惁涓虹┖ - * @return - */ - public boolean isEmpty(){ - if(0 == elementData.size()){ - return false; - } - return true; - } - - /** - * 鏍堝ぇ灏 - * @return - */ - public int size(){ - return elementData.size(); - } - -} diff --git a/group26/2070509107/src/main/java/com/coding/basic/Test.java b/group26/2070509107/src/main/java/com/coding/basic/Test.java deleted file mode 100644 index 66c3594f62..0000000000 --- a/group26/2070509107/src/main/java/com/coding/basic/Test.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.coding.basic; - -public class Test { - public static void main(String[] args) { - List list =new ArrayList(); - list.add(1); - list.add(1); - list.add(1); - list.add(1); - list.add(1); - list.add(1); - System.out.println(list.size()); - } -} From 6aac837ee17f4d0bbbf05591a0c602611e00f0e0 Mon Sep 17 00:00:00 2001 From: em14Vito Date: Sat, 11 Mar 2017 12:44:08 +0800 Subject: [PATCH 262/646] add homework --- group23/729693763/First_Homework1/.classpath | 7 + group23/729693763/First_Homework1/.project | 17 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 11 + group23/729693763/First_Homework1/readme.md | 2 + .../src/com/danny/hw1/ArrayList.java | 117 +++++++ .../src/com/danny/hw1/BinaryTreeNode.java | 101 ++++++ .../src/com/danny/hw1/Iterator.java | 6 + .../src/com/danny/hw1/LinkedList.java | 297 ++++++++++++++++++ .../src/com/danny/hw1/List.java | 10 + .../src/com/danny/hw1/Queue.java | 25 ++ .../src/com/danny/hw1/Stack.java | 40 +++ .../src/com/danny/hw1/test/ArrayListTest.java | 80 +++++ .../danny/hw1/test/BinaryTreeNodeTest.java | 48 +++ .../com/danny/hw1/test/LinkedListTest.java | 86 +++++ .../src/com/danny/hw1/test/QueueTest.java | 47 +++ .../src/com/danny/hw1/test/StackTest.java | 54 ++++ .../src/com/danny/hw1/test/SuitTest.java | 17 + .../729693763/homework1_demo/ArrayList.java | 32 ++ .../homework1_demo/BinaryTreeNode.java | 32 ++ .../729693763/homework1_demo/Iterator.java | 7 + .../729693763/homework1_demo/LinkedList.java | 124 ++++++++ group23/729693763/homework1_demo/List.java | 9 + group23/729693763/homework1_demo/Queue.java | 19 ++ group23/729693763/homework1_demo/Stack.java | 22 ++ group23/729693763/readme.md | 1 + 26 files changed, 1213 insertions(+) create mode 100644 group23/729693763/First_Homework1/.classpath create mode 100644 group23/729693763/First_Homework1/.project create mode 100644 group23/729693763/First_Homework1/.settings/org.eclipse.core.resources.prefs create mode 100644 group23/729693763/First_Homework1/.settings/org.eclipse.jdt.core.prefs create mode 100644 group23/729693763/First_Homework1/readme.md create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/ArrayList.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/BinaryTreeNode.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/Iterator.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/LinkedList.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/List.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/Queue.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/Stack.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/ArrayListTest.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/BinaryTreeNodeTest.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/LinkedListTest.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/QueueTest.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/StackTest.java create mode 100644 group23/729693763/First_Homework1/src/com/danny/hw1/test/SuitTest.java create mode 100644 group23/729693763/homework1_demo/ArrayList.java create mode 100644 group23/729693763/homework1_demo/BinaryTreeNode.java create mode 100644 group23/729693763/homework1_demo/Iterator.java create mode 100644 group23/729693763/homework1_demo/LinkedList.java create mode 100644 group23/729693763/homework1_demo/List.java create mode 100644 group23/729693763/homework1_demo/Queue.java create mode 100644 group23/729693763/homework1_demo/Stack.java create mode 100644 group23/729693763/readme.md diff --git a/group23/729693763/First_Homework1/.classpath b/group23/729693763/First_Homework1/.classpath new file mode 100644 index 0000000000..373dce4005 --- /dev/null +++ b/group23/729693763/First_Homework1/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group23/729693763/First_Homework1/.project b/group23/729693763/First_Homework1/.project new file mode 100644 index 0000000000..5022bfb83c --- /dev/null +++ b/group23/729693763/First_Homework1/.project @@ -0,0 +1,17 @@ + + + First_Homework1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group23/729693763/First_Homework1/.settings/org.eclipse.core.resources.prefs b/group23/729693763/First_Homework1/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/group23/729693763/First_Homework1/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/group23/729693763/First_Homework1/.settings/org.eclipse.jdt.core.prefs b/group23/729693763/First_Homework1/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..3a21537071 --- /dev/null +++ b/group23/729693763/First_Homework1/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group23/729693763/First_Homework1/readme.md b/group23/729693763/First_Homework1/readme.md new file mode 100644 index 0000000000..219dee010b --- /dev/null +++ b/group23/729693763/First_Homework1/readme.md @@ -0,0 +1,2 @@ +It contain source code and Test file by JUnit, +you can run SuitTest for testing whole file. diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/ArrayList.java b/group23/729693763/First_Homework1/src/com/danny/hw1/ArrayList.java new file mode 100644 index 0000000000..ccb3bcb12c --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/ArrayList.java @@ -0,0 +1,117 @@ +package com.danny.hw1; + +import java.lang.reflect.Array; +import java.util.Arrays; + +import javax.print.attribute.Size2DSyntax; + +public class ArrayList implements List{ + //ArrayList Size + private int size=0; + private int array_len=2; + + //total element in here + private Object[] elementData = new Object[array_len]; + + @Override + public void add(Object o) { + // TODO Auto-generated method stub + adjustCapacity(); + this.elementData[size++] = o; + } + + @Override + public void add(int index, Object o) { + // TODO Auto-generated method stub + //Check range. if index is invalid,then would not add anythings + rangeCheckForAdd(index); + + adjustCapacity(); + System.arraycopy(elementData, index, elementData, + index + 1,size - index); + this.elementData[index] = o; + this.size++; + + } + + @Override + public Object get(int index) { + // TODO Auto-generated method stub + rangeCheckExist(index); + + return elementData[index]; + + } + + @Override + public Object remove(int index) { + // TODO Auto-generated method stub + rangeCheckExist(index); + + Object oldValue = elementData[index]; + //deal with copy operation + int moveStep = size - index - 1; + if ( moveStep > 0 ) + System.arraycopy(elementData, index+1, elementData, index,moveStep); + elementData[--size] = null; // clear to let GC do its work + + return oldValue; + + } + + @Override + public int size() { + // TODO Auto-generated method stub + return this.size; + } + + //Get Iterator + public Iterator iterator() { + return new ArrayListIterator(); + } + + /******* Iterator *******/ + private class ArrayListIterator implements Iterator{ + + private int currentIndex = 0; + + @Override + public boolean hasNext() { + return currentIndex < size(); + } + + @Override + public Object next() { + rangeCheckExist(currentIndex); + + return elementData[currentIndex++]; + } + } + + + /*******Inner function*******/ + //Increase arraylist size + private void adjustCapacity(){ + //array length can not satisfy data size; + if ( this.array_len < size() + 1 ) { + this.array_len *= 2; + this.elementData = Arrays.copyOf(elementData, array_len); + } else { + return ; + } + } + + private void rangeCheckForAdd(int index) { + //Add operation is allow to add value in [ size() ] even if [ size() ] has not data + if ( index > size() || index < 0 ) + throw new IndexOutOfBoundsException("Invalid Adding Index:"+index); + } + private void rangeCheckExist(int index) { + if ( index >= size() || index < 0 ) + throw new IndexOutOfBoundsException("Invalid Index:"+index); + } + + + + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/BinaryTreeNode.java b/group23/729693763/First_Homework1/src/com/danny/hw1/BinaryTreeNode.java new file mode 100644 index 0000000000..8e3178b50b --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/BinaryTreeNode.java @@ -0,0 +1,101 @@ +package com.danny.hw1; + +import java.util.Map; +import java.util.TreeMap; + +public class BinaryTreeNode { + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode insert(Object o){ + if ( this.data == null && left == null && right == null ) { + this.data = o; + return this; + } else { + BinaryTreeNode temp = findNode(this, o); + + BinaryTreeNode newNode = new BinaryTreeNode(); + newNode.data = o; + //assert more than one null node in the temp(left,right,or both); + if ( temp.compareTo(o) >= 0 ) { + temp.left = newNode; + } else { + temp.right = newNode; + } + return newNode; + } + } + + public BinaryTreeNode() { + // TODO Auto-generated constructor stub + data=null; + left =null; + right = null; + + } + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + private int compareTo(Object o){ + // o1 > o2 == 1; o1 = o2 == 0 ; o1 < o2 == -1 + //鍋囪杩欎釜姣旇緝鐜板湪鍙敤鍦ㄦ暟瀛椾笂 + return Integer.parseInt(this.data.toString()) - Integer.parseInt(o.toString()); + } + + private static BinaryTreeNode findNode(BinaryTreeNode root,Object o){ + if ( root.left == null && root.right == null || + ( root.compareTo(o) < 0 && root.right == null) || + ( root.compareTo(o) >= 0 && root.left == null) ){ + return root; + } else if ( root.compareTo(o) >= 0 ) { + //root data is bigger than object + return findNode(root.left, o); + } else { + return findNode(root.right, o); + } +// else if(root.compareTo(o) < 0 ){ +// return findNode(root.right, o); +// } +// + } + + //For Test value + private Map teMap = new TreeMap<>(); + public void printWholeTree(BinaryTreeNode root,int layer){ + if(root == null) { + return ; + } + teMap.put(root.data,layer); + + layer++; + printWholeTree(root.left,layer); + printWholeTree(root.right,layer); + + } + + public Map getTeMap() { + return teMap; + } + + public void setTeMap(Map teMap) { + this.teMap = teMap; + } +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/Iterator.java b/group23/729693763/First_Homework1/src/com/danny/hw1/Iterator.java new file mode 100644 index 0000000000..b1ff654263 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/Iterator.java @@ -0,0 +1,6 @@ +package com.danny.hw1; + +public interface Iterator { + public boolean hasNext(); + public Object next(); +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/LinkedList.java b/group23/729693763/First_Homework1/src/com/danny/hw1/LinkedList.java new file mode 100644 index 0000000000..445cef7686 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/LinkedList.java @@ -0,0 +1,297 @@ +package com.danny.hw1; + +public class LinkedList implements List{ + + private Node Head = null; + private Node Tail = null; + private int size = 0; + + @Override + public void add(Object o) { + // TODO Auto-generated method stub + addLastNode(o); + } + + @Override + public void add(int index, Object o) { + // TODO Auto-generated method stub + checkPositionIndex(index); + + if ( index == size() ){ + addLastNode(o); + } else { + addBeforeNode(index,o); + } + } + + @Override + public Object get(int index) { + // TODO Auto-generated method stub + checkElementIndex(index); + + Node findGetNode = findIndexNode(index); + return findGetNode.data; + } + + @Override + public Object remove(int index) { + // TODO Auto-generated method stub + checkElementIndex(index); + Node deleteNode = null; + + //delete all node + if ( size() == 1 ) { + this.Head = null; + this.Tail = null; + } + + //Remove Head + if ( index == 0 ) { + deleteNode = this.Head; + this.Head = this.Head.next; + } else if ( index == size() - 1) { + //Remove Tail + deleteNode = this.Tail; + Node findDeleteNode = findIndexNode(index - 1); + findDeleteNode.next = null; + this.Tail = findDeleteNode; + } else { + //Remove Mid + Node findDeleteNode = findIndexNode(index - 1); + deleteNode = findDeleteNode.next; + findDeleteNode.next = findDeleteNode.next.next; + } + this.size--; + return deleteNode.data; + } + + @Override + public int size() { + // TODO Auto-generated method stub + return this.size; + } + + @Override + public Iterator iterator(){ + return new LinkedListIterator(); + } + + /************Other function (without Interface function)**************/ + + public void addFirst(Object o){ + Node newNode = new Node(); + newNode.data = o; + newNode.next = this.Head; + this.Head = newNode; + } + + public Object removeFirst(){ + checkElementIndex(0); + + Node deleteNode = this.Head; + this.Head = this.Head.next; + + this.size--; + return deleteNode.data; + } + + public Object removeLast(){ + checkElementIndex(size() - 1); + + Node deleteNode = this.Tail; + if ( this.Head == this.Tail ) { + this.Head = this.Tail = null; + } else { + this.Tail = findIndexNode(size() - 2); + } + this.size--; + return deleteNode.data; + + } + /************Iterator**************/ + private class LinkedListIterator implements Iterator{ + private Node currentNode; + private int currentIndex; + + public LinkedListIterator() { + // TODO Auto-generated constructor stub + this.currentIndex = 0; + this.currentNode = new Node(); + } + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return currentIndex < size(); + } + + @Override + public Object next() { + // TODO Auto-generated method stub + checkElementIndex(currentIndex); + if ( currentNode.data == null ) { + this.currentNode = findIndexNode(currentIndex); + } + Object value = currentNode.data; + currentNode = currentNode.next; + currentIndex++; + return value; + } + } + + /************Node class for supporting LinkedList**************/ + private static class Node{ + Object data ; + Node next ; + public Node() { + // TODO Auto-generated constructor stub + data = null; + next = null; + } + } + + /************Inner function **************/ + private void checkPositionIndex(int index){ + if ( !( index >= 0 && index <= size ) ) + throw new IndexOutOfBoundsException("Invalid Index:"+index); + } + + private void checkElementIndex(int index){ + if ( !( index >= 0 && index < size ) ) + throw new IndexOutOfBoundsException("Invalid Index:"+index); + } + + private void addLastNode(Object o){ + Node newNode = new Node(); + newNode.data = o; + + if ( this.Head == null ) { + this.Head = newNode; + this.Tail = newNode; + } else { + if(this.Head == this.Tail ){ + this.Tail = newNode; + this.Head.next = this.Tail; + } + else{ + //Tail and Head are different Object, + this.Tail.next = newNode; + this.Tail = newNode; + } + } + this.size++; + } + + private void addBeforeNode(int index,Object o){ + Node newNode = new Node(); + Node beforeInserNode = this.Head; + newNode.data = o; + + // if index is in Head + if ( index == 0 ) { + newNode.next = this.Head; + this.Head = newNode; + } else { + for (int i=0; i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 +// */ +//public void reverse(){ +// +//} +// +///** +// * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 +// * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 +// * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 +// +// */ +//public void removeFirstHalf(){ +// +//} +// +///** +// * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 +// * @param i +// * @param length +// */ +//public void remove(int i, int length){ +// +//} +///** +// * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 +// * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 +// * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 +// * listB = 1->3->4->6 +// * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] +// * @param list +// */ +//public static int[] getElements(LinkedList list){ +// return null; +//} +// +///** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 +// +// * @param list +// */ +// +//public void subtract(LinkedList list){ +// +//} +// +///** +// * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 +// */ +//public void removeDuplicateValues(){ +// +//} +// +///** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 +// * @param min +// * @param max +// */ +//public void removeRange(int min, int max){ +// +//} +// +///** +// * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 +// * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 +// * @param list +// */ +//public LinkedList intersection( LinkedList list){ +// return null; +//} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/List.java b/group23/729693763/First_Homework1/src/com/danny/hw1/List.java new file mode 100644 index 0000000000..e71a86c78d --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/List.java @@ -0,0 +1,10 @@ +package com.danny.hw1; + +public interface List { + void add(Object o); + void add(int index,Object o); + Object get(int index); + Object remove(int index); + int size(); + Iterator iterator(); +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/Queue.java b/group23/729693763/First_Homework1/src/com/danny/hw1/Queue.java new file mode 100644 index 0000000000..58f957dd31 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/Queue.java @@ -0,0 +1,25 @@ +package com.danny.hw1; + +public class Queue { + private LinkedList elementData = new LinkedList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + if ( size() > 0 ) { + return elementData.remove(0); + } else { + throw new IndexOutOfBoundsException("Queue is Null"); + } + } + + public boolean isEmpty(){ + return size() == 0; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/Stack.java b/group23/729693763/First_Homework1/src/com/danny/hw1/Stack.java new file mode 100644 index 0000000000..165387695b --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/Stack.java @@ -0,0 +1,40 @@ +package com.danny.hw1; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + this.elementData.add(o); + + } + + public Object pop(){ + int size = this.elementData.size(); + + if ( size > 0 ) { + return this.elementData.remove(size - 1 ); + } else{ + throw new IndexOutOfBoundsException("Stack is empty"); + } + } + + public Object peek(){ + + if ( size() > 0 ) { + return this.elementData.get(size() - 1 ); + } else{ + throw new IndexOutOfBoundsException("Stack is empty"); + } + } + public boolean isEmpty(){ + return size() == 0; + } + + public int size(){ + return this.elementData.size(); + } + + public Stack() { + // TODO Auto-generated constructor stub + } +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/ArrayListTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/ArrayListTest.java new file mode 100644 index 0000000000..de4c734eb8 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/ArrayListTest.java @@ -0,0 +1,80 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import java.lang.reflect.Array; +import java.lang.reflect.Parameter; +import java.util.Arrays; +import java.util.Collection; + +import javax.print.attribute.standard.RequestingUserName; +import javax.xml.crypto.Data; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.danny.hw1.ArrayList; +import com.danny.hw1.Iterator; +import com.danny.hw1.test_al; + +import junit.extensions.TestSetup; + + +public class ArrayListTest { + + static Object[] Data = new Object[]{1,2,3,4,5,6,7,8}; + ArrayList test; + @Before + public void setUp() throws Exception{ + test = new ArrayList(); + for(Object data: Data){ + test.add(data); + } + } + + @Test + public void testAddObject() { + int len = test.size(); + test.add(10); + assertEquals(len, test.size()-1); + } + + @Test + public void testAddIntObject() { + int len = test.size(); + test.add(len, 10); + + assertEquals(len, test.size()-1); + } + + @Test + public void testGet() { + assertEquals(Data[3], test.get(3)); + } + + @Test + public void testRemove() { + assertEquals(Data[4], test.remove(4)); + assertEquals(Data.length-1, test.size()); + } + + @Test + public void testSize() { + assertEquals(Data.length, test.size()); + } + + @Test + public void testIterator() { + Iterator iterator =test.iterator(); + for(Object i:Data){ + if(iterator.hasNext()){ + assertEquals(i,iterator.next()); + } + } + } + + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/BinaryTreeNodeTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..2d99534098 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/BinaryTreeNodeTest.java @@ -0,0 +1,48 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.danny.hw1.BinaryTreeNode; +import com.danny.hw1.LinkedList; + +public class BinaryTreeNodeTest { + + static Object[] Data = new Object[]{5,10,3,2,15,12,56,8}; + BinaryTreeNode test; + @Before + public void setUp() throws Exception{ + test = new BinaryTreeNode(); + for(Object data: Data){ + test.insert(data); + + } + } + @Test + public void testPrintWholeTree(){ + test.printWholeTree(test, 1); + int layer = 1; + int printNum = 0; + System.out.println("var {5,10,3,2,15,12,56,8} insert tree\n"+"Print binary tree:"); + while(true){ + if(printNum == test.getTeMap().size()) break; + for (Object key : test.getTeMap().keySet()) { + Integer value = test.getTeMap().get(key); + + if (value.intValue() == layer){ + System.out.print(key.toString()+" "); + printNum++; + } + + } + System.out.println(""); + layer++; + } + + + } + + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/LinkedListTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/LinkedListTest.java new file mode 100644 index 0000000000..ab49d2823c --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/LinkedListTest.java @@ -0,0 +1,86 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.danny.hw1.ArrayList; +import com.danny.hw1.Iterator; +import com.danny.hw1.LinkedList; + +public class LinkedListTest { + + static Object[] Data = new Object[]{1,2,3,4,5,6,7,8}; + LinkedList test; + @Before + public void setUp() throws Exception{ + test = new LinkedList(); + for(Object data: Data){ + test.add(data); + } + } + + @Test + public void testAddObject() { + int len = test.size(); + test.add(10); + assertEquals(len, test.size()-1); + } + + @Test + public void testAddIntObject() { + int len = test.size(); + test.add(len, 10); + + assertEquals(len, test.size()-1); + } + + @Test + public void testGet() { + assertEquals(Data[3], test.get(3)); + } + + @Test + public void testRemove() { + System.out.println(Data[4]); + assertEquals(Data[4], test.remove(4)); + assertEquals(Data.length -1, test.size()); + } + + @Test + public void testSize() { + assertEquals(Data.length, test.size()); + } + + @Test + public void testIterator() { + Iterator iterator =test.iterator(); + for(Object i:Data){ + if(iterator.hasNext()){ + assertEquals(i,iterator.next()); + } + } + } + + @Test + public void testAddFirst() { + test.addFirst(10); + assertEquals(10, test.get(0)); + } + + @Test + public void testRemoveFirst() { + Object ans=test.get(0); + assertEquals(ans,test.removeFirst()); + assertEquals(Data.length-1,test.size()); + } + + @Test + public void testRemoveLast() { + Object ans=test.get(Data.length - 1); + assertEquals(ans,test.removeLast()); + assertEquals(Data.length-1,test.size()); + } + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/QueueTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/QueueTest.java new file mode 100644 index 0000000000..7292129e95 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/QueueTest.java @@ -0,0 +1,47 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.danny.hw1.LinkedList; +import com.danny.hw1.Queue; + +public class QueueTest { + + static Object[] Data = new Object[]{1,2,3,4,5,6,7,8}; + Queue test; + @Before + public void setUp() throws Exception{ + test = new Queue(); + for(Object data: Data){ + test.enQueue(data); + } + } + + @Test + public void testEnQueue() { + Object t=10; + test.enQueue(t); + assertEquals(Data.length+1,test.size()); + } + + @Test + public void testDeQueue() { + Object t=test.deQueue(); + assertEquals(Data.length-1,test.size()); + assertEquals(Data[0], t); + } + @Test + public void testIsEmpty() { + assertFalse(test.isEmpty()); + } + + @Test + public void testSize() { + assertEquals(Data.length,test.size()); + } + + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/StackTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/StackTest.java new file mode 100644 index 0000000000..11484c0043 --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/StackTest.java @@ -0,0 +1,54 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.danny.hw1.Queue; +import com.danny.hw1.Stack; + +public class StackTest { + + static Object[] Data = new Object[]{1,2,3,4,5,6,7,8}; + Stack test; + @Before + public void setUp() throws Exception{ + test = new Stack(); + for(Object data: Data){ + test.push(data); + } + } + + @Test + public void testPush() { + Object t=10; + test.push(t); + assertEquals(Data.length+1,test.size()); + } + + @Test + public void testPop() { + assertEquals(Data[Data.length-1], test.pop()); + assertEquals(Data.length-1, test.size()); + } + + @Test + public void testPeek() { + assertEquals(Data[Data.length-1], test.peek()); + assertEquals(Data.length, test.size()); + } + + @Test + public void testIsEmpty() { + assertFalse(test.isEmpty()); + } + + @Test + public void testSize() { + assertEquals(Data.length, test.size()); + } + + + +} diff --git a/group23/729693763/First_Homework1/src/com/danny/hw1/test/SuitTest.java b/group23/729693763/First_Homework1/src/com/danny/hw1/test/SuitTest.java new file mode 100644 index 0000000000..25eb57411b --- /dev/null +++ b/group23/729693763/First_Homework1/src/com/danny/hw1/test/SuitTest.java @@ -0,0 +1,17 @@ +package com.danny.hw1.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@Suite.SuiteClasses({ArrayListTest.class,BinaryTreeNodeTest.class, + LinkedListTest.class,QueueTest.class,StackTest.class + }) +public class SuitTest { + +} diff --git a/group23/729693763/homework1_demo/ArrayList.java b/group23/729693763/homework1_demo/ArrayList.java new file mode 100644 index 0000000000..1f185736f9 --- /dev/null +++ b/group23/729693763/homework1_demo/ArrayList.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group23/729693763/homework1_demo/BinaryTreeNode.java b/group23/729693763/homework1_demo/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group23/729693763/homework1_demo/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group23/729693763/homework1_demo/Iterator.java b/group23/729693763/homework1_demo/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group23/729693763/homework1_demo/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group23/729693763/homework1_demo/LinkedList.java b/group23/729693763/homework1_demo/LinkedList.java new file mode 100644 index 0000000000..4fdb03db8a --- /dev/null +++ b/group23/729693763/homework1_demo/LinkedList.java @@ -0,0 +1,124 @@ +package com.coding.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group23/729693763/homework1_demo/List.java b/group23/729693763/homework1_demo/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group23/729693763/homework1_demo/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group23/729693763/homework1_demo/Queue.java b/group23/729693763/homework1_demo/Queue.java new file mode 100644 index 0000000000..36e516e266 --- /dev/null +++ b/group23/729693763/homework1_demo/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group23/729693763/homework1_demo/Stack.java b/group23/729693763/homework1_demo/Stack.java new file mode 100644 index 0000000000..a5a04de76d --- /dev/null +++ b/group23/729693763/homework1_demo/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} diff --git a/group23/729693763/readme.md b/group23/729693763/readme.md new file mode 100644 index 0000000000..25bc95c472 --- /dev/null +++ b/group23/729693763/readme.md @@ -0,0 +1 @@ +Data Struct contain: ArrayList, LinkedList, BinaryTreeNode, Stack, Queue, Iterator From a9ad5cb019ca0458d738d3deea3905a701a02b9d Mon Sep 17 00:00:00 2001 From: "kaitao.li" Date: Sat, 11 Mar 2017 12:49:07 +0800 Subject: [PATCH 263/646] =?UTF-8?q?linkedList=20=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/coding2017/week3/LinkedList.java | 312 ++++++++++++++++-- .../week3/download/DownloadThread.java | 8 +- .../week3/download/FileDownloader.java | 6 +- .../week3/download/api/Connection.java | 6 +- .../week3/download/api/ConnectionManager.java | 2 +- .../week3/download/api/DownloadListener.java | 3 +- .../week3/download/impl/ConnectionImpl.java | 4 +- .../com/coding2017/week3/LinkedListTest.java | 131 ++++++++ 8 files changed, 436 insertions(+), 36 deletions(-) create mode 100644 group01/280646174/basic/src/test/java/com/coding2017/week3/LinkedListTest.java diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java index 59c399af25..764299b7d1 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/LinkedList.java @@ -7,57 +7,210 @@ public class LinkedList implements List { private Node head; - public void add(Object o) { + private Node tail; + + private int size; + + public LinkedList() { + } + public static LinkedList of(Object... objects) { + LinkedList linkedList = new LinkedList(); + for (int i = 0; i < objects.length; i++) { + linkedList.add(objects[i]); + } + return linkedList; + } + + public void add(Object o) { + addLast(o); } public void add(int index, Object o) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + if (index == size) { + addLast(o); + } else if (index == 0) { + addFirst(o); + } else { + Node node = new Node(o); + Node prevNode = getNode(index - 1); + Node nextNode = prevNode.next; + prevNode.next = node; + node.prev = prevNode; + nextNode.prev = node; + node.next = nextNode; + size++; + } + } + private Node getNode(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + Node node = head; + for (int j = 0; j < index; j++) { + node = node.next; + } + return node; } public Object get(int index) { - return null; + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + return getNode(index).data; } public Object remove(int index) { - return null; + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + + if (index == 0) { + return removeFirst(); + } else if (index == size - 1) { + return removeLast(); + } else { + Node node = getNode(index); + node.prev.next = node.next; + node.next.prev = node.prev; + size--; + return node.data; + } } public int size() { - return -1; + return size; } public void addFirst(Object o) { - + Node node = new Node(o); + if (size == 0) { + head = node; + tail = node; + } else { + head.prev = node; + node.next = head; + head = node; + } + size++; } public void addLast(Object o) { - + if (size == 0) { + addFirst(o); + } else { + Node node = new Node(o); + tail.next = node; + node.prev = tail; + tail = node; + size++; + } } public Object removeFirst() { - return null; + if (size == 0) { + throw new IndexOutOfBoundsException(); + } + Node node = head; + if (size == 1) { + head = null; + tail = null; + size--; + } else { + head.next.prev = null; + head = head.next; + size--; + } + return node.data; } public Object removeLast() { - return null; + if (size == 0) { + throw new IndexOutOfBoundsException(); + } + if (size == 1) { + return removeFirst(); + } + Node node = tail; + tail.prev.next = null; + tail = tail.prev; + size--; + return node.data; } public Iterator iterator() { - return null; + return new LinkedListIterator(); + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder("["); + if (size > 0) { + builder.append(get(0)); + } + for (Node node = head.next; node != null; node = node.next) { + builder.append(", ").append(node.data); + } + builder.append("]"); + return builder.toString(); } private static class Node { - Object data; - Node next; + private Object data; + private Node next; + private Node prev; + public Node() { + } + + private Node(Object data) { + this.data = data; + } } + private class LinkedListIterator implements Iterator { + private Node node; + + public LinkedListIterator() { + this.node = LinkedList.this.head; + } + + @Override + public boolean hasNext() { + return node != null; + } + + @Override + public Object next() { + Node temp = node; + node = node.next; + return temp.data; + } + } + + /******** 浣跨敤鍗曞悜閾捐〃瀹炵幇涓嬭竟鍔熻兘 *************/ /** * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ public void reverse() { - + if (size == 0 || size == 1) { + return; + } + + Node preNode = null; + Node curNode = head; + + while (curNode != null) { + Node nextNode = curNode.next; + curNode.next = preNode; + preNode = curNode; + curNode = nextNode; + } + head = preNode; } /** @@ -65,17 +218,32 @@ public void reverse() { * */ public void removeFirstHalf() { + if (size == 0 || size == 1) { + return; + } + remove(0, size / 2); } /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * - * @param i + * @param index * @param length */ - public void remove(int i, int length) { - + public void remove(int index, int length) { + assert index >= 0 && index < size; + assert index + length <= size; + + if (index == 0) { + for (int i = 0; i < length; i++) { + head = head.next; + } + } else { + Node preNode = getNode(index - 1); + preNode.next = getNode(index + length); + } + size -= length; } /** @@ -84,8 +252,20 @@ public void remove(int i, int length) { * * @param list */ - public static int[] getElements(LinkedList list) { - return null; + public int[] getElements(LinkedList list) { + int resultSize = list.size; + int[] result = new int[resultSize]; + Node node = head; + Node indexNode = list.head; + int preIndex = 0; + for (int i = 0; i < resultSize; i++) { + node = forward(node, (Integer) indexNode.data - preIndex); + result[i] = (Integer) node.data; + preIndex = (Integer) indexNode.data; + indexNode = indexNode.next; + } + + return result; } /** @@ -93,16 +273,55 @@ public static int[] getElements(LinkedList list) { * * @param list */ - public void subtract(LinkedList list) { - + Node preNode = null; + Node node = head; + Node deleteNode = list.head; + while (node != null && deleteNode != null) { + int data = (Integer) node.data; + int deleteData = (Integer) deleteNode.data; + if (data == deleteData) { + if (node == head) { + head = head.next; + node = node.next; + } else { + preNode.next = node.next; + node = node.next; + } + size--; + } else if (data > deleteData) { + deleteNode = deleteNode.next; + } else { + preNode = node; + node = node.next; + } + } } /** * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ public void removeDuplicateValues() { - + if (size == 0 || size == 1) { + return; + } + + Node curNode = head; // 褰撳墠鑺傜偣 + Node nextNode = head.next; // 鏌ユ壘涓庡綋鍓嶈妭鐐逛笉鍚岀殑鑺傜偣 + while (curNode != null) { + if (nextNode == null) { + curNode.next = null; + break; + } + if (curNode.data.equals(nextNode.data)) { + nextNode = nextNode.next; + size--; + } else { + curNode.next = nextNode; + curNode = nextNode; + nextNode = curNode.next; + } + } } /** @@ -112,7 +331,23 @@ public void removeDuplicateValues() { * @param max */ public void removeRange(int min, int max) { - + // 灏忎簬绛変簬min鐨勮妭鐐, 鍋囧畾head涔熷ぇ浜巑in + Node preNode = new Node(null); + preNode.next = head; + + Node nextNode = null; + + for (Node node = head; node != null; node = node.next) { + if ((Integer) node.data <= min) { + preNode = node; + } else if ((Integer) node.data >= max) { + nextNode = node; + break; + } + } + preNode.next = nextNode; + head = nextNode; + setSize(); } /** @@ -121,6 +356,39 @@ public void removeRange(int min, int max) { * @param list */ public LinkedList intersection(LinkedList list) { - return null; + + LinkedList result = new LinkedList(); + Node node1 = head; + Node node2 = list.head; + while (node1 != null && node2 != null) { + int data1 = (Integer) node1.data; + int data2 = (Integer) node2.data; + + if (data1 == data2) { + result.add(node1.data); + node1 = node1.next; + node2 = node2.next; + } else if (data1 < data2) { + node1 = node1.next; + } else { + node2 = node2.next; + } + } + return result; + } + + private Node forward(Node node, int step) { + for (int i = 0; i < step; i++) { + node = node.next; + } + return node; + } + + private void setSize() { + int size = 0; + for (Node node = head; node != null; node = node.next) { + size++; + } + this.size = size; } } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java index 8afb4927fa..e1118c862d 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java @@ -4,17 +4,17 @@ public class DownloadThread extends Thread { - Connection conn; - int startPos; - int endPos; + private Connection conn; + private int startPos; + private int endPos; public DownloadThread(Connection conn, int startPos, int endPos) { - this.conn = conn; this.startPos = startPos; this.endPos = endPos; } + @Override public void run() { } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java index 4368396d98..5e8c6bec52 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java @@ -7,11 +7,11 @@ public class FileDownloader { - String url; + private String url; - DownloadListener listener; + private DownloadListener listener; - ConnectionManager cm; + private ConnectionManager cm; public FileDownloader(String _url) { this.url = _url; diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java index d559af18dd..20840e9e9e 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/Connection.java @@ -10,17 +10,17 @@ public interface Connection { * @param endPos 缁撴潫浣嶇疆 * @return */ - public byte[] read(int startPos, int endPos) throws IOException; + byte[] read(int startPos, int endPos) throws IOException; /** * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 * * @return */ - public int getContentLength(); + int getContentLength(); /** * 鍏抽棴杩炴帴 */ - public void close(); + void close(); } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java index 19ee0fec0d..31a864532a 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionManager.java @@ -7,5 +7,5 @@ public interface ConnectionManager { * @param url * @return */ - public Connection open(String url) throws ConnectionException; + Connection open(String url) throws ConnectionException; } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java index ffffa4941f..a74f7b5b4d 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/DownloadListener.java @@ -1,5 +1,6 @@ package com.coding2017.week3.download.api; public interface DownloadListener { - public void notifyFinished(); + + void notifyFinished(); } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java index d61a739a74..43687a11ea 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java @@ -1,8 +1,8 @@ package com.coding2017.week3.download.impl; -import java.io.IOException; +import com.coding2017.week3.download.api.Connection; -import com.coderising.download.api.Connection; +import java.io.IOException; public class ConnectionImpl implements Connection { diff --git a/group01/280646174/basic/src/test/java/com/coding2017/week3/LinkedListTest.java b/group01/280646174/basic/src/test/java/com/coding2017/week3/LinkedListTest.java new file mode 100644 index 0000000000..2cf186f1fb --- /dev/null +++ b/group01/280646174/basic/src/test/java/com/coding2017/week3/LinkedListTest.java @@ -0,0 +1,131 @@ +package com.coding2017.week3; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Created by kaitao.li on 2017/3/11. + */ +public class LinkedListTest { + + @Test + public void testReverse() { + LinkedList list = mockEmptyList(); + list.reverse(); + assertTrue(list.size() == 0); + + list = mockOneNodeList(); + list.reverse(); + assertTrue(list.get(0).equals(1)); + assertTrue(list.size() == 1); + + list = mockThreeNodeList(); + list.reverse(); + assertTrue(list.size() == 3); + assertTrue(list.get(0).equals(3)); + assertTrue(list.get(1).equals(2)); + assertTrue(list.get(2).equals(1)); + } + + @Test + public void testRemoveFirstHalf() { + LinkedList list = new LinkedList(); + list.add(2); + list.add(5); + list.add(7); + list.add(8); + list.removeFirstHalf(); + assertTrue(list.size() == 2); + assertTrue(list.get(0).equals(7)); + assertTrue(list.get(1).equals(8)); + + list = new LinkedList(); + list.add(2); + list.add(5); + list.add(7); + list.removeFirstHalf(); + assertTrue(list.size() == 2); + assertTrue(list.get(0).equals(5)); + assertTrue(list.get(1).equals(7)); + } + + @Test + public void testRemove() { + LinkedList linkedList = mockThreeNodeList(); + linkedList.remove(1, 1); + assertTrue(linkedList.size() == 2); + assertTrue(linkedList.get(0).equals(1)); + assertTrue(linkedList.get(1).equals(3)); + } + + @Test + public void testGetElements() { + LinkedList linkedList = LinkedList.of(11, 101, 201, 301, 401, 501, 601, 701); + LinkedList indexList = LinkedList.of(1, 3, 4, 6); + int[] elements = linkedList.getElements(indexList); + assertArrayEquals(elements, new int[] { 101, 301, 401, 601 }); + } + + @Test + public void testSubtract() { + LinkedList linkedList = LinkedList.of(11, 101, 201, 301, 401, 501, 601, 701); + LinkedList deleteList = LinkedList.of(11, 201, 301, 601, 701); + linkedList.subtract(deleteList); + assertTrue(linkedList.size() == 3); + assertTrue(linkedList.get(0).equals(101)); + assertTrue(linkedList.get(1).equals(401)); + assertTrue(linkedList.get(2).equals(501)); + } + + @Test + public void testRemoveDuplicateValues() { + LinkedList linkedList = LinkedList.of(11, 101, 101, 301, 401, 401, 401, 701); + linkedList.removeDuplicateValues(); + assertTrue(linkedList.size() == 5); + assertTrue(linkedList.get(0).equals(11)); + assertTrue(linkedList.get(1).equals(101)); + assertTrue(linkedList.get(2).equals(301)); + assertTrue(linkedList.get(3).equals(401)); + assertTrue(linkedList.get(4).equals(701)); + } + + @Test + public void testRemoveRange() { + LinkedList linkedList = LinkedList.of(11, 101, 201, 301, 401, 501, 601, 701); + linkedList.removeRange(10, 601); + assertTrue(linkedList.size() == 2); + assertTrue(linkedList.get(0).equals(601)); + assertTrue(linkedList.get(1).equals(701)); + } + + @Test + public void testIntersection() { + LinkedList linkedList = LinkedList.of(1, 2, 3, 4); + LinkedList linkedList1 = LinkedList.of(2, 4, 6, 7); + LinkedList result = linkedList.intersection(linkedList1); + assertTrue(result.size() == 2); + assertTrue(result.get(0).equals(2)); + assertTrue(result.get(1).equals(4)); + } + + private LinkedList mockEmptyList() { + return new LinkedList(); + } + + private LinkedList mockOneNodeList() { + LinkedList list = new LinkedList(); + list.add(1); + return list; + } + + private LinkedList mockThreeNodeList() { + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(3); + return list; + } + +} \ No newline at end of file From c4e4c7cac831ab671dce51493c4091259471433c Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Sat, 11 Mar 2017 13:08:44 +0800 Subject: [PATCH 264/646] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1515345281/src/Collection/ArrayList.java | 137 +++++++++--------- group26/zhuakuang2017/Main.java | 5 - .../src/zhuakuang/homework/first/Main.java | 7 + 3 files changed, 76 insertions(+), 73 deletions(-) delete mode 100644 group26/zhuakuang2017/Main.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java diff --git a/group26/1515345281/src/Collection/ArrayList.java b/group26/1515345281/src/Collection/ArrayList.java index 0b6d000669..017fac67e2 100644 --- a/group26/1515345281/src/Collection/ArrayList.java +++ b/group26/1515345281/src/Collection/ArrayList.java @@ -1,72 +1,73 @@ package Collection; public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData = new Object[100]; - - public void add(Object o){ - - if(o==null) - throw new RuntimeException("鎻掑叆鐨勫间笉鑳戒负null"); - if((size+1)>=100){ - throw new RuntimeException("鏁扮粍瓒婄晫寮傚父"); - } - elementData[size]=o; - size++; - } - - public void add(int index, Object o){ - - for(int i=index;i=size) - throw new RuntimeException("绱㈠紩寮傚父"); - return elementData[index]; - } - - public Object remove(int index){ - - if(index<0 || index>=size) - throw new RuntimeException("绱㈠紩寮傚父"); - Object temp=elementData[index]; - for(int i=index;i= 100) { + throw new RuntimeException("鏁扮粍瓒婄晫寮傚父"); + } + elementData[size] = o; + size++; + } + + public void add(int index, Object o) { + + for (int i = index; i < size; i++) { + elementData[i + 1] = elementData[i]; + } + elementData[index] = o; + } + + public Object get(int index) { + + if (index < 0 || index >= size) + throw new RuntimeException("绱㈠紩寮傚父"); + return elementData[index]; + } + + public Object remove(int index) { + + if (index < 0 || index >= size) + throw new RuntimeException("绱㈠紩寮傚父"); + Object temp = elementData[index]; + for (int i = index; i < size - 1; i++) { + elementData[i] = elementData[i + 1]; + } + return temp; + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new Itr(); + } + + private class Itr implements Iterator { + + private int cursor = 0; + + @Override + public boolean hasNext() { + + return cursor != size; + } + + @Override + public Object next() { + int i = cursor; + cursor = i + 1; + return elementData[i]; + } + + } + } diff --git a/group26/zhuakuang2017/Main.java b/group26/zhuakuang2017/Main.java deleted file mode 100644 index 0ef0803b17..0000000000 --- a/group26/zhuakuang2017/Main.java +++ /dev/null @@ -1,5 +0,0 @@ -package zhuakuang2017; - -public class Main { - -} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java new file mode 100644 index 0000000000..9f3d7e846c --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java @@ -0,0 +1,7 @@ +package zhuakuang.homework.first; + +public class Main { + public static void main(String[] args) { + System.out.println(1); + } +} From 75187455398c950ebf8f271c34a9941481f6b7c7 Mon Sep 17 00:00:00 2001 From: zheng <765324639@qq.com> Date: Sat, 11 Mar 2017 15:35:53 +0800 Subject: [PATCH 265/646] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/zavier/week01/basic/LinkedList.java | 226 ++++++++++++++++++ .../zavier/week01/test/LinkedListTest.java | 150 ++++++++++++ .../coderising/download/DownloadThread.java | 44 ++++ .../coderising/download/FileDownloader.java | 87 +++++++ .../download/FileDownloaderTest.java | 62 +++++ .../coderising/download/api/Connection.java | 26 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 11 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 64 +++++ .../download/impl/ConnectionManagerImpl.java | 14 ++ 11 files changed, 694 insertions(+) create mode 100644 group01/765324639/src/zavier/week03/coderising/download/DownloadThread.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/FileDownloader.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/FileDownloaderTest.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/api/Connection.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/api/ConnectionException.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/api/ConnectionManager.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/api/DownloadListener.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionImpl.java create mode 100644 group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group01/765324639/src/zavier/week01/basic/LinkedList.java b/group01/765324639/src/zavier/week01/basic/LinkedList.java index c876b48f1b..5f2a191739 100644 --- a/group01/765324639/src/zavier/week01/basic/LinkedList.java +++ b/group01/765324639/src/zavier/week01/basic/LinkedList.java @@ -145,4 +145,230 @@ private static class Node { next = null; } } + + // =========================绗笁鍛ㄤ綔涓========================= + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node reverseNode = null; + while (head != null) { + Node temp = head; + head = head.next; + temp.next = reverseNode; + reverseNode = temp; + } + head = reverseNode; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + int newStartIndex = size / 2; + for (int i = 0; i < newStartIndex; i++) { + head = head.next; + } + size = size - newStartIndex; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (i < 0) { + throw new IllegalArgumentException(); + } + if (i + length >= size) { + length = size - i; + } + + if (i == 0) { + for (int j = 0; j < length; j++) { + head = head.next; + } + } else { + Node beforeRemoveStartNode = head; + for (int j = 0; j < i - 1; j++) { + beforeRemoveStartNode = beforeRemoveStartNode.next; + } + + Node removeEndNode = beforeRemoveStartNode; + for (int j = 0; j < length; j++) { + removeEndNode = removeEndNode.next; + } + + beforeRemoveStartNode.next = removeEndNode.next; + } + + size = size - length; + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + checkList(list); + + int[] dest = new int[list.size]; + int arrayNum = 0; + Node temp = head; + int n = (int) list.get(0); + for (int i = 0; i < n; i++) { + temp = temp.next; + } + dest[arrayNum++] = (int) temp.data; + + for (int i = 1; i < list.size; i++) { + int num = (int) list.get(i) - (int) list.get(i - 1); + for (int j = 0; j < num; j++) { + temp = temp.next; + } + dest[arrayNum++] = (int) temp.data; + } + return dest; + } + + private void checkList(LinkedList list) { + for (int i = 0; i < list.size; i++) { + if ((int) list.get(i) < 0 || (int) list.get(i) >= size) { + throw new IllegalArgumentException("list涓殑鍏冪礌浣嶇疆瓒婄晫"); + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + if (list == null || list.size == 0 || this.size == 0) { + return; + } + + int thisIndex = 0; + int listIndex = 0; + Node temp = head; + while (true) { // 鍚庣画闇瑕佷紭鍖栨浛鎹emove()鏂规硶 + if ((int) temp.data < (int) list.get(listIndex)) { + temp = temp.next; + thisIndex++; + } else if ((int) temp.data == (int) list.get(listIndex)) { + this.remove(thisIndex); + temp = temp.next; + thisIndex++; + listIndex++; + } else { + listIndex++; + } + + if (thisIndex >= this.size || listIndex >= list.size) { + break; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + if (this.size == 0) { + return; + } + + Node subHead = head; + Node subTail = head; + + while (true) { + if (subTail == null) { + break; + } + if ((int) subTail.data == (int) subHead.data) { + if (!(subTail == subHead)) { // 鍒ゆ柇涓や釜鎸囬拡鏄惁鎸囧悜鍚屼竴涓湴鏂 + this.size--; + } + subTail = subTail.next; + } else { + subHead.next = subTail; + subHead = subHead.next; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if (this.size == 0) { + return; + } + + if ((int) head.data > max) { + throw new IllegalArgumentException(); + } + + int length = 0; + Node subList = new Node(null); + Node temp = subList; + while (true) { + if (head == null) { + break; + } + if ((int) head.data <= min || (int) head.data >= max) { + temp.next = head; + temp = temp.next; + length++; + } + head = head.next; + } + temp.next = null; // 鍘绘帀灏鹃儴澶氫綑鏁版嵁 + head = subList.next; + size = length; + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + if (this.size == 0 || list.size == 0) { + return null; + } + + Node tempHead = head; + int listIndex = 0; + + LinkedList newList = new LinkedList(); + while (true) { + if (tempHead == null || listIndex >= list.size) { + break; + } + + if ((int) tempHead.data < (int) list.get(listIndex)) { + tempHead = tempHead.next; + } else if ((int) tempHead.data > (int) list.get(listIndex)) { + listIndex++; + } else { + newList.add(tempHead.data); + + tempHead = tempHead.next; + listIndex++; + } + } + + return newList; + } } diff --git a/group01/765324639/src/zavier/week01/test/LinkedListTest.java b/group01/765324639/src/zavier/week01/test/LinkedListTest.java index de7436a350..ea1f077704 100644 --- a/group01/765324639/src/zavier/week01/test/LinkedListTest.java +++ b/group01/765324639/src/zavier/week01/test/LinkedListTest.java @@ -106,4 +106,154 @@ public void testRemoveLast() { Assert.assertEquals(498, linkedList.size()); } + // =========================绗笁鍛ㄤ綔涓========================= + + @Test + public void testReverse() { + linkedList.reverse(); + for (int i = 0; i < linkedList.size(); i++) { + Assert.assertEquals(499 - i, linkedList.get(i)); + } + Assert.assertEquals(500, linkedList.size()); + } + + @Test + public void testRemoveFirstHalfOfEven() { + linkedList.removeFirstHalf(); + for (int i = 250; i < 500; i++) { + Assert.assertEquals(i, linkedList.get(i - 250)); + } + Assert.assertEquals(250, linkedList.size()); + } + + @Test + public void testRemoveFirstHalfOfOdd() { + linkedList.add(500); + linkedList.removeFirstHalf(); + for (int i = 250; i < 501; i++) { + Assert.assertEquals(i, linkedList.get(i - 250)); + } + Assert.assertEquals(251, linkedList.size()); + } + + @Test + public void testRemoveIntInt() { + linkedList.remove(10, 10); + Assert.assertEquals(0, linkedList.get(0)); + Assert.assertEquals(20, linkedList.get(10)); + Assert.assertEquals(490, linkedList.size()); + } + + @Test(expected = IllegalArgumentException.class) + public void testIllegalIRemoveIntInt() { + linkedList.remove(-10, 10); + } + + @Test + public void testIllegalLengthRemoveIntInt() { + linkedList.remove(0, 10); + Assert.assertEquals(490, linkedList.size()); + Assert.assertEquals(10, linkedList.get(0)); + + linkedList.remove(300, 500); + Assert.assertEquals(300, linkedList.size()); + for (int i = 0; i < 300; i++) { + Assert.assertEquals(i + 10, linkedList.get(i)); + } + } + + @Test(expected = IllegalArgumentException.class) + public void testGetElements() { + LinkedList list = new LinkedList(); + list.add(5); + list.add(10); + list.add(202); + list.add(305); + Assert.assertArrayEquals(new int[] {5, 10, 202, 305}, linkedList.getElements(list)); + + Assert.assertEquals(500, linkedList.size()); + + list.add(500); + linkedList.getElements(list); + } + + @Test + public void testSubtract() { + LinkedList list1 = new LinkedList(); + list1.add(1); + list1.add(5); + list1.add(8); + list1.add(10); + LinkedList list2 = new LinkedList(); + list2.add(2); + list2.add(5); + list2.add(7); + list2.add(11); + list1.subtract(list2); + + Assert.assertEquals(1, list1.get(0)); + Assert.assertEquals(8, list1.get(1)); + Assert.assertEquals(10, list1.get(2)); + Assert.assertEquals(3, list1.size()); + } + + @Test + public void testRemoveDuplicateValues() { + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(2); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(6); + list.add(7); + list.add(7); + list.add(7); + + list.removeDuplicateValues(); + for (int i = 0; i < 7; i++) { + Assert.assertEquals(i + 1, list.get(i)); + } + Assert.assertEquals(7, list.size()); + } + + @Test + public void testRemoveRange() { + linkedList.removeRange(100, 300); + Assert.assertEquals(301, linkedList.size()); + for (int i = 0; i < 100; i++) { + Assert.assertEquals(i, linkedList.get(i)); + } + for (int i = 300; i < 500; i++) { + Assert.assertEquals(i, linkedList.get(i - 199)); + } + } + + @Test + public void testIntersection() { + LinkedList list1 = new LinkedList(); + list1.add(1); + list1.add(2); + list1.add(5); + list1.add(7); + list1.add(9); + + LinkedList list2 = new LinkedList(); + list2.add(0); + list2.add(2); + list2.add(9); + list2.add(10); + list2.add(19); + + LinkedList intersection = list1.intersection(list2); + Assert.assertNotNull(intersection); + Assert.assertEquals(2, intersection.size()); + Assert.assertEquals(2, (int) intersection.get(0)); + Assert.assertEquals(9, (int) intersection.get(1)); + + + } } diff --git a/group01/765324639/src/zavier/week03/coderising/download/DownloadThread.java b/group01/765324639/src/zavier/week03/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..f94c97b8b1 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/DownloadThread.java @@ -0,0 +1,44 @@ +package zavier.week03.coderising.download; + +import java.io.IOException; +import java.io.RandomAccessFile; + +import zavier.week03.coderising.download.api.Connection; + +public class DownloadThread extends Thread { + + Connection conn; + int startPos; + int endPos; + + + public DownloadThread(Connection conn, int startPos, int endPos) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + + } + + @Override + public void run() { + byte[] data = new byte[endPos - startPos]; + try { + data = conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + writeToFile(data); + } + + private void writeToFile(byte[] data) { + RandomAccessFile file; + try { + file = new RandomAccessFile("download20170311.jpg", "rw"); + file.seek(startPos); + file.write(data, 0, data.length); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/FileDownloader.java b/group01/765324639/src/zavier/week03/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..ff2db12f50 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/FileDownloader.java @@ -0,0 +1,87 @@ +package zavier.week03.coderising.download; + +import zavier.week03.coderising.download.api.Connection; +import zavier.week03.coderising.download.api.ConnectionException; +import zavier.week03.coderising.download.api.ConnectionManager; +import zavier.week03.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + DownloadThread downloadThread1 = new DownloadThread(conn, 0, length / 3); + downloadThread1.start(); + DownloadThread downloadThread2 = + new DownloadThread(conn, length / 3 + 1, length / 3 * 2); + downloadThread2.start(); + DownloadThread downloadThread3 = + new DownloadThread(conn, length / 3 * 2 + 1, length - 1); + downloadThread3.start(); + try { + downloadThread1.join(); + downloadThread2.join(); + downloadThread3.join(); + listener.notifyFinished(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/FileDownloaderTest.java b/group01/765324639/src/zavier/week03/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..bf67e8d494 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/FileDownloaderTest.java @@ -0,0 +1,62 @@ +package zavier.week03.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import zavier.week03.coderising.download.api.ConnectionManager; +import zavier.week03.coderising.download.api.DownloadListener; +import zavier.week03.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception {} + + @After + public void tearDown() throws Exception {} + + @Test + public void testDownload() { + + String url = "http://121.42.185.101/forum/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + new Thread() { + @Override + public void run() { + downloader.execute(); + } + }.start(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/api/Connection.java b/group01/765324639/src/zavier/week03/coderising/download/api/Connection.java new file mode 100644 index 0000000000..4763202fab --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/api/Connection.java @@ -0,0 +1,26 @@ +package zavier.week03.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionException.java b/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..5df32804de --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package zavier.week03.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionManager.java b/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..81f5f34f72 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package zavier.week03.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/api/DownloadListener.java b/group01/765324639/src/zavier/week03/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..f72ecd263d --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package zavier.week03.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionImpl.java b/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..b297beef54 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,64 @@ +package zavier.week03.coderising.download.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import zavier.week03.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private URL url = null;; + + private HttpURLConnection conn = null; + + public ConnectionImpl(String url) { + try { + this.url = new URL(url); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + try { + conn = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + conn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + InputStream inputStream = conn.getInputStream(); + byte[] result = new byte[endPos - startPos + 1]; + byte[] data = new byte[1024]; + int read = -1; + int i = 0; + while ((read = inputStream.read(data, 0, data.length)) != -1) { + System.arraycopy(data, 0, result, i, read); + i += read; + } + return result; + } + + @Override + public int getContentLength() { + HttpURLConnection openConnection = null; + try { + openConnection = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + int contentLength = openConnection.getContentLength(); + openConnection.disconnect(); + return contentLength; + } + + @Override + public void close() { + conn.disconnect(); + conn = null; + } + +} diff --git a/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionManagerImpl.java b/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..d6828e7ae8 --- /dev/null +++ b/group01/765324639/src/zavier/week03/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,14 @@ +package zavier.week03.coderising.download.impl; + +import zavier.week03.coderising.download.api.Connection; +import zavier.week03.coderising.download.api.ConnectionException; +import zavier.week03.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + return new ConnectionImpl(url); + } + +} From aca0e519c326e036b9b2f1d84ba2ef9f5865e9e7 Mon Sep 17 00:00:00 2001 From: BlindingDark Date: Fri, 10 Mar 2017 18:56:23 +0800 Subject: [PATCH 266/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ajie9608 <1778842360@qq.com> --- group26/1778842360/first heomework/.classpath | 6 + group26/1778842360/first heomework/.project | 17 ++ .../.settings/org.eclipse.jdt.core.prefs | 11 + .../first heomework/src/ArrayList.java | 149 +++++++++++++ .../first heomework/src/ArrayTest.java | 27 +++ .../first heomework/src/BinaryTreeNode.java | 34 +++ .../first heomework/src/Iterator.java | 7 + .../first heomework/src/LinkedList.java | 209 ++++++++++++++++++ .../first heomework/src/LinkedTest.java | 34 +++ .../1778842360/first heomework/src/List.java | 8 + .../1778842360/first heomework/src/Queue.java | 28 +++ .../first heomework/src/QueueTest.java | 21 ++ .../1778842360/first heomework/src/Stack.java | 35 +++ .../first heomework/src/StackTest.java | 24 ++ 14 files changed, 610 insertions(+) create mode 100644 group26/1778842360/first heomework/.classpath create mode 100644 group26/1778842360/first heomework/.project create mode 100644 group26/1778842360/first heomework/.settings/org.eclipse.jdt.core.prefs create mode 100644 group26/1778842360/first heomework/src/ArrayList.java create mode 100644 group26/1778842360/first heomework/src/ArrayTest.java create mode 100644 group26/1778842360/first heomework/src/BinaryTreeNode.java create mode 100644 group26/1778842360/first heomework/src/Iterator.java create mode 100644 group26/1778842360/first heomework/src/LinkedList.java create mode 100644 group26/1778842360/first heomework/src/LinkedTest.java create mode 100644 group26/1778842360/first heomework/src/List.java create mode 100644 group26/1778842360/first heomework/src/Queue.java create mode 100644 group26/1778842360/first heomework/src/QueueTest.java create mode 100644 group26/1778842360/first heomework/src/Stack.java create mode 100644 group26/1778842360/first heomework/src/StackTest.java diff --git a/group26/1778842360/first heomework/.classpath b/group26/1778842360/first heomework/.classpath new file mode 100644 index 0000000000..fb565a588d --- /dev/null +++ b/group26/1778842360/first heomework/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group26/1778842360/first heomework/.project b/group26/1778842360/first heomework/.project new file mode 100644 index 0000000000..88536f7819 --- /dev/null +++ b/group26/1778842360/first heomework/.project @@ -0,0 +1,17 @@ + + + first heomework + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group26/1778842360/first heomework/.settings/org.eclipse.jdt.core.prefs b/group26/1778842360/first heomework/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..7341ab1683 --- /dev/null +++ b/group26/1778842360/first heomework/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/group26/1778842360/first heomework/src/ArrayList.java b/group26/1778842360/first heomework/src/ArrayList.java new file mode 100644 index 0000000000..79c83046be --- /dev/null +++ b/group26/1778842360/first heomework/src/ArrayList.java @@ -0,0 +1,149 @@ + +//package javaTest; + +import java.util.Arrays; + +public class ArrayList { + + private Object[] elementData=new Object[2]; + int size; + //添加元素 + public void add(Object o) + { + if(sizei;x--) + { + if(x==index+1) + { + elementData[x]=t; + } + else + { + elementData[x]=elementData[x-1]; + } + + } + } + } + } + public Iterator iterator() + { + return new ArrayListIterator(this); + } + private class ArrayListIterator implements Iterator + { + ArrayList l=null; + int pos=0; + private ArrayListIterator(ArrayList l) + { + this.l=l; + } + public boolean hasNext() { + // TODO Auto-generated method stub + boolean flag=true; + pos++; + if(pos>size) + { + flag=false; + } + return flag; + } + + public Object next() { + // TODO Auto-generated method stub + + return elementData[pos-1]; + } + } + + + + +} + diff --git a/group26/1778842360/first heomework/src/ArrayTest.java b/group26/1778842360/first heomework/src/ArrayTest.java new file mode 100644 index 0000000000..4a5a9eabe5 --- /dev/null +++ b/group26/1778842360/first heomework/src/ArrayTest.java @@ -0,0 +1,27 @@ + +//package javaTest; + +public class ArrayTest { + + /** + * @param args + * 模拟ArrayList实现对元素的增删查找 + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + ArrayList a=new ArrayList(); + a.add("hello"); + a.add("java"); + a.add("world"); + a.add("hello"); + // a.add(2,"hello"); + Iterator it=a.iterator(); + while(it.hasNext()) + { + System.out.print(it.next()+" "); + } + System.out.println(a.size()); + } + +} + diff --git a/group26/1778842360/first heomework/src/BinaryTreeNode.java b/group26/1778842360/first heomework/src/BinaryTreeNode.java new file mode 100644 index 0000000000..b5e788838e --- /dev/null +++ b/group26/1778842360/first heomework/src/BinaryTreeNode.java @@ -0,0 +1,34 @@ + +//package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} + diff --git a/group26/1778842360/first heomework/src/Iterator.java b/group26/1778842360/first heomework/src/Iterator.java new file mode 100644 index 0000000000..dbb092f46e --- /dev/null +++ b/group26/1778842360/first heomework/src/Iterator.java @@ -0,0 +1,7 @@ + +public interface Iterator { + + public boolean hasNext(); + public Object next(); + +} diff --git a/group26/1778842360/first heomework/src/LinkedList.java b/group26/1778842360/first heomework/src/LinkedList.java new file mode 100644 index 0000000000..0f63676418 --- /dev/null +++ b/group26/1778842360/first heomework/src/LinkedList.java @@ -0,0 +1,209 @@ +//package com.coding.basic; + +public class LinkedList implements List { + + private Node head; + int size; + public void add(Object o){ + if(head==null) + { + head=new Node(o); + head.next=null; + head.data=o; + } + else{ + Node p=head; + { + while(p.next!=null) + { + p=p.next; + } + Node n=new Node(o); + p.next=n; + n.data=o; + n.next=null; + } + } + size++; + } + public void add(int index , Object o){ + int i=1; + Node p=head; + while(iindex) {return null;} + return p.data; + } + public Object remove(int index){ + int i=1; + Node p=head; + Object o=null; + if(index==1) + { + o=head.data; + if(head.next!=null) + { + p=head.next; + head.data=p.data; + p=head; + } + else{ + head=null; + } + } + else{ + while(i0) + { + flag=false; + } + return flag; + } + + public int size(){ + return l.size; + } +} + diff --git a/group26/1778842360/first heomework/src/QueueTest.java b/group26/1778842360/first heomework/src/QueueTest.java new file mode 100644 index 0000000000..81131511c9 --- /dev/null +++ b/group26/1778842360/first heomework/src/QueueTest.java @@ -0,0 +1,21 @@ + +//package com.coding.basic; + +public class QueueTest { + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Queue q=new Queue(); + q.enQueue("add"); + q.enQueue("world"); + int length=q.size(); + System.out.println(length); + System.out.println(q.deQueue()); + System.out.println(q.isEmpty()); + } + +} + diff --git a/group26/1778842360/first heomework/src/Stack.java b/group26/1778842360/first heomework/src/Stack.java new file mode 100644 index 0000000000..20cdba1c4b --- /dev/null +++ b/group26/1778842360/first heomework/src/Stack.java @@ -0,0 +1,35 @@ + +//package javaTest; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + //将元素压入栈 + public void push(Object o){ + elementData.add(o); + } + //将元素出栈 + public Object pop(){ + Object o=elementData.remove(elementData.size-1); + return o; + } + //获取栈顶元素 + public Object peek(){ + Object o=elementData.get(elementData.size-1); + return o; + } + //判断栈是否为空 + public boolean isEmpty(){ + boolean flag=true; + if(elementData.size>0) + { + flag=false; + } + return flag; + } + //获取栈的大小 + public int size(){ + return elementData.size; + } +} + diff --git a/group26/1778842360/first heomework/src/StackTest.java b/group26/1778842360/first heomework/src/StackTest.java new file mode 100644 index 0000000000..271ba04daf --- /dev/null +++ b/group26/1778842360/first heomework/src/StackTest.java @@ -0,0 +1,24 @@ +//package javaTest; + +public class StackTest { + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Stack s=new Stack(); + s.push("world"); + s.push("java"); + s.push("world"); + Object o1=s.peek(); + System.out.println(o1); + Object o=s.pop(); + System.out.println(o); + int size=s.size(); + System.out.println(size); + System.out.println(s.isEmpty()); + } + +} + From ac67112337be177b648af74242d19aad27e2c566 Mon Sep 17 00:00:00 2001 From: PengyuanWei Date: Sat, 11 Mar 2017 15:57:53 +0800 Subject: [PATCH 267/646] =?UTF-8?q?week01=20-=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../910725683/RemoteSystemsTempFiles/.project | 12 + group22/910725683/week01/.classpath | 8 + group22/910725683/week01/.gitignore | 4 + group22/910725683/week01/.project | 17 + .../src/com/coding/basic/ArrayList.java | 98 ++++++ .../src/com/coding/basic/BinaryTreeNode.java | 110 ++++++ .../week01/src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 327 ++++++++++++++++++ .../week01/src/com/coding/basic/List.java | 10 + .../week01/src/com/coding/basic/Queue.java | 26 ++ .../week01/src/com/coding/basic/Stack.java | 27 ++ .../test/com/coding/basic/ArrayListTest.java | 53 +++ .../com/coding/basic/BinaryTreeNodeTest.java | 47 +++ .../test/com/coding/basic/LinkedListTest.java | 137 ++++++++ .../test/com/coding/basic/QueueTest.java | 40 +++ .../test/com/coding/basic/StackTest.java | 48 +++ 16 files changed, 971 insertions(+) create mode 100644 group22/910725683/RemoteSystemsTempFiles/.project create mode 100644 group22/910725683/week01/.classpath create mode 100644 group22/910725683/week01/.gitignore create mode 100644 group22/910725683/week01/.project create mode 100644 group22/910725683/week01/src/com/coding/basic/ArrayList.java create mode 100644 group22/910725683/week01/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group22/910725683/week01/src/com/coding/basic/Iterator.java create mode 100644 group22/910725683/week01/src/com/coding/basic/LinkedList.java create mode 100644 group22/910725683/week01/src/com/coding/basic/List.java create mode 100644 group22/910725683/week01/src/com/coding/basic/Queue.java create mode 100644 group22/910725683/week01/src/com/coding/basic/Stack.java create mode 100644 group22/910725683/week01/test/com/coding/basic/ArrayListTest.java create mode 100644 group22/910725683/week01/test/com/coding/basic/BinaryTreeNodeTest.java create mode 100644 group22/910725683/week01/test/com/coding/basic/LinkedListTest.java create mode 100644 group22/910725683/week01/test/com/coding/basic/QueueTest.java create mode 100644 group22/910725683/week01/test/com/coding/basic/StackTest.java diff --git a/group22/910725683/RemoteSystemsTempFiles/.project b/group22/910725683/RemoteSystemsTempFiles/.project new file mode 100644 index 0000000000..5447a64fa9 --- /dev/null +++ b/group22/910725683/RemoteSystemsTempFiles/.project @@ -0,0 +1,12 @@ + + + RemoteSystemsTempFiles + + + + + + + org.eclipse.rse.ui.remoteSystemsTempNature + + diff --git a/group22/910725683/week01/.classpath b/group22/910725683/week01/.classpath new file mode 100644 index 0000000000..1b83178c00 --- /dev/null +++ b/group22/910725683/week01/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/group22/910725683/week01/.gitignore b/group22/910725683/week01/.gitignore new file mode 100644 index 0000000000..6a59c3a991 --- /dev/null +++ b/group22/910725683/week01/.gitignore @@ -0,0 +1,4 @@ +/bin/ +/.settings/ +.classpatch +.prject \ No newline at end of file diff --git a/group22/910725683/week01/.project b/group22/910725683/week01/.project new file mode 100644 index 0000000000..3b3c4fa7ee --- /dev/null +++ b/group22/910725683/week01/.project @@ -0,0 +1,17 @@ + + + week01 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group22/910725683/week01/src/com/coding/basic/ArrayList.java b/group22/910725683/week01/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..acc0e9f8f4 --- /dev/null +++ b/group22/910725683/week01/src/com/coding/basic/ArrayList.java @@ -0,0 +1,98 @@ +package com.coding.basic; +import java.util.Arrays; + +public class ArrayList implements List { + + //数组初始容量// + private final int DEFAULT_CAPICITY=7; + + //数组元素个数// + private int size = 0; + + private Object[] elementData = new Object[DEFAULT_CAPICITY]; + + public void add(Object o){ + ensureCapcity(size+1); + elementData[size++]=o; + } + public void add(int index, Object o){ + //index要连续的增加// + checkIndex(index); + ensureCapcity(size+1); + /* index及后面的元素左移一位,即从index开始移动,注意index从0开始, + * 即还要+1,则长度为size-((index)+1)+1 + */ + System.arraycopy(elementData, index, elementData, index+1, size-index); + elementData[index]=o; + size++; + } + + public Object get(int index){ + checkIndex(index); + return elementData[index]; + } + + public Object remove(int index){ + checkIndex(index); + Object temp=elementData[index]; + /* index后面的元素左移一位,即从index+1开始移动,注意index从0开始, + * 即还要+1,则长度为size-((index+1)+1)+1 + */ + System.arraycopy(elementData, index+1, elementData, index, size-index-1); + size--; + return temp; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new Iterator(); + } + + private class Iterator{ + private int index=0; + public boolean hasNext(){ + return index=size){ + throw new IndexOutOfBoundsException("get " + index+" in "+size); + } + } + + //判断是否需要扩容并完成扩容// + private void ensureCapcity(int size){ + int oldLength=elementData.length; + if (size>=oldLength){ + //util.ArrayList中的公式,源代码使用的右移1,即除2// + int newLength=oldLength/2+oldLength; + if (newLength7->10 , 逆置后变为 10->7->3 + */ + public void reverse(){ + /*两个指针,开始的时候指向头跟头后面的一个(前指针、后指针) + *循环:每次向后移动步长1,至后指针移到链表尾,size-1个节点需要移动(size-1)-1次 + *先保留前指针的值temp,即当前逆序链表的头,然后再移动前、后指针 + *移动后,将前指针的节点连接到逆序链表的头,开始下一次移动 + *循环结束后,注意到实际重连的只有旧链表的第二个节点到倒数第个节点,需要单独处理旧链表的头尾节点 + *旧链表的尾节点需要链接到逆序链表的头,旧链表的头节点的指针置空,不然会1<->2 + *维护头尾标记 + */ + Node current=head; + Node currentAfter=current.next; + Node temp; + for (int i=0;i5->7->8 , 删除以后的值为 7->8 + * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 + */ + public void removeFirstHalf(){ + //int截断,不会有小数// + int removeLength = size / 2; + for (int i=1;i<=removeLength;i++){ + removeFirst(); + } + } + + /** + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 + * @param i + * @param length + */ + public void remove(int i, int length){ + checkIndex(i); + length=length+i-1; + if (i+length-1>size){ + length=size-i; + } + //从后往前删除,防止越界// + for (int k=length;k>=i;k--){ + remove(k); + } + } + /** + * 假定当前链表和list均包含已升序排列的整数 + * 从当前链表中取出那些list所指定的元素 + * 例如当前链表 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + int indexLength=list.size(); + int[] result=new int[indexLength]; + for (int i=0;isize){ + result[i]=0; + }else{ + result[i]=(int)list.get(index); + } + } + return result; + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 从当前链表中中删除在list中出现的元素 + * @param list + */ + //注意到递增,在外层循环list的时候,保留内层循环的被比较链表的节点的下标并递增即可// + public void subtract(LinkedList list){ + int startIndex=0; + Iterator iter=list.iterator(); + while(iter.hasNext()){ + int src =(int) iter.next(); + while(startIndexmax){ + if (isHeadNoed){ + current=current.next; + removeFirst(); + }else{ + temp.next=current.next; + current=current.next; + size--; + } + }else{ + temp=current; + current=current.next; + isHeadNoed=false; + } + + } + } + + /** + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 + * @param list + */ + //注意到递增,保留内循环下标位置递增即可// + public LinkedList intersection( LinkedList list){ + LinkedList result = new LinkedList(); + int startIndex = 0; + for (Iterator iter = list.iterator();iter.hasNext();){ + int src = (int) iter.next(); + while (startIndex=size){ + throw new IndexOutOfBoundsException("get " + index+" in "+size); + } + } + + public String toString(){ + StringBuilder sb = new StringBuilder(); + Node current = head; + for (int i=0;i"); + } + current=current.next; + } + return sb.toString(); + } +} \ No newline at end of file diff --git a/group22/910725683/week01/src/com/coding/basic/List.java b/group22/910725683/week01/src/com/coding/basic/List.java new file mode 100644 index 0000000000..29caa79f69 --- /dev/null +++ b/group22/910725683/week01/src/com/coding/basic/List.java @@ -0,0 +1,10 @@ +package com.coding.basic; + + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} \ No newline at end of file diff --git a/group22/910725683/week01/src/com/coding/basic/Queue.java b/group22/910725683/week01/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..6e1b288ebc --- /dev/null +++ b/group22/910725683/week01/src/com/coding/basic/Queue.java @@ -0,0 +1,26 @@ +package com.coding.basic; + +public class Queue { + + private LinkedList queue = new LinkedList(); + + public void enQueue(Object o){ + queue.add(o); + } + + public Object deQueue(){ + return queue.removeFirst(); + } + + public boolean isEmpty(){ + return queue.size()==0; + } + + public int size(){ + return queue.size(); + } + + public String toString() { + return queue.toString(); + } +} \ No newline at end of file diff --git a/group22/910725683/week01/src/com/coding/basic/Stack.java b/group22/910725683/week01/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..a8d071b707 --- /dev/null +++ b/group22/910725683/week01/src/com/coding/basic/Stack.java @@ -0,0 +1,27 @@ +package com.coding.basic; + + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return (elementData.size())==0; + } + public int size(){ + return elementData.size(); + } + public String toString() { + return elementData.toString(); + } +} \ No newline at end of file diff --git a/group22/910725683/week01/test/com/coding/basic/ArrayListTest.java b/group22/910725683/week01/test/com/coding/basic/ArrayListTest.java new file mode 100644 index 0000000000..e0940e8acb --- /dev/null +++ b/group22/910725683/week01/test/com/coding/basic/ArrayListTest.java @@ -0,0 +1,53 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class ArrayListTest { + + ArrayList al = new ArrayList(); + + @Test + public void testAddObject() { + for (int i=1;i<=5;i++){ + al.add(i); + } + } + + @Test + public void testAddIntObject() { + testAddObject(); + al.add(3, 12); + System.out.println("inser index 3 value 12 : "+al.toString()); + } + + @Test + public void testGet() { + testAddObject(); + System.out.println("get index 4 : "+al.get(4)); + } + + @Test + public void testRemove() { + testAddObject(); + System.out.println("remove index 3 : "+al.remove(3)); + } + + @Test + public void testSize() { + testAddObject(); + System.out.println("get size : "+al.size()); + } + + @Test + public void testIterator() { + fail("Not yet implemented"); + } + + @Test + public void testToString() { + fail("Not yet implemented"); + } + +} diff --git a/group22/910725683/week01/test/com/coding/basic/BinaryTreeNodeTest.java b/group22/910725683/week01/test/com/coding/basic/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..b32b779091 --- /dev/null +++ b/group22/910725683/week01/test/com/coding/basic/BinaryTreeNodeTest.java @@ -0,0 +1,47 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import com.coding.basic.BinaryTreeNode; + +public class BinaryTreeNodeTest { + + BinaryTreeNode btn = new BinaryTreeNode(); + + @Test + public void testPreOrder() { + testInsert(); + System.out.print("preOrde : "); + btn.preOrder(btn); + System.out.println(""); + } + + @Test + public void testInOrder() { + testInsert(); + System.out.print("inOrder : "); + btn.inOrder(btn); + System.out.println(""); + } + + @Test + public void testPostOrder() { + testInsert(); + System.out.print("postOrder : "); + btn.postOrder(btn); + System.out.println(""); + } + + @Test + public void testInsert() { + btn.insert(45); + btn.insert(24); + btn.insert(53); + btn.insert(12); + btn.insert(37); + btn.insert(93); + } + +} diff --git a/group22/910725683/week01/test/com/coding/basic/LinkedListTest.java b/group22/910725683/week01/test/com/coding/basic/LinkedListTest.java new file mode 100644 index 0000000000..2d22e2e92d --- /dev/null +++ b/group22/910725683/week01/test/com/coding/basic/LinkedListTest.java @@ -0,0 +1,137 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import com.coding.basic.LinkedList; + +public class LinkedListTest { + LinkedList ll =new LinkedList(); + @Test + public void testAddObject() { + for (int i=0;i<9;i++){ + ll.add(i); + } + } + + @Test + public void testAddIntObject() { + testAddObject(); + ll.add(4, 22); + ll.add(0, 23); + System.out.println("add int : " + ll.toString()); + } + + @Test + public void testGet() { + testAddObject(); + System.out.println("get index 3 : "+ll.get(3)); + } + + @Test + public void testRemoveInt() { + testAddObject(); + System.out.println("remove index 5 : "+ll.get(5)); + } + + @Test + public void testSize() { + testAddObject(); + System.out.println("get size : "+ll.size()); + } + + @Test + public void testAddFirst() { + testAddObject(); + ll.addFirst(12); + System.out.println("add first : "+ll.toString()); + } + + @Test + public void testAddLast() { + testAddObject(); + ll.addLast(23); + System.out.println("add first : "+ll.toString()); + } + + @Test + public void testRemoveFirst() { + testAddObject(); + ll.removeFirst(); + System.out.println("remove first : "+ll.toString()); + } + + @Test + public void testRemoveLast() { + testAddObject(); + ll.removeLast(); + System.out.println("remove last : "+ll.toString()); + } + + @Test + public void testReverse() { + testAddObject(); + ll.reverse(); + System.out.println("reverse : "+ll.toString()); + } + + @Test + public void testRemoveFirstHalf() { + testAddObject(); + ll.removeFirstHalf(); + System.out.println("remove first half : "+ll.toString()); + } + + @Test + public void testRemoveIntInt() { + testAddObject(); + ll.remove(2, 4); + System.out.println("remove index 2 length 4 : "+ll.toString()); + } + + @Test + public void testGetElements() { + testAddObject(); + System.out.println("get index 2 : "+ll.get(2)); + } + + @Test + public void testSubtract() { + testAddObject(); + LinkedList test1 =new LinkedList(); + for (int i=2;i<5;i++){ + test1.add(i); + } + ll.subtract(test1); + System.out.println("subtract "+test1.toString()+" : "+ll.toString()); + } + + @Test + public void testRemoveDuplicateValues() { + testAddObject(); + for (int i=6;i>2;i--){ + ll.add(i,i); + } + ll.removeDuplicateValues(); + System.out.println("remove dupl : "+ll.toString()); + } + + @Test + public void testRemoveRange() { + testAddObject(); + ll.removeRange(3, 6); + System.out.println("remove range[3,6] : "+ll.toString()); + } + + @Test + public void testIntersection() { + testAddObject(); + LinkedList test2 =new LinkedList(); + for (int i=4;i<14;i=i+2){ + test2.add(i); + } + System.out.println("intersection "+test2.toString()+" : "+ll.intersection(test2)); + } + +} diff --git a/group22/910725683/week01/test/com/coding/basic/QueueTest.java b/group22/910725683/week01/test/com/coding/basic/QueueTest.java new file mode 100644 index 0000000000..18cba75d07 --- /dev/null +++ b/group22/910725683/week01/test/com/coding/basic/QueueTest.java @@ -0,0 +1,40 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import com.coding.basic.Queue; + +public class QueueTest { + Queue queue = new Queue(); + + @Test + public void testEnQueue() { + for (int i=0;i<10;i++){ + queue.enQueue(i); + } + } + + @Test + public void testDeQueue() { + testEnQueue(); + for (int i=0;i<3;i++){ + System.out.println("deQueue : " + queue.deQueue()); + } + } + + @Test + public void testIsEmpty() { + System.out.println("is empty(true) : "+queue.isEmpty()); + testEnQueue(); + System.out.println("is empty(false) : "+queue.isEmpty()); + } + + @Test + public void testSize() { + testEnQueue(); + System.out.println("size : "+queue.size()); + } + +} diff --git a/group22/910725683/week01/test/com/coding/basic/StackTest.java b/group22/910725683/week01/test/com/coding/basic/StackTest.java new file mode 100644 index 0000000000..0c8095d79c --- /dev/null +++ b/group22/910725683/week01/test/com/coding/basic/StackTest.java @@ -0,0 +1,48 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import com.coding.basic.Stack; + +public class StackTest { + Stack stack = new Stack(); + + @Test + public void testPush() { + for (int i = 0; i < 10; i++) { + stack.push(i); + } + } + + @Test + public void testPop() { + testPush(); + for (int i = 0; i < 3; i++) { + System.out.println("pop : "+stack.pop()); + } + } + + @Test + public void testPeek() { + testPush(); + for (int i = 0; i < 3; i++) { + System.out.println("peek : "+stack.peek()); + } + } + + @Test + public void testIsEmpty() { + System.out.println("is empty(true) : "+stack.isEmpty()); + testPush(); + System.out.println("is empty(false) : "+stack.isEmpty()); + } + + @Test + public void testSize() { + testPush(); + System.out.println("size : "+stack.size()); + } + +} From 1e1f7ded7ecc5d2e1bf5910f5655bc93d6ec9149 Mon Sep 17 00:00:00 2001 From: BlindingDark Date: Fri, 10 Mar 2017 18:56:23 +0800 Subject: [PATCH 268/646] =?UTF-8?q?.gitignore=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/1778842360/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 group26/1778842360/.gitignore diff --git a/group26/1778842360/.gitignore b/group26/1778842360/.gitignore new file mode 100644 index 0000000000..4f4c622218 --- /dev/null +++ b/group26/1778842360/.gitignore @@ -0,0 +1,2 @@ +/bin +/.project/.classpath \ No newline at end of file From 459b67a863e3b83de03a30ca4537de3507728266 Mon Sep 17 00:00:00 2001 From: MAC Date: Sat, 11 Mar 2017 16:45:07 +0800 Subject: [PATCH 269/646] week01 homework commit --- group26/89460886/src/week01/ArrayList.java | 107 ++++++++++ group26/89460886/src/week01/BinaryTree.java | 80 ++++++++ group26/89460886/src/week01/Iterator.java | 12 ++ group26/89460886/src/week01/List.java | 14 ++ group26/89460886/src/week01/Queue.java | 38 ++++ .../89460886/src/week01/SinglyLinkedList.java | 185 ++++++++++++++++++ group26/89460886/src/week01/Stack.java | 40 ++++ 7 files changed, 476 insertions(+) create mode 100644 group26/89460886/src/week01/ArrayList.java create mode 100644 group26/89460886/src/week01/BinaryTree.java create mode 100644 group26/89460886/src/week01/Iterator.java create mode 100644 group26/89460886/src/week01/List.java create mode 100644 group26/89460886/src/week01/Queue.java create mode 100644 group26/89460886/src/week01/SinglyLinkedList.java create mode 100644 group26/89460886/src/week01/Stack.java diff --git a/group26/89460886/src/week01/ArrayList.java b/group26/89460886/src/week01/ArrayList.java new file mode 100644 index 0000000000..7437aca7f6 --- /dev/null +++ b/group26/89460886/src/week01/ArrayList.java @@ -0,0 +1,107 @@ +package list; + +/** + * @author jiaxun + */ +public class ArrayList implements List { + + private static final int DEFAULT_CAPACITY = 10; + + private Object[] elementData; + private int size; + + public ArrayList() { + elementData = new Object[DEFAULT_CAPACITY]; + size = 0; + } + + public void add(Object object) { + ensureCapacity(); + elementData[size] = object; + size++; + } + + public void add(int index, Object object) { + if (index > size || index < 0) { + throw new ArrayIndexOutOfBoundsException(); + } + ensureCapacity(); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = object; + size++; + } + + public Object remove(int index) { + if (index < 0 || index > size) { + return null; + } + Object object = get(index); + System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); + size--; + return object; + } + + public int size() { + return size; + } + + public Object get(int index) { + if (index >= size || index < 0) { + throw new ArrayIndexOutOfBoundsException(); + } + return elementData[index]; + } + + public void set(int index, Object object) { + if (index >= size) { + throw new ArrayIndexOutOfBoundsException(); + } + elementData[index] = object; + } + + public boolean isEmpty() { + return size == 0; + } + + public Iterator iterator() { + return new ArrayListIterator(this); + } + + private void ensureCapacity() { + if (size + 1 > elementData.length) { + ensureCapacity(elementData.length + 1); + } + } + + private void ensureCapacity(int length) { + Object[] newElementData = new Object[length]; + System.arraycopy(elementData, 0, newElementData, 0, size); + elementData = newElementData; + } + + private class ArrayListIterator implements Iterator { + + private ArrayList arrayList; + private int currentPosition = 0; + + private ArrayListIterator(ArrayList arrayList) { + this.arrayList = arrayList; + } + + @Override + public boolean hasNext() { + return currentPosition < size; + } + + @Override + public Object next() { + return elementData[currentPosition++]; + } + + @Override + public Object remove() { + return arrayList.remove(--currentPosition); + } + } + +} diff --git a/group26/89460886/src/week01/BinaryTree.java b/group26/89460886/src/week01/BinaryTree.java new file mode 100644 index 0000000000..712276be02 --- /dev/null +++ b/group26/89460886/src/week01/BinaryTree.java @@ -0,0 +1,80 @@ +package list; + +/** + * @author jiaxun + */ +public class BinaryTree { + + private Node root; + + public BinaryTree() { + root = null; + } + + public void insert(int value) { + if (root == null) { + root = new Node(value); + } else { + Node newNode = new Node(value); + Node curr = root; + Node prev = null; + boolean right = true; + + while (curr != null) { + prev = curr; + if (curr.getData() > value) { + curr = curr.getRight(); + right = true; + } else if (curr.getData() < value) { + curr = curr.getLeft(); + right = false; + } else { + prev = null; + break; + } + } + if (prev != null) { + if (right) { + prev.setRight(newNode); + } else { + prev.setLeft(newNode); + } + } + } + } + + public boolean isEmpty() { + return root == null; + } + + private static class Node { + int data; + Node left; + Node right; + + public Node(int data) { + this.data = data; + } + + public int getData() { + return data; + } + + public Node getLeft() { + return left; + } + + public void setLeft(Node left) { + this.left = left; + } + + public Node getRight() { + return right; + } + + public void setRight(Node right) { + this.right = right; + } + } + +} diff --git a/group26/89460886/src/week01/Iterator.java b/group26/89460886/src/week01/Iterator.java new file mode 100644 index 0000000000..b79feac764 --- /dev/null +++ b/group26/89460886/src/week01/Iterator.java @@ -0,0 +1,12 @@ +package list; + +/** + * @author jiaxun + */ +public interface Iterator { + + boolean hasNext(); + Object next(); + Object remove(); + +} diff --git a/group26/89460886/src/week01/List.java b/group26/89460886/src/week01/List.java new file mode 100644 index 0000000000..685daafab3 --- /dev/null +++ b/group26/89460886/src/week01/List.java @@ -0,0 +1,14 @@ +package list; + +/** + * @author jiaxun + */ +public interface List { + + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); + +} diff --git a/group26/89460886/src/week01/Queue.java b/group26/89460886/src/week01/Queue.java new file mode 100644 index 0000000000..5bcd9af149 --- /dev/null +++ b/group26/89460886/src/week01/Queue.java @@ -0,0 +1,38 @@ +package list; + +/** + * @author jiaxun + */ +public class Queue { + + private SinglyLinkedList linkedList = new SinglyLinkedList(); + + public void enQueue(Object object) { + linkedList.addLast(object); + } + + public Object deQueue() { + return linkedList.removeFirst(); + } + + public boolean isEmpty() { + return linkedList.size() == 0; + } + + public int size() { + return linkedList.size(); + } + + @Override + public String toString() { + if (size() > 0) { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0, len = size(); i < len; i++) { + stringBuilder.append("[").append(linkedList.get(i)).append("]"); + } + return stringBuilder.toString(); + } else { + return super.toString(); + } + } +} diff --git a/group26/89460886/src/week01/SinglyLinkedList.java b/group26/89460886/src/week01/SinglyLinkedList.java new file mode 100644 index 0000000000..1fed093242 --- /dev/null +++ b/group26/89460886/src/week01/SinglyLinkedList.java @@ -0,0 +1,185 @@ +package list; + +/** + * @author jiaxun + */ +public class SinglyLinkedList implements List { + + private Node head; + private int size; + + public SinglyLinkedList() { + size = 0; + } + + public void addFirst(Object data) { + Node node = new Node(data); + node.setNext(head); + head = node; + size++; + } + + public Node removeFirst() { + Node object = head; + head = object.getNext(); + size--; + return object; + } + + public Node removeLast() { + Node curr = head; + Node prev = null; + while (curr != null) { + prev = curr; + curr = curr.getNext(); + } + if (prev != null) { + prev.setNext(null); + } + size--; + return curr; + } + + public Node get(int index) { + if (index > size) { + throw new IndexOutOfBoundsException(); + } + Node curr = head; + while (curr != null) { + if (index == 0) + break; + curr = curr.getNext(); + index--; + + } + return curr; + } + + public Node remove(int index) { + Node curr = head; + Node prev = null; + while (curr != null) { + if (index == 0) + break; + prev = curr; + curr = curr.getNext(); + index--; + } + if (prev != null) { + prev.setNext(curr.getNext()); + curr.setNext(null); + } + size--; + return curr; + } + + public void addLast(Object object) { + if (head == null) { + head = new Node(object); + } else { + Node curr = head; + Node prev = null; + while (curr != null) { + prev = curr; + curr = curr.getNext(); + } + prev.setNext(new Node(object)); + } + size++; + } + + @Override + public void add(Object o) { + + } + + public void add(int index, Object object) { + Node curr = head; + Node prev = null; + while (curr != null) { + if (index == 0) + break; + prev = curr; + curr = curr.getNext(); + index--; + } + if (prev != null) { + Node newNode = new Node(object); + newNode.setNext(curr); + prev.setNext(newNode); + size++; + } + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new SinglyLinkedListIterator(this); + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + Node current = head; + while (current != null) { + builder.append(current.toString()); + current = current.getNext(); + } + return builder.toString(); + } + + private class SinglyLinkedListIterator implements Iterator { + + private SinglyLinkedList linkedList; + private int currentPosition = 0; + + public SinglyLinkedListIterator(SinglyLinkedList linkedList) { + this.linkedList = linkedList; + } + + @Override + public boolean hasNext() { + return currentPosition < size; + } + + @Override + public Object next() { + return linkedList.get(currentPosition++); + } + + @Override + public Object remove() { + return linkedList.remove(--currentPosition); + } + } + + private static class Node { + + private Object data; + private Node next; + + public Node(Object data) { + this.data = data; + } + + public Object getData() { + return data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + @Override + public String toString() { + return "[data is " + getData() + "]"; + } + } + +} diff --git a/group26/89460886/src/week01/Stack.java b/group26/89460886/src/week01/Stack.java new file mode 100644 index 0000000000..f6b4b052d0 --- /dev/null +++ b/group26/89460886/src/week01/Stack.java @@ -0,0 +1,40 @@ +package list; + +/** + * @author jiaxun + */ +public class Stack { + + private ArrayList elementData = new ArrayList(); + + public void push(Object object) { + elementData.add(object); + } + + public Object pop() { + return elementData.remove(elementData.size() - 1); + } + + public Object peek() { + return elementData.get(elementData.size() - 1); + } + + public boolean isEmpty() { + return elementData.size() == 0; + } + + public int size() { + return elementData.size(); + } + + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder(); + if (size() > 0) { + for (int i = 0, len = size(); i < len; i++) { + stringBuilder.append("[data is ").append(elementData.get(i)).append("]"); + } + } + return stringBuilder.toString(); + } +} From 27102f7976c974d7209a70bcd643e34c33585872 Mon Sep 17 00:00:00 2001 From: Kewy2017 Date: Sat, 11 Mar 2017 17:12:13 +0800 Subject: [PATCH 270/646] Mywork for first week data structure: ArrayList, LinkedList, Stack, Queue, BinaryTree unit test: creat a class for student test score, and use Junit to call method written. --- group22/1014331282/Mywork_LX/.classpath | 7 + group22/1014331282/Mywork_LX/.project | 17 ++ .../.settings/org.eclipse.jdt.core.prefs | 11 ++ .../Mywork_LX/src/week1_0306/ArrayList.java | 114 +++++++++++ .../Mywork_LX/src/week1_0306/BinaryTree.java | 135 +++++++++++++ .../Mywork_LX/src/week1_0306/Iterator.java | 9 + .../Mywork_LX/src/week1_0306/LinkedList.java | 181 ++++++++++++++++++ .../Mywork_LX/src/week1_0306/List.java | 18 ++ .../Mywork_LX/src/week1_0306/Queue.java | 35 ++++ .../Mywork_LX/src/week1_0306/ScoreRecord.java | 180 +++++++++++++++++ .../Mywork_LX/src/week1_0306/Stack.java | 36 ++++ .../src/week1_0306/Test_ArrayList.java | 56 ++++++ .../Mywork_LX/src/week1_0306/Test_BTree.java | 41 ++++ .../Mywork_LX/src/week1_0306/Test_Queue.java | 45 +++++ .../Mywork_LX/src/week1_0306/Test_Stack.java | 48 +++++ 15 files changed, 933 insertions(+) create mode 100644 group22/1014331282/Mywork_LX/.classpath create mode 100644 group22/1014331282/Mywork_LX/.project create mode 100644 group22/1014331282/Mywork_LX/.settings/org.eclipse.jdt.core.prefs create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/ArrayList.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/BinaryTree.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Iterator.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/LinkedList.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/List.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Queue.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/ScoreRecord.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Stack.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Test_ArrayList.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Test_BTree.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Test_Queue.java create mode 100644 group22/1014331282/Mywork_LX/src/week1_0306/Test_Stack.java diff --git a/group22/1014331282/Mywork_LX/.classpath b/group22/1014331282/Mywork_LX/.classpath new file mode 100644 index 0000000000..373dce4005 --- /dev/null +++ b/group22/1014331282/Mywork_LX/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group22/1014331282/Mywork_LX/.project b/group22/1014331282/Mywork_LX/.project new file mode 100644 index 0000000000..1290d27942 --- /dev/null +++ b/group22/1014331282/Mywork_LX/.project @@ -0,0 +1,17 @@ + + + Mywork_LX + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group22/1014331282/Mywork_LX/.settings/org.eclipse.jdt.core.prefs b/group22/1014331282/Mywork_LX/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..3a21537071 --- /dev/null +++ b/group22/1014331282/Mywork_LX/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/ArrayList.java b/group22/1014331282/Mywork_LX/src/week1_0306/ArrayList.java new file mode 100644 index 0000000000..5446c9b557 --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/ArrayList.java @@ -0,0 +1,114 @@ +package week1_0306; + + + +public class ArrayList implements List +{ + + private int size; + + private Object[] elementData ; + + public ArrayList() + { + elementData = new Object[3]; + size=-1; + } + + public void add(Object o) + { + if(size >= elementData.length-1) + { + Object[] replaceData=new Object[elementData.length+5]; + System.arraycopy(elementData, 0, replaceData, 0, elementData.length); + elementData = replaceData; + } + elementData[++size] = o; + } + + public void add(int index, Object o) + { + Object[] replaceData=new Object[11]; + for(int i=0;i=0 && size>=0) + return elementData[index]; + else return null; + } + + + public Object remove(int index) + { + size--; + Object o=elementData[index]; + if (index0) + { + for(int i=index;i=0) + return size+1; + else + return 0; + } + + public Iterator iterator() + { + return new ArrayListIterator(this); + } + + private class ArrayListIterator implements Iterator + { + ArrayList l=null; + int pos = 0; + private ArrayListIterator(ArrayList l) + { + this.l=l; + } + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + pos++; + if(pos > size) + return false; + else return true; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + return elementData[pos]; + + } + + public Object remove() + { + return this.l.remove(pos); + } + + } + +} diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/BinaryTree.java b/group22/1014331282/Mywork_LX/src/week1_0306/BinaryTree.java new file mode 100644 index 0000000000..e5b23d37ce --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/BinaryTree.java @@ -0,0 +1,135 @@ +package week1_0306; + +import java.util.Comparator; + +import week1_0306.BinaryTree.BinaryTreeNode; + +public class BinaryTree +{ + private BinaryTreeNode root; + + private BinaryTreeNode pointer; + + public BinaryTreeNode getRoot() { + return root; + } + + public void setRoot(BinaryTreeNode root) { + this.root = root; + } + + public BinaryTreeNode getPointer() { + return pointer; + } + + public void setPointer(BinaryTreeNode pointer) { + this.pointer = pointer; + } + + public BinaryTree() + { + root=new BinaryTreeNode(); + pointer=root; + } + + public BinaryTreeNode insert(Object o,Comparator c) + { + + pointer= root.insert(o, c); + return pointer; + } + + public void printTree() + { + root.printNode(); + } + + public class BinaryTreeNode + { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + pointer=left; + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + pointer=right; + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + + + public BinaryTreeNode insert(Object o, Comparator c) //建有规律的树+插入 + { + if(this.data == null) + { + this.data = o; + return this; + } + + int i = c.compare(this.data,o); + + if( i > 0 ) + { + if(this.left == null) + { + this.left=new BinaryTreeNode(); + this.left.data=o; + return this.left; + } + else + return this.left.insert(o, c); + } + else if(i < 0) + { + if(this.right == null) + { + this.right=new BinaryTreeNode(); + this.right.data = o; + return this.right; + } + + else + return this.right.insert(o, c); + } + else + { + return this; + } + + } + + public void printNode() + { + ScoreRecord s=(ScoreRecord)(this.getData()); + System.out.println(s.getName()+" "+s.getId()); + if(this.getLeft()!=null) + this.getLeft().printNode(); + if(this.getRight()!=null) + this.getRight().printNode(); + else return; + } + + } + +} diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/Iterator.java b/group22/1014331282/Mywork_LX/src/week1_0306/Iterator.java new file mode 100644 index 0000000000..26471af1cd --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/Iterator.java @@ -0,0 +1,9 @@ +package week1_0306; + +public interface Iterator { + + public boolean hasNext(); + public Object next(); + public Object remove(); + +} diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/LinkedList.java b/group22/1014331282/Mywork_LX/src/week1_0306/LinkedList.java new file mode 100644 index 0000000000..e540a7c115 --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/LinkedList.java @@ -0,0 +1,181 @@ +package week1_0306; + + + +public class LinkedList implements List +{ + private Node head; + + private static int size = 0; + + public LinkedList() + { + head=new Node(); + + } + + + private static class Node + { + Object data; + Node next; + } + + public void add(Object o) + { + Node h = head; + while(h.next!= null) + { + h=h.next; + } + Node p = new Node(); + p.data=o; + p.next=null; + h.next= p; + + size++; + } + + public void add(int index, Object o) + { + Node h=head.next; + int i=0; + while(i size) + return false; + else return true; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + return l.get(pos); + + } + + public Object remove() + { + return this.l.remove(pos); + } + + } + + +} + diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/List.java b/group22/1014331282/Mywork_LX/src/week1_0306/List.java new file mode 100644 index 0000000000..7ec758f832 --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/List.java @@ -0,0 +1,18 @@ +package week1_0306; + + + +public interface List { + + public void add(Object o); + + public void add(int index, Object o); + + public Object get(int index); + + public Object remove(int index); + + public int size(); + + public Iterator iterator(); +} diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/Queue.java b/group22/1014331282/Mywork_LX/src/week1_0306/Queue.java new file mode 100644 index 0000000000..e9c32b8e68 --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/Queue.java @@ -0,0 +1,35 @@ +package week1_0306; + +public class Queue { + + private LinkedList queue = new LinkedList(); + + public void enQueue(Object o)//进队列 + { + queue.addFirst(o); + } + + public Object deQueue()//出队列 + { + return queue.removeLast(); + } + + public boolean isEmpty() + { + if(queue.get(0)==null) + return true; + else return false; + } + + public int size() + { + return queue.size(); + } + + public Queue() { + // TODO Auto-generated constructor stub + } + + + +} diff --git a/group22/1014331282/Mywork_LX/src/week1_0306/ScoreRecord.java b/group22/1014331282/Mywork_LX/src/week1_0306/ScoreRecord.java new file mode 100644 index 0000000000..f3bce47950 --- /dev/null +++ b/group22/1014331282/Mywork_LX/src/week1_0306/ScoreRecord.java @@ -0,0 +1,180 @@ +package week1_0306; +/* +提示录入几个学生信息 +录入学号姓名三门成绩 +打印学生中语文数学英语成绩最高的那个人 +统计每门课的平均成绩及总成绩的平均值 +封装处理 +*/ +import java.util.Scanner; +import java.util.Comparator; + +public class ScoreRecord implements Comparator +{ + + private int id; + private String name; + private float C_Score; + private float M_Score; + private float E_Score; + + public ScoreRecord(){}; + + public ScoreRecord(int id,String name,float C_Score, float M_Score, float E_Score) + { + this.id=id; + this.name=name; + this.C_Score=C_Score; + this.E_Score=E_Score; + this.M_Score=M_Score; + } + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public float getC_Score() { + return C_Score; + } + + public void setC_Score(float c_Score) { + C_Score = c_Score; + } + + public float getM_Score() { + return M_Score; + } + + public void setM_Score(float m_Score) { + M_Score = m_Score; + } + + public float getE_Score() { + return E_Score; + } + + public void setE_Score(float e_Score) { + E_Score = e_Score; + } + + public int compare(Object o1, Object o2) + { + ScoreRecord s1 = (ScoreRecord) o1; + ScoreRecord s2 = (ScoreRecord) o2; + if(s1.id>s2.id) + return 1; + else if(s1.id==s2.id) + return 0; + else + return -1; + } + + public int compareTo(Object o1) + { + ScoreRecord s = (ScoreRecord) o1; + if(this.id>s.id) + return 1; + else if(this.id==s.id) + return 0; + else return -1; + } + + public static void readData(ScoreRecord[] arr) + { + Scanner a=new Scanner(System.in); + for(int i=0;i Date: Sat, 11 Mar 2017 17:26:31 +0800 Subject: [PATCH 271/646] =?UTF-8?q?=E7=AE=80=E5=8D=95=E5=AE=9E=E7=8E=B0Arr?= =?UTF-8?q?ayList=E3=80=81Stack=E3=80=81Queue,LinkedList;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wdn/coding2017/basic/ArrayList.java | 84 ++++++++-- .../wdn/coding2017/basic/BinaryTreeNode.java | 3 + .../github/wdn/coding2017/basic/Iterator.java | 3 + .../wdn/coding2017/basic/LinkedList.java | 157 +++++++++++++++--- .../github/wdn/coding2017/basic/Queue.java | 15 +- .../github/wdn/coding2017/basic/Stack.java | 15 +- 6 files changed, 229 insertions(+), 48 deletions(-) diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java index bfd96d3202..3b3ea048f3 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java @@ -1,32 +1,88 @@ package com.github.wdn.coding2017.basic; +import java.util.Arrays; + public class ArrayList implements List { - + private int size = 0; - - private Object[] elementData = new Object[100]; - + + private Object[] elementData; + public ArrayList(){ + elementData = new Object[10]; + } + public ArrayList(int size){ + elementData = new Object[size]; + } public void add(Object o){ - + if(size>=elementData.length){ + elementData = Arrays.copyOf(elementData,elementData.length*2); + } + elementData[size]=o; + size++; } public void add(int index, Object o){ - + Object[] newElementData; + if(size()+1>=elementData.length){ + newElementData=new Object[elementData.length*2]; + + }else{ + newElementData=new Object[elementData.length]; + } + for (int i = 0; i < elementData.length; i++) { + if(index==1){ + newElementData[i]=o; + }else if(i>index) { + newElementData[i]=elementData[i-1]; + }else{ + newElementData[i]=elementData[i]; + } + } + elementData = newElementData; + size++; } - + public Object get(int index){ - return null; + if(index>=size){ + throw new IndexOutOfBoundsException(); + } + return elementData[index]; } - - public Object remove(int index){ - return null; + + public Object remove(int index) { + if(index>=size){ + throw new IndexOutOfBoundsException(); + } + Object returnO = elementData[index]; + for (int i = index; i < size; i++) { + if(i==size-1){ + elementData[i]=null; + }else { + elementData[i] = elementData[i + 1]; + } + } + size--; + return returnO; } - + public int size(){ - return -1; + return size; } - + public Iterator iterator(){ return null; } + + public static void main(String[] args) { + ArrayList list = new ArrayList(2); + list.add("1"); + list.add("2"); + list.remove(1); + list.add("3"); + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i)); + } + int[] i = {}; + System.out.println(i[0]); + } } diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java index 39d4e62c93..b8b613d6f0 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java @@ -1,5 +1,8 @@ package com.github.wdn.coding2017.basic; +/** + * TODO 浠g爜鍦ㄥ叕鍙哥數鑴戦噷銆傘傘傚悗缁彁浜 + */ public class BinaryTreeNode { private Object data; diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java index f601a50c7b..044ddf0993 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java @@ -1,5 +1,8 @@ package com.github.wdn.coding2017.basic; +/** + * TODO 涓昏鑰冭檻閬嶅巻涓畨鍏ㄥ垹闄ゅ厓绱犵殑瀹炵幇 + */ public interface Iterator { public boolean hasNext(); public Object next(); diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java index ba5b32cb90..6040cb5a47 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java @@ -1,92 +1,201 @@ package com.github.wdn.coding2017.basic; - +/** + * TODO 鍙槸绠鍗曞疄鐜 缂哄皯瀵硅竟鐣岀殑澶勭悊 + * 鍙傝僇DK婧愮爜鏀逛负鏇翠紭闆呯殑瀹炵幇 + */ public class LinkedList implements List { private Node head; - + private Node tail; + private int size; + + public LinkedList(){ + this.head=null; + this.tail=null; + } public void add(Object o){ - + Node newNode = new Node(o); + if (head == null) { + head = newNode; + tail = newNode; + }else{ + tail.setNext(newNode); + newNode.setPre(tail); + tail = newNode; + } + size++; } public void add(int index , Object o){ - + checkIndex(index); + Node indexNode = getNode(index); + Node newNode = new Node(o); + Node pre = indexNode.getPre(); + if(pre!=null){ + pre.setNext(newNode); + }else{ + head = newNode; + } + newNode.setPre(pre); + newNode.setNext(indexNode); + indexNode.setPre(newNode); + } + private void checkIndex(int index){ + if(index >= size || index <0){ + throw new IndexOutOfBoundsException(); + } + } + private Node getNode(int index){ + checkIndex(index); + // TODO杩欓噷鍙互浼樺寲锛屽厛鍒ゆ柇index鍦ㄥ墠鍗婇儴杩樻槸鍚庡崐閮ㄥ垎 鐒跺悗纭畾浠庡ご閮ㄦ垨鑰呭熬閮ㄦ煡鎵 + Node result=null; + if(index==0){ + return head; + } + if(index==size-1){ + return tail; + } + for (int i = 0; i < index; i++) { + result = head.getNext(); + } + return result; } public Object get(int index){ - return null; + return getNode(index).getData(); } public Object remove(int index){ - return null; + checkIndex(index); + Node indexNode = getNode(index); + Node pre = indexNode.getPre(); + Node next = indexNode.getNext(); + if(pre!=null){ + pre.setNext(next); + }else{ + head = next; + } + if(next!=null){ + next.setPre(pre); + }else{ + tail = pre; + } + return indexNode.getData(); } public int size(){ - return -1; + return size; } public void addFirst(Object o){ - + Node newNode = new Node(o); + head.setPre(newNode); + newNode.setNext(head); + head = newNode; } public void addLast(Object o){ - + Node newNode = new Node(o); + tail.setNext(newNode); + newNode.setPre(tail); + tail = newNode; } public Object removeFirst(){ - return null; + Node next = head.getNext(); + Node oldHead = head; + head = next; + head.setPre(null); + return oldHead; } public Object removeLast(){ - return null; + Node oldTail = tail; + Node pre = tail.getPre(); + tail = pre; + tail.setNext(null); + return oldTail; } public Iterator iterator(){ + return null; } - + /** + * JDK 涓娇鐢ㄦ瀯閫犳柟娉曠殑鏂瑰紡璁剧疆next鍜宲re鍑忓皯涓嶅繀瑕佺殑getset鏂规硶鏇翠紭闆 + */ private static class Node{ + Object data; Node next; - + Node pre; + public Node(){ + + } + public Node(Object data){ + this.data = data; + } + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + public Node getPre() { + return pre; + } + + public void setPre(Node pre) { + this.pre = pre; + } } /** * 鎶婅閾捐〃閫嗙疆 * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ - public void reverse(){ - - } - - /** + public void reverse(){ + } + + /** * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 */ public void removeFirstHalf(){ - + } - + /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 * @param i * @param length */ public void remove(int i, int length){ - + } /** * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] * @param list */ public static int[] getElements(LinkedList list){ return null; } - + /** * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 * @param list */ diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java index 627f2d3a87..59992f0cbd 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java @@ -1,19 +1,24 @@ package com.github.wdn.coding2017.basic; +/** + * 闃熷垪浣跨敤閾捐〃瀹炵幇姣旇緝绠鍗曠悊璁轰笂鏄棤鐣岄槦鍒 + * 濡傛灉浣跨敤鏁扮粍闇瑕佸鐞嗗緢澶氶棶棰樻瘮濡傞暱搴﹂檺鍒讹紝鍏冪礌鐨勫鍒 + */ public class Queue { - - public void enQueue(Object o){ + private LinkedList queue = new LinkedList(); + public void enQueue(Object o){ + queue.add(o); } public Object deQueue(){ - return null; + return queue.remove(0); } public boolean isEmpty(){ - return false; + return queue.size()==0; } public int size(){ - return -1; + return queue.size(); } } diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java index a5970ed4c7..f0a0fe56e9 100644 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java +++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java @@ -1,22 +1,27 @@ package com.github.wdn.coding2017.basic; +/** + * 浣跨敤list瀹炵幇姣旇緝绠鍗 + * 鍙互鑰冭檻浣跨敤鍏跺畠缁撴瀯 + */ public class Stack { private ArrayList elementData = new ArrayList(); - public void push(Object o){ + public void push(Object o){ + elementData.add(o); } public Object pop(){ - return null; + return elementData.remove(elementData.size()-1); } public Object peek(){ - return null; + return elementData.get(elementData.size()-1); } public boolean isEmpty(){ - return false; + return elementData.size()==0; } public int size(){ - return -1; + return elementData.size(); } } From 33f10552a644204c50bbe96924dd546bb2e8a814 Mon Sep 17 00:00:00 2001 From: unknown <鏍戞湪> Date: Sat, 11 Mar 2017 18:32:27 +0800 Subject: [PATCH 272/646] =?UTF-8?q?565832157=20=E6=B5=8B=E8=AF=95=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=20=E6=9C=AA=E5=81=9A=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/array/ArrayUtil.java | 96 ++++++++++++++ .../coderising/download/DownloadThread.java | 20 +++ .../coderising/download/FileDownloader.java | 73 +++++++++++ .../download/FileDownloaderTest.java | 59 +++++++++ .../coderising/download/api/Connection.java | 23 ++++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++++ .../download/impl/ConnectionManagerImpl.java | 15 +++ .../coderising/litestruts/LoginAction.java | 39 ++++++ .../src/com/coderising/litestruts/Struts.java | 37 ++++++ .../com/coderising/litestruts/StrutsTest.java | 43 ++++++ .../src/com/coderising/litestruts/View.java | 23 ++++ .../src/com/coderising/litestruts/struts.xml | 11 ++ .../src/com/coding/basic/ArrayList.java | 32 +++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 122 ++++++++++++++++++ .../565832157/src/com/coding/basic/List.java | 9 ++ .../565832157/src/com/coding/basic/Queue.java | 19 +++ .../565832157/src/com/coding/basic/Stack.java | 22 ++++ 22 files changed, 729 insertions(+) create mode 100644 group23/565832157/src/com/coderising/array/ArrayUtil.java create mode 100644 group23/565832157/src/com/coderising/download/DownloadThread.java create mode 100644 group23/565832157/src/com/coderising/download/FileDownloader.java create mode 100644 group23/565832157/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group23/565832157/src/com/coderising/download/api/Connection.java create mode 100644 group23/565832157/src/com/coderising/download/api/ConnectionException.java create mode 100644 group23/565832157/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group23/565832157/src/com/coderising/download/api/DownloadListener.java create mode 100644 group23/565832157/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group23/565832157/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group23/565832157/src/com/coderising/litestruts/LoginAction.java create mode 100644 group23/565832157/src/com/coderising/litestruts/Struts.java create mode 100644 group23/565832157/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group23/565832157/src/com/coderising/litestruts/View.java create mode 100644 group23/565832157/src/com/coderising/litestruts/struts.xml create mode 100644 group23/565832157/src/com/coding/basic/ArrayList.java create mode 100644 group23/565832157/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group23/565832157/src/com/coding/basic/Iterator.java create mode 100644 group23/565832157/src/com/coding/basic/LinkedList.java create mode 100644 group23/565832157/src/com/coding/basic/List.java create mode 100644 group23/565832157/src/com/coding/basic/Queue.java create mode 100644 group23/565832157/src/com/coding/basic/Stack.java diff --git a/group23/565832157/src/com/coderising/array/ArrayUtil.java b/group23/565832157/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..e5ddb476a6 --- /dev/null +++ b/group23/565832157/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,96 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group23/565832157/src/com/coderising/download/DownloadThread.java b/group23/565832157/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..900a3ad358 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group23/565832157/src/com/coderising/download/FileDownloader.java b/group23/565832157/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..c3c8a3f27d --- /dev/null +++ b/group23/565832157/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group23/565832157/src/com/coderising/download/FileDownloaderTest.java b/group23/565832157/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4ff7f46ae0 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group23/565832157/src/com/coderising/download/api/Connection.java b/group23/565832157/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group23/565832157/src/com/coderising/download/api/ConnectionException.java b/group23/565832157/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ b/group23/565832157/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group23/565832157/src/com/coderising/download/api/ConnectionManager.java b/group23/565832157/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group23/565832157/src/com/coderising/download/api/DownloadListener.java b/group23/565832157/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group23/565832157/src/com/coderising/download/impl/ConnectionImpl.java b/group23/565832157/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..36a9d2ce15 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group23/565832157/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group23/565832157/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..172371dd55 --- /dev/null +++ b/group23/565832157/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group23/565832157/src/com/coderising/litestruts/LoginAction.java b/group23/565832157/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group23/565832157/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group23/565832157/src/com/coderising/litestruts/Struts.java b/group23/565832157/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..6df190d484 --- /dev/null +++ b/group23/565832157/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,37 @@ +package com.coderising.litestruts; + +import java.lang.reflect.Method; +import java.util.Map; + + + +public class Struts { + + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + + return null; + } + +} diff --git a/group23/565832157/src/com/coderising/litestruts/StrutsTest.java b/group23/565832157/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group23/565832157/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group23/565832157/src/com/coderising/litestruts/View.java b/group23/565832157/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group23/565832157/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group23/565832157/src/com/coderising/litestruts/struts.xml b/group23/565832157/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..e5d9aebba8 --- /dev/null +++ b/group23/565832157/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group23/565832157/src/com/coding/basic/ArrayList.java b/group23/565832157/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..1f185736f9 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/ArrayList.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group23/565832157/src/com/coding/basic/BinaryTreeNode.java b/group23/565832157/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group23/565832157/src/com/coding/basic/Iterator.java b/group23/565832157/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group23/565832157/src/com/coding/basic/LinkedList.java b/group23/565832157/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..09fe0a8ff3 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/LinkedList.java @@ -0,0 +1,122 @@ +package com.coding.basic; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group23/565832157/src/com/coding/basic/List.java b/group23/565832157/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group23/565832157/src/com/coding/basic/Queue.java b/group23/565832157/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..36e516e266 --- /dev/null +++ b/group23/565832157/src/com/coding/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group23/565832157/src/com/coding/basic/Stack.java b/group23/565832157/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..a5a04de76d --- /dev/null +++ b/group23/565832157/src/com/coding/basic/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From 23f62d1c7341d127f0039e6a18da53cca798d48e Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 19:01:42 +0800 Subject: [PATCH 273/646] done with LinkedList&Queue&Stack no Test --- group22/2622819383/Task1/LinkedList.java | 127 +++++++++++++++++------ group22/2622819383/Task1/Queue.java | 10 +- group22/2622819383/Task1/Stack.java | 11 +- 3 files changed, 105 insertions(+), 43 deletions(-) diff --git a/group22/2622819383/Task1/LinkedList.java b/group22/2622819383/Task1/LinkedList.java index d431e25fdb..70ddd5d7a0 100644 --- a/group22/2622819383/Task1/LinkedList.java +++ b/group22/2622819383/Task1/LinkedList.java @@ -1,59 +1,118 @@ public class LinkedList implements List { - private Node head; + private Node header; + + private Node trailer; + + private int theSize; + + public LinkedList() { + header = new Node(null, null, null); + trailer = new Node(null, header, null); + header.succ = trailer; + theSize = 0; + } public void add(Object o){ - + add(size(), o); } public void add(int index , Object o){ - + if (index < 0 || theSize < index) throw new IndexOutOfBoundsException(); + Node p = header; + while (0 < index--) p = p.succ(); + p.insertAsSucc(o); + theSize++; } public Object get(int index){ - return null; + if (index < 0 || theSize <= index) throw new IndexOutOfBoundsException(); + Node p = header.succ(); + while (0 < index--) p = p.succ(); + + return p.data(); } public Object remove(int index){ - return null; + if (0 < index || theSize <= index) throw new IndexOutOfBoundsException(); + Node p = header.succ(); + while (0 < index--) p = p.succ(); + Object removed = p.data(); + p.pred().succ = p.succ(); + p.succ().pred = p.pred(); + theSize--; + return removed; } public int size(){ - return -1; + return theSize; } public void addFirst(Object o){ - + header.insertAsSucc(o); } public void addLast(Object o){ - + trailer.insertAsPred(o); } public Object removeFirst(){ - return null; + return remove(0); } public Object removeLast(){ - return null; + return remove(theSize - 1); } public Iterator iterator(){ - return null; - } - + return new LinkedListIterator(); + } + private class LinkedListIterator implements Iterator { + private Node current = header.succ(); + public boolean hasNext() { + return current != trailer; + } + public Object next() { + if (!hasNext()) throw new java.util.NoSuchElementException(); + Object item = current.data(); + current = current.succ(); + return item; + } + } - private static class Node{ - Object data; - Node next; + private static class Node{ + private Object data; + private Node pred; + private Node succ; + public Node(Object d, Node p, Node s) { + data = d; + pred = p; + succ = s; + } + public Object data() { return data; } + public Node succ() { return succ; } + public Node pred() { return pred; } + //插入前驱节点,返回新节点 + public Node insertAsPred(Object data) { + Node p = new Node(data, pred, this); + pred = pred.succ = p; + return p; + } + public Node insertAsSucc(Object data) { + Node p = new Node(data, this, succ); + succ = succ.pred = p; + return p; + } + + } /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * 把该链表逆置 + * 例如链表为 3->7->10 , 逆置后变为 10->7->3 */ public void reverse(){ } /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * 删除一个单链表的前半部分 + * 例如:list = 2->5->7->8 , 删除以后的值为 7->8 + * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 */ public void removeFirstHalf(){ @@ -61,7 +120,7 @@ public void removeFirstHalf(){ } /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 * @param i * @param length */ @@ -69,11 +128,11 @@ public void remove(int i, int length){ } /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * 假定当前链表和list均包含已升序排列的整数 + * 从当前链表中取出那些list所指定的元素 + * 例如当前链表 = 11->101->201->301->401->501->601->701 * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 返回的结果应该是[101,301,401,601] * @param list */ public static int[] getElements(LinkedList list){ @@ -81,8 +140,8 @@ public static int[] getElements(LinkedList list){ } /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 从当前链表中中删除在list中出现的元素 * @param list */ @@ -92,16 +151,16 @@ public void subtract(LinkedList list){ } /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) */ public void removeDuplicateValues(){ } /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) * @param min * @param max */ @@ -110,8 +169,8 @@ public void removeRange(int min, int max){ } /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 * @param list */ public LinkedList intersection( LinkedList list){ diff --git a/group22/2622819383/Task1/Queue.java b/group22/2622819383/Task1/Queue.java index 08f1e8ba29..654a1e3e38 100644 --- a/group22/2622819383/Task1/Queue.java +++ b/group22/2622819383/Task1/Queue.java @@ -1,17 +1,19 @@ public class Queue { + private LinkedList elementData = new LinkedList(); - public void enQueue(Object o){ + public void enQueue(Object o){ + elementData.addLast(o); } public Object deQueue(){ - return null; + return elementData.removeFirst(); } public boolean isEmpty(){ - return false; + return size() == 0; } public int size(){ - return -1; + return elementData.size(); } } diff --git a/group22/2622819383/Task1/Stack.java b/group22/2622819383/Task1/Stack.java index 6c8c49bb10..17a4d0bd0f 100644 --- a/group22/2622819383/Task1/Stack.java +++ b/group22/2622819383/Task1/Stack.java @@ -1,20 +1,21 @@ public class Stack { private ArrayList elementData = new ArrayList(); - public void push(Object o){ + public void push(Object o){ + elementData.add(o); } public Object pop(){ - return null; + return elementData.remove(size() - 1); } public Object peek(){ - return null; + return elementData.get(size() - 1); } public boolean isEmpty(){ - return false; + return size() == 0; } public int size(){ - return -1; + return elementData.size(); } } From b8de47fd8878fbda20ab528b2febe45b7977eb6f Mon Sep 17 00:00:00 2001 From: "haibo.yu" Date: Sat, 11 Mar 2017 19:15:32 +0800 Subject: [PATCH 274/646] update --- group08/286060098/3-12/pom.xml | 4 +- .../coderising/download/DownloadCallable.java | 52 +++++ .../coderising/download/DownloadThread.java | 20 -- .../coderising/download/FileDownloader.java | 191 ++++++++++++------ .../download/FileDownloaderTest.java | 90 ++++----- .../coderising/download/api/Connection.java | 52 +++-- .../download/api/ConnectionManager.java | 5 +- .../download/impl/ConnectionImpl.java | 58 ++++-- .../download/impl/ConnectionManagerImpl.java | 50 ++++- 9 files changed, 349 insertions(+), 173 deletions(-) create mode 100644 group08/286060098/3-12/src/com/coderising/download/DownloadCallable.java delete mode 100644 group08/286060098/3-12/src/com/coderising/download/DownloadThread.java diff --git a/group08/286060098/3-12/pom.xml b/group08/286060098/3-12/pom.xml index 7097bcd0ec..20e7fbc415 100644 --- a/group08/286060098/3-12/pom.xml +++ b/group08/286060098/3-12/pom.xml @@ -14,8 +14,8 @@ 3.5 19.0 - 1.7 - 1.7 + 1.8 + 1.8 1.7.5 diff --git a/group08/286060098/3-12/src/com/coderising/download/DownloadCallable.java b/group08/286060098/3-12/src/com/coderising/download/DownloadCallable.java new file mode 100644 index 0000000000..2ee54528a7 --- /dev/null +++ b/group08/286060098/3-12/src/com/coderising/download/DownloadCallable.java @@ -0,0 +1,52 @@ +package com.coderising.download; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.concurrent.Callable; + +import com.coderising.download.api.Connection; + +public class DownloadCallable implements Callable { + + private File downFile; + + private Connection conn; + + private int startPos; + + private int endPos; + + public DownloadCallable(File downFile, Connection conn, int startPos, int endPos) { + this.downFile = downFile; + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + @Override + public Boolean call() throws Exception { + RandomAccessFile out = null; + try { + downFile.setWritable(true); + out = new RandomAccessFile(downFile, "rwd"); + out.seek(startPos); + System.out.println(startPos); + byte[] buffer = conn.read(startPos, endPos); + out.write(buffer, 0, buffer.length); + return Boolean.TRUE; + } catch (Exception e) { + e.printStackTrace(); + return Boolean.FALSE; + } finally { + if (out != null) { + try { + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + +} diff --git a/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java b/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java deleted file mode 100644 index 1456314140..0000000000 --- a/group08/286060098/3-12/src/com/coderising/download/DownloadThread.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.coderising.download; - -import com.coderising.download.api.Connection; - -public class DownloadThread extends Thread{ - - Connection conn; - int startPos; - int endPos; - - public DownloadThread( Connection conn, int startPos, int endPos){ - - this.conn = conn; - this.startPos = startPos; - this.endPos = endPos; - } - public void run(){ - - } -} diff --git a/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java b/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java index f5d7999eb4..4138c1dbd9 100644 --- a/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java +++ b/group08/286060098/3-12/src/com/coderising/download/FileDownloader.java @@ -1,73 +1,134 @@ package com.coderising.download; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.List; +import java.util.concurrent.CompletionService; +import java.util.concurrent.ExecutorCompletionService; +import java.util.concurrent.Executors; + import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; - +import com.google.common.collect.Lists; public class FileDownloader { - - String url; - - DownloadListener listener; - - ConnectionManager cm; - - - public FileDownloader(String _url) { - this.url = _url; - - } - - public void execute(){ - // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 - // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 - // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 - // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 - // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 - // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 - // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; - try { - - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); - - } catch (ConnectionException e) { - e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); - } - } - - - - - } - - public void setListener(DownloadListener listener) { - this.listener = listener; - } - - - - public void setConnectionManager(ConnectionManager ucm){ - this.cm = ucm; - } - - public DownloadListener getListener(){ - return this.listener; - } - + + private static final int DEFAULT_THREAD_NUM = 3; + + private File downFile = null; + + private List listeners = Lists.newArrayList(); + + private CompletionService completionService = new ExecutorCompletionService( + Executors.newFixedThreadPool(5)); + + private ConnectionManager cm; + + private String url; + + public FileDownloader(String url) { + this.url = url; + + } + + public void execute() { + Connection conn = null; + try { + conn = cm.open(this.url); + createFile(conn); + Long length = conn.getContentLength(); + int startIndex = 0; + int size = Double.valueOf(Math.ceil(length.intValue()) / DEFAULT_THREAD_NUM).intValue() ; + for (int i = 0; i < DEFAULT_THREAD_NUM; i++) { + conn = cm.open(this.url, startIndex, startIndex + size); + completionService.submit(new DownloadCallable(downFile, conn, startIndex, startIndex + size)); + startIndex += size; + } + for (int i = 0; i < DEFAULT_THREAD_NUM; i++) { + try { + if (completionService.take().get()) { + System.out.println("涓嬭浇鎴愬姛"); + } else { + System.out.println("涓嬭浇澶辫触"); + throw new RuntimeException("涓嬭浇澶辫触"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + for (DownloadListener listener : listeners) { + listener.notifyFinished(); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + } + + private boolean createFile(Connection conn) { + RandomAccessFile out = null; + try { + if (downFile == null) { + downFile = new File("/Users/haibo/Code/github/coding2017-1/" + "" + + "group08/286060098/3-12/src/com/coderising/" + conn.downLoadFileName()); + if (downFile.exists()) { + return true; + } + if (downFile.isDirectory()) { + System.out.println("鐩爣鏂囦欢涓嶈兘涓虹洰褰曪紒"); + return false; + } + if (!downFile.getParentFile().exists()) { + if (!downFile.getParentFile().mkdirs()) { + System.out.println("鍒涘缓鐩爣鏂囦欢鎵鍦ㄧ殑鐩綍澶辫触锛"); + return false; + } + } + try { + if (downFile.createNewFile()) { + System.out.println("鍒涘缓鏂囦欢鎴愬姛"); + out = new RandomAccessFile(downFile, "rwd"); + out.setLength(conn.getContentLength()); + System.out.println(downFile.length()); + return true; + } else { + System.out.println("鍒涘缓鏂囦欢澶辫触"); + return false; + } + } catch (IOException e) { + e.printStackTrace(); + System.out.println("鍒涘缓鏂囦欢澶辫触" + e.getMessage()); + return false; + } + } + return true; + } finally { + if (out != null) { + try { + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + public void addListener(DownloadListener listener) { + this.listeners.add(listener); + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public List getListener() { + return this.listeners; + } + } diff --git a/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java b/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java index 8171ee5763..af9627cb33 100644 --- a/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java +++ b/group08/286060098/3-12/src/com/coderising/download/FileDownloaderTest.java @@ -9,51 +9,49 @@ import com.coderising.download.impl.ConnectionManagerImpl; public class FileDownloaderTest { - boolean downloadFinished = false; - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testDownload() { - - String url = "http://localhost:8080/test.jpg"; - - FileDownloader downloader = new FileDownloader(url); - - - ConnectionManager cm = new ConnectionManagerImpl(); - downloader.setConnectionManager(cm); - - downloader.setListener(new DownloadListener() { - @Override - public void notifyFinished() { - downloadFinished = true; - } - - }); - - - downloader.execute(); - - // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 - while (!downloadFinished) { - try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 - Thread.sleep(5000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - System.out.println("涓嬭浇瀹屾垚锛"); - - - - } + + private boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "https://source.qunarzz.com/common/hf/logo.png"; + + FileDownloader downloader = new FileDownloader(url); + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.addListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + } } diff --git a/group08/286060098/3-12/src/com/coderising/download/api/Connection.java b/group08/286060098/3-12/src/com/coderising/download/api/Connection.java index 091c5c97ce..b1cad54eed 100644 --- a/group08/286060098/3-12/src/com/coderising/download/api/Connection.java +++ b/group08/286060098/3-12/src/com/coderising/download/api/Connection.java @@ -1,23 +1,41 @@ package com.coderising.download.api; import java.io.IOException; +import java.net.HttpURLConnection; public interface Connection { - /** - * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 - * @param startPos 寮濮嬩綅缃紝 浠0寮濮 - * @param endPos 缁撴潫浣嶇疆 - * @return - */ - public byte[] read(int startPos, int endPos) throws IOException; - /** - * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 - * @return - */ - public int getContentLength(); - - /** - * 鍏抽棴杩炴帴 - */ - public void close(); + + /** + * 鏋勫缓閾炬帴 + * + * @param conn + * @return + */ + Connection build(HttpURLConnection conn); + + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + long getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + void close(); + + /** + * 涓嬭浇鏂囦欢鍚 + */ + String downLoadFileName(); } diff --git a/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java index fb44ede457..41b9af1a14 100644 --- a/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java +++ b/group08/286060098/3-12/src/com/coderising/download/api/ConnectionManager.java @@ -6,5 +6,8 @@ public interface ConnectionManager { * @param url * @return */ - public Connection open(String url) throws ConnectionException; + public Connection open(String url) throws ConnectionException; + + + public Connection open(String url, int start, int end) throws ConnectionException; } diff --git a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java index 32f03efdc7..01a315ca2c 100644 --- a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,27 +1,53 @@ package com.coderising.download.impl; import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; + +import org.apache.commons.lang3.StringUtils; import com.coderising.download.api.Connection; +import com.google.common.base.Preconditions; + +public class ConnectionImpl implements Connection { + + private HttpURLConnection conn; + + private String fileName; + + public Connection build(HttpURLConnection conn) { + this.conn = conn; + return this; + } -public class ConnectionImpl implements Connection{ + @Override + public byte[] read(int startPos, int endPos) throws IOException { + Preconditions.checkArgument(startPos < endPos); + byte[] buffer = new byte[endPos - startPos]; + try (InputStream in = conn.getInputStream()) { + in.read(buffer, 0, endPos - startPos); + } catch (Exception e) { + throw new RuntimeException(e); + } + return buffer; + } - @Override - public byte[] read(int startPos, int endPos) throws IOException { - - return null; - } + @Override + public long getContentLength() { + return conn.getContentLengthLong(); + } - @Override - public int getContentLength() { - - return 0; - } + @Override + public void close() { - @Override - public void close() { - - - } + } + @Override + public String downLoadFileName() { + if (StringUtils.isNotBlank(fileName)) { + return fileName; + } + fileName = conn.getURL().getFile(); + return fileName; + } } diff --git a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java index 046f7c49a4..80046c2ed3 100644 --- a/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group08/286060098/3-12/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -1,15 +1,53 @@ package com.coderising.download.impl; -import com.coderising.download.api.Connection; +import java.net.HttpURLConnection; +import java.net.URL; + import com.coderising.download.api.ConnectionException; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionManager; +import com.google.common.base.Preconditions; public class ConnectionManagerImpl implements ConnectionManager { - @Override - public Connection open(String url) throws ConnectionException { - - return null; - } + private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionManagerImpl.class); + + @Override + public Connection open(String url) throws ConnectionException { + Preconditions.checkArgument(StringUtils.isNoneBlank(url), "闈炴硶閾炬帴"); + Connection connection = new ConnectionImpl(); + try { + URL link = new URL(url); + HttpURLConnection conn = (HttpURLConnection) link.openConnection(); + conn.setReadTimeout(5000); + conn.setRequestMethod("GET"); + connection.build(conn); + } catch (Exception e) { + LOGGER.error("杩炴帴鎵撳紑澶辫触"); + } + return connection; + } + + @Override + public Connection open(String url, int start, int end) { + Preconditions.checkArgument(StringUtils.isNoneBlank(url), "闈炴硶閾炬帴"); + Connection connection = new ConnectionImpl(); + try { + URL link = new URL(url); + HttpURLConnection conn = (HttpURLConnection) link.openConnection(); + conn.setReadTimeout(5000); + conn.setRequestMethod("GET"); + System.out.println("bytes=" + start + "-" + end); + conn.setRequestProperty("Range", "bytes=" + start + "-" + end); + connection.build(conn); + } catch (Exception e) { + LOGGER.error("閾炬帴鎵撳紑澶辫触"); + } + return connection; + } } From ee94cd7ce5ff84826a35d360a631f4cb09e8110e Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 19:25:05 +0800 Subject: [PATCH 275/646] change from GB2312 to UTF-8 --- group22/2622819383/Task1/ArrayList.java | 103 ++++++++++++++---------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/group22/2622819383/Task1/ArrayList.java b/group22/2622819383/Task1/ArrayList.java index 1c060ffe3a..19b0b6ca53 100644 --- a/group22/2622819383/Task1/ArrayList.java +++ b/group22/2622819383/Task1/ArrayList.java @@ -8,11 +8,10 @@ public class ArrayList implements List { private Object[] elementData; - //add()时用于扩容 + //add()鏃剁敤浜庡湪蹇呰鏃跺埢鎵╁厖搴曞眰鏁扮粍瀹归噺 private void expand() { - if (size < capacity) return;//尚未满员,不必扩容 - - if (capacity < DEFAULT_CAPACITY) capacity = DEFAULT_CAPACITY;//不低于最小容量 + if (size < capacity) return;//灏氭湭婊″憳锛屼笉蹇呮墿瀹 + if (capacity < DEFAULT_CAPACITY) capacity = DEFAULT_CAPACITY;//涓嶄綆浜庢渶灏忓閲 Object[] oldElem = elementData; elementData = new Object[capacity <<= 1]; @@ -20,67 +19,65 @@ private void expand() { elementData[i] = oldElem[i]; } - //remove()时用于缩容 + //remove()鏃剁敤浜庡湪蹇呰鏃跺埢缂╁皬搴曞眰鏁扮粍瀹归噺 private void shrink() { - if (capacity < DEFAULT_CAPACITY << 1) return;//不致收缩至DEFAULT_CAPACITY以下 - - if (capacity >> 2 < size) return; //以25%为界 + if (capacity < DEFAULT_CAPACITY << 1) return;//涓嶈嚧鏀剁缉鑷矰EFAULT_CAPACITY浠ヤ笅 + if (capacity >> 2 < size) return; //浠25%涓虹晫 Object[] oldElem = elementData; elementData = new Object[capacity >>= 1]; for (int i = 0; i < size; i++) - elementData[i] = oldElem[i]; - + elementData[i] = oldElem[i]; } public ArrayList() { clear(); } - public ArrayList(Object ...args) { - this(); - for (Object o : args) - add(o); - } public void clear() { size = 0; elementData = new Object[capacity = DEFAULT_CAPACITY]; } - public int size() { return size; } + public int size() { + return size; + } - public int capacity() { return capacity; }//用于测试shrink()&expand() + public int capacity() { //鐢ㄤ簬娴嬭瘯shrink()&expand() + return capacity; + } - public boolean isEmpty() { return size == 0; } + public boolean isEmpty() { + return size == 0; + } public void add(Object o){ add(size(), o); } + public void add(int index, Object o){ - if (index < 0 || size < index) throw new IndexOutOfBoundsException(); - expand(); + if (index < 0 || size < index) + throw new IndexOutOfBoundsException(); + expand(); for (int i = size; i > index; i--) elementData[i] = elementData[i - 1]; elementData[index] = o; - size++; } - public void add(Object ...args) { - for (Object o : args) - add(o); - } - + public Object get(int index){ - if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); - return elementData[index]; + if (index < 0 || size <= index) + throw new IndexOutOfBoundsException(); + + return elementData[index]; } public Object remove(int index){ - if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); + if (index < 0 || size <= index) + throw new IndexOutOfBoundsException(); Object removed = elementData[index]; - for (int i = index; i < size - 1; i++) elementData[i] = elementData[i + 1]; size--; @@ -88,10 +85,7 @@ public Object remove(int index){ return removed; } - public void removeElems(int ...args) { - for (int i : args) - remove(i); - } + public Iterator iterator(){ return new ArrayListIterator(); @@ -99,15 +93,39 @@ public Iterator iterator(){ private class ArrayListIterator implements Iterator { private int current; - public boolean hasNext() { return current != size; } + + public boolean hasNext() { + return current != size; + } + public Object next() { - if (!hasNext()) throw new java.util.NoSuchElementException(); + if (!hasNext()) + throw new java.util.NoSuchElementException(); return elementData[current++]; } } + + + //浠ヤ笅鏂规硶渚夸簬娴嬭瘯 + + public ArrayList(Object ...args) { + this(); + for (Object o : args) + add(o); + } + + public void add(Object ...args) { + for (Object o : args) + add(o); + } + + public void removeElems(int ...args) { + for (int i : args) + remove(i); + } public static void showElements(ArrayList list) { - System.out.print("当前list中元素:"); + System.out.print("褰撳墠list涓厓绱狅細"); Iterator iter = list.iterator(); while (iter.hasNext()) System.out.print(iter.next() + " "); @@ -115,12 +133,11 @@ public static void showElements(ArrayList list) { } public static void test(ArrayList list) { - System.out.println("--------基本方法测试---------"); - System.out.println("当前list.isEmpty(): " + list.isEmpty()); - System.out.println("当前list.size(): " + list.size()); - System.out.println("当前list.capacity(): " + list.capacity()); - showElements(list); - + System.out.println("--------鍩烘湰鏂规硶娴嬭瘯---------"); + System.out.println("褰撳墠list.isEmpty(): " + list.isEmpty()); + System.out.println("褰撳墠list.size(): " + list.size()); + System.out.println("褰撳墠list.capacity(): " + list.capacity()); + showElements(list); } public static void main(String[] args) { From 4b527d28acde98b013b06bbe658bdcd9e749b792 Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 19:33:45 +0800 Subject: [PATCH 276/646] change Tab --- group22/2622819383/Task1/ArrayList.java | 62 ++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/group22/2622819383/Task1/ArrayList.java b/group22/2622819383/Task1/ArrayList.java index 19b0b6ca53..55c8c616d0 100644 --- a/group22/2622819383/Task1/ArrayList.java +++ b/group22/2622819383/Task1/ArrayList.java @@ -1,12 +1,12 @@ public class ArrayList implements List { - private int size; + private int size; private int capacity; private static final int DEFAULT_CAPACITY = 10; - private Object[] elementData; + private Object[] elementData; //add()鏃剁敤浜庡湪蹇呰鏃跺埢鎵╁厖搴曞眰鏁扮粍瀹归噺 private void expand() { @@ -51,29 +51,29 @@ public boolean isEmpty() { return size == 0; } - public void add(Object o){ - add(size(), o); - } - - public void add(int index, Object o){ + public void add(Object o){ + add(size(), o); + } + + public void add(int index, Object o){ if (index < 0 || size < index) throw new IndexOutOfBoundsException(); - expand(); + expand(); for (int i = size; i > index; i--) elementData[i] = elementData[i - 1]; elementData[index] = o; size++; - } - - public Object get(int index){ + } + + public Object get(int index){ if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); - + return elementData[index]; - } - - public Object remove(int index){ + } + + public Object remove(int index){ if (index < 0 || size <= index) throw new IndexOutOfBoundsException(); @@ -82,15 +82,15 @@ public Object remove(int index){ elementData[i] = elementData[i + 1]; size--; shrink(); - return removed; - } - - - - public Iterator iterator(){ - return new ArrayListIterator(); - } - + return removed; + } + + + + public Iterator iterator(){ + return new ArrayListIterator(); + } + private class ArrayListIterator implements Iterator { private int current; @@ -105,21 +105,21 @@ public Object next() { return elementData[current++]; } } - - + + //浠ヤ笅鏂规硶渚夸簬娴嬭瘯 - + public ArrayList(Object ...args) { this(); for (Object o : args) add(o); } - + public void add(Object ...args) { for (Object o : args) add(o); } - + public void removeElems(int ...args) { for (int i : args) remove(i); @@ -131,7 +131,7 @@ public static void showElements(ArrayList list) { System.out.print(iter.next() + " "); System.out.println(); } - + public static void test(ArrayList list) { System.out.println("--------鍩烘湰鏂规硶娴嬭瘯---------"); System.out.println("褰撳墠list.isEmpty(): " + list.isEmpty()); @@ -139,7 +139,7 @@ public static void test(ArrayList list) { System.out.println("褰撳墠list.capacity(): " + list.capacity()); showElements(list); } - + public static void main(String[] args) { ArrayList list = new ArrayList(1, 2, 3, 4, 5); test(list); From b67c212a381e5a8a669b73c8ca721a6a51b25ef0 Mon Sep 17 00:00:00 2001 From: xxp17457741 <17457741@qq.com> Date: Sat, 11 Mar 2017 19:40:03 +0800 Subject: [PATCH 277/646] 17457741 --- address.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 address.txt diff --git a/address.txt b/address.txt new file mode 100644 index 0000000000..975ea2b26d --- /dev/null +++ b/address.txt @@ -0,0 +1 @@ + http://www.cnblogs.com/xxp17457741/p/6504673.html \ No newline at end of file From 83a0020c9d6c0d0dac47f8808d04435e7beb035b Mon Sep 17 00:00:00 2001 From: MAC Date: Sat, 11 Mar 2017 19:42:32 +0800 Subject: [PATCH 278/646] supple commit readme --- ...73\204\346\203\205\345\206\265\347\273\237\350\256\241.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" index 8700b37aaf..b56980dad6 100644 --- "a/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" +++ "b/group26/26\347\273\204\346\203\205\345\206\265\347\273\237\350\256\241.md" @@ -4,7 +4,7 @@ | | 鏂囩珷1 | | | | | | | | | | | JEE-閫嗘按鐧惧窛 | 宸插畬鎴 | 瀹屾垚90% | | | | | | | | | | | 鐧惧害 www.baidu.com | | | | | | | | | | -| | | | | | | | | | | | -| | | | | | | | | | | | +| jiaxun1990 | 宸插畬鎴 | | | | | | | | | | +| | https://goo.gl/Wvz3Od | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | \ No newline at end of file From 892f436bf02f02df43f92aab723665a23e454615 Mon Sep 17 00:00:00 2001 From: xxp17457741 <17457741@qq.com> Date: Sat, 11 Mar 2017 19:46:39 +0800 Subject: [PATCH 279/646] 17457741 --- group22/17457741/src/address.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 group22/17457741/src/address.txt diff --git a/group22/17457741/src/address.txt b/group22/17457741/src/address.txt new file mode 100644 index 0000000000..975ea2b26d --- /dev/null +++ b/group22/17457741/src/address.txt @@ -0,0 +1 @@ + http://www.cnblogs.com/xxp17457741/p/6504673.html \ No newline at end of file From d19d48ffff0c04569e98553a5a78a457f85324dd Mon Sep 17 00:00:00 2001 From: xxp17457741 <17457741@qq.com> Date: Sat, 11 Mar 2017 19:47:44 +0800 Subject: [PATCH 280/646] Delete address.txt --- address.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 address.txt diff --git a/address.txt b/address.txt deleted file mode 100644 index 975ea2b26d..0000000000 --- a/address.txt +++ /dev/null @@ -1 +0,0 @@ - http://www.cnblogs.com/xxp17457741/p/6504673.html \ No newline at end of file From 05f0a9dcc608600e67b50bae9f679ba0b2a799a6 Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 19:48:05 +0800 Subject: [PATCH 281/646] change Tab --- group22/2622819383/Task1/Iterator.java | 4 +-- group22/2622819383/Task1/LinkedList.java | 43 ++++++++++++++++++------ group22/2622819383/Task1/List.java | 10 +++--- group22/2622819383/Task1/Queue.java | 30 ++++++++--------- group22/2622819383/Task1/Stack.java | 38 +++++++++++---------- 5 files changed, 74 insertions(+), 51 deletions(-) diff --git a/group22/2622819383/Task1/Iterator.java b/group22/2622819383/Task1/Iterator.java index 96a43dbe0a..f390e63f3a 100644 --- a/group22/2622819383/Task1/Iterator.java +++ b/group22/2622819383/Task1/Iterator.java @@ -1,5 +1,5 @@ public interface Iterator { - public boolean hasNext(); - public Object next(); + public boolean hasNext(); + public Object next(); } diff --git a/group22/2622819383/Task1/LinkedList.java b/group22/2622819383/Task1/LinkedList.java index 70ddd5d7a0..d1af15765f 100644 --- a/group22/2622819383/Task1/LinkedList.java +++ b/group22/2622819383/Task1/LinkedList.java @@ -1,6 +1,6 @@ public class LinkedList implements List { - private Node header; + private Node header; private Node trailer; @@ -12,26 +12,30 @@ public LinkedList() { header.succ = trailer; theSize = 0; } - public void add(Object o){ add(size(), o); } + public void add(int index , Object o){ if (index < 0 || theSize < index) throw new IndexOutOfBoundsException(); + Node p = header; while (0 < index--) p = p.succ(); p.insertAsSucc(o); theSize++; } + public Object get(int index){ if (index < 0 || theSize <= index) throw new IndexOutOfBoundsException(); + Node p = header.succ(); while (0 < index--) p = p.succ(); - return p.data(); } + public Object remove(int index){ if (0 < index || theSize <= index) throw new IndexOutOfBoundsException(); + Node p = header.succ(); while (0 < index--) p = p.succ(); Object removed = p.data(); @@ -48,23 +52,30 @@ public int size(){ public void addFirst(Object o){ header.insertAsSucc(o); } + public void addLast(Object o){ trailer.insertAsPred(o); } + public Object removeFirst(){ return remove(0); } + public Object removeLast(){ return remove(theSize - 1); } + public Iterator iterator(){ return new LinkedListIterator(); } + private class LinkedListIterator implements Iterator { private Node current = header.succ(); + public boolean hasNext() { return current != trailer; } + public Object next() { if (!hasNext()) throw new java.util.NoSuchElementException(); Object item = current.data(); @@ -77,28 +88,38 @@ private static class Node{ private Object data; private Node pred; private Node succ; + public Node(Object d, Node p, Node s) { data = d; pred = p; succ = s; } - public Object data() { return data; } - public Node succ() { return succ; } - public Node pred() { return pred; } - //插入前驱节点,返回新节点 + + public Object data() { + return data; + } + + public Node succ() { + return succ; + } + + public Node pred() { + return pred; + } + + //插入前驱节点,返回插入的新节点 public Node insertAsPred(Object data) { Node p = new Node(data, pred, this); pred = pred.succ = p; return p; } + + //插入后继节点,返回插入的新节点 public Node insertAsSucc(Object data) { Node p = new Node(data, this, succ); succ = succ.pred = p; return p; - } - - - + } } /** diff --git a/group22/2622819383/Task1/List.java b/group22/2622819383/Task1/List.java index 4f7bcc71a8..c8f6da95a8 100644 --- a/group22/2622819383/Task1/List.java +++ b/group22/2622819383/Task1/List.java @@ -1,7 +1,7 @@ public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); } diff --git a/group22/2622819383/Task1/Queue.java b/group22/2622819383/Task1/Queue.java index 654a1e3e38..fa916cb089 100644 --- a/group22/2622819383/Task1/Queue.java +++ b/group22/2622819383/Task1/Queue.java @@ -1,19 +1,19 @@ public class Queue { private LinkedList elementData = new LinkedList(); - - public void enQueue(Object o){ + + public void enQueue(Object o){ elementData.addLast(o); - } - - public Object deQueue(){ - return elementData.removeFirst(); - } - - public boolean isEmpty(){ - return size() == 0; - } - - public int size(){ - return elementData.size(); - } + } + + public Object deQueue(){ + return elementData.removeFirst(); + } + + public boolean isEmpty(){ + return size() == 0; + } + + public int size(){ + return elementData.size(); + } } diff --git a/group22/2622819383/Task1/Stack.java b/group22/2622819383/Task1/Stack.java index 17a4d0bd0f..3072c65370 100644 --- a/group22/2622819383/Task1/Stack.java +++ b/group22/2622819383/Task1/Stack.java @@ -1,21 +1,23 @@ public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ elementData.add(o); - } - - public Object pop(){ - return elementData.remove(size() - 1); - } - - public Object peek(){ - return elementData.get(size() - 1); - } - public boolean isEmpty(){ - return size() == 0; - } - public int size(){ - return elementData.size(); - } + } + + public Object pop(){ + return elementData.remove(size() - 1); + } + + public Object peek(){ + return elementData.get(size() - 1); + } + + public boolean isEmpty(){ + return size() == 0; + } + + public int size(){ + return elementData.size(); + } } From 6fc5ae0ccfe9d2f3d4862dd808cea4eec35b25ce Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 20:07:43 +0800 Subject: [PATCH 282/646] change Tab --- group22/2622819383/Task1/LinkedList.java | 263 ++++++++++++----------- 1 file changed, 132 insertions(+), 131 deletions(-) diff --git a/group22/2622819383/Task1/LinkedList.java b/group22/2622819383/Task1/LinkedList.java index d1af15765f..0d87d2d72a 100644 --- a/group22/2622819383/Task1/LinkedList.java +++ b/group22/2622819383/Task1/LinkedList.java @@ -12,30 +12,31 @@ public LinkedList() { header.succ = trailer; theSize = 0; } - public void add(Object o){ - add(size(), o); - } - public void add(int index , Object o){ - if (index < 0 || theSize < index) throw new IndexOutOfBoundsException(); - + public void add(Object o) { + add(size(), o); + } + + public void add(int index , Object o) { + if (index < 0 || theSize < index) throw new IndexOutOfBoundsException(); + Node p = header; while (0 < index--) p = p.succ(); p.insertAsSucc(o); theSize++; - } - - public Object get(int index){ + } + + public Object get(int index) { if (index < 0 || theSize <= index) throw new IndexOutOfBoundsException(); - - Node p = header.succ(); + + Node p = header.succ(); while (0 < index--) p = p.succ(); return p.data(); - } - - public Object remove(int index){ - if (0 < index || theSize <= index) throw new IndexOutOfBoundsException(); - + } + + public Object remove(int index) { + if (0 < index || theSize <= index) throw new IndexOutOfBoundsException(); + Node p = header.succ(); while (0 < index--) p = p.succ(); Object removed = p.data(); @@ -43,39 +44,39 @@ public Object remove(int index){ p.succ().pred = p.pred(); theSize--; return removed; - } - - public int size(){ - return theSize; - } - - public void addFirst(Object o){ - header.insertAsSucc(o); - } - - public void addLast(Object o){ - trailer.insertAsPred(o); - } - - public Object removeFirst(){ - return remove(0); - } - - public Object removeLast(){ - return remove(theSize - 1); - } - - public Iterator iterator(){ - return new LinkedListIterator(); - } - - private class LinkedListIterator implements Iterator { + } + + public int size() { + return theSize; + } + + public void addFirst(Object o) { + header.insertAsSucc(o); + } + + public void addLast(Object o) { + trailer.insertAsPred(o); + } + + public Object removeFirst() { + return remove(0); + } + + public Object removeLast() { + return remove(theSize - 1); + } + + public Iterator iterator() { + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator { private Node current = header.succ(); - + public boolean hasNext() { return current != trailer; } - + public Object next() { if (!hasNext()) throw new java.util.NoSuchElementException(); Object item = current.data(); @@ -83,118 +84,118 @@ public Object next() { return item; } } - - private static class Node{ - private Object data; - private Node pred; + + private static class Node { + private Object data; + private Node pred; private Node succ; - + public Node(Object d, Node p, Node s) { data = d; pred = p; succ = s; } - + public Object data() { return data; } - + public Node succ() { return succ; } - + public Node pred() { return pred; } - + //插入前驱节点,返回插入的新节点 public Node insertAsPred(Object data) { Node p = new Node(data, pred, this); pred = pred.succ = p; return p; } - + //插入后继节点,返回插入的新节点 public Node insertAsSucc(Object data) { Node p = new Node(data, this, succ); succ = succ.pred = p; return p; } - } - - /** - * 把该链表逆置 - * 例如链表为 3->7->10 , 逆置后变为 10->7->3 - */ - public void reverse(){ - - } - - /** - * 删除一个单链表的前半部分 - * 例如:list = 2->5->7->8 , 删除以后的值为 7->8 - * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 假定当前链表和list均包含已升序排列的整数 - * 从当前链表中取出那些list所指定的元素 - * 例如当前链表 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 返回的结果应该是[101,301,401,601] - * @param list - */ - public static int[] getElements(LinkedList list){ - return null; - } - - /** - * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 - * 从当前链表中中删除在list中出现的元素 + } - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 - * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) - */ - public void removeDuplicateValues(){ - - } - - /** - * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 - * 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) - * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } + /** + * 把该链表逆置 + * 例如链表为 3->7->10 , 逆置后变为 10->7->3 + */ + public void reverse(){ + + } + + /** + * 删除一个单链表的前半部分 + * 例如:list = 2->5->7->8 , 删除以后的值为 7->8 + * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 假定当前链表和list均包含已升序排列的整数 + * 从当前链表中取出那些list所指定的元素 + * 例如当前链表 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 从当前链表中中删除在list中出现的元素 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) + */ + public void removeDuplicateValues(){ + + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } } From 6f45e392fe43e5a043cd976034ec706eacf66056 Mon Sep 17 00:00:00 2001 From: xiongrui233 Date: Sat, 11 Mar 2017 20:17:26 +0800 Subject: [PATCH 283/646] complete simple queue --- group22/.gitignore | 1 + group22/627559964/src/com/coding/basic/Queue.java | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 group22/.gitignore diff --git a/group22/.gitignore b/group22/.gitignore new file mode 100644 index 0000000000..d1945e125c --- /dev/null +++ b/group22/.gitignore @@ -0,0 +1 @@ +/627559964/ diff --git a/group22/627559964/src/com/coding/basic/Queue.java b/group22/627559964/src/com/coding/basic/Queue.java index 90f845e6cd..965894a9ea 100644 --- a/group22/627559964/src/com/coding/basic/Queue.java +++ b/group22/627559964/src/com/coding/basic/Queue.java @@ -8,23 +8,28 @@ */ public class Queue { - private Object[] queue = new Object[10]; + private LinkedList elements = new LinkedList();; private int size = 0; public void enQueue(Object o) { - + elements.add(o); + size ++; } public Object deQueue() { - return null; + size --; + return elements.removeLast(); } public boolean isEmpty() { + if (size == 0) { + return true; + } return false; } public int size() { - return -1; + return size; } } \ No newline at end of file From 5ad297828ae916ee3c50eccbfcb6c69341af2890 Mon Sep 17 00:00:00 2001 From: xiongrui233 Date: Sat, 11 Mar 2017 20:20:32 +0800 Subject: [PATCH 284/646] delete .classpath .project --- group22/627559964/.gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group22/627559964/.gitignore b/group22/627559964/.gitignore index 3727029200..6ef2139e00 100644 --- a/group22/627559964/.gitignore +++ b/group22/627559964/.gitignore @@ -1,2 +1,4 @@ /bin/ -.metadata \ No newline at end of file +.metadatas +.classpath +.project \ No newline at end of file From 347ef9d2d6540bfa9ce8031491407f3f7660c7cd Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sat, 11 Mar 2017 20:21:36 +0800 Subject: [PATCH 285/646] upload homework for 3-12 (code) --- .../coderising/download/DownloadThread.java | 83 ++++ .../coderising/download/FileDownloader.java | 99 +++++ .../download/FileDownloaderTest.java | 60 +++ .../coderising/download/api/Connection.java | 23 + .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 72 ++++ .../download/impl/ConnectionManagerImpl.java | 23 + .../3-12/code/com/coding/basic/Iterator.java | 7 + .../code/com/coding/basic/LinkedList.java | 395 ++++++++++++++++++ .../3-12/code/com/coding/basic/List.java | 9 + .../code/com/coding/test/LinkedListTest.java | 128 ++++++ 13 files changed, 919 insertions(+) create mode 100644 group08/619057560/3-12/code/com/coderising/download/DownloadThread.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/FileDownloader.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/FileDownloaderTest.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/api/Connection.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/api/ConnectionException.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/api/ConnectionManager.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/api/DownloadListener.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group08/619057560/3-12/code/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group08/619057560/3-12/code/com/coding/basic/Iterator.java create mode 100644 group08/619057560/3-12/code/com/coding/basic/LinkedList.java create mode 100644 group08/619057560/3-12/code/com/coding/basic/List.java create mode 100644 group08/619057560/3-12/code/com/coding/test/LinkedListTest.java diff --git a/group08/619057560/3-12/code/com/coderising/download/DownloadThread.java b/group08/619057560/3-12/code/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..a0a5cfe1c0 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/DownloadThread.java @@ -0,0 +1,83 @@ +package com.coderising.download; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + private static final String FILENAME = "test.jpg"; + + Connection conn; + int startPos; + int endPos; + + DownloadThreadListener listener; + int tag = 0; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + public void setTagAndListener(int tag, DownloadThreadListener listener) { + this.tag = tag; + this.listener = listener; + } + + public void run(){ + RandomAccessFile raf = null; + int offset = startPos, len; + byte[] buffer; + try { + raf = new RandomAccessFile(FILENAME, "rw"); + if (raf.length() == 0) { + raf.setLength(conn.getContentLength()); + } + raf.seek(startPos); + do { + len = endPos + 1 - offset; + if (len > 10000) { + len = 10000; + } + buffer = conn.read(offset, offset + len - 1); + if (buffer == null) { + processException(new NullPointerException()); + return; + } + raf.write(buffer); + offset += len; + } while (offset < endPos); + if (listener != null) { + listener.onFinished(conn, tag, true); + } + } catch (FileNotFoundException e) { + processException(e); + } catch (IOException e) { + processException(e); + } finally { + if (raf != null) { + try { + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + private void processException(Exception e) { + e.printStackTrace(); + if (listener != null) { + listener.onFinished(conn, tag, false); + } + } + + public static interface DownloadThreadListener { + public void onFinished(Connection conn, int tag, boolean succeeded); + } +} diff --git a/group08/619057560/3-12/code/com/coderising/download/FileDownloader.java b/group08/619057560/3-12/code/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..2da25e0597 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/FileDownloader.java @@ -0,0 +1,99 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coding.basic.Stack; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + // Use stack to check if all threads are finished + // When a thread is started, an empty Object will be pushed in this stack; + // when a thread is finished, an Object will be popped out. + private Stack mStack; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + Connection conn = null; + try { + int length = 0; + + int threadNum = 3; + mStack = new Stack(); + + DownloadThread.DownloadThreadListener dtListener = new DownloadThread.DownloadThreadListener() { + + @Override + public void onFinished(Connection conn, int tag, boolean succeeded) { + System.out.println("Thread with tag " + tag + (succeeded?" succeeded":" failed") + " to download"); + mStack.pop(); + if (conn != null) { + conn.close(); + } + if (mStack.isEmpty()) { + listener.notifyFinished(); + } + } + }; + + for (int i = 0; i < threadNum; i++) { + conn = cm.open(this.url); + if (length == 0) { + length = conn.getContentLength(); + } + mStack.push(new Object()); + DownloadThread dt = new DownloadThread(conn,length*i/threadNum,length*(i+1)/threadNum - 1); + dt.setTagAndListener(i, dtListener); + dt.start(); + System.out.println("DownloadThread with tag " + i + " created and started"); + } + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally{ +// if(conn != null){ +// conn.close(); +// } + } + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group08/619057560/3-12/code/com/coderising/download/FileDownloaderTest.java b/group08/619057560/3-12/code/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..a8b7ca79d4 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,60 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + //String url = "http://localhost:8080/test.jpg"; + String url = "https://edmullen.net/test/rc.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group08/619057560/3-12/code/com/coderising/download/api/Connection.java b/group08/619057560/3-12/code/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..9710e270e1 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group08/619057560/3-12/code/com/coderising/download/api/ConnectionException.java b/group08/619057560/3-12/code/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group08/619057560/3-12/code/com/coderising/download/api/ConnectionManager.java b/group08/619057560/3-12/code/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group08/619057560/3-12/code/com/coderising/download/api/DownloadListener.java b/group08/619057560/3-12/code/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..938e1ff063 --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,72 @@ +package com.coderising.download.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; + +public class ConnectionImpl implements Connection{ + + private URLConnection mUrlConnection = null; + private InputStream iStream; + private int currPos = 0; + + public ConnectionImpl(URL url) throws ConnectionException{ + try { + mUrlConnection = url.openConnection(); + mUrlConnection.connect(); + iStream = mUrlConnection.getInputStream(); + } catch (IOException e) { + mUrlConnection = null; + e.printStackTrace(); + throw new ConnectionException(); + } + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + int bytesLen = endPos - startPos + 1; + byte[] buffer = new byte[bytesLen]; + + if (currPos < startPos) { + iStream.skip(startPos - currPos); + } else if (currPos > startPos) { + // should not read previous bytes of input stream. + // return null to end this thread. + return null; + } + + for (int offset = 0, len; + bytesLen > 0 && (len = iStream.read(buffer, offset, bytesLen)) >= 0; + offset += len, bytesLen -= len) ; + currPos = endPos + 1; + + return buffer; + } + + @Override + public int getContentLength() { + if (mUrlConnection != null) { + return mUrlConnection.getContentLength(); + } + return 0; + } + + @Override + public void close() { + try { + if (iStream != null) { + iStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + currPos = 0; + mUrlConnection = null; + } + +} diff --git a/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionManagerImpl.java b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..954dfe293d --- /dev/null +++ b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,23 @@ +package com.coderising.download.impl; + +import java.net.MalformedURLException; +import java.net.URL; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + try { + return new ConnectionImpl(new URL(url)); + } catch (MalformedURLException e) { + e.printStackTrace(); + throw new ConnectionException(); + } + } + +} diff --git a/group08/619057560/3-12/code/com/coding/basic/Iterator.java b/group08/619057560/3-12/code/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..58058b650c --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + public void remove(); +} diff --git a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..392194c2f2 --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java @@ -0,0 +1,395 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + Node pNewNode = new Node(); + pNewNode.data = o; + + Node pNode = head; + + if (head == null) { + head = pNewNode; + return; + } + + while (pNode.next != null) { + pNode = pNode.next; + } + + pNode.next = pNewNode; + } + + public void add(int index , Object o){ + ensureBounds(index); + + Node pNewNode = new Node(); + pNewNode.data = o; + + if (index == 0) { + pNewNode.next = head; + head = pNewNode; + return; + } + + Node pNode = head; + while (--index > 0) { + pNode = pNode.next; + } + pNewNode.next = pNode.next; + pNode.next = pNewNode; + } + + public Object get(int index){ + ensureBounds(index); + + Node pNode = head; + while (index-- > 0) { + pNode = pNode.next; + } + + return pNode.data; + } + + public Object remove(int index){ + ensureBounds(index); + + Node pNode = head; + if (index == 0) { + head = head.next; + return pNode.data; + } + + while (--index > 0) { + pNode = pNode.next; + } + Node pTargetNode = pNode.next; + pNode.next = pTargetNode.next; + + return pTargetNode.data; + } + + private void ensureBounds(int index) { + if (index < 0 || index >= size()) { + throw new IndexOutOfBoundsException(); + } + } + + public int size(){ + Node pNode = head; + int num = 0; + while (pNode != null) { + pNode = pNode.next; + num++; + } + return num; + } + + public void addFirst(Object o){ + add(0, o); + } + + public void addLast(Object o){ + add(o); + } + + public Object removeFirst(){ + if (head == null) { + throw new NoSuchElementException(); + } + return remove(0); + } + + public Object removeLast(){ + if (head == null) { + throw new NoSuchElementException(); + } + + Node pNode = head; + Node pPrevNode = null; + while (pNode.next != null) { + pPrevNode = pNode; + pNode = pNode.next; + } + if (pPrevNode != null) { + pPrevNode.next = pNode.next; + } + else { + head = null; + } + return pNode.data; + } + + public Iterator iterator(){ + return new Itr(); + } + + private class Itr implements Iterator { + + int index = 0; + Node pCurr = head; + Node pPrevPrev = null; + boolean hasCalledRemove = false; + + @Override + public boolean hasNext() { + return (pCurr != null); + } + + @Override + public Object next() { + if (pCurr == null) { + throw new NoSuchElementException(); + } + Object retOb = pCurr.data; + pCurr = pCurr.next; + index++; + if (index == 2) { + pPrevPrev = head; + } else if (index > 2 && !hasCalledRemove) { + pPrevPrev = pPrevPrev.next; + } + + hasCalledRemove = false; + + return retOb; + } + + @Override + public void remove() { + if (hasCalledRemove) { + throw new IllegalStateException(); + } + hasCalledRemove = true; + + if (index == 1) { + head = head.next; + index--; + } else if (pPrevPrev != null) { + pPrevPrev.next = pCurr; + index--; + } else { + throw new IllegalStateException(); + } + } + + } + + private static class Node{ + Object data; + Node next; + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + if (head == null) { + return; + } + + Node pNode1 = head, pNode2 = head.next, tmpNode; + + head.next = null; + while (pNode2 != null) { + tmpNode = pNode2.next; + pNode2.next = pNode1; + pNode1 = pNode2; + pNode2 = tmpNode; + } + + head = pNode1; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int len = size() / 2; + while (len-- > 0) { + head = head.next; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + ensureBounds(i); + Node pNode1 = head, pNode2; + if (i == 0) { + pNode2 = head; + head = null; + } else { + while (--i > 0) { + pNode1 = pNode1.next; + } + pNode2 = pNode1.next; + } + while (length-- > 0 && pNode2 != null) { + pNode2 = pNode2.next; + } + + if (head == null) { + head = pNode2; + } else { + pNode1.next = pNode2; + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + if (list == null) { + return new int[0]; + } + int size = list.size(); + int index; + int[] elements = new int[size]; + for (int i = 0; i < size; i++) { + index = ((Integer)list.get(i)).intValue(); + elements[i] = ((Integer)get(index)).intValue(); + } + return elements; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + if (list == null) { + return; + } + + Iterator listItr = list.iterator(); + Iterator mainItr = iterator(); + + intersectionIteration(new intersectionIterationCallback(){ + + @Override + public void onElementFound(Object element) { + mainItr.remove(); + } + + }, listItr, mainItr); + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + Iterator itr = iterator(); + Integer lastInt = null, currInt; + while (itr.hasNext()) { + currInt = (Integer)itr.next(); + if (lastInt != null && lastInt.intValue() == currInt.intValue()) { + itr.remove(); + } + lastInt = currInt; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + Node pNode = head, pNodeMark = null; + + while (pNode != null && (Integer)pNode.data <= min) { + pNodeMark = pNode; + pNode = pNode.next; + } + while (pNode != null && (Integer)pNode.data < max) { + pNode = pNode.next; + } + + if (pNodeMark == null) { + head = pNode; + } else { + pNodeMark.next = pNode; + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + LinkedList newList = new LinkedList(); + + if (list == null) { + return newList; + } + + Iterator listItr = list.iterator(); + Iterator mainItr = iterator(); + + intersectionIteration(new intersectionIterationCallback(){ + + @Override + public void onElementFound(Object element) { + newList.add(element); + } + + }, listItr, mainItr); + + return newList; + } + + private interface intersectionIterationCallback { + void onElementFound(Object element); + } + + private void intersectionIteration(intersectionIterationCallback callback, Iterator listItr, Iterator mainItr) { + if (!listItr.hasNext() || !mainItr.hasNext()) { + return; + } + + Integer listValue = (Integer)listItr.next(); + Integer mainValue = (Integer)mainItr.next(); + while (listItr.hasNext() || mainItr.hasNext()) { + if (listValue < mainValue) { + if (!listItr.hasNext()) { + break; + } + listValue = (Integer)listItr.next(); + } else if (listValue > mainValue) { + if (!mainItr.hasNext()) { + break; + } + mainValue = (Integer)mainItr.next(); + } else { + callback.onElementFound(mainValue); + mainValue = (Integer)mainItr.next(); + } + } + if (listValue.intValue() == mainValue.intValue()) { + callback.onElementFound(mainValue); + } + } +} diff --git a/group08/619057560/3-12/code/com/coding/basic/List.java b/group08/619057560/3-12/code/com/coding/basic/List.java new file mode 100644 index 0000000000..396b1f6416 --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java new file mode 100644 index 0000000000..d8b25594ad --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java @@ -0,0 +1,128 @@ +package com.coding.test; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.coding.basic.LinkedList; + +public class LinkedListTest { + + LinkedList mainList; + + private void initLinkedList(LinkedList list, int[] elements) { + while (list.size() > 0) { + list.removeFirst(); + } + for (int e:elements) { + list.add(new Integer(e)); + } + } + + private int[] getIntegerArray(LinkedList list) { + if (list == null) { + return new int[0]; + } + int[] array = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + array[i] = (Integer)list.get(i); + } + return array; + } + + private void printMainList() { + for (int e:getIntegerArray(mainList)) { + System.out.println(e); + } + } + + @Before + public void setUp() { + mainList = new LinkedList(); + } + + @After + public void tearDown() { + mainList = null; + } + + @Test + public void testReverse() { + initLinkedList(mainList, new int[] {}); + mainList.reverse(); + Assert.assertArrayEquals(new int[0], getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {1,2,3,4,5}); + mainList.reverse(); + Assert.assertArrayEquals(new int[] {5,4,3,2,1}, getIntegerArray(mainList)); + } + + @Test + public void testRemoveFirstHalf() { + initLinkedList(mainList, new int[] {1,2,3,4,5}); + mainList.removeFirstHalf(); + Assert.assertArrayEquals(new int[] {3,4,5}, getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {1,2,3,4}); + mainList.removeFirstHalf(); + Assert.assertArrayEquals(new int[] {3,4}, getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {1}); + mainList.removeFirstHalf(); + Assert.assertArrayEquals(new int[] {1}, getIntegerArray(mainList)); + } + + @Test + public void testRemove() { + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + mainList.remove(0,9); + Assert.assertArrayEquals(new int[] {10}, getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + mainList.remove(2,9); + Assert.assertArrayEquals(new int[] {1,2}, getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + mainList.remove(3,1); + Assert.assertArrayEquals(new int[] {1,2,3,5,6,7,8,9,10}, getIntegerArray(mainList)); + } + + @Test + public void testGetElements() { + initLinkedList(mainList, new int[] {0,10,20,30,40,50,60,70,80,90,100}); + LinkedList list = new LinkedList(); + initLinkedList(list, new int[] {0,3,4,7}); + Assert.assertArrayEquals(new int[] {0,30,40,70}, mainList.getElements(list)); + } + + @Test + public void testSubtract() { + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + LinkedList list = new LinkedList(); + initLinkedList(list, new int[] {1,2,3,4,5,9,10}); + mainList.subtract(list); + Assert.assertArrayEquals(new int[] {6,7,8}, getIntegerArray(mainList)); + //printMainList(); + } + + @Test + public void testRemoveDuplicateValues() { + initLinkedList(mainList, new int[] {1,2,3,3,4,4,5,5,5,5,5}); + mainList.removeDuplicateValues(); + Assert.assertArrayEquals(new int[] {1,2,3,4,5}, getIntegerArray(mainList)); + } + + @Test + public void testRemoveRange() { + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + mainList.removeRange(5, 5); + Assert.assertArrayEquals(new int[] {1,2,3,4,5,6,7,8,9,10}, getIntegerArray(mainList)); + } + + @Test + public void testIntersection() { + initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); + LinkedList list = new LinkedList(); + initLinkedList(list, new int[] {1,2,3,4,5,9,10}); + mainList = mainList.intersection(list); + //printMainList(); + Assert.assertArrayEquals(new int[] {1,2,3,4,5,9,10}, getIntegerArray(mainList)); + } + +} From df1b1fe9a3236a754a587674a8ac2d489ea3d93d Mon Sep 17 00:00:00 2001 From: xiongrui233 Date: Sat, 11 Mar 2017 20:22:27 +0800 Subject: [PATCH 286/646] delete ignore file --- group22/627559964/.classpath | 8 -------- group22/627559964/.gitignore | 4 ---- group22/627559964/.project | 17 ----------------- 3 files changed, 29 deletions(-) delete mode 100644 group22/627559964/.classpath delete mode 100644 group22/627559964/.gitignore delete mode 100644 group22/627559964/.project diff --git a/group22/627559964/.classpath b/group22/627559964/.classpath deleted file mode 100644 index e72ef7c0d4..0000000000 --- a/group22/627559964/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/group22/627559964/.gitignore b/group22/627559964/.gitignore deleted file mode 100644 index 6ef2139e00..0000000000 --- a/group22/627559964/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/bin/ -.metadatas -.classpath -.project \ No newline at end of file diff --git a/group22/627559964/.project b/group22/627559964/.project deleted file mode 100644 index 870f65f4a0..0000000000 --- a/group22/627559964/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - 627559964 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - From 4f99185bb0cf4aeb8af704ec6b7ce244effa2ede Mon Sep 17 00:00:00 2001 From: ESun Date: Sat, 11 Mar 2017 20:51:10 +0800 Subject: [PATCH 287/646] =?UTF-8?q?=E5=AE=8C=E6=88=90LinkedList=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 20 ++ .../coderising/download/FileDownloader.java | 73 ++++++ .../download/FileDownloaderTest.java | 59 +++++ .../coderising/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 +++ .../download/impl/ConnectionManagerImpl.java | 15 ++ .../src/com/coding/basic/LinkedList.java | 225 +++++++++++++++++- .../src/com/coding/basic/LinkedListTest.java | 143 +++++++++++ .../org.eclipse.core.resources.prefs | 2 + 12 files changed, 597 insertions(+), 10 deletions(-) create mode 100644 group03/617187912/Learning02/src/com/coderising/download/DownloadThread.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/FileDownloader.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/api/Connection.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/api/ConnectionException.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/api/DownloadListener.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group03/617187912/Learning02/src/com/coding/basic/LinkedListTest.java create mode 100644 liuxin/.settings/org.eclipse.core.resources.prefs diff --git a/group03/617187912/Learning02/src/com/coderising/download/DownloadThread.java b/group03/617187912/Learning02/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..900a3ad358 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/FileDownloader.java b/group03/617187912/Learning02/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..c3c8a3f27d --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/FileDownloaderTest.java b/group03/617187912/Learning02/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4ff7f46ae0 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/api/Connection.java b/group03/617187912/Learning02/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionException.java b/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionManager.java b/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/api/DownloadListener.java b/group03/617187912/Learning02/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionImpl.java b/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..36a9d2ce15 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..172371dd55 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group03/617187912/Learning02/src/com/coding/basic/LinkedList.java b/group03/617187912/Learning02/src/com/coding/basic/LinkedList.java index 88a4c6c31b..51fb6e1f6e 100644 --- a/group03/617187912/Learning02/src/com/coding/basic/LinkedList.java +++ b/group03/617187912/Learning02/src/com/coding/basic/LinkedList.java @@ -1,6 +1,9 @@ package com.coding.basic; +import java.awt.Dimension; import java.util.NoSuchElementException; +import java.util.Set; +import java.util.TreeSet; public class LinkedList implements List { @@ -17,7 +20,7 @@ public void add(int index, Object o) { head = new Node(o, head); size++; } else { - Node nd = getNode(index-1); + Node nd = getNode(index - 1); nd.next = new Node(o, nd.next); size++; } @@ -88,6 +91,11 @@ public Iterator iterator() { return new MyIterator(); } + public void clear() { + head = null; + size = 0; + } + private class MyIterator implements Iterator { public Node current = head; @@ -115,23 +123,220 @@ public Node(Object data, Node next) { } } + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (size() < 2) { + return; + } + Node newHeadNode = head; + Node curNode = newHeadNode.next; + newHeadNode.next = null; + Node nextNode; + do { + nextNode = curNode.next; + curNode.next = newHeadNode; + newHeadNode = curNode; + curNode = nextNode; + } while (curNode != null); + head = newHeadNode; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + if (size < 2) { + return; + } + int i = (size) / 2; + head = getNode(i); + size = size - i; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if ((i + length) > size) { + throw new IndexOutOfBoundsException("index瓒呭嚭鏁扮粍鐣岄檺."); + } + if (i == 0) { + head = getNode(length); + } else { + getNode(i - 1).next = getNode(i + length); + } + size -= length; + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if (list == null || list.size() == 0) { + int[] arrElem = new int[size()]; + Node node = head; + for (int i = 0; i < size(); i++) { + arrElem[i] = (int) node.data; + node = node.next; + } + return arrElem; + } else { + if (list.size() > size() || (int) list.get(list.size() - 1) + 1 > size()) { + throw new IndexOutOfBoundsException("瓒呭嚭鏁扮粍鐣岄檺銆"); + } + int[] arrElem = new int[list.size()]; + int cur = 0; + Node node = head; + for (int i = 0; i < (int) list.get(list.size() - 1) + 1; i++) { + if (i == (int) list.get(cur)) { + arrElem[cur++] = (int) node.data; + } + node = node.next; + } + return arrElem; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + Node curNode = head; + int curIndex = 0; + for (int i = 0; i < list.size(); i++) { + int value = (int) list.get(i); + for (int j = curIndex; j < size(); j++) { + if (value == (int) curNode.data) { + remove(j); + break; + } else { + curNode = curNode.next; + } + } + curNode = head; + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Set set = new TreeSet(); + Node node = head; + for (int i = 0; i < size(); i++) { + set.add((Integer) node.data); + node = node.next; + } + clear(); + for (Integer i : set) { + add(i); + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + Node node = head; + int startIndex = -1; + int endIndex = size(); + for (int i = 0; i < size(); i++) { + if (node == null) { + break; + } + int value = (int) node.data; + if (value < min) { + node = node.next; + continue; + } + if (value > max) { + endIndex = i - 1; + break; + } + if (startIndex == -1) { + startIndex = i; + } + node = node.next; + } + if (startIndex > -1) { + if (startIndex == 0 && endIndex == size()) { + clear(); + return; + } + remove(startIndex, endIndex - startIndex); + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList interSection(LinkedList list) { + LinkedList newList = new LinkedList(); + Node aHead = head; + Node bHead = list.head; + for (int i = 0; i < list.size(); i++) { + int bValue = (int) bHead.data; + int aValue = 0; + do { + aValue = (int) aHead.data; + if (aHead == null || aValue > bValue) { + break; + } + if (aValue == bValue) { + newList.add(bValue); + aHead = aHead.next; + break; + } else { + aHead = aHead.next; + } + } while (aHead != null && (int) aHead.data <= bValue); + if (aHead == null) { + break; + } + bHead = bHead.next; + } + return newList; + } + public static void main(String[] args) { LinkedList list = new LinkedList(); list.add(1); list.add(2); list.add(3); list.add(4); + list.reverse(); for (int i = 0; i < list.size; i++) { System.out.println(list.get(i)); } - System.out.println(list.get(2)); - list.add(2, 100); - System.out.println(list.get(2)); - list.addFirst(10); - System.out.println(list.get(2)); - list.addLast(100); - System.out.println(list.remove(1)); - System.out.println(list.removeFirst()); - System.out.println(list.removeLast()); + // System.out.println(list.get(2)); + // list.add(2, 100); + // System.out.println(list.get(2)); + // list.addFirst(10); + // System.out.println(list.get(2)); + // list.addLast(100); + // System.out.println(list.remove(1)); + // System.out.println(list.removeFirst()); + // System.out.println(list.removeLast()); + } } diff --git a/group03/617187912/Learning02/src/com/coding/basic/LinkedListTest.java b/group03/617187912/Learning02/src/com/coding/basic/LinkedListTest.java new file mode 100644 index 0000000000..ce470106b6 --- /dev/null +++ b/group03/617187912/Learning02/src/com/coding/basic/LinkedListTest.java @@ -0,0 +1,143 @@ +package com.coding.basic; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import junit.framework.AssertionFailedError; + +public class LinkedListTest { + + @Before + public void setUp() throws Exception { + } + + @Test + public void testReverse() { + LinkedList list1 = createLinkList(0, 1000); + list1.reverse(); + list1.reverse(); + LinkedList list2 = createLinkList(0, 1000); + compareEquals(list1, list2); + } + + @Test + public void testRemoveFirstHalf() { + LinkedList list1 = createLinkList(0, 5); + list1.removeFirstHalf(); + LinkedList list2 = createLinkList(2, 5); + compareEquals(list1, list2); + + LinkedList list3 = createLinkList(0, 6); + list3.removeFirstHalf(); + LinkedList list4 = createLinkList(3, 6); + compareEquals(list3, list4); + } + + @Test + public void testRemoveIntInt() { + LinkedList list1 = createLinkList(0, 10); + list1.remove(3, 5); + LinkedList list2 = createLinkList(0, 3); + addDataToLinkList(list2, 8, 10); + compareEquals(list2, list1); + } + + @Test + public void testGetElements() { + LinkedList list1 = createLinkList(0, 10); + LinkedList list2 = createLinkList(3, 8); + int[] arrResult = { 3, 4, 5, 6, 7 }; + assertArrayEquals(arrResult, list1.getElements(list2)); + + // LinkedList list3 = createLinkList(0, 10); + // LinkedList list4 = createLinkList(9, 11); + // list3.getElements(list4); + } + + @Test + public void testSubtract() { + LinkedList list1 = createLinkList(0, 10); + LinkedList list2 = createLinkList(3, 8); + list1.subtract(list2); + LinkedList list3 = createLinkList(0, 3); + addDataToLinkList(list3, 8, 10); + compareEquals(list3, list1); + } + + @Test + public void testRemoveDuplicateValues() { + LinkedList list1 = createLinkList(0, 2); + list1.add(1); + list1.add(1); + addDataToLinkList(list1, 2, 5); + list1.add(4); + list1.removeDuplicateValues(); + LinkedList list2 = createLinkList(0, 5); + compareEquals(list1, list2); + } + + @Test + public void testRemoveRange() { + LinkedList list1 = createLinkList(0, 10000); + list1.removeRange(0, 5000); + LinkedList list2 = createLinkList(5000, 10000); + compareEquals(list2, list1); + + LinkedList list3 = createLinkList(0, 6); + list3.removeRange(3, 5); + LinkedList list4 = createLinkList(0, 3); + compareEquals(list4, list3); + + LinkedList list5 = createLinkList(0, 6); + list5.removeRange(0, 7); + LinkedList list6 = new LinkedList(); + compareEquals(list6, list5); + } + + @Test + public void testIntersection() { + LinkedList list1 = new LinkedList(); + LinkedList list2 = new LinkedList(); + for (int i = 0; i < 10; i++) { + list1.add(i); + } + for (int i = 3; i < 12; i++) { + list2.add(i); + } + LinkedList list3 = new LinkedList(); + for (int i = 3; i < 10; i++) { + list3.add(i); + } + LinkedList list4 = list1.interSection(list2); + compareEquals(list3, list4); + } + + private void compareEquals(LinkedList list1, LinkedList list2) { + assertEquals(list1.size(), list2.size()); + for (int i = 0; i < list1.size(); i++) { + assertEquals(list1.get(i), list2.get(i)); + } + } + + private void printLinkedList(LinkedList list) { + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i)); + } + } + + private LinkedList createLinkList(int min, int max) { + LinkedList list = new LinkedList(); + for (int i = min; i < max; i++) { + list.add(i); + } + return list; + } + + private void addDataToLinkList(LinkedList list, int min, int max) { + for (int i = min; i < max; i++) { + list.add(i); + } + } +} diff --git a/liuxin/.settings/org.eclipse.core.resources.prefs b/liuxin/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/liuxin/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 From 9af937c194a2d0dfc73dfb7578fc81b31140124b Mon Sep 17 00:00:00 2001 From: laoheihei Date: Sat, 11 Mar 2017 22:26:27 +0800 Subject: [PATCH 288/646] no test --- group22/2622819383/Task1/ArrayList.java | 1 + group22/2622819383/Task1/BinaryTreeNode.java | 78 +++++++++++++------- group22/2622819383/Task1/LinkedList.java | 6 +- 3 files changed, 56 insertions(+), 29 deletions(-) diff --git a/group22/2622819383/Task1/ArrayList.java b/group22/2622819383/Task1/ArrayList.java index 55c8c616d0..d438fba17d 100644 --- a/group22/2622819383/Task1/ArrayList.java +++ b/group22/2622819383/Task1/ArrayList.java @@ -1,3 +1,4 @@ +//浠g爜鍙傝冭嚜銆婃暟鎹粨鏋勪笌绠楁硶鍒嗘瀽銆 public class ArrayList implements List { private int size; diff --git a/group22/2622819383/Task1/BinaryTreeNode.java b/group22/2622819383/Task1/BinaryTreeNode.java index 1f07869939..8c2b4492d2 100644 --- a/group22/2622819383/Task1/BinaryTreeNode.java +++ b/group22/2622819383/Task1/BinaryTreeNode.java @@ -1,30 +1,54 @@ +//代码参考自《数据结构与算法分析》 public class BinaryTreeNode { - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public Object getData() { - return data; - } - public void setData(Object data) { - this.data = data; - } - public BinaryTreeNode getLeft() { - return left; - } - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - public BinaryTreeNode getRight() { - return right; - } - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o){ - return null; - } - + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + private BinaryTreeNode parrent; + private BinaryTreeNode hot; //表示search(Object o)方法返回的命中节点的父亲 + + public BinaryTreeNode(Object o, BinaryTreeNode p) { + data = o; + parrent = p; + } + //在以v为根的二叉树中查找关键码o,返回命中的节点(真实存在得或者虚拟存在的) + public static BinaryTreeNode search(BinaryTreeNode v, Object o, BinaryTreeNode hot) { + int vData = (int)v.getData(); + int searched = (int)o; + if (v == null || vData == searched) return v; + + hot = v; + return search(searched < vData ? v.getLeft() : v.getRight(), o, hot); + } + + public BinaryTreeNode insert(Object o){ + BinaryTreeNode node = search(this, o, this.parrent); + if (node != null) return node; + + node = new BinaryTreeNode(o, hot); + if ((int)o < (int)hot.getData()) hot.setLeft(node); + else hot.setRight(node); + return node; + } + } diff --git a/group22/2622819383/Task1/LinkedList.java b/group22/2622819383/Task1/LinkedList.java index 0d87d2d72a..81c1db409c 100644 --- a/group22/2622819383/Task1/LinkedList.java +++ b/group22/2622819383/Task1/LinkedList.java @@ -1,3 +1,4 @@ +//代码参考自《数据结构与算法分析》 public class LinkedList implements List { private Node header; @@ -86,6 +87,7 @@ public Object next() { } private static class Node { + //pred、succ代表属性;pred()、succ()代表Node节点 private Object data; private Node pred; private Node succ; @@ -111,14 +113,14 @@ public Node pred() { //插入前驱节点,返回插入的新节点 public Node insertAsPred(Object data) { Node p = new Node(data, pred, this); - pred = pred.succ = p; + pred = pred().succ = p; return p; } //插入后继节点,返回插入的新节点 public Node insertAsSucc(Object data) { Node p = new Node(data, this, succ); - succ = succ.pred = p; + succ = succ().pred = p; return p; } } From dcb33754833838bb5c403b731d2ca6faa8084076 Mon Sep 17 00:00:00 2001 From: fzon0902 <815591664@qq.com> Date: Sat, 11 Mar 2017 22:27:12 +0800 Subject: [PATCH 289/646] =?UTF-8?q?=E8=83=A1=E9=AB=98=E6=B8=85=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group27/815591664/2017Learning/.classpath | 7 + group27/815591664/2017Learning/.gitignore | 1 + group27/815591664/2017Learning/.project | 17 + .../org.eclipse.core.resources.prefs | 2 + .../src/com/coderising/array/ArrayUtil.java | 348 ++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 ++ .../src/com/coderising/litestruts/Struts.java | 34 ++ .../com/coderising/litestruts/StrutsTest.java | 43 +++ .../src/com/coderising/litestruts/View.java | 23 ++ .../src/com/coderising/litestruts/struts.xml | 11 + .../src/com/coding/basic/ArrayList.java | 146 ++++++++ .../src/com/coding/basic/BinaryTree.java | 35 ++ .../src/com/coding/basic/BinaryTreeNode.java | 43 +++ .../src/com/coding/basic/Iterator.java | 9 + .../src/com/coding/basic/LinkedList.java | 236 ++++++++++++ .../src/com/coding/basic/List.java | 9 + .../src/com/coding/basic/Queue.java | 27 ++ .../src/com/coding/basic/Stack.java | 29 ++ 18 files changed, 1059 insertions(+) create mode 100644 group27/815591664/2017Learning/.classpath create mode 100644 group27/815591664/2017Learning/.gitignore create mode 100644 group27/815591664/2017Learning/.project create mode 100644 group27/815591664/2017Learning/.settings/org.eclipse.core.resources.prefs create mode 100644 group27/815591664/2017Learning/src/com/coderising/array/ArrayUtil.java create mode 100644 group27/815591664/2017Learning/src/com/coderising/litestruts/LoginAction.java create mode 100644 group27/815591664/2017Learning/src/com/coderising/litestruts/Struts.java create mode 100644 group27/815591664/2017Learning/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group27/815591664/2017Learning/src/com/coderising/litestruts/View.java create mode 100644 group27/815591664/2017Learning/src/com/coderising/litestruts/struts.xml create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/ArrayList.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/BinaryTree.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/Iterator.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/LinkedList.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/List.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/Queue.java create mode 100644 group27/815591664/2017Learning/src/com/coding/basic/Stack.java diff --git a/group27/815591664/2017Learning/.classpath b/group27/815591664/2017Learning/.classpath new file mode 100644 index 0000000000..3e0fb272a8 --- /dev/null +++ b/group27/815591664/2017Learning/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group27/815591664/2017Learning/.gitignore b/group27/815591664/2017Learning/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group27/815591664/2017Learning/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group27/815591664/2017Learning/.project b/group27/815591664/2017Learning/.project new file mode 100644 index 0000000000..fab8d7f04c --- /dev/null +++ b/group27/815591664/2017Learning/.project @@ -0,0 +1,17 @@ + + + 2017Learning + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/815591664/2017Learning/.settings/org.eclipse.core.resources.prefs b/group27/815591664/2017Learning/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..3af089907a --- /dev/null +++ b/group27/815591664/2017Learning/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/com/coderising/array/ArrayUtil.java=UTF-8 diff --git a/group27/815591664/2017Learning/src/com/coderising/array/ArrayUtil.java b/group27/815591664/2017Learning/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..7c30103d89 --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,348 @@ +package com.coderising.array; + +import java.util.ArrayList; +import java.util.Arrays; + +import java.util.List; + + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + + public static void main(String[] args) { + int[] a = {7, 9, 30, 3, 4}; + reverseArray(a); + System.out.println(Arrays.toString(a)); + + + int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5,0} ; + System.out.println(Arrays.toString(removeZero(oldArr))); + + + int[] a1 = {3, 5, 7,8}; + int[] a2 = {4, 5, 6,7}; + + System.out.println(Arrays.toString(merge(a1,a2))); + + + int[] b = { 2,3,6}; + System.out.println(Arrays.toString(grow(b,5))); + + System.out.println(genFibonacci(5)); + + System.out.println(Arrays.toString(fibonacci(30))); + + System.out.println(Arrays.toString(getPrimes(10000))); + + System.out.println(getFactor(10)); + + System.out.println(isPerfectNum(1000)); + +// System.out.println(); + System.out.println(Arrays.toString(getPerfectNumbers(100))); + + System.out.println(join(a,"&")); + + + } + public static void reverseArray(int[] origin){ + + if(origin.length==0){ + return; + + } + int[] copy = new int[origin.length]; + System.arraycopy(origin, 0, copy, 0, origin.length); + + for (int i = 0; i < copy.length; i++) { + + origin[i] = copy[copy.length-1-i]; + } + + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public static int[] removeZero(int[] oldArray){ + int newSize = 0; + for (int i = 0; i < oldArray.length; i++) { + if(oldArray[i]!=0){ + newSize++; + } + } + int index = 0; + int[] newArr = new int[newSize]; + for (int i = 0; i < oldArray.length; i++) { + if(oldArray[i]!=0){ + newArr[index] = oldArray[i]; + index++; + } + } + return newArr; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public static int[] merge(int[] array1, int[] array2){ + Arrays.sort(array1); + Arrays.sort(array2); + + int[] newArr = new int[array1.length+array2.length]; + + System.arraycopy(array1, 0, newArr, 0,array1.length ); + System.arraycopy(array2, 0, newArr, array1.length, array2.length); + Arrays.sort(newArr); + List list = new ArrayList(); + for(int i=0;i list = new ArrayList(); + for(int i =0;i list = new ArrayList(); + for(int i=2;i<=max;i++){ + if(isPrime(i)){ + list.add(i); + } + } + + return listToArray(list); + + + } + + public static int[] listToArray(List list){ + if(list == null){ + return null; + } + + int[] arr = new int[list.size()]; + + for(int i=0;i list = new ArrayList(); + for(int i=1;i<=max;i++){ + if(isPerfectNum(i)){ + list.add(i); + } + } + + return listToArray(list); + } + + + public static boolean isPerfectNum(int num){ + if(num <=1){ + return false; + } + + List factors = getFactor(num); + int sum = 0; + for (Integer integer : factors) { + sum = integer+sum; + } + if(sum == num){ + return true; + } + return false; + } + + public static List getFactor(int num){ + List list = new ArrayList(); + list.add(1); + + + for(int i=2;i getFactor(int num){ + List list = new ArrayList(); + list.add(1); + int temp = num; + + while(!isPrime(temp)){ + if(temp ==1){ + break; + } + for(int i=2;i<=temp;i++){ + if(temp % i ==0){ + list.add(i); + temp = temp/i; + break; + } + } + + } + list.add(temp); + + return list; + }*/ + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public static String join(int[] array, String seperator){ + StringBuilder sb = new StringBuilder(); + for (int i : array) { + sb.append(i); + sb.append(seperator); + + } + + return sb.subSequence(0, sb.length()-1).toString(); + } + + +} diff --git a/group27/815591664/2017Learning/src/com/coderising/litestruts/LoginAction.java b/group27/815591664/2017Learning/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group27/815591664/2017Learning/src/com/coderising/litestruts/Struts.java b/group27/815591664/2017Learning/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..85e2e22de3 --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group27/815591664/2017Learning/src/com/coderising/litestruts/StrutsTest.java b/group27/815591664/2017Learning/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group27/815591664/2017Learning/src/com/coderising/litestruts/View.java b/group27/815591664/2017Learning/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group27/815591664/2017Learning/src/com/coderising/litestruts/struts.xml b/group27/815591664/2017Learning/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..dd598a3664 --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group27/815591664/2017Learning/src/com/coding/basic/ArrayList.java b/group27/815591664/2017Learning/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..c983c04968 --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coding/basic/ArrayList.java @@ -0,0 +1,146 @@ +package com.coding.basic; + +import java.util.Arrays; +import java.util.LinkedList; + +/** + * @author hugaoqing + * created on 2017-3-8 + */ +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + + + /* + * 当size等于容器的length时,用buffer数组替代原容器 + * + */ + public void add(Object o){ + if(elementData.length == size){ + Object[] buffer = new Object[size+15]; + System.arraycopy(elementData, 0, buffer, 0, size); + elementData = buffer; + elementData[size] = o; + size++; + }else { + + elementData[size] = o; + size++; + } + + } + + + /* + * 指定位置添加元素 + * 当size+1等于 length要先扩大容量再进行添加操作 + */ + public void add(int index, Object o) throws Exception{ + if(index <0){ + throw new Exception("索引不能为0!"); + + }else if(index >= size){ + throw new Exception("索引超限!"); + }else if(size+1=size){ + throw new Exception("索引超限!"); + } + return elementData[index]; + } + + public Object remove(int index) throws Exception{ + if(index>=size){ + throw new Exception("索引超限!"); + } + Object out = elementData[index]; + Object[] temp = new Object[size-index-1]; + System.arraycopy(elementData, index+1, temp, 0, size-index-1); + System.arraycopy(temp, 0, elementData,index, size-index-1); + + size--; + return out; + } + + public int size(){ + return this.size; + } + + @Override + public String toString() { + Object[] objs = new Object[size]; + System.arraycopy(elementData, 0,objs , 0, size); + return Arrays.toString(objs); + + } + public Iterator iterator(){ + return new Iterator() { + int cursor = 0; + public Object next() throws Exception { + cursor++; + return get(cursor-1); + } + + public boolean hasNext() { + + return this.cursor ll = new LinkedList(); + ll.add(null); + + + + } + + + +} diff --git a/group27/815591664/2017Learning/src/com/coding/basic/BinaryTree.java b/group27/815591664/2017Learning/src/com/coding/basic/BinaryTree.java new file mode 100644 index 0000000000..ed69a3f16c --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coding/basic/BinaryTree.java @@ -0,0 +1,35 @@ +package com.coding.basic; + +public class BinaryTree { + + private BinaryTreeNode root; + + public BinaryTreeNode insert(Integer data){ + BinaryTreeNode node = new BinaryTreeNode(data); + + + if(this.root==null){ + root = node; + root.setLeft(null); + root.setRight(null); + }else{ + BinaryTreeNode curNode = this.root; + + if(data.compareTo(root.getData())>0){ + while(curNode.getRight()!=null){ + curNode = curNode.getRight(); + } + curNode = node; + + }else{ + while(curNode.getLeft()!=null){ + curNode = curNode.getLeft(); + } + curNode = node; + } + + } + return null; + } + +} diff --git a/group27/815591664/2017Learning/src/com/coding/basic/BinaryTreeNode.java b/group27/815591664/2017Learning/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..23e2b871a3 --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,43 @@ +package com.coding.basic; + + + +/** + * @author hugaoqing + * created on 2017-3-11 + */ +public class BinaryTreeNode { + + private Integer data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(Integer data) { + super(); + this.data = data; + } + public Integer getData() { + return data; + } + public void setData(Integer data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + /*public BinaryTreeNode insert(Object o){ + this.data = o; + return this; + }*/ + +} diff --git a/group27/815591664/2017Learning/src/com/coding/basic/Iterator.java b/group27/815591664/2017Learning/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..d4656a7daf --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coding/basic/Iterator.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface Iterator { + //接口里的成员变量默认都是final static的 +// int cursor = 0; + public boolean hasNext(); + public Object next() throws Exception; + +} diff --git a/group27/815591664/2017Learning/src/com/coding/basic/LinkedList.java b/group27/815591664/2017Learning/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..6f2fbf1f5b --- /dev/null +++ b/group27/815591664/2017Learning/src/com/coding/basic/LinkedList.java @@ -0,0 +1,236 @@ +package com.coding.basic; + +public class LinkedList implements List { + + private Node head; + private Node tail; + private int size; + + + public void add(Object o){ + this.addLast(o); + + } + public void add(int index , Object o) throws Exception{ + if(index==0){ + this.addFirst(o); + return; + }else if(index==size-1){ + this.addLast(o); + return; + }else{ + + + Node curNode = this.getNode(index); + Node pre = curNode.previous; +// Node next = curNode.next; + //加入链表 + Node newNode = new Node(o, pre, curNode); + curNode.previous = newNode; + pre.next = newNode; + } + size++; + + + } + private Node getNode(int index) throws Exception{ + if(index>=size){ + throw new Exception("下标超限"); + } + if(index ==0){ + return head; + }else if(index==size-1){ + return tail; + + }else{ + Node temp = head; + for(int i =1;i<=index;i++){ + temp = temp.next; + } + return temp; + } + } + public Object get(int index) throws Exception{ + if(index>=size){ + throw new Exception("下标超限"); + } + if(index ==0){ + return head.data; + }else if(index==size-1){ + return tail.data; + + }else{ + Node temp = head; + for(int i =1;i<=index;i++){ + temp = temp.next; + } + return temp.data; + } + } + public Object remove(int index) throws Exception{ + if(index>=size){ + throw new Exception("下标超限"); + } + Object o = null; + if(size == 1){ + o = head.data; + }else{ + if(index==0){ + + Node afterHead = head.next; + afterHead.previous = null; + head = afterHead; + o = head.data; + + }else if(index == size-1){ + Node beforeTail = tail.previous; + beforeTail.next = null; + tail = beforeTail; + o = tail.data; + }else{ + Node curNode = this.getNode(index); + Node pre = curNode.previous; + Node next = curNode.next; + //中间变量用于断开指针 + Node temp = new Node(next.data, pre, next.next); + pre.next = temp; + next = temp; + o = curNode.data; + + } + + + + } + + size--; + return o; + + + } + + public int size(){ + return this.size; + } + + public void addFirst(Object o){ + Node node = new Node(o, null, head); + + if(head == null){ + head = node; + tail = node; + }else{ + head.previous = node; + head = node; + } + size++; + + } + public void addLast(Object o){ + //新节点的previous指针指向tail + Node curNode = new Node(o, tail, null); + if(tail==null){ + //当前链表为空时,将该节点加入链表,头尾均为该节点 + head = curNode; + tail = curNode; + }else{ + //如果该链表不为空时,将最后一个节点的next指针指向新加入的节点即可 + tail.next = curNode; + //将新加入的这个节点置为tail + tail = curNode; + + } + size++; + + } + public Object removeFirst() throws Exception{ + return this.remove(0); + } + public Object removeLast() throws Exception{ + return this.remove(size-1); + } + + private class Itr implements Iterator{ + int cursor = 0; + public boolean hasNext() { + return cursor Date: Sat, 11 Mar 2017 22:31:02 +0800 Subject: [PATCH 290/646] wanchengzuoye MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 瀹屾垚浣滀笟 --- .../src/list/LinkedList.java" | 282 ++++++++++++++++++ .../src/list/LinkedListTest.java" | 142 +++++++++ 2 files changed, 424 insertions(+) create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedList.java" create mode 100644 "group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedListTest.java" diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedList.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedList.java" new file mode 100644 index 0000000000..f867a9a698 --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedList.java" @@ -0,0 +1,282 @@ +package com.byhieg.coding2017.homework312; + + +import com.byhieg.coding2017.homework226.Iterator; +import com.byhieg.coding2017.homework226.List; +import com.byhieg.utils.bprint.FullPrint; + +public class LinkedList implements List { + + private Node head; + int size = 0; + + public void add(Object o) { + addLast(o); + } + + public void add(int index, Object o) { + checkRangeForAdd(index); + if (index == size) { + addLast(o); + return; + } + Node nextNode = node(index); + Node newNode = new Node(o, nextNode); + + Node prevNode; + if (index == 0) { + prevNode = null; + } else { + prevNode = node(index - 1); + } + if (prevNode == null) { + head = newNode; + } else { + prevNode.next = newNode; + } + + size++; + } + + + private Node node(int index) { + Node cursor = head; + for (int i = 0; i < index; i++) { + cursor = cursor.next; + } + return cursor; + } + + private void checkRangeForAdd(int index) { + if (index > size || index < 0) { + throw new IndexOutOfBoundsException("鎸囧畾鐨刬ndex瓒呰繃鐣岄檺"); + } + } + + public Object get(int index) { + checkRange(index); + return node(index).data; + } + + private void checkRange(int index) { + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException("鎸囧畾index瓒呰繃鐣岄檺"); + } + } + + public Object remove(int index) { + checkRange(index); + Node targetNode = node(index); + Object o = targetNode.data; + Node prevNode; + Node nextNode = targetNode.next; + + if (index == 0) { + prevNode = null; + } else { + prevNode = node(index - 1); + } + if (prevNode == null) { + head = nextNode; + targetNode.next = null; + } else { + prevNode.next = nextNode; + targetNode.next = null; + } + + targetNode.data = null; + size--; + return o; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + Node nextNode = head; + Node newNode = new Node(o, nextNode); + head = newNode; + size++; + } + + public void addLast(Object o) { + Node newNode = new Node(o, null); + if (size == 0) { + head = newNode; + } else { + Node lastNode = node(size - 1); + lastNode.next = newNode; + } + size++; + } + + public Object removeFirst() { + return remove(0); + } + + public Object removeLast() { + return remove(size() - 1); + } + + public Iterator iterator() { + + return new MyIterator(); + } + + private class MyIterator implements Iterator { + + public Node cursor = head; + + @Override + public boolean hasNext() { + return cursor != null; + } + + @Override + public Object next() { + Object o = cursor.data; + cursor = cursor.next; + return o; + } + } + + + private static class Node { + Object data; + Node next; + + public Node(Object data, Node next) { + this.data = data; + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + for (int i = 0; i < size() / 2; i++) { + if (i == 0) { + Object o1 = remove(i); + Object o2 = remove(size - i - 1); + addFirst(o2); + addLast(o1); + } else { + Object o1 = remove(i); + Object o2 = remove(size - i - 1); + add(i, o2); + add(size - i, o1); + } + } + } + + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + for (int i = 0; i < size() / 2; i++) { + remove(0); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + for (int j = 0 ; j < length ;j ++) { + remove(i); + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + int[] result = new int[list.size()]; + int count = 0; + for (int i = 0 ; i < list.size();i++) { + result[count++] = (int)get((Integer) list.get(i)); + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + for (int i = 0 ; i < list.size();i++) { + for (int j = 0 ;j < size();j++) { + if (list.get(i) == get(j)) { + remove(j); + } + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + for (int i = 0; i < size();i++) { + for (int j = i + 1 ; j < size();j++) { + if (get(i) == get(j)){ + remove(j); + } + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + for (int i = 0 ; i < size();i++) { + if ((int)get(i) > min && (int)get(i) < max){ + remove(i); + i--; + } + + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList result = new LinkedList(); + for (int i = 0 ; i < size();i++) { + for (int j = 0 ; j < list.size();j++){ + if (get(i) == list.get(j)){ + result.add(get(i)); + } + } + } + return result; + } +} diff --git "a/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedListTest.java" "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedListTest.java" new file mode 100644 index 0000000000..f817bca7ea --- /dev/null +++ "b/group03/1196051822/3\346\234\21013\346\227\245\344\275\234\344\270\232\347\232\204\344\273\243\347\240\201/src/list/LinkedListTest.java" @@ -0,0 +1,142 @@ +package com.byhieg.coding2017.homework312; + +import junit.framework.TestCase; + +/** + * Created by byhieg on 17/3/8. + * Mail to byhieg@gmail.com + */ +public class LinkedListTest extends TestCase { + + private LinkedList list = new LinkedList(); + public void testReverse() throws Exception { + System.out.println("Reverse寮濮"); + list.add(3); + list.add(1,7); + list.add(2,8); + list.add(10); + list.add(11); + for (int i = 0 ; i < list.size();i++) { + System.out.print(list.get(i) + " "); + } + + list.reverse(); + System.out.println(); + for (int i = 0 ; i < list.size();i++) { + System.out.print(list.get(i) + " "); + } + System.out.println(); + System.out.println("Reverse缁撴潫"); + } + + public void testRemoveFirstHalf() throws Exception { + System.out.println("RemoveFirstHalf寮濮"); + list.add(3); + list.add(1,7); + list.add(2,8); + list.add(10); + list.add(11); + list.removeFirstHalf(); + for (int i = 0 ; i < list.size();i++) { + System.out.println(list.get(i) + " "); + } + System.out.println("RemoveFirstHalf缁撴潫"); + + } + + public void testRemove() throws Exception { + System.out.println("remove寮濮"); + list.add(3); + list.add(7); + list.add(8); + list.add(10); + list.add(11); + list.remove(0,3); + for (int i = 0 ; i < list.size();i++) { + System.out.println(list.get(i) + " "); + } + System.out.println("remove缁撴潫"); + } + + public void testGetElements() throws Exception { + System.out.println("getElements寮濮"); + list.add(3); + list.add(7); + list.add(8); + list.add(10); + list.add(11); + LinkedList linkedList = new LinkedList(); + linkedList.add(1); + linkedList.add(3); + int [] result = list.getElements(linkedList); + for (int i = 0 ; i < result.length;i++) { + System.out.println(result[i] + " "); + } + System.out.println("getElements缁撴潫"); + } + + public void testSubtract() throws Exception { + System.out.println("subtract寮濮"); + list.add(3); + list.add(7); + list.add(8); + list.add(10); + list.add(11); + LinkedList linkedList = new LinkedList(); + linkedList.add(8); + linkedList.add(3); + list.subtract(linkedList); + for (int i = 0 ; i < list.size();i++) { + System.out.println(list.get(i) + " "); + } + System.out.println("subtract缁撴潫"); + } + + public void testRemoveDuplicateValues() throws Exception { + System.out.println("RemoveDuplicateValues寮濮"); + list.add(3); + list.add(8); + list.add(8); + list.add(10); + list.add(10); + list.removeDuplicateValues(); + for (int i = 0 ; i < list.size();i++) { + System.out.println(list.get(i) + " "); + } + System.out.println("RemoveDuplicateValues缁撴潫"); + } + + public void testRemoveRange() throws Exception { + System.out.println("RemoveRange寮濮"); + list.add(3); + list.add(5); + list.add(8); + list.add(10); + list.add(101); + list.removeRange(4,9); + for (int i = 0 ; i < list.size();i++) { + System.out.println(list.get(i) + " "); + } + System.out.println("RemoveRange缁撴潫"); + } + + public void testIntersection() throws Exception { + System.out.println("Intersection寮濮"); + list.add(3); + list.add(5); + list.add(8); + list.add(10); + list.add(101); + LinkedList b = new LinkedList(); + b.add(5); + b.add(8); + b.add(10); + b.add(123); + LinkedList c = list.intersection(b); + for (int i = 0 ; i < c.size();i++) { + System.out.println(c.get(i) + " "); + } + System.out.println("Intersection缁撴潫"); + } + +} \ No newline at end of file From 09895efbc9e5c891b3ff5f6e31dfe37279c1675e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Mar 2017 22:37:14 +0800 Subject: [PATCH 291/646] task3 --- group05/578505552/pom.xml | 4 +- .../src/main/java/com/coderising/Q&A.md | 5 -- .../coderising/download/DownloadThread.java | 47 +++++++++++ .../coderising/download/FileDownloader.java | 77 +++++++++++++++++++ .../download/FileDownloaderTest.java | 53 +++++++++++++ .../coderising/download/api/Connection.java | 23 ++++++ .../download/api/ConnectionException.java | 20 +++++ .../download/api/ConnectionManager.java | 10 +++ .../download/api/DownloadListener.java | 5 ++ .../download/impl/ConnectionImpl.java | 52 +++++++++++++ .../download/impl/ConnectionManagerImpl.java | 25 ++++++ .../coderising/litestruts/Configuration.java | 7 ++ .../coderising/litestruts/ReflectUtils.java | 14 ++++ .../com/coderising/litestruts/XmlUtil.java | 8 -- .../download/DownloadThreadTest.java | 48 ++++++++++++ .../download/impl/ConnectionImplTest.java | 47 +++++++++++ 16 files changed, 430 insertions(+), 15 deletions(-) delete mode 100644 group05/578505552/src/main/java/com/coderising/Q&A.md create mode 100644 group05/578505552/src/main/java/com/coderising/download/DownloadThread.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/FileDownloader.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/FileDownloaderTest.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/api/Connection.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/api/ConnectionException.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/api/ConnectionManager.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/api/DownloadListener.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group05/578505552/src/main/java/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group05/578505552/src/main/java/com/coderising/litestruts/Configuration.java create mode 100644 group05/578505552/src/main/java/com/coderising/litestruts/ReflectUtils.java delete mode 100644 group05/578505552/src/main/java/com/coderising/litestruts/XmlUtil.java create mode 100644 group05/578505552/src/test/java/com/coderising/download/DownloadThreadTest.java create mode 100644 group05/578505552/src/test/java/com/coderising/download/impl/ConnectionImplTest.java diff --git a/group05/578505552/pom.xml b/group05/578505552/pom.xml index b22dfcedd8..62eed92daf 100644 --- a/group05/578505552/pom.xml +++ b/group05/578505552/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.coding2017.yang - basic + com.coding2017 + yangsongbao 1.0-SNAPSHOT jar diff --git a/group05/578505552/src/main/java/com/coderising/Q&A.md b/group05/578505552/src/main/java/com/coderising/Q&A.md deleted file mode 100644 index 29fcbb1560..0000000000 --- a/group05/578505552/src/main/java/com/coderising/Q&A.md +++ /dev/null @@ -1,5 +0,0 @@ -# Struts涓幓鑾峰緱getter鎴栬卻etter鏂规硶鐨勬椂鍊欐庢牱姣旇緝闈犺氨锛熺洰鍓嶆湁涓ょ鎬濊矾 -## 鑾峰彇Struts涓墍鏈変互鈥済et鈥濇垨鈥渟et鈥濆紑澶寸殑鏂规硶 -### 闂1锛氬彲鑳芥湁涓嶆槸getter鎴栬卻etter鐨勬柟娉曚篃鏄互鈥済et鈥濇垨鑰呪渟et鈥濆紑澶 -## 鍏堣幏鍙朣truts涓墍鏈夌殑鎴愬憳鍙橀噺鐨勫悕瀛楋紝鍐嶄笌瀛楃涓测済et鈥濇垨鈥渟et鈥濇嫾鎺ュ嚭getter鎴栬卻etter鏂规硶鍚嶏紝鍐嶉氳繃鏂规硶鍚嶇敤鍙嶅皠鑾峰彇鏂规硶 -### 闂1锛氬洜涓烘嫾鎺ユ柟娉曞悕鑲畾浠ラ┘宄板懡鍚嶆硶鏉ユ嫾鎺ワ紝杩欏氨瑕佹眰getter鍜宻etter鏂规硶涔熸槸浠ヨ繖涓鍒欏懡鍚嶏紝铏界劧ide鑷姩鐢熸垚鐨勬柟娉曟槸濡傛锛屼絾涓嶈兘淇濆瓨鎬绘槸濡傛銆 \ No newline at end of file diff --git a/group05/578505552/src/main/java/com/coderising/download/DownloadThread.java b/group05/578505552/src/main/java/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..428f35d244 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/DownloadThread.java @@ -0,0 +1,47 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.DownloadListener; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + File targetFile; + DownloadListener listener; + + public DownloadThread(Connection conn, int startPos, int endPos, File targetFile, DownloadListener listener){ + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.targetFile = targetFile; + this.listener = listener; + } + public void run(){ + try { + System.out.println("绾跨▼" + this.getName() + "姝e湪涓嬭浇" + startPos + "--" + endPos + "鐨勬暟鎹"); + + byte[] content = conn.read(startPos, endPos); + RandomAccessFile randomAccessFile = new RandomAccessFile(targetFile, "rw"); + randomAccessFile.seek(startPos); + randomAccessFile.write(content, 0, endPos - startPos + 1); + randomAccessFile.close(); + + if (FileDownloader.isDownLoadFinished()){ + listener.notifyFinished(); + System.out.println(">>>>>>>>>>>>>>绾跨▼" + this.getName() + "瀹屾垚浜嗘渶缁堢殑涓嬭浇"); + } + + System.out.println("绾跨▼" + this.getName() + "瀹屾垚" + startPos + "--" + endPos + "鏁版嵁鐨勪笅杞"); + } catch (IOException e) { + e.printStackTrace(); + } finally { + conn.close(); + } + } +} diff --git a/group05/578505552/src/main/java/com/coderising/download/FileDownloader.java b/group05/578505552/src/main/java/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..8e651495aa --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/FileDownloader.java @@ -0,0 +1,77 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +public class FileDownloader { + + String url; + DownloadListener listener; + ConnectionManager cm; + public static final int threadCount = 5; + private static int threadFinished; + + public FileDownloader(String _url) { + this.url = _url; + } + + public void execute(){ + try { + Connection conn = cm.open(this.url); + int length = conn.getContentLength(); + + File targetFile = new File("D:" + File.separator + "meinv.jpg"); + RandomAccessFile randomAccessFile = new RandomAccessFile(targetFile, "rw"); + randomAccessFile.setLength(length); + System.out.println("鎬婚暱搴︼細" + length); + randomAccessFile.close(); + + int temp = length / threadCount; + for (int i = 0; i < threadCount; i++) { + int startPos = i * temp; + int endPos = startPos + temp - 1; + if (i == threadCount - 1){ + endPos = length; + } + String threadName = "DownloadThread" + String.valueOf(i); + Connection connection = cm.open(url); + DownloadThread downloadThread = new DownloadThread(connection, startPos, endPos, targetFile, listener); + downloadThread.setName(threadName); + downloadThread.start(); + } + } catch (ConnectionException e) { + e.printStackTrace(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally{ + + } + } + + public synchronized static boolean isDownLoadFinished(){ + threadFinished++; + return threadFinished == threadCount; + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group05/578505552/src/main/java/com/coderising/download/FileDownloaderTest.java b/group05/578505552/src/main/java/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..7923434050 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,53 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/image/h%3D360/sign=9bb90992550fd9f9bf17536f152cd42b/9a504fc2d5628535959cf4cf94ef76c6a6ef63db.jpg"; + + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + public void notifyFinished() { + downloadFinished = true; + } + + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } + +} diff --git a/group05/578505552/src/main/java/com/coderising/download/api/Connection.java b/group05/578505552/src/main/java/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..494c713b27 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group05/578505552/src/main/java/com/coderising/download/api/ConnectionException.java b/group05/578505552/src/main/java/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..5954d22409 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,20 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + + public ConnectionException() { + } + + public ConnectionException(String message) { + super(message); + } + + public ConnectionException(String message, Throwable cause) { + super(message, cause); + } + + public ConnectionException(Throwable cause) { + super(cause); + } + +} diff --git a/group05/578505552/src/main/java/com/coderising/download/api/ConnectionManager.java b/group05/578505552/src/main/java/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group05/578505552/src/main/java/com/coderising/download/api/DownloadListener.java b/group05/578505552/src/main/java/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionImpl.java b/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..dc1b668659 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,52 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; + +public class ConnectionImpl implements Connection{ + + private HttpURLConnection conn; + + public ConnectionImpl() { + } + + public ConnectionImpl(HttpURLConnection urlConnection) { + this.conn = urlConnection; + } + + public byte[] read(int startPos, int endPos) throws IOException { + conn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + byte[] temp = null; + if (conn.getResponseCode() == 206){ + InputStream inputStream = conn.getInputStream(); + temp = new byte[endPos - startPos + 1]; + while ((inputStream.read(temp)) != -1){ + + } + } + return temp; + } + + public int getContentLength() { + try { + if (conn.getResponseCode() == 200){ + return conn.getContentLength(); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + this.close(); + } + return 0; + } + + public void close() { + if (conn != null){ + conn.disconnect(); + conn = null; + } + } +} diff --git a/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionManagerImpl.java b/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..3ea9a95517 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,25 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +import java.net.HttpURLConnection; +import java.net.URL; + +public class ConnectionManagerImpl implements ConnectionManager { + + public Connection open(String url) throws ConnectionException { + + try { + URL urlObject = new URL(url); + HttpURLConnection urlConnection = (HttpURLConnection)urlObject.openConnection(); + urlConnection.setRequestMethod("GET"); + urlConnection.setReadTimeout(5000); + return new ConnectionImpl(urlConnection); + } catch (java.io.IOException e) { + throw new ConnectionException("杩炴帴澶辫触"); + } + } + +} diff --git a/group05/578505552/src/main/java/com/coderising/litestruts/Configuration.java b/group05/578505552/src/main/java/com/coderising/litestruts/Configuration.java new file mode 100644 index 0000000000..90d8a0c6a1 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/litestruts/Configuration.java @@ -0,0 +1,7 @@ +package com.coderising.litestruts; + +/** + * Created by songbao.yang on 2017/3/10. + */ +public class Configuration { +} diff --git a/group05/578505552/src/main/java/com/coderising/litestruts/ReflectUtils.java b/group05/578505552/src/main/java/com/coderising/litestruts/ReflectUtils.java new file mode 100644 index 0000000000..c11c5632f3 --- /dev/null +++ b/group05/578505552/src/main/java/com/coderising/litestruts/ReflectUtils.java @@ -0,0 +1,14 @@ +package com.coderising.litestruts; + +import java.lang.reflect.Method; + +/** + * Created by songbao.yang on 2017/3/10. + */ +public class ReflectUtils { + + public Method[] getMethods(Class clazz, String name){ + + return null; + } +} diff --git a/group05/578505552/src/main/java/com/coderising/litestruts/XmlUtil.java b/group05/578505552/src/main/java/com/coderising/litestruts/XmlUtil.java deleted file mode 100644 index 6e3c261882..0000000000 --- a/group05/578505552/src/main/java/com/coderising/litestruts/XmlUtil.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.coderising.litestruts; - -/** - * - * Created by songbao.yang on 2017/2/28. - */ -public class XmlUtil { -} diff --git a/group05/578505552/src/test/java/com/coderising/download/DownloadThreadTest.java b/group05/578505552/src/test/java/com/coderising/download/DownloadThreadTest.java new file mode 100644 index 0000000000..eaa651776c --- /dev/null +++ b/group05/578505552/src/test/java/com/coderising/download/DownloadThreadTest.java @@ -0,0 +1,48 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.File; + +import static org.junit.Assert.*; + +/** + * Created by songbao.yang on 2017/3/11. + */ +public class DownloadThreadTest { + + private DownloadThread downloadThread; + private final String url = "https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/image/h%3D360/sign=9bb90992550fd9f9bf17536f152cd42b/9a504fc2d5628535959cf4cf94ef76c6a6ef63db.jpg"; + private final String path = "D:"; + DownloadListener listener; + + @Before + public void setUp() throws Exception { + String threadName = "DownloadThreadTest"; + ConnectionManagerImpl connectionManager = new ConnectionManagerImpl(); + Connection connection = connectionManager.open(url); + File file = new File(path + File.separator + "meinv.jpg"); + int contentLength = connection.getContentLength(); + System.out.println(contentLength); + + Connection conn = connectionManager.open(url); + downloadThread = new DownloadThread(conn, 0, contentLength, file, listener); + downloadThread.setName(threadName); + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void run() throws Exception { + downloadThread.run(); + } + +} \ No newline at end of file diff --git a/group05/578505552/src/test/java/com/coderising/download/impl/ConnectionImplTest.java b/group05/578505552/src/test/java/com/coderising/download/impl/ConnectionImplTest.java new file mode 100644 index 0000000000..142540943e --- /dev/null +++ b/group05/578505552/src/test/java/com/coderising/download/impl/ConnectionImplTest.java @@ -0,0 +1,47 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionManager; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Created by songbao.yang on 2017/3/11. + */ +public class ConnectionImplTest { + + private Connection connection; + private final String URL = "https://ss0.baidu.com/-Po3dSag_xI4khGko9WTAnF6hhy/image/h%3D200/sign=8e07ecabb7fb4316051f7d7a10a54642/5882b2b7d0a20cf482c772bf73094b36acaf997f.jpg"; + + @Before + public void setUp() throws Exception { + ConnectionManagerImpl connectionManager = new ConnectionManagerImpl(); + this.connection = connectionManager.open(URL); + } + + @After + public void tearDown() throws Exception { + + } + + @Test + public void read() throws Exception { + byte[] read = connection.read(0, 100); + System.out.println(read); + } + + @Test + public void getContentLength() throws Exception { + int contentLength = connection.getContentLength(); + System.out.println(contentLength); + } + + @Test + public void close() throws Exception { + + } + +} \ No newline at end of file From f7cf095ed9c61f18d65ebc059422b3fadf4d7582 Mon Sep 17 00:00:00 2001 From: lzb Date: Sat, 11 Mar 2017 22:51:22 +0800 Subject: [PATCH 292/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=EF=BC=8C=E4=BA=8C=E5=8F=89=E6=A0=91=E6=98=8E=E5=A4=A9?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group24/1148285693/.gitignore | 36 +++ .../learning2017/learning-basic/pom.xml | 23 ++ .../me/lzb/homework0312/basic/ArrayList.java | 96 +++++++ .../homework0312/basic/BinaryTreeNode.java | 36 +++ .../me/lzb/homework0312/basic/Iterator.java | 10 + .../me/lzb/homework0312/basic/LinkedList.java | 266 ++++++++++++++++++ .../java/me/lzb/homework0312/basic/List.java | 13 + .../java/me/lzb/homework0312/basic/Queue.java | 31 ++ .../java/me/lzb/homework0312/basic/Stack.java | 49 ++++ .../java/me/lzb/homework0312/basic/Test.java | 22 ++ .../lzb/homework0312/basic/ArrayListTest.java | 113 ++++++++ .../homework0312/basic/LinkedListTest.java | 114 ++++++++ group24/1148285693/learning2017/pom.xml | 93 ++++++ 13 files changed, 902 insertions(+) create mode 100644 group24/1148285693/.gitignore create mode 100644 group24/1148285693/learning2017/learning-basic/pom.xml create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/ArrayList.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Iterator.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/LinkedList.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/List.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Queue.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Stack.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/ArrayListTest.java create mode 100644 group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/LinkedListTest.java create mode 100644 group24/1148285693/learning2017/pom.xml diff --git a/group24/1148285693/.gitignore b/group24/1148285693/.gitignore new file mode 100644 index 0000000000..8e0951ea09 --- /dev/null +++ b/group24/1148285693/.gitignore @@ -0,0 +1,36 @@ +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files +*.war +*.ear +*.bk +.gradle +target +*.class +*.real + +# virtual machine crash logs +# see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# Eclipse Files # +.project +.classpath +.settings + +# Idea +*.iml +*.ipr +*.iws +.idea + +# log +*_IS_UNDEFINED +logs +*.log + +# other +*.bak +.directory +.DS_Store \ No newline at end of file diff --git a/group24/1148285693/learning2017/learning-basic/pom.xml b/group24/1148285693/learning2017/learning-basic/pom.xml new file mode 100644 index 0000000000..95a5bd92fe --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + + + learning2017 + me.lzb + 1.0 + + + + learning-basic + jar + basic + 1.0 + + + + + diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/ArrayList.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/ArrayList.java new file mode 100644 index 0000000000..c93b6c76e0 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/ArrayList.java @@ -0,0 +1,96 @@ +package me.lzb.homework0312.basic; + +/** + * 绠鏄揂rrayList + * Created by LZB on 2017/3/11. + */ +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = {}; + + + public void add(Object o) { + if (elementData.length < size + 1) { + Object[] target = new Object[size + 1]; + System.arraycopy(elementData, 0, target, 0, elementData.length); + elementData = target; + } + elementData[size] = o; + size = size + 1; + } + + + public void add(int index, Object o) throws IndexOutOfBoundsException { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("index boom"); + } + + int leftSize = index; + int rightSize = size - index; + Object[] target = new Object[elementData.length + 1]; + System.arraycopy(elementData, 0, target, 0, leftSize); + target[index] = o; + System.arraycopy(elementData, index, target, index + 1, rightSize); + elementData = target; + size = size + 1; + } + + public Object get(int index) throws IndexOutOfBoundsException { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("index boom"); + } + return elementData[index]; + } + + public Object remove(int index) throws IndexOutOfBoundsException { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("index boom"); + } + Object removeObject = elementData[index]; + int leftSize = index; + int rightSize = size - index - 1; + Object[] target = new Object[elementData.length - 1]; + System.arraycopy(elementData, 0, target, 0, leftSize); + System.arraycopy(elementData, index + 1, target, index, rightSize); + elementData = target; + size = size - 1; + return removeObject; + } + + public int size() { + return size; + } + + + public Iterator iterator() { + return new ArrayListIterator(this); + } + + private class ArrayListIterator implements Iterator { + private ArrayList arrayList; + + int pos = 0; + + private ArrayListIterator(ArrayList arrayList) { + this.arrayList = arrayList; + } + + @Override + public boolean hasNext() { + if (pos >= arrayList.size) { + return false; + } + + return true; + } + + @Override + public Object next() { + Object result = arrayList.get(pos); + pos = pos + 1; + return result; + } + } +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..95c91ac280 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java @@ -0,0 +1,36 @@ +package me.lzb.homework0312.basic; + +/** + * 宸﹁竟姣旂埗鑺傜偣澶э紝鍙宠竟姣旂埗鑺傜偣灏 + * Created by LZB on 2017/3/11. + */ +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Iterator.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Iterator.java new file mode 100644 index 0000000000..138e090126 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Iterator.java @@ -0,0 +1,10 @@ +package me.lzb.homework0312.basic; + +/** + * Created by LZB on 2017/3/11. + */ +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/LinkedList.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/LinkedList.java new file mode 100644 index 0000000000..7b12d27c6c --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/LinkedList.java @@ -0,0 +1,266 @@ +package me.lzb.homework0312.basic; + + +/** + * 绠鏄揕inkedList + * Created by LZB on 2017/3/11. + */ +public class LinkedList implements List { + + private int size = 0; + + + private Node first; + + private Node last; + + + private static class Node { + Object data; + Node next; + + public Node(Object data, Node next) { + this.data = data; + this.next = next; + } + + } + + + public void add(Object o) { + if (first == null) { + first = new Node(o, null); + last = first; + } else { + Node n = new Node(o, null); + last.next = n; + last = n; + } + size = size + 1; + } + + + public void add(int index, Object o) throws IndexOutOfBoundsException { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("index boom"); + } + + if (index == size) { + add(o); + return; + } + + if (index == 0) { + Node n = new Node(0, first); + first = n; + size = size + 1; + return; + } + + Node before = first; + for (int i = 0; i < index - 1; i++) { + before = before.next; + } + + Node after = before.next; + + Node n = new Node(o, after); + + before.next = n; + + size = size + 1; + + } + + + public Object get(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("index boom"); + } + Node result = first; + for (int i = 0; i < index; i++) { + result = result.next; + } + return result.data; + } + + + public Object remove(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("index boom"); + } + + if (size == 1) { + Node result = last; + last = null; + first = null; + size = size - 1; + return result.data; + } + + if (index == size - 1) { + Node result = last; + last = null; + size = size - 1; + return result.data; + } + + + if (index == 0) { + Node result = first; + Node second = first.next; + first = second; + size = size - 1; + return result.data; + } + + + Node before = first; + for (int i = 0; i < index - 1; i++) { + before = before.next; + } + Node result = before.next; + Node after = before.next.next; + before.next = after; + size = size - 1; + return result.data; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + add(0, o); + } + + + public void addLast(Object o) { + add(o); + } + + + public Object removeFirst() { + return remove(0); + } + + + public Object removeLast() { + return remove(size); + } + + + public Iterator iterator() { + return new LinkedListIterator(this); + } + + + private class LinkedListIterator implements Iterator { + private LinkedList linkedList; + + int pos = 0; + + private LinkedListIterator(LinkedList linkedList) { + this.linkedList = linkedList; + } + + @Override + public boolean hasNext() { + + if (pos >= linkedList.size) { + return false; + } + return true; + } + + @Override + public Object next() { + Object result = linkedList.get(pos); + pos = pos + 1; + return result; + } + } + + + //鍚庨潰鐨勬柟娉曞厛涓嶇敤鍐欑殑璇 + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public static int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/List.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/List.java new file mode 100644 index 0000000000..bd66593efa --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/List.java @@ -0,0 +1,13 @@ +package me.lzb.homework0312.basic; + +/** + * list鎺ュ彛 + * Created by LZB on 2017/3/11. + */ +public interface List { + void add(Object o); + void add(int index, Object o); + Object get(int index); + Object remove(int index); + int size(); +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Queue.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Queue.java new file mode 100644 index 0000000000..50ea66f1a2 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Queue.java @@ -0,0 +1,31 @@ +package me.lzb.homework0312.basic; + +/** + * 鍏堣繘鍏堝嚭 + * Created by LZB on 2017/3/11. + */ +public class Queue { + LinkedList elementData = new LinkedList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue() throws IndexOutOfBoundsException{ + if(isEmpty()){ + throw new IndexOutOfBoundsException("index boom"); + } + return elementData.remove(elementData.size() - 1); + } + + public boolean isEmpty(){ + if(elementData.size() <= 0){ + return true; + } + return false; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Stack.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Stack.java new file mode 100644 index 0000000000..4cd8d3dfd9 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Stack.java @@ -0,0 +1,49 @@ +package me.lzb.homework0312.basic; + +/** + * 鍏堣繘鍚庡嚭 + * Created by LZB on 2017/3/11. + */ +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + elementData.add(o); + } + + /** + * 鑾峰彇鏈鍚庤繘鐨勯偅涓紝骞跺垹闄 + * + * @return + */ + public Object pop() throws IndexOutOfBoundsException { + if (isEmpty()) { + throw new IndexOutOfBoundsException("index boom"); + } + + return elementData.remove(elementData.size() - 1); + } + + /** + * 杩斿洖鏈鍚庤繘鍘荤殑鍏冪礌 + * + * @return + */ + public Object peek() throws IndexOutOfBoundsException { + if (isEmpty()) { + throw new IndexOutOfBoundsException("index boom"); + } + return elementData.get(elementData.size() - 1); + } + + public boolean isEmpty() { + if (elementData.size() <= 0) { + return true; + } + return false; + } + + public int size() { + return elementData.size(); + } +} diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java new file mode 100644 index 0000000000..aa99166524 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java @@ -0,0 +1,22 @@ +package me.lzb.homework0312.basic; + +/** + * Created by LZB on 2017/3/11. + */ +public class Test { + + public static void main(String[] args) { +// java.util.List list = new ArrayList<>(); +// list.add("a"); +// list.add(2, "aa"); +// list.add(2, "aa"); +// list.forEach(s -> System.out.println(s)); +// int[] a = new int[0]; + +// ArrayList list = new ArrayList(); +// list.add("aaa"); +// list.add("bbb"); +// list.size(); +// list.add("c"); + } +} diff --git a/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/ArrayListTest.java b/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/ArrayListTest.java new file mode 100644 index 0000000000..c35ed8d2b4 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/ArrayListTest.java @@ -0,0 +1,113 @@ +package me.lzb.homework0312.basic; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +/** + * ArrayList娴嬭瘯 + * Created by LZB on 2017/3/11. + */ + +public class ArrayListTest { + + private ArrayList arrayList; + + private String[] strArray; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void instantiate() throws Exception { + arrayList = new ArrayList(); + arrayList.add("a"); + arrayList.add("b"); + arrayList.add("c"); + arrayList.add("d"); + + strArray = new String[]{"a", "b", "c", "d"}; + } + + + @Test + public void sizeTest() { + Assert.assertEquals(4, arrayList.size(), 0); + } + + @Test + public void getTest() throws IndexOutOfBoundsException { + Assert.assertEquals("a", arrayList.get(0).toString()); + Assert.assertEquals("c", arrayList.get(2).toString()); + Assert.assertEquals("d", arrayList.get(3).toString()); + + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + arrayList.get(100); + arrayList.get(-1); + } + + @Test + public void iteratoreTest(){ + Iterator iterator = arrayList.iterator(); + int a = 0; + while (iterator.hasNext()){ + Assert.assertEquals(strArray[a], iterator.next().toString()); + a = a + 1; + } + } + + + @Test + public void addTest() { + arrayList.add("f"); + Assert.assertEquals("f", arrayList.get(4).toString()); + } + + @Test + public void removeTest() throws IndexOutOfBoundsException { + + ArrayList list = new ArrayList(); + list.add("a"); + list.add("b"); + list.add("c"); + list.add("d"); + + + String r1 = list.remove(1).toString(); + Assert.assertEquals("b", r1); + Assert.assertEquals(3, list.size()); + + String r0 = list.remove(0).toString(); + Assert.assertEquals("a", r0); + Assert.assertEquals(2, list.size()); + + String rs = list.remove(list.size() - 1).toString(); + Assert.assertEquals("d", rs); + Assert.assertEquals(1, list.size()); + + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + list.remove(100); + + } + + + @Test + public void addIndexTest() throws IndexOutOfBoundsException { + arrayList.add(0, "0"); + Assert.assertEquals("0", arrayList.get(0).toString()); + arrayList.add(arrayList.size(), "s"); + Assert.assertEquals("s", arrayList.get(arrayList.size() - 1).toString()); + arrayList.add(2, "2a"); + Assert.assertEquals("2a", arrayList.get(2).toString()); + + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + arrayList.add(10, "10a"); + } + + +} diff --git a/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/LinkedListTest.java b/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/LinkedListTest.java new file mode 100644 index 0000000000..740d8768c7 --- /dev/null +++ b/group24/1148285693/learning2017/learning-basic/src/test/java/me/lzb/homework0312/basic/LinkedListTest.java @@ -0,0 +1,114 @@ +package me.lzb.homework0312.basic; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + + +/** + * linkedliksTest + * Created by LZB on 2017/3/11. + */ +public class LinkedListTest { + + private LinkedList linkedList; + + private String[] strArray; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void instantiate() throws Exception { + linkedList = new LinkedList(); + linkedList.add("a"); + linkedList.add("b"); + linkedList.add("c"); + linkedList.add("d"); + + strArray = new String[]{"a", "b", "c", "d"}; + } + + + @Test + public void iteratoreTest(){ + Iterator iterator = linkedList.iterator(); + int a = 0; + while (iterator.hasNext()){ + Assert.assertEquals(strArray[a], iterator.next().toString()); + a = a + 1; + } + } + + + @Test + public void sizeTest() { + Assert.assertEquals(4, linkedList.size(), 0); + } + + @Test + public void getTest() throws IndexOutOfBoundsException { + Assert.assertEquals("a", linkedList.get(0).toString()); + Assert.assertEquals("b", linkedList.get(1).toString()); + Assert.assertEquals("d", linkedList.get(3).toString()); + + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + linkedList.get(100); + linkedList.get(-1); + } + + + @Test + public void addTest() { + linkedList.add("f"); + Assert.assertEquals("f", linkedList.get(4).toString()); + } + + @Test + public void removeTest() throws IndexOutOfBoundsException { + + LinkedList list = new LinkedList(); + list.add("a"); + list.add("b"); + list.add("c"); + list.add("d"); + + + String r1 = list.remove(1).toString(); + Assert.assertEquals("b", r1); + Assert.assertEquals(3, list.size()); + + String r0 = list.remove(0).toString(); + Assert.assertEquals("a", r0); + Assert.assertEquals(2, list.size()); + + String rs = list.remove(list.size() - 1).toString(); + Assert.assertEquals("d", rs); + Assert.assertEquals(1, list.size()); + + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + list.remove(100); + list.remove(-1); + } + + + @Test + public void addIndexTest() throws IndexOutOfBoundsException { + linkedList.add(0, "0"); + Assert.assertEquals("0", linkedList.get(0).toString()); + linkedList.add(linkedList.size(), "s"); + Assert.assertEquals("s", linkedList.get(linkedList.size() - 1).toString()); + linkedList.add(2, "2a"); + Assert.assertEquals("2a", linkedList.get(2).toString()); + thrown.expect(IndexOutOfBoundsException.class); + thrown.expectMessage("index boom"); + linkedList.add(100, "10a"); + + } + + +} diff --git a/group24/1148285693/learning2017/pom.xml b/group24/1148285693/learning2017/pom.xml new file mode 100644 index 0000000000..476484d03d --- /dev/null +++ b/group24/1148285693/learning2017/pom.xml @@ -0,0 +1,93 @@ + + + 4.0.0 + + me.lzb + learning2017 + 1.0 + learning2017 + jar + + https://github.com/lzbferrari/coding2017 + 2017缂栫▼鎻愰珮 + + + + lzb + https://github.com/lzbferrari + lzbferrari@gmail.com + + + + + learning-basic + + + + 1.8 + UTF-8 + UTF-8 + 1.8 + UTF-8 + + + + + + aliyun + aliyun + http://maven.aliyun.com/nexus/content/groups/public + + true + never + + + false + + + + + + + aliyun + aliyun + http://maven.aliyun.com/nexus/content/groups/public + + true + + + false + + + + + + + + + junit + junit + 4.12 + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${java.version} + ${java.version} + UTF-8 + + + + + \ No newline at end of file From 91e7be7f2f0c15cff5bedae13aaf13f918392cd1 Mon Sep 17 00:00:00 2001 From: wjwzero <13602573297@163.com> Date: Sat, 11 Mar 2017 22:52:56 +0800 Subject: [PATCH 293/646] Delete .classpath --- group26/723161901/.classpath | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 group26/723161901/.classpath diff --git a/group26/723161901/.classpath b/group26/723161901/.classpath deleted file mode 100644 index 3e0fb272a8..0000000000 --- a/group26/723161901/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From cf252f16ae31d54dc46023ddefd49fe3176fa341 Mon Sep 17 00:00:00 2001 From: wjwzero <13602573297@163.com> Date: Sat, 11 Mar 2017 22:53:29 +0800 Subject: [PATCH 294/646] Delete .project --- group26/723161901/.project | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 group26/723161901/.project diff --git a/group26/723161901/.project b/group26/723161901/.project deleted file mode 100644 index e02cb8b932..0000000000 --- a/group26/723161901/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - 723161901 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - From 7d13bef6e864b63b1f9beac119905865146ede7c Mon Sep 17 00:00:00 2001 From: wenGQ Date: Sat, 11 Mar 2017 22:54:12 +0800 Subject: [PATCH 295/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/github/mrwengq/first/ArrayList.java | 104 ++++++++ .../github/mrwengq/first/BinaryTreeNode.java | 77 ++++++ .../com/github/mrwengq/first/Iterator.java | 10 + .../com/github/mrwengq/first/LinkedList.java | 244 ++++++++++++++++++ .../src/com/github/mrwengq/first/List.java | 16 ++ .../src/com/github/mrwengq/first/Queue.java | 29 +++ .../src/com/github/mrwengq/first/Stack.java | 40 +++ 7 files changed, 520 insertions(+) create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/Iterator.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/List.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/Queue.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/Stack.java diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java new file mode 100644 index 0000000000..f627f38abb --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java @@ -0,0 +1,104 @@ +package com.github.mrwengq.first; + +public class ArrayList implements List { + + private int size = 0; + private Object elementData[] = new Object[5]; + + public void add(Object o) { + if (size >= elementData.length) + elementData = copyAddArray(elementData); + elementData[size] = o; + size++; + } + + public void add(int index, Object o) { + if (index > size - 1 || index < 0) { + throw new ArrayIndexOutOfBoundsException(); + } else { + elementData = addUpdateArray(elementData, index); + elementData[index] = o; + size++; + return; + } + } + + public Object get(int index) { + if (index > size - 1 || index < 0) + throw new ArrayIndexOutOfBoundsException(); + else + return elementData[index]; + } + + public Object remove(int index) { + if (index > size - 1 || index < 0) + throw new ArrayIndexOutOfBoundsException(); + if (index == size - 1) { + elementData[index] = null; + size--; + return null; + } else { + delUpdateArray(elementData, index); + size--; + return null; + } + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new Iterator() { + + int index; + + public boolean hasNext() { + index++; + Object ob = elementData[index]; + return ob != null; + } + + public Object next() { + return elementData[index]; + } + + }; + } + + private Object[] copyAddArray(Object elementData[]) { + Object ob[] = new Object[(elementData.length * 3) / 4]; + System.arraycopy(((Object) (elementData)), 0, ((Object) (ob)), 0, + elementData.length); + return ob; + } + + private Object[] addUpdateArray(Object elementData[], int index) { + Object temp = null; + for (int i = 0; i < size; i++) + if (i > index) { + temp = elementData[index]; + elementData[index] = elementData[i]; + elementData[i] = temp; + if (i == size - 1) { + if (size > elementData.length) + elementData = copyAddArray(elementData); + elementData[size] = elementData[index]; + } + } + + return elementData; + } + + private void delUpdateArray(Object elementData[], int index) { + Object temp = null; + for (int i = 0; i < size; i++) + if (i > index && i < size - 1) + elementData[i - 1] = elementData[i]; + else if (i == size - 1) + elementData[i] = null; + + } + + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java new file mode 100644 index 0000000000..37bc363cdb --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java @@ -0,0 +1,77 @@ +package com.github.mrwengq.first; + +import java.util.Comparator; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + private Comparator cpt; + public BinaryTreeNode() { + cpt = new Comparator() { + + public int compare(Object o1, Object o2) { + int ob1 = ((Integer) o1).intValue(); + int ob2 = ((Integer) o2).intValue(); + if (ob1 > ob2){ + return 1; + } + if(ob1 0) { + if (getLeft() == null) { + this.setLeft(tree); + return null; + } + left.insert(o); + } else if (comValue < 0) { + if (getRight() == null) { + this.setRight(tree); + return null; + } + right.insert(o); + } + return null; + } + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/Iterator.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Iterator.java new file mode 100644 index 0000000000..2947813ffd --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Iterator.java @@ -0,0 +1,10 @@ +package com.github.mrwengq.first; + + +public interface Iterator +{ + + public abstract boolean hasNext(); + + public abstract Object next(); +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java new file mode 100644 index 0000000000..a8ef6f6413 --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java @@ -0,0 +1,244 @@ +package com.github.mrwengq.first; + +public class LinkedList implements List { + private Node head; + private int size =0; + private static class Node { + + Object data; + Node next; + + public Node(Object o) { + data = o; + next = null; + } + } + + + public void add(Object o) { + if (size == 0) { + head = new Node(o); + } else { + Node node = new Node(o); + Node lastNode = findNode(size); + lastNode.next = node; + } + size++; + } + + private Node findNode(int index) { + Node no = head; + for (; index - 1 > 0; index--) + no = no.next; + + return no; + } + + public void add(int index, Object o) { + if (index < 0 || index > size - 1) + throw new ArrayIndexOutOfBoundsException(); + Node node = new Node(o); + Node indexNode = findNode(index); + if (index - 1 < 0) { + node.next = indexNode; + head = node; + size++; + return; + } else { + Node lastNode = findNode(index - 1); + lastNode.next = node; + node.next = indexNode; + size++; + return; + } + } + + public Object get(int index) { + if (index < 0 || index > size - 1) + throw new ArrayIndexOutOfBoundsException(); + else + return findNode(index).data; + } + + public Object remove(int index) { + if (index < 0 || index > size - 1 || size == 0) + throw new ArrayIndexOutOfBoundsException(); + Node indexNode = findNode(index); + if (size == 1) { + head = null; + size = 0; + return indexNode.data; + } + Node nextNode = null; + Node lastNode = null; + if (index + 1 < size - 1) + nextNode = findNode(index + 1); + if (index - 1 > 0) + lastNode = findNode(index - 1); + if (lastNode == null) { + head = nextNode; + size--; + return indexNode.data; + } + if (nextNode == null) { + lastNode.next = null; + size--; + return indexNode.data; + } else { + lastNode.next = nextNode; + size--; + return indexNode.data; + } + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + Node node = new Node(o); + if (size == 0) { + head = node; + size++; + return; + } else { + node.next = head; + head = node; + size++; + return; + } + } + + public void addLast(Object o) { + Node node = new Node(o); + if (size == 0) { + head = node; + size++; + return; + } else { + Node lastNode = findNode(size); + lastNode.next = node; + size++; + return; + } + } + + public Object removeFirst() { + if (size == 0) { + return null; + } else { + Node nextNode = head.next; + Object ob = head.data; + head = nextNode; + size--; + return ob; + } + } + + public Object removeLast() { + if (size == 0) { + return null; + } else { + Node node = findNode(size); + Node lastNode = findNode(size - 1); + lastNode.next = null; + size--; + return node.data; + } + } + + public Iterator iterator() { + return new Iterator() { + + int index = -1; + + public boolean hasNext() { + index++; + return findNode(index) != null; + } + + public Object next() { + return findNode(index).data; + } + + + }; + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/List.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/List.java new file mode 100644 index 0000000000..d36d04b8b6 --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/List.java @@ -0,0 +1,16 @@ +package com.github.mrwengq.first; + + +public interface List +{ + + public abstract void add(Object obj); + + public abstract void add(int i, Object obj); + + public abstract Object get(int i); + + public abstract Object remove(int i); + + public abstract int size(); +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/Queue.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Queue.java new file mode 100644 index 0000000000..004ac39e6b --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Queue.java @@ -0,0 +1,29 @@ +package com.github.mrwengq.first; + +public class Queue { + + private ArrayList elementData; + public Queue() { + elementData = new ArrayList(); + } + + public void enQueue(Object o) { + elementData.add(o); + } + + public Object deQueue() { + Object ob = null; + ob = elementData.get(0); + elementData.remove(0); + return ob; + } + + public boolean isEmpty() { + return elementData.size() == 0; + } + + public int size() { + return elementData.size(); + } + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/Stack.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Stack.java new file mode 100644 index 0000000000..f0614a13df --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/Stack.java @@ -0,0 +1,40 @@ +package com.github.mrwengq.first; + +public class Stack { + + + private ArrayList elementData; + public Stack() { + elementData = new ArrayList(); + } + + public void push(Object o) { + elementData.add(o); + } + + public Object pop() { + if (elementData.size() == 0) { + return null; + } else { + Object ob = null; + ob = elementData.get(elementData.size() - 1); + elementData.remove(elementData.size() - 1); + return ob; + } + } + + public Object peek() { + if (elementData.size() == 0) + return null; + else + return elementData.get(elementData.size() - 1); + } + + public boolean isEmpty() { + return elementData.size() == 0; + } + + public int size() { + return elementData.size(); + } +} From 0ed1f6d2e7f98b12002e5ff4fac6150b4307d2ae Mon Sep 17 00:00:00 2001 From: chk Date: Sat, 11 Mar 2017 22:59:57 +0800 Subject: [PATCH 296/646] this first homework --- .../com/basic/datastructure/ArrayList.java | 64 ++++++++++++ .../com/basic/datastructure/LinkedList.java | 98 +++++++++++++++++++ .../com/basic/datastructure/List.java | 9 ++ .../com/basic/datastructure/Queue.java | 23 +++++ .../com/basic/datastructure/Stack.java | 29 ++++++ .../datastructure/TestDataStructure.java | 27 +++++ 6 files changed, 250 insertions(+) create mode 100644 group23/632678665/com/basic/datastructure/ArrayList.java create mode 100644 group23/632678665/com/basic/datastructure/LinkedList.java create mode 100644 group23/632678665/com/basic/datastructure/List.java create mode 100644 group23/632678665/com/basic/datastructure/Queue.java create mode 100644 group23/632678665/com/basic/datastructure/Stack.java create mode 100644 group23/632678665/com/basic/datastructure/TestDataStructure.java diff --git a/group23/632678665/com/basic/datastructure/ArrayList.java b/group23/632678665/com/basic/datastructure/ArrayList.java new file mode 100644 index 0000000000..35fb185737 --- /dev/null +++ b/group23/632678665/com/basic/datastructure/ArrayList.java @@ -0,0 +1,64 @@ +package com.basic.datastructure; + +import java.util.Arrays; + +import org.junit.Test; + +public class ArrayList implements List{ + private Object [] array =new Object [15]; + private int size=0; + private int aindex=0; + @Override + public void add(Object o) { + if(aindex>(int)(array.length/3*2)){ + array=autoGrew(array); + } + array[aindex]=o; + size++; + aindex++; + } + + @Override + public void add(int index, Object o) { + if(index>=array.length){ + throw new IndexOutOfBoundsException(); + } + array[index]=o; + size++; + aindex=index; + } + + @Override + public Object get(int index) { + if(index>=array.length){ + throw new IndexOutOfBoundsException(); + } + return array[index]; + } + + @Override + public Object remove(int index) { + if(index>=array.length){ + throw new IndexOutOfBoundsException(); + } + Object o=array[index]; + for(int i=index;i Date: Sat, 11 Mar 2017 23:12:51 +0800 Subject: [PATCH 297/646] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=8F=90=E4=BA=A4=EF=BC=8C=E4=BD=9C=E4=B8=9A=E5=BE=85?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group12/247565311/week2/ArrayUtil.java | 1 + group12/247565311/week3/DownloadThread.java | 53 ++++ group12/247565311/week3/FileDownloader.java | 74 +++++ .../247565311/week3/FileDownloaderTest.java | 45 ++++ group12/247565311/week3/LinkedList.java | 252 ++++++++++++++++++ group12/247565311/week3/LinkedListTest.java | 244 +++++++++++++++++ group12/247565311/week3/api/Connection.java | 24 ++ .../week3/api/ConnectionException.java | 5 + .../week3/api/ConnectionManager.java | 10 + .../247565311/week3/api/DownloadListener.java | 5 + .../247565311/week3/impl/ConnectionImpl.java | 43 +++ .../week3/impl/ConnectionManagerImpl.java | 28 ++ 12 files changed, 784 insertions(+) create mode 100644 group12/247565311/week3/DownloadThread.java create mode 100644 group12/247565311/week3/FileDownloader.java create mode 100644 group12/247565311/week3/FileDownloaderTest.java create mode 100644 group12/247565311/week3/LinkedList.java create mode 100644 group12/247565311/week3/LinkedListTest.java create mode 100644 group12/247565311/week3/api/Connection.java create mode 100644 group12/247565311/week3/api/ConnectionException.java create mode 100644 group12/247565311/week3/api/ConnectionManager.java create mode 100644 group12/247565311/week3/api/DownloadListener.java create mode 100644 group12/247565311/week3/impl/ConnectionImpl.java create mode 100644 group12/247565311/week3/impl/ConnectionManagerImpl.java diff --git a/group12/247565311/week2/ArrayUtil.java b/group12/247565311/week2/ArrayUtil.java index b76726b7b5..00bab36625 100644 --- a/group12/247565311/week2/ArrayUtil.java +++ b/group12/247565311/week2/ArrayUtil.java @@ -195,6 +195,7 @@ public String join(int[] array, String seperator){ if(array == null) return ""; int lena = array.length; String res = ""; + for(int i=0;i endPos) + curEndPos = endPos; + try { + byte[] data = conn.read(startPos, curEndPos); + FileChannel channel = FileChannel.open(filepath,StandardOpenOption.WRITE); + // System.out.println("startPos"+startPos + ", length:"+data.length); + buffer.put(data); + channel.write(buffer); + } catch (IOException e) { + //e.printStackTrace(); + System.out.println("写文件错误"); + } + // } + conn.close(); + } +} diff --git a/group12/247565311/week3/FileDownloader.java b/group12/247565311/week3/FileDownloader.java new file mode 100644 index 0000000000..c5ab5fb5d0 --- /dev/null +++ b/group12/247565311/week3/FileDownloader.java @@ -0,0 +1,74 @@ +package week3; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +import week3.api.Connection; +import week3.api.ConnectionException; +import week3.api.ConnectionManager; +import week3.api.DownloadListener; +import week3.impl.ConnectionManagerImpl; + +public class FileDownloader { + private String url = null,path=null; + DownloadListener listener = null; + private ConnectionManager cm = new ConnectionManagerImpl(); + + public FileDownloader(String weburl,String localpath) { + this.url = weburl; + this.path = localpath; + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + int length = conn.getContentLength(); + // 鍦ㄨ繖閲屽垱寤哄嚭涓涓悓鏍峰ぇ灏忕殑绌烘枃浠讹紝 璺緞鏄痯ath + RandomAccessFile tarfile = new RandomAccessFile(path,"rw"); + tarfile.setLength(length); + tarfile.close(); + Thread[] threads = new Thread[4]; + threads[0] = new DownloadThread(cm.open(this.url),0,length/4,path); + threads[1] = new DownloadThread(cm.open(this.url),length/4,length/2,path); + threads[2] = new DownloadThread(cm.open(this.url),length/2,3*length/4,path); + threads[3] = new DownloadThread(cm.open(this.url),3*length/4,length,path); + for(int i=0;i<4;i++) + threads[i].start(); + threads[0].join(); + threads[1].join(); + threads[2].join(); + threads[3].join(); + this.getListener().notifyFinished(); + } catch (ConnectionException | IOException | InterruptedException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + } + public void setListener(DownloadListener listener) { + this.listener = listener; + } + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + public DownloadListener getListener(){ + return this.listener; + } +} diff --git a/group12/247565311/week3/FileDownloaderTest.java b/group12/247565311/week3/FileDownloaderTest.java new file mode 100644 index 0000000000..96893b71e9 --- /dev/null +++ b/group12/247565311/week3/FileDownloaderTest.java @@ -0,0 +1,45 @@ +package week3; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import week3.api.ConnectionManager; +import week3.api.DownloadListener; +import week3.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + String url = "https://edmullen.net/test/rc.jpg"; + String path = "D:\\hellp.jpg"; + FileDownloader downloader = new FileDownloader(url,path); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + }); + downloader.execute(); + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + Thread.sleep(5000);//浼戠湢5绉 + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } +} diff --git a/group12/247565311/week3/LinkedList.java b/group12/247565311/week3/LinkedList.java new file mode 100644 index 0000000000..dbf9465386 --- /dev/null +++ b/group12/247565311/week3/LinkedList.java @@ -0,0 +1,252 @@ +package week3; + + +import java.util.NoSuchElementException; + +import week1.Iterator; +import week1.List; + +public class LinkedList implements List { + private Node head = new Node(); + private int size = 0; + private void checkAddIndex(int index){ + if(index > size || index<0) throw new IndexOutOfBoundsException("Index:"+index+", Size:"+size); + } + private void checkGetIndex(int index){ + if(index >= size || index<0) throw new IndexOutOfBoundsException("Index:"+index+", Size:"+size); + } + public void add(Object o){ + Node newNode = new Node(o),p = head; + while(p.next!=null) + p = p.next; + p.next = newNode; + size += 1; + } + /** + * + * */ + public void add(int index , Object o){ + checkAddIndex(index); + Node p = head; + for(int i=0;i7->10 , 逆置后变为 10->7->3 + */ + public void reverse(){ + Node rhead = new Node(),p=head; + for(int i=0;i5->7->8 , 删除以后的值为 7->8 + * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 + + */ + public void removeFirstHalf(){ + int numToRemove = size/2; + for(int i=0;i101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + int []res = new int[list.size()]; + Node p = head.next,q = list.head.next; + int lenl = list.size(),index=0; + for(int i=0;imax) return; // 目标区间 (min,max) + Node p = head; + while(p.next != null && ((Integer)p.next.data).intValue()<=min) // 跳过不相干的元素 + p = p.next; + while(p.next != null && ((Integer)p.next.data).intValue()=endPos) return null; + byte[]res = null; + conn.setRequestProperty("Range","bytes="+startPos+"-"+endPos); + int responcode = conn.getResponseCode(); + if(200 < responcode && responcode < 300){ + InputStream input = conn.getInputStream(); + res = new byte[endPos-startPos]; + input.read(res); + input.close(); + } + conn.disconnect(); + return res; + } + + @Override + public int getContentLength() { + if(conn == null) return 0; + return conn.getContentLength(); + } + + @Override + public void close() { + if(conn == null) return; + conn.disconnect(); + } + public void setConn(HttpURLConnection urlconn) { + conn = urlconn; + } +} diff --git a/group12/247565311/week3/impl/ConnectionManagerImpl.java b/group12/247565311/week3/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..68e458b1ca --- /dev/null +++ b/group12/247565311/week3/impl/ConnectionManagerImpl.java @@ -0,0 +1,28 @@ +package week3.impl; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + +import week3.api.Connection; +import week3.api.ConnectionException; +import week3.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + URL urllink = null; + ConnectionImpl conImpl = null; + @Override + public Connection open(String url) throws ConnectionException { + try { + URL urllink = new URL(url); + conImpl = new ConnectionImpl(); + HttpURLConnection httpconn = (HttpURLConnection)urllink.openConnection(); + httpconn.setConnectTimeout(5*1000); + httpconn.setRequestProperty("User-Agent","Mozilla/4.0 (compatiable; MSIE 5.0; Windows NT; DigExt)"); // 模拟浏览器 + conImpl.setConn(httpconn); + } catch (Exception e) { + throw (ConnectionException)e; + } + return conImpl; + } +} From b64f399b593157906f3d895ecdf708fff74d959b Mon Sep 17 00:00:00 2001 From: BlindingDark <844620174@qq.com> Date: Sat, 11 Mar 2017 23:13:44 +0800 Subject: [PATCH 298/646] =?UTF-8?q?ArrayList=20TestArrayList=20=E7=AD=89?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1515345281/src/Collection/ArrayList.java | 1 - .../1515345281/src/Collection/LinkedList.java | 397 +++++++++--------- .../src/Collection/TestCollection.java | 1 + .../homework/first/Collection/ArrayList.java | 102 +++++ .../first/Collection/BinaryTreeNode.java | 35 ++ .../homework/first/Collection/Iterator.java | 10 + .../homework/first/Collection/LinkedList.java | 134 ++++++ .../homework/first/Collection/List.java | 10 + .../homework/first/Collection/Queue.java | 19 + .../homework/first/Collection/Stack.java | 22 + .../first/Collection/TestCollection.java | 41 ++ .../src/zhuakuang/homework/first/Main.java | 7 - 12 files changed, 580 insertions(+), 199 deletions(-) create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/ArrayList.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/BinaryTreeNode.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Iterator.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/LinkedList.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/List.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Queue.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Stack.java create mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/TestCollection.java delete mode 100644 group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java diff --git a/group26/1515345281/src/Collection/ArrayList.java b/group26/1515345281/src/Collection/ArrayList.java index 017fac67e2..fb15e957f2 100644 --- a/group26/1515345281/src/Collection/ArrayList.java +++ b/group26/1515345281/src/Collection/ArrayList.java @@ -1,7 +1,6 @@ package Collection; public class ArrayList implements List { - private int size = 0; private Object[] elementData = new Object[100]; diff --git a/group26/1515345281/src/Collection/LinkedList.java b/group26/1515345281/src/Collection/LinkedList.java index 8a689e187a..3d4a4d496d 100644 --- a/group26/1515345281/src/Collection/LinkedList.java +++ b/group26/1515345281/src/Collection/LinkedList.java @@ -1,195 +1,210 @@ package Collection; public class LinkedList implements List { - - private int theSize=0;//琛ㄧず璇ラ摼琛ㄧ殑闀垮害 - private Node beginMarker;//閾捐〃鐨勫ご鍏冪礌 - private Node endMarker;//閾捐〃鐨勫熬鍏冪礌 - - //閾捐〃鐨勬瀯閫犳柟娉 - public LinkedList () { - beginMarker = new Node(null, null, null); - endMarker = new Node(null, beginMarker, null); - beginMarker.next=endMarker; - } - - public void add(Object o){ - add(size(),o); - } - public void add(int index , Object o){ - addBefore(getNode(index),o); - } - public Object get(int index){ - return getNode(index).data; - } - public Object remove(int index){ - return remove(getNode(index)); - } - - public int size(){ - return theSize; - } - - public void addFirst(Object o){ - addBefore(getNode(0),o); - } - public void addLast(Object o){ - addBefore(getNode(theSize),o); - } - public Object removeFirst(){ - return remove(getNode(0)); - } - public Object removeLast(){ - return remove(getNode(theSize-1)); - } - public Iterator iterator(){ - return new Itr(); - } - - private class Itr implements Iterator{ - - private Node cursor=beginMarker.next; - @Override - public boolean hasNext() { - - return cursor!=endMarker; - } - - @Override - public Object next() { - - Object o=cursor.data; - cursor=cursor.next; - - return o; - } - - } - private Object remove(Node node) { - node.prev.next=node.next; - node.next.prev=node.prev; - theSize--; - return node.data; - } - - private Node getNode(int index){ - Node p; - if(index<0 || index>size()){ - throw new IndexOutOfBoundsException(); - } - if(index==-1){ - return beginMarker; - }else if(index==theSize){ - return endMarker; - } - if(indexindex;i--){ - p=p.prev; - } - } - return p; - } - - private void addBefore(Node node,Object o){ - Node newNode=new Node(o,node.prev,node); - newNode.prev.next=newNode; - node.prev=newNode; - theSize++; - //nodeCount++; - } - - private static class Node{ - public Object data; - public Node next; - public Node prev; - public Node(Object data,Node prev,Node next){ - this.data=data; - this.prev=prev; - this.next=next; - } - } - - - //浠ヤ笅涓嶇敤瀹炵幇 - /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } + + private int theSize = 0;//琛ㄧず璇ラ摼琛ㄧ殑闀垮害 + private Node beginMarker;//閾捐〃鐨勫ご鍏冪礌 + private Node endMarker;//閾捐〃鐨勫熬鍏冪礌 + + //閾捐〃鐨勬瀯閫犳柟娉 + public LinkedList() { + beginMarker = new Node(null, null, null); + endMarker = new Node(null, beginMarker, null); + beginMarker.next = endMarker; + } + + public void add(Object o) { + add(size(), o); + } + + public void add(int index, Object o) { + addBefore(getNode(index), o); + } + + public Object get(int index) { + return getNode(index).data; + } + + public Object remove(int index) { + return remove(getNode(index)); + } + + public int size() { + return theSize; + } + + public void addFirst(Object o) { + addBefore(getNode(0), o); + } + + public void addLast(Object o) { + addBefore(getNode(theSize), o); + } + + public Object removeFirst() { + return remove(getNode(0)); + } + + public Object removeLast() { + return remove(getNode(theSize - 1)); + } + + public Iterator iterator() { + return new Itr(); + } + + private class Itr implements Iterator { + + private Node cursor = beginMarker.next; + + @Override + public boolean hasNext() { + + return cursor != endMarker; + } + + @Override + public Object next() { + + Object o = cursor.data; + cursor = cursor.next; + + return o; + } + + } + + private Object remove(Node node) { + node.prev.next = node.next; + node.next.prev = node.prev; + theSize--; + return node.data; + } + + private Node getNode(int index) { + Node p; + if (index < 0 || index > size()) { + throw new IndexOutOfBoundsException(); + } + if (index == -1) { + return beginMarker; + } else if (index == theSize) { + return endMarker; + } + if (index < size() / 2) { + p = beginMarker.next; + for (int i = 0; i < index; i++) { + p = p.next; + } + } else { + p = endMarker.prev; + for (int i = size() - 1; i > index; i--) { + p = p.prev; + } + } + return p; + } + + private void addBefore(Node node, Object o) { + Node newNode = new Node(o, node.prev, node); + newNode.prev.next = newNode; + node.prev = newNode; + theSize++; + //nodeCount++; + } + + private static class Node { + public Object data; + public Node next; + public Node prev; + + public Node(Object data, Node prev, Node next) { + this.data = data; + this.prev = prev; + this.next = next; + } + } + + + //浠ヤ笅涓嶇敤瀹炵幇 + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } } diff --git a/group26/1515345281/src/Collection/TestCollection.java b/group26/1515345281/src/Collection/TestCollection.java index 797ce419b5..9105cbe23b 100644 --- a/group26/1515345281/src/Collection/TestCollection.java +++ b/group26/1515345281/src/Collection/TestCollection.java @@ -2,6 +2,7 @@ import org.junit.Test; + public class TestCollection { @Test diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/ArrayList.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/ArrayList.java new file mode 100644 index 0000000000..13c251ffe9 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/ArrayList.java @@ -0,0 +1,102 @@ +package zhuakuang.homework.first.Collection; + +import java.util.Arrays; + +public class ArrayList implements List, Iterable { + + private int size = 0; + + private Object[] elementData = new Object[10]; + + public void add(Object o) { + ensureCapacity(size + 1); + elementData[size] = o; + size++; + } + + /** + * 鎻掑叆 + * + * @param index + * @param o + */ + public void add(int index, Object o) { + if (index > size || index < 0) { + throw new IndexOutOfBoundsException("index" + index + "瓒婄晫"); + } + ensureCapacity(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, + size - index); + elementData[index] = o; + size++; + } + + public Object get(int index) { + checkIndex(index); + return elementData[index]; + } + + public Object remove(int index) { + checkIndex(index); + Object oldValue = elementData[index]; + + int numMoved = size - index - 1; + if (numMoved > 0) { + System.arraycopy(elementData, index + 1, elementData, index, + numMoved); + } + elementData[--size] = null;// GC + return oldValue; + } + + private void checkIndex(int index) { + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException("index" + index + "瓒婄晫"); + } + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new Itr(); + } + + private class Itr implements Iterator { + int cursor = 0; + + @Override + public boolean hasNext() { + if (cursor < size) { + return true; + }// + return false; + } + + @Override + public Object next() { + int nowCursor = cursor; + cursor++; + return elementData[nowCursor]; + } + } + + + public void ensureCapacity(int minCapacity) { + int oldCapacity = elementData.length; + if (minCapacity > oldCapacity) { + int newCapacity = (oldCapacity * 3) / 2 + 1; // oldCapacity 鐨 1.5 鍊嶏紙鍙栨暣锛+ 1 + if (newCapacity < minCapacity) { + newCapacity = minCapacity; + } + // Arrays.copyOf 鍔熻兘锛氭妸涓涓暟缁勫鍒跺埌鍙︿竴涓暟缁勶紝杩斿洖鍊煎氨鏄彟涓涓暟缁勩 + // 绗竴鍙傛暟鏄鎷疯礉鍙傛暟锛岀浜屼釜鍙傛暟鏄繑鍥炵殑鏂版暟缁勭殑闀垮害銆 + // 濡傛灉鏂版暟缁勭殑闀垮害瓒呰繃鍘熸暟缁勭殑闀垮害锛屽垯淇濈暀鏁扮粍榛樿鍊笺 + // 濡傛灉鏂版暟缁勭殑闀垮害灏忎簬鍘熸暟缁勭殑闀垮害锛屽垯澶氬嚭鐨勯儴鍒嗕笉淇濈暀銆 + elementData = Arrays.copyOf(elementData, newCapacity); + } + } + + +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/BinaryTreeNode.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/BinaryTreeNode.java new file mode 100644 index 0000000000..974f6418fb --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/BinaryTreeNode.java @@ -0,0 +1,35 @@ +package zhuakuang.homework.first.Collection; + +/** + * 浜屽弶鏍 + */ +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Iterator.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Iterator.java new file mode 100644 index 0000000000..0f806b8788 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Iterator.java @@ -0,0 +1,10 @@ +package zhuakuang.homework.first.Collection; + +public interface Iterator extends java.util.Iterator { + public boolean hasNext(); + public Object next(); + + + //void remove(); + +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/LinkedList.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/LinkedList.java new file mode 100644 index 0000000000..692951f698 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/LinkedList.java @@ -0,0 +1,134 @@ +package zhuakuang.homework.first.Collection; + +public class LinkedList implements List { + + private Node head; + private Node tail; + + public void add(Object o) { + + } + + public void add(int index, Object o) { + + } + + public Object get(int index) { + return null; + } + + public Object remove(int index) { + return null; + } + + public int size() { + return -1; + } + + public void addFirst(Object o) { + + } + + public void addLast(Object o) { + + } + + public Object removeFirst() { + return null; + } + + public Object removeLast() { + return null; + } + + public Iterator iterator() { + return null; + } + + + private static class Node { + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/List.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/List.java new file mode 100644 index 0000000000..26b05377a6 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/List.java @@ -0,0 +1,10 @@ +package zhuakuang.homework.first.Collection; + +public interface List extends Iterable { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); + Iterator iterator(); +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Queue.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Queue.java new file mode 100644 index 0000000000..7a1c8681a5 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Queue.java @@ -0,0 +1,19 @@ +package zhuakuang.homework.first.Collection; + +public class Queue { + + public void enQueue(Object o) { + } + + public Object deQueue() { + return null; + } + + public boolean isEmpty() { + return false; + } + + public int size() { + return -1; + } +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Stack.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Stack.java new file mode 100644 index 0000000000..ed39665be1 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/Stack.java @@ -0,0 +1,22 @@ +package zhuakuang.homework.first.Collection; +import java.util.ArrayList; +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/TestCollection.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/TestCollection.java new file mode 100644 index 0000000000..9e953df486 --- /dev/null +++ b/group26/zhuakuang2017/src/zhuakuang/homework/first/Collection/TestCollection.java @@ -0,0 +1,41 @@ +package zhuakuang.homework.first.Collection; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +/** + * Created by BlindingDark on 2017/3/11 0011. + */ +public class TestCollection { + @Test + public void arrayListTest() {//鍒嗗紑娴嬭瘯姣忎竴涓柟娉 List test + ArrayList myArrayList = new ArrayList(); + + myArrayList.add("1"); + myArrayList.add("2"); + myArrayList.add("3"); + myArrayList.add("4"); + myArrayList.add("5"); + myArrayList.add("6"); + myArrayList.add("7"); + myArrayList.add("8"); + myArrayList.add("9"); + myArrayList.add("10"); + myArrayList.add("11"); + myArrayList.add("12"); + + myArrayList.add(2, "2.5"); + myArrayList.remove(1); + + String first = String.valueOf(Integer.valueOf((String) myArrayList.get(2)) - 2); + String[] strs = {first, "2.5", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}; + + Iterator itr = myArrayList.iterator(); + while (itr.hasNext()) { + for (int i = 0; i < myArrayList.size(); i++) { + assertEquals(strs[i], itr.next()); + } + } + } +} diff --git a/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java b/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java deleted file mode 100644 index 9f3d7e846c..0000000000 --- a/group26/zhuakuang2017/src/zhuakuang/homework/first/Main.java +++ /dev/null @@ -1,7 +0,0 @@ -package zhuakuang.homework.first; - -public class Main { - public static void main(String[] args) { - System.out.println(1); - } -} From cabb0ecc964c355bafb77ec7d3e85fc5bb59e55e Mon Sep 17 00:00:00 2001 From: Vito Date: Sat, 11 Mar 2017 23:24:04 +0800 Subject: [PATCH 299/646] Add Blog link --- group23/729693763/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/group23/729693763/readme.md b/group23/729693763/readme.md index 25bc95c472..534a6f1789 100644 --- a/group23/729693763/readme.md +++ b/group23/729693763/readme.md @@ -1 +1,3 @@ Data Struct contain: ArrayList, LinkedList, BinaryTreeNode, Stack, Queue, Iterator +Add Blog link: +http://www.cnblogs.com/CodeSaveMe/p/6523745.html From 0ba2d7952c30f788cd30cc834645b2007257d6df Mon Sep 17 00:00:00 2001 From: Vito Date: Sat, 11 Mar 2017 23:24:28 +0800 Subject: [PATCH 300/646] Update readme.md --- group23/729693763/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/group23/729693763/readme.md b/group23/729693763/readme.md index 534a6f1789..c1f8e02e42 100644 --- a/group23/729693763/readme.md +++ b/group23/729693763/readme.md @@ -1,3 +1,4 @@ Data Struct contain: ArrayList, LinkedList, BinaryTreeNode, Stack, Queue, Iterator +--- --- Add Blog link: http://www.cnblogs.com/CodeSaveMe/p/6523745.html From 17fe8cade36bc93d912e63311438de9fb1ba5750 Mon Sep 17 00:00:00 2001 From: lzb Date: Sun, 12 Mar 2017 00:25:15 +0800 Subject: [PATCH 301/646] =?UTF-8?q?=E4=BA=8C=E5=8F=89=E6=A0=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=8A=82=E7=82=B9=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homework0312/basic/BinaryTreeNode.java | 63 ++++++++++++------- .../java/me/lzb/homework0312/basic/Test.java | 22 ------- 2 files changed, 40 insertions(+), 45 deletions(-) delete mode 100644 group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java index 95c91ac280..053baad0d4 100644 --- a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java +++ b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/BinaryTreeNode.java @@ -1,36 +1,53 @@ package me.lzb.homework0312.basic; /** - * 宸﹁竟姣旂埗鑺傜偣澶э紝鍙宠竟姣旂埗鑺傜偣灏 + * 宸﹁竟姣旂埗鑺傜偣灏忥紝鍙宠竟姣旂埗鑺傜偣澶 * Created by LZB on 2017/3/11. */ public class BinaryTreeNode { - private Object data; + private int data; private BinaryTreeNode left; private BinaryTreeNode right; - - public Object getData() { + + public BinaryTreeNode(int data){ + this.data = data; + } + + public int getData() { return data; } - public void setData(Object data) { - this.data = data; - } - public BinaryTreeNode getLeft() { - return left; - } - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - public BinaryTreeNode getRight() { - return right; - } - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o){ - return null; + + + //杩欏眰婊′簡灏变笅涓灞傜户缁璦dd,鐩村埌鎵惧埌绌轰綅 + public void add(int d){ + BinaryTreeNode b = new BinaryTreeNode(d); + if(compareTo(b)){ + //姣旂埗鑺傜偣灏忥紝宸﹁竟 + if(this.left == null){ + this.left = b; + }else { + this.left.add(d); + } + + }else {//鐩哥瓑涓嶈冭檻 + //姣旂埗鑺傜偣澶э紝鍙宠竟 + if(this.right == null){ + this.right = b; + }else { + this.right.add(d); + } + + } + } + + + public boolean compareTo(BinaryTreeNode node){ + if(this.data > node.getData()){ + return true; + } + return false; } - + + } diff --git a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java b/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java deleted file mode 100644 index aa99166524..0000000000 --- a/group24/1148285693/learning2017/learning-basic/src/main/java/me/lzb/homework0312/basic/Test.java +++ /dev/null @@ -1,22 +0,0 @@ -package me.lzb.homework0312.basic; - -/** - * Created by LZB on 2017/3/11. - */ -public class Test { - - public static void main(String[] args) { -// java.util.List list = new ArrayList<>(); -// list.add("a"); -// list.add(2, "aa"); -// list.add(2, "aa"); -// list.forEach(s -> System.out.println(s)); -// int[] a = new int[0]; - -// ArrayList list = new ArrayList(); -// list.add("aaa"); -// list.add("bbb"); -// list.size(); -// list.add("c"); - } -} From d918489f61afc30c4ef3a6458beb6f4e2a0ef20a Mon Sep 17 00:00:00 2001 From: lzb Date: Sun, 12 Mar 2017 01:29:16 +0800 Subject: [PATCH 302/646] =?UTF-8?q?=E4=BF=AE=E6=94=B9maven=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../learning2017/learning-basic/pom.xml | 1 - group24/1148285693/learning2017/pom.xml | 25 ++++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/group24/1148285693/learning2017/learning-basic/pom.xml b/group24/1148285693/learning2017/learning-basic/pom.xml index 95a5bd92fe..7cb5cfb3f0 100644 --- a/group24/1148285693/learning2017/learning-basic/pom.xml +++ b/group24/1148285693/learning2017/learning-basic/pom.xml @@ -13,7 +13,6 @@ learning-basic - jar basic 1.0 diff --git a/group24/1148285693/learning2017/pom.xml b/group24/1148285693/learning2017/pom.xml index 476484d03d..6493774794 100644 --- a/group24/1148285693/learning2017/pom.xml +++ b/group24/1148285693/learning2017/pom.xml @@ -8,7 +8,7 @@ learning2017 1.0 learning2017 - jar + pom https://github.com/lzbferrari/coding2017 2017缂栫▼鎻愰珮 @@ -27,9 +27,9 @@ 1.8 + 1.8 UTF-8 UTF-8 - 1.8 UTF-8 @@ -75,19 +75,36 @@ - org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + 3.6.1 ${java.version} ${java.version} UTF-8 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + org.apache.maven.surefire + surefire-junit47 + 2.19.1 + + + + false + + + \ No newline at end of file From 856058464a13e8b78a71072a9933e7f44ab3dff8 Mon Sep 17 00:00:00 2001 From: vvvandbb Date: Sun, 12 Mar 2017 01:46:28 +0800 Subject: [PATCH 303/646] add 3-12 --- group08/649859235/3-12/articleurl.md | 2 + .../3-12/code/com/vvv/basic/Iterator.java | 6 + .../3-12/code/com/vvv/basic/LinkedList.java | 392 ++++++++++++++++++ .../code/com/vvv/basic/LinkedListTest.java | 147 +++++++ .../3-12/code/com/vvv/basic/List.java | 9 + .../code/com/vvv/download/DownloadThread.java | 64 +++ .../code/com/vvv/download/FileDownloader.java | 127 ++++++ .../com/vvv/download/FileDownloaderTest.java | 52 +++ .../code/com/vvv/download/api/Connection.java | 27 ++ .../vvv/download/api/ConnectionException.java | 11 + .../vvv/download/api/ConnectionManager.java | 10 + .../vvv/download/api/DownloadListener.java | 6 + .../com/vvv/download/impl/ConnectionImpl.java | 149 +++++++ .../download/impl/ConnectionManagerImpl.java | 27 ++ 14 files changed, 1029 insertions(+) create mode 100644 group08/649859235/3-12/articleurl.md create mode 100644 group08/649859235/3-12/code/com/vvv/basic/Iterator.java create mode 100644 group08/649859235/3-12/code/com/vvv/basic/LinkedList.java create mode 100644 group08/649859235/3-12/code/com/vvv/basic/LinkedListTest.java create mode 100644 group08/649859235/3-12/code/com/vvv/basic/List.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/DownloadThread.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/FileDownloader.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/FileDownloaderTest.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/api/Connection.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/api/ConnectionException.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/api/ConnectionManager.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/api/DownloadListener.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/impl/ConnectionImpl.java create mode 100644 group08/649859235/3-12/code/com/vvv/download/impl/ConnectionManagerImpl.java diff --git a/group08/649859235/3-12/articleurl.md b/group08/649859235/3-12/articleurl.md new file mode 100644 index 0000000000..2b506cd6f5 --- /dev/null +++ b/group08/649859235/3-12/articleurl.md @@ -0,0 +1,2 @@ +3-12鏂囩珷鍦板潃 +http://note.youdao.com/noteshare?id=a0e00ce473692d46ac87881ad77c3b11&sub=C46D2B83C8074C6A8BF4C024F3B057D3 diff --git a/group08/649859235/3-12/code/com/vvv/basic/Iterator.java b/group08/649859235/3-12/code/com/vvv/basic/Iterator.java new file mode 100644 index 0000000000..cbc6fe35b2 --- /dev/null +++ b/group08/649859235/3-12/code/com/vvv/basic/Iterator.java @@ -0,0 +1,6 @@ +package com.vvv.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); +} diff --git a/group08/649859235/3-12/code/com/vvv/basic/LinkedList.java b/group08/649859235/3-12/code/com/vvv/basic/LinkedList.java new file mode 100644 index 0000000000..d39c5c8dd7 --- /dev/null +++ b/group08/649859235/3-12/code/com/vvv/basic/LinkedList.java @@ -0,0 +1,392 @@ +package com.vvv.basic; + +public class LinkedList implements List { + + private Node head; + private int size; + + public void add(Object o) { + addLast(o); + } + + public void add(int index, Object o) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + + if (index == 0) { + addFirst(o); + return; + } + + if (index == size) { + addLast(o); + return; + } + + Node newNode = new Node(o); + Node node = head; + for (int i = 1; i < index; i++) { + node = node.next; + } + newNode.next = node.next; + node.next = newNode; + size++; + } + + public Object get(int index) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + + Node node = head; + for (int i = 0; i < index; i++) { + if (node.next != null) { + node = node.next; + } + } + Object data = node.data; + return data; + } + + public Object remove(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + + if (index == 0) { + return removeFirst(); + } + + Node node = head; + Node pre = head; + for (int i = 0; i < index; i++) { + if (node.next != null) { + pre = node; + node = node.next; + } + } + + Object obj = node.data; + if (head.next == null) { + head = null; + pre = null; + } else if (node.next == null) { + pre.next = null; + node = null; + } else { + pre.next = node.next; + node.next = null; + node = null; + } + + size--; + return obj; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + Node node = new Node(o); + node.next = head; + head = node; + size++; + } + + public void addLast(Object o) { + Node newNode = new Node(o); + if (head == null) { + head = newNode; + } else { + if (head.next == null) { + head.next = newNode; + } else { + Node node = head; + for (int i = 1; i < size; i++) { + node = node.next; + } + node.next = newNode; + } + } + + size++; + } + + public Object removeFirst() { + if (size <= 0) + throw new IndexOutOfBoundsException(); + + Node node = head; + head = node.next; + node.next = null; + + size--; + return node.data; + } + + public Object removeLast() { + if (size <= 0) + throw new IndexOutOfBoundsException(); + + Node node = head; + for (int i = 1; i < size - 1; i++) { + node = node.next; + } + Object data = node.next.data; + node.next = null; + + size--; + return data; + } + + public Iterator iterator() { + return new LinkedListIterator(); + } + + @SuppressWarnings("hiding") + private static class Node { + Object data; + Node next; + + public Node(Object data) { + this.data = data; + } + } + + private class LinkedListIterator implements Iterator { + private Node node = head; + + @Override + public boolean hasNext() { + return node!=null; + } + + @Override + public Object next() { + Object data = node.data; + node = node.next; + return data; + } + + public void moveFirst(){ + node = head; + } + } + + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (size <= 0) { + throw new IndexOutOfBoundsException(); + } + + Node node = head; + Node middleNode = node; + int length = size; + for (int i = 0; i < length; i++) { + if (node.next != null) { + node = node.next; + addFirst(node.data); + } + } + + middleNode.next = null; + node = null; + size = length; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + if (size <= 0) { + throw new IndexOutOfBoundsException(); + } + + Node node = head; + Node pre = head; + int count = 0; + for (int i = 0; i < size / 2; i++) { + pre = node; + node = node.next; + count++; + } + head = node; + pre.next = null; + pre = null; + size = size - count; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if(i<0 || i>=size || length<0 || length>size || (i+length)>size){ + throw new IndexOutOfBoundsException(); + } + + Node node = head; + Node pre = head; + Node posNode = head; + for (int j = 0; j < i+length; j++) { + if (node.next != null) { + pre = node; + if(j==(i-1)){ + posNode = node; + } + node = node.next; + } + } + + if(i==0){ + head = node; + }else{ + posNode.next = node; + } + pre.next = null; + pre = null; + size = size - length; + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if (list == null || list.size() == 0) { + throw new IndexOutOfBoundsException(); + } + + int[] arr = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + int index = (Integer) list.get(i); + arr[i] = (Integer) get(index); + } + return arr; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + public void subtract(LinkedList list) { + if (list == null || list.size() == 0) { + return; + } + + for (int i = 0; i < list.size(); i++) { + int o = (Integer) list.get(i); + LinkedListIterator it = (LinkedListIterator) this.iterator(); + int index = 0; + while (it.hasNext()) { + int obj = (Integer) it.next(); + if (obj == o) { + remove(index); + it.moveFirst(); + break; + } + index++; + } + } + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + if (head == null) { + return; + } + Node node = head; + Node pre = head; + while (node.next != null) { + node = node.next; + int value = (Integer) pre.data; + if ((Integer) node.data == value) { + if (node.next == null) { + pre.next = null; + size--; + break; + } + pre.next = node.next; + node = node.next; + if (node == null) { + size--; + break; + } + size--; + } + pre = pre.next; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + Node node = head; + Node minNode = null; + int count = 0; + + while (node != null && (Integer) node.data <= min) { + minNode = node; + node = node.next; + } + + while (node != null && (Integer) node.data < max) { + node = node.next; + count++; + } + + if (minNode != null) { + minNode.next = node; + } else { + head = node; + } + size = size - count; + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + if (head == null) { + return null; + } + + LinkedList newList = new LinkedList(); + Node node = head; + while (node.next != null) { + Iterator it = list.iterator(); + while (it.hasNext()) { + int value = (Integer)it.next(); + if ((Integer) node.data == value) { + newList.add(value); + break; + } + } + node = node.next; + } + + return newList; + } +} diff --git a/group08/649859235/3-12/code/com/vvv/basic/LinkedListTest.java b/group08/649859235/3-12/code/com/vvv/basic/LinkedListTest.java new file mode 100644 index 0000000000..64fcefb077 --- /dev/null +++ b/group08/649859235/3-12/code/com/vvv/basic/LinkedListTest.java @@ -0,0 +1,147 @@ +package com.vvv.basic; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class LinkedListTest { + LinkedList list = null; + + @Before + public void setUp() throws Exception { + list = new LinkedList(); + list.add(100); + list.add(111); + list.add(222); + list.add(333); + list.add(444); + list.add(555); + list.add(666); + printList(list); + } + + @After + public void tearDown() throws Exception { + printList(list); + list = null; + } + + @Test + public void addTest() { + } + + @Test + public void addIndexTest() { + list.add(3, "3 444"); + list.add(5, "5 add"); + list.add(0, "0 add"); + } + + @Test + public void removeTest() { + list.remove(4); + } + + @Test + public void removeFirstTest() { + list.removeFirst(); + list.removeFirst(); + } + + @Test + public void iteratorTest() { + LinkedList list = new LinkedList(); + + for (int i = 0; i < 5; i++) { + list.add(i); + } + + Iterator it = list.iterator(); + Assert.assertTrue(it.hasNext()); + + int count = 0; + while (it.hasNext()) { + Object value = it.next(); + Assert.assertEquals(count, value); + count++; + } + } + + private void printList(LinkedList list){ + if(list==null){ + return ; + } + System.out.println("list size:"+list.size()); + for(int i=0; i= FileDownloader.THREAD_NUM) { + if (listener != null) { + listener.notifyFinished(); + } + } + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + int length = conn.getContentLength(); + setFileName("d:\\"+conn.getFileName()); + conn.close(); + startDownload(length, THREAD_NUM); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + } + + private void startDownload(int len, int threadNum){ + if(len<=0){ + listener.notifyFinished(); + return; + } + //鍦ㄥ鎴风鏈湴鍒涘缓鍑烘潵涓涓ぇ灏忚窡鏈嶅姟鍣ㄧ涓鏍峰ぇ灏忕殑涓存椂鏂囦欢 + RandomAccessFile raf = null; + try { + raf = new RandomAccessFile(getFileName(), "rw"); + raf.setLength(len); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + }finally{ + try { + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + int block = len/threadNum==0?len/threadNum:len/threadNum+1; + System.out.println("...startDownload len:"+len+",block "+block); + for(int i=0; iendPos) return null; + try { + httpConn.setRequestProperty("Range", "bytes=" + startPos + "-"+endPos); + if (httpConn.getResponseCode() == HttpURLConnection.HTTP_OK) { + String contentlenth = httpConn.getHeaderField("Content-Length"); + if (contentlenth != null) { + setContentLength(Integer.parseInt(contentlenth)); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + InputStream inputStream = httpConn.getInputStream(); + + byte[] buff = new byte[BUFF_LENGTH]; + int length = -1; + while ((length = inputStream.read(buff)) > 0) { + os.write(buff, 0, length); + } + if (inputStream != null) { + inputStream.close(); + inputStream = null; + } + close(); + return os.toByteArray(); + } + + @Override + public int getContentLength() { + return this.contentLength ; + } + + public void setContentLength(int len){ + this.contentLength = len; + } + + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType; + } + + private String getName() { + String fileName; + String disposition = httpConn.getHeaderField("Content-Disposition"); + if (disposition != null && !"".equals(disposition)) { + fileName = disposition.split(";")[1].split("=")[1].replaceAll("\"", ""); + } else { + fileName = url.substring(url.lastIndexOf("/") + 1); + } + + if (fileName != null && !"".equals(fileName)) { + try { + fileName = URLDecoder.decode(fileName, "utf-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } else { + fileName = "file_" + (int) (Math.random() * 10); + } + return fileName; + } + + @Override + public void close() { + if (httpConn != null) { + httpConn.disconnect(); + httpConn = null; + } + } + + private HttpURLConnection createConnection(String url) throws IOException { + HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); + conn.setConnectTimeout(CONNECTION_TIMEOUT); + conn.setReadTimeout(READ_TIMEOUT); + conn.setRequestMethod(requestMethod); + conn.setRequestProperty("User-Agent", "vvv download"); + conn.setRequestProperty("Connection", "Keep-Alive"); + conn.setRequestProperty("Keep-Alive", "300"); + return conn; + } + +} diff --git a/group08/649859235/3-12/code/com/vvv/download/impl/ConnectionManagerImpl.java b/group08/649859235/3-12/code/com/vvv/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..fffce916d4 --- /dev/null +++ b/group08/649859235/3-12/code/com/vvv/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,27 @@ +package com.vvv.download.impl; + +import com.vvv.download.api.Connection; +import com.vvv.download.api.ConnectionException; +import com.vvv.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + private String url; + + @Override + public Connection open(String url) throws ConnectionException { + if(url!=null && (url.startsWith("http://") || url.startsWith("https://"))){ + Connection conn = null; + if(!url.equals(this.url)){ + conn = new ConnectionImpl(url); + this.url = url; + }else{ + conn = new ConnectionImpl(url, false); + } + return conn; + } + + throw new ConnectionException("Connection exception, uri is incorrect."); + } + + +} From c8c48b0f07e376e679eb88bd00f191c630be4bfd Mon Sep 17 00:00:00 2001 From: XiangYangHan Date: Sun, 12 Mar 2017 10:07:08 +0800 Subject: [PATCH 304/646] record01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 瀹屾垚 ArrayList鐨勫疄鐜帮紝鍙傝冧簡jdk婧愮爜涓鍐呴儴绫籌ter鐨勫疄鐜版柟寮 --- .../Exercise/src/lesson01/ArrayList.java | 124 +++++++++++++++--- .../Exercise/src/lesson01/List.java | 13 +- 2 files changed, 117 insertions(+), 20 deletions(-) diff --git a/group13/1274639949/Exercise/src/lesson01/ArrayList.java b/group13/1274639949/Exercise/src/lesson01/ArrayList.java index c7c17f2c0f..45fbd42c1a 100644 --- a/group13/1274639949/Exercise/src/lesson01/ArrayList.java +++ b/group13/1274639949/Exercise/src/lesson01/ArrayList.java @@ -1,6 +1,7 @@ package lesson01; import java.util.Arrays; +import java.util.NoSuchElementException; public class ArrayList implements List { @@ -49,64 +50,149 @@ public void add(int index, E element) { @Override public void clear() { - elementData = new Object[DEFAULT_CAPACITY]; + elementData = new Object[elementData.length]; size = 0; } @Override public boolean contains(Object o) { - for(int i = 0; i < size; i++){ - + if(o == null){ + for(int i = 0; i < size; i++){ + if(elementData[i] == null){ + return true; + } + } + }else{ + for(int i = 0; i < size; i++){ + if(o.equals(elementData[i])){ + return true; + } + } } return false; } @Override public int indexOf(Object o) { - // TODO Auto-generated method stub - return 0; + if(o == null){ + for(int i = 0; i < size; i++){ + if(elementData[i] == null){ + return i; + } + } + }else{ + for(int i = 0; i < size; i++){ + if(o.equals(elementData[i])){ + return i; + } + } + } + return -1; } + @SuppressWarnings("unchecked") @Override public E get(int index) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + return (E) elementData[index]; } + private void checkIndex(int index) { + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("Illegal index:" + index); + } + } + + @SuppressWarnings("unchecked") @Override public E remove(int index) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + + E e = (E) elementData[index]; + //姝ゅ搴旀敞鎰忚鍒ゆ柇index鏄惁涓篹lementData鏈鍚庝竴涓厓绱犵殑涓嬫爣锛屽洜涓哄湪涓嬮潰鐨刟rrayCopy鏂规硶涓璁块棶index+1鐨勪綅缃紝姝ゆ椂鏈夊彲鑳藉彂鐢熸暟缁勮秺鐣屻 + if(index == size -1){ + size --; + }else{ + System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); + } + return e; } @Override public boolean remove(Object o) { - // TODO Auto-generated method stub - return false; + int index = indexOf(o); + if(index >= 0){ + remove(index); + return true; + }else{ + return false; + } } + @SuppressWarnings("unchecked") @Override public E set(int index, E element) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + E e = (E)elementData[index]; + elementData[index] = element; + return e; } @Override public int size() { - // TODO Auto-generated method stub - return 0; + return size; } @Override public Object[] toArray() { - // TODO Auto-generated method stub - return null; + return Arrays.copyOf(elementData, size); + } + + /** + * 灏咥rrayList涓叏閮ㄥ厓绱犲瓨鍏ヤ竴涓繍琛屾椂纭畾绫诲瀷鐨勬暟缁勪腑 + * @param t + * @return + */ + @SuppressWarnings("unchecked") + public T[] toArray(T[] t){ + if(t.length < size){ + t = (T[]) Arrays.copyOf(elementData, size, t.getClass()); + }else{ + System.arraycopy(elementData, 0, t, 0, size); + } + return t; } @Override public Iterator iterator() { - // TODO Auto-generated method stub - return null; + return new Iter(); } + + private final class Iter implements Iterator{ + + int pos = 0; + int lastRet = -1; + + @Override + public boolean hasNext() { + return pos < size; + } + @Override + public E next() { + if(!hasNext()){ + throw new NoSuchElementException(); + } + lastRet = pos++; + return get(lastRet); + } + + @Override + public void remove() { + if(lastRet < 0){ + throw new IllegalStateException(); + } + ArrayList.this.remove(lastRet); + } + } } diff --git a/group13/1274639949/Exercise/src/lesson01/List.java b/group13/1274639949/Exercise/src/lesson01/List.java index a477383b82..b6b2d7c554 100644 --- a/group13/1274639949/Exercise/src/lesson01/List.java +++ b/group13/1274639949/Exercise/src/lesson01/List.java @@ -1,27 +1,32 @@ package lesson01; public interface List { + /** * 鍦↙ist鐨勬渶鍚庝竴涓厓绱犲悗娣诲姞涓涓厓绱 * @param e 娣诲姞鐨勫厓绱 */ public boolean add(E e); + /** * 鍦↙ist鐨刬ndex浣嶇疆鍔犲叆鍏冪礌element * @param index * @param element */ public void add(int index, E element); + /** * 娓呯┖璇ist */ public void clear(); + /** * 鍒ゆ柇List涓槸鍚﹀惈鏈夊璞 * @param o * @return 濡傛灉o瀛樺湪浜庤List涓垯杩斿洖true锛 鍚﹀垯杩斿洖false */ public boolean contains(Object o); + /** * 濡傛灉o瀛樺湪浜庤List涓紝鍒欒繑鍥炲畠绗竴娆″嚭鐜扮殑浣嶇疆 * 绗竴涓厓绱犵殑浣嶇疆涓0 @@ -31,18 +36,24 @@ public interface List { */ public int indexOf(Object o); + public E get(int index); + public E remove(int index); + public boolean remove(Object o); + public E set(int index, E element); + public int size(); + public Object[] toArray(); + public Iterator iterator(); - } From 77446fd30786c6df1e50032db23676f481b55166 Mon Sep 17 00:00:00 2001 From: franke Date: Sun, 12 Mar 2017 10:10:13 +0800 Subject: [PATCH 305/646] 0312 zuoye --- .../0312/download/DownloadThread.java | 44 ++++++++++ .../0312/download/FileDownloader.java | 76 ++++++++++++++++ .../0312/download/FileDownloaderTest.java | 56 ++++++++++++ .../0312/download/api/Connection.java | 27 ++++++ .../download/api/ConnectionException.java | 5 ++ .../0312/download/api/ConnectionManager.java | 12 +++ .../0312/download/api/DownloadListener.java | 5 ++ .../0312/download/impl/ConnectionImpl.java | 88 +++++++++++++++++++ .../download/impl/ConnectionManagerImpl.java | 20 +++++ 9 files changed, 333 insertions(+) create mode 100644 group13/568334413/0312/download/DownloadThread.java create mode 100644 group13/568334413/0312/download/FileDownloader.java create mode 100644 group13/568334413/0312/download/FileDownloaderTest.java create mode 100644 group13/568334413/0312/download/api/Connection.java create mode 100644 group13/568334413/0312/download/api/ConnectionException.java create mode 100644 group13/568334413/0312/download/api/ConnectionManager.java create mode 100644 group13/568334413/0312/download/api/DownloadListener.java create mode 100644 group13/568334413/0312/download/impl/ConnectionImpl.java create mode 100644 group13/568334413/0312/download/impl/ConnectionManagerImpl.java diff --git a/group13/568334413/0312/download/DownloadThread.java b/group13/568334413/0312/download/DownloadThread.java new file mode 100644 index 0000000000..3d5f309e57 --- /dev/null +++ b/group13/568334413/0312/download/DownloadThread.java @@ -0,0 +1,44 @@ +package download; + + +import download.api.Connection; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.concurrent.CountDownLatch; + +public class DownloadThread extends Thread { + + private CountDownLatch countDownLatch; + Connection conn; + int startPos; + int endPos; + + public DownloadThread(Connection conn, int startPos, int endPos, CountDownLatch countDownLatch) { + this.countDownLatch = countDownLatch; + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + @Override + public void run() { + try { + byte[] bytes = conn.read(startPos, endPos); + if (bytes == null) { + return; + } + File file = new File("./src/main/resources/1.mp4"); + RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); + randomAccessFile.seek(0); + randomAccessFile.write(bytes); + randomAccessFile.close(); + countDownLatch.countDown(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } +} diff --git a/group13/568334413/0312/download/FileDownloader.java b/group13/568334413/0312/download/FileDownloader.java new file mode 100644 index 0000000000..f301b06a8e --- /dev/null +++ b/group13/568334413/0312/download/FileDownloader.java @@ -0,0 +1,76 @@ +package download; + +import download.api.Connection; +import download.api.ConnectionManager; +import download.api.DownloadListener; + +import java.util.concurrent.CountDownLatch; + +public class FileDownloader { + + String url; + DownloadListener listener; + ConnectionManager cm; + int THREADCOUNT = 4; + + public FileDownloader(String _url) { + this.url = _url; + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + conn = cm.open(this.url); + int length = conn.getContentLength(); + + int blockSize = length / THREADCOUNT; + final CountDownLatch countDownLatch = new CountDownLatch(THREADCOUNT); + for (int threadId = 0; threadId < THREADCOUNT; threadId++) { + int startIndex = threadId * blockSize; + int endIndex = (threadId + 1) * blockSize - 1; + if (threadId == (THREADCOUNT - 1)) { + endIndex = length - 1; + } + new DownloadThread(conn, startIndex, endIndex, countDownLatch).start(); + } + countDownLatch.await(); + getListener().notifyFinished(); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group13/568334413/0312/download/FileDownloaderTest.java b/group13/568334413/0312/download/FileDownloaderTest.java new file mode 100644 index 0000000000..c3dfca6b53 --- /dev/null +++ b/group13/568334413/0312/download/FileDownloaderTest.java @@ -0,0 +1,56 @@ +package download; + + +import download.api.ConnectionManager; +import download.api.DownloadListener; +import download.impl.ConnectionManagerImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + +// String url = "http://upload-images.jianshu.io/upload_images/430632-49ce383d76352277.jpg"; +// String url = "http://img3.91.com/uploads/allimg/130428/32-13042Q63239.jpg"; +// String url = "http://images.weiphone.net/data/attachment/forum/201703/10/082621it8dfr8frmpbgrdo.png"; + String url = "http://img.zhxhlm.com/o_1b4sfgd8087os528sg85jjkf.mp4"; + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(new DownloadListener() { + + public void notifyFinished() { + downloadFinished = true; + } + }); + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + System.out.println("涓嬭浇瀹屾垚锛"); + + + } + +} diff --git a/group13/568334413/0312/download/api/Connection.java b/group13/568334413/0312/download/api/Connection.java new file mode 100644 index 0000000000..29d1e128ee --- /dev/null +++ b/group13/568334413/0312/download/api/Connection.java @@ -0,0 +1,27 @@ +package download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength() throws IOException; + + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group13/568334413/0312/download/api/ConnectionException.java b/group13/568334413/0312/download/api/ConnectionException.java new file mode 100644 index 0000000000..7873ff7dbd --- /dev/null +++ b/group13/568334413/0312/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group13/568334413/0312/download/api/ConnectionManager.java b/group13/568334413/0312/download/api/ConnectionManager.java new file mode 100644 index 0000000000..f6f9af519f --- /dev/null +++ b/group13/568334413/0312/download/api/ConnectionManager.java @@ -0,0 +1,12 @@ +package download.api; + +import java.io.IOException; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException, IOException; +} diff --git a/group13/568334413/0312/download/api/DownloadListener.java b/group13/568334413/0312/download/api/DownloadListener.java new file mode 100644 index 0000000000..4119e46144 --- /dev/null +++ b/group13/568334413/0312/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group13/568334413/0312/download/impl/ConnectionImpl.java b/group13/568334413/0312/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..3714ed1c1b --- /dev/null +++ b/group13/568334413/0312/download/impl/ConnectionImpl.java @@ -0,0 +1,88 @@ +package download.impl; + +import download.api.Connection; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.ProtocolException; +import java.net.URL; + + +public class ConnectionImpl implements Connection { + + private static int RESPONSECODE = 200; + private String urlAddress; + private InputStream inputStream; + private HttpURLConnection httpURLConnection = null; + private URL url = null; + + public ConnectionImpl(String urlAddress) { + this.urlAddress = urlAddress; + try { + url = new URL(urlAddress); + httpURLConnection = (HttpURLConnection) url.openConnection(); + httpURLConnection.setDoOutput(true); + httpURLConnection.setDoInput(true); + httpURLConnection.setConnectTimeout(10000); + httpURLConnection.setRequestMethod("GET"); + httpURLConnection.connect(); + } catch (ProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + public byte[] read(int startPos, int endPos) { + + HttpURLConnection httpURLConnection = null; + try { + httpURLConnection = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + httpURLConnection.setDoOutput(true); + httpURLConnection.setDoInput(true); + httpURLConnection.setConnectTimeout(10000); + byte[] tempByteArray = new byte[0]; + try { + httpURLConnection.setRequestMethod("GET"); + httpURLConnection.connect(); + tempByteArray = new byte[httpURLConnection.getContentLength()]; + InputStream inputStream = httpURLConnection.getInputStream(); + byte[] buffer = new byte[1024]; + int len = -1; + int index = 0; + while ((len = inputStream.read(buffer)) != -1) { + System.arraycopy(buffer, 0, tempByteArray, index, len); + index = index + len; + } + inputStream.close(); + } catch (ProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + return tempByteArray; + } + + public int getContentLength() throws IOException { + int code = httpURLConnection.getResponseCode(); + if (code == RESPONSECODE) { + inputStream = httpURLConnection.getInputStream(); + return httpURLConnection.getContentLength(); + } + return 0; + } + + public void close() { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group13/568334413/0312/download/impl/ConnectionManagerImpl.java b/group13/568334413/0312/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..5e89c6f6bd --- /dev/null +++ b/group13/568334413/0312/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,20 @@ +package download.impl; + + +import download.api.Connection; +import download.api.ConnectionException; +import download.api.ConnectionManager; + +import java.io.IOException; + +public class ConnectionManagerImpl implements ConnectionManager { + + + public Connection open(String address) throws ConnectionException, IOException { + + Connection connection = new ConnectionImpl(address); + + return connection; + } + +} From 7197e7be95c51b4ebd7d35652cb4c8df4ad272f1 Mon Sep 17 00:00:00 2001 From: XiangYangHan Date: Sun, 12 Mar 2017 10:11:56 +0800 Subject: [PATCH 306/646] Revert "record01" This reverts commit c8c48b0f07e376e679eb88bd00f191c630be4bfd. --- .../Exercise/src/lesson01/ArrayList.java | 124 +++--------------- .../Exercise/src/lesson01/List.java | 13 +- 2 files changed, 20 insertions(+), 117 deletions(-) diff --git a/group13/1274639949/Exercise/src/lesson01/ArrayList.java b/group13/1274639949/Exercise/src/lesson01/ArrayList.java index 45fbd42c1a..c7c17f2c0f 100644 --- a/group13/1274639949/Exercise/src/lesson01/ArrayList.java +++ b/group13/1274639949/Exercise/src/lesson01/ArrayList.java @@ -1,7 +1,6 @@ package lesson01; import java.util.Arrays; -import java.util.NoSuchElementException; public class ArrayList implements List { @@ -50,149 +49,64 @@ public void add(int index, E element) { @Override public void clear() { - elementData = new Object[elementData.length]; + elementData = new Object[DEFAULT_CAPACITY]; size = 0; } @Override public boolean contains(Object o) { - if(o == null){ - for(int i = 0; i < size; i++){ - if(elementData[i] == null){ - return true; - } - } - }else{ - for(int i = 0; i < size; i++){ - if(o.equals(elementData[i])){ - return true; - } - } + for(int i = 0; i < size; i++){ + } return false; } @Override public int indexOf(Object o) { - if(o == null){ - for(int i = 0; i < size; i++){ - if(elementData[i] == null){ - return i; - } - } - }else{ - for(int i = 0; i < size; i++){ - if(o.equals(elementData[i])){ - return i; - } - } - } - return -1; + // TODO Auto-generated method stub + return 0; } - @SuppressWarnings("unchecked") @Override public E get(int index) { - checkIndex(index); - return (E) elementData[index]; + // TODO Auto-generated method stub + return null; } - private void checkIndex(int index) { - if(index < 0 || index >= size){ - throw new IndexOutOfBoundsException("Illegal index:" + index); - } - } - - @SuppressWarnings("unchecked") @Override public E remove(int index) { - checkIndex(index); - - E e = (E) elementData[index]; - //姝ゅ搴旀敞鎰忚鍒ゆ柇index鏄惁涓篹lementData鏈鍚庝竴涓厓绱犵殑涓嬫爣锛屽洜涓哄湪涓嬮潰鐨刟rrayCopy鏂规硶涓璁块棶index+1鐨勪綅缃紝姝ゆ椂鏈夊彲鑳藉彂鐢熸暟缁勮秺鐣屻 - if(index == size -1){ - size --; - }else{ - System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); - } - return e; + // TODO Auto-generated method stub + return null; } @Override public boolean remove(Object o) { - int index = indexOf(o); - if(index >= 0){ - remove(index); - return true; - }else{ - return false; - } + // TODO Auto-generated method stub + return false; } - @SuppressWarnings("unchecked") @Override public E set(int index, E element) { - checkIndex(index); - E e = (E)elementData[index]; - elementData[index] = element; - return e; + // TODO Auto-generated method stub + return null; } @Override public int size() { - return size; + // TODO Auto-generated method stub + return 0; } @Override public Object[] toArray() { - return Arrays.copyOf(elementData, size); - } - - /** - * 灏咥rrayList涓叏閮ㄥ厓绱犲瓨鍏ヤ竴涓繍琛屾椂纭畾绫诲瀷鐨勬暟缁勪腑 - * @param t - * @return - */ - @SuppressWarnings("unchecked") - public T[] toArray(T[] t){ - if(t.length < size){ - t = (T[]) Arrays.copyOf(elementData, size, t.getClass()); - }else{ - System.arraycopy(elementData, 0, t, 0, size); - } - return t; + // TODO Auto-generated method stub + return null; } @Override public Iterator iterator() { - return new Iter(); + // TODO Auto-generated method stub + return null; } - - private final class Iter implements Iterator{ - - int pos = 0; - int lastRet = -1; - - @Override - public boolean hasNext() { - return pos < size; - } - @Override - public E next() { - if(!hasNext()){ - throw new NoSuchElementException(); - } - lastRet = pos++; - return get(lastRet); - } - - @Override - public void remove() { - if(lastRet < 0){ - throw new IllegalStateException(); - } - ArrayList.this.remove(lastRet); - } - } } diff --git a/group13/1274639949/Exercise/src/lesson01/List.java b/group13/1274639949/Exercise/src/lesson01/List.java index b6b2d7c554..a477383b82 100644 --- a/group13/1274639949/Exercise/src/lesson01/List.java +++ b/group13/1274639949/Exercise/src/lesson01/List.java @@ -1,32 +1,27 @@ package lesson01; public interface List { - /** * 鍦↙ist鐨勬渶鍚庝竴涓厓绱犲悗娣诲姞涓涓厓绱 * @param e 娣诲姞鐨勫厓绱 */ public boolean add(E e); - /** * 鍦↙ist鐨刬ndex浣嶇疆鍔犲叆鍏冪礌element * @param index * @param element */ public void add(int index, E element); - /** * 娓呯┖璇ist */ public void clear(); - /** * 鍒ゆ柇List涓槸鍚﹀惈鏈夊璞 * @param o * @return 濡傛灉o瀛樺湪浜庤List涓垯杩斿洖true锛 鍚﹀垯杩斿洖false */ public boolean contains(Object o); - /** * 濡傛灉o瀛樺湪浜庤List涓紝鍒欒繑鍥炲畠绗竴娆″嚭鐜扮殑浣嶇疆 * 绗竴涓厓绱犵殑浣嶇疆涓0 @@ -36,24 +31,18 @@ public interface List { */ public int indexOf(Object o); - public E get(int index); - public E remove(int index); - public boolean remove(Object o); - public E set(int index, E element); - public int size(); - public Object[] toArray(); - public Iterator iterator(); + } From 468d93e9433eaba6a8371e02ba5941a7bfb016ed Mon Sep 17 00:00:00 2001 From: XiangYangHan Date: Sun, 12 Mar 2017 10:23:25 +0800 Subject: [PATCH 307/646] record02 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鍐嶄篃涓嶆暍涔辩偣浜 --- .../Exercise/src/lesson01/ArrayList.java | 124 +++++++++++++++--- .../Exercise/src/lesson01/List.java | 13 +- 2 files changed, 117 insertions(+), 20 deletions(-) diff --git a/group13/1274639949/Exercise/src/lesson01/ArrayList.java b/group13/1274639949/Exercise/src/lesson01/ArrayList.java index c7c17f2c0f..45fbd42c1a 100644 --- a/group13/1274639949/Exercise/src/lesson01/ArrayList.java +++ b/group13/1274639949/Exercise/src/lesson01/ArrayList.java @@ -1,6 +1,7 @@ package lesson01; import java.util.Arrays; +import java.util.NoSuchElementException; public class ArrayList implements List { @@ -49,64 +50,149 @@ public void add(int index, E element) { @Override public void clear() { - elementData = new Object[DEFAULT_CAPACITY]; + elementData = new Object[elementData.length]; size = 0; } @Override public boolean contains(Object o) { - for(int i = 0; i < size; i++){ - + if(o == null){ + for(int i = 0; i < size; i++){ + if(elementData[i] == null){ + return true; + } + } + }else{ + for(int i = 0; i < size; i++){ + if(o.equals(elementData[i])){ + return true; + } + } } return false; } @Override public int indexOf(Object o) { - // TODO Auto-generated method stub - return 0; + if(o == null){ + for(int i = 0; i < size; i++){ + if(elementData[i] == null){ + return i; + } + } + }else{ + for(int i = 0; i < size; i++){ + if(o.equals(elementData[i])){ + return i; + } + } + } + return -1; } + @SuppressWarnings("unchecked") @Override public E get(int index) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + return (E) elementData[index]; } + private void checkIndex(int index) { + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("Illegal index:" + index); + } + } + + @SuppressWarnings("unchecked") @Override public E remove(int index) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + + E e = (E) elementData[index]; + //姝ゅ搴旀敞鎰忚鍒ゆ柇index鏄惁涓篹lementData鏈鍚庝竴涓厓绱犵殑涓嬫爣锛屽洜涓哄湪涓嬮潰鐨刟rrayCopy鏂规硶涓璁块棶index+1鐨勪綅缃紝姝ゆ椂鏈夊彲鑳藉彂鐢熸暟缁勮秺鐣屻 + if(index == size -1){ + size --; + }else{ + System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); + } + return e; } @Override public boolean remove(Object o) { - // TODO Auto-generated method stub - return false; + int index = indexOf(o); + if(index >= 0){ + remove(index); + return true; + }else{ + return false; + } } + @SuppressWarnings("unchecked") @Override public E set(int index, E element) { - // TODO Auto-generated method stub - return null; + checkIndex(index); + E e = (E)elementData[index]; + elementData[index] = element; + return e; } @Override public int size() { - // TODO Auto-generated method stub - return 0; + return size; } @Override public Object[] toArray() { - // TODO Auto-generated method stub - return null; + return Arrays.copyOf(elementData, size); + } + + /** + * 灏咥rrayList涓叏閮ㄥ厓绱犲瓨鍏ヤ竴涓繍琛屾椂纭畾绫诲瀷鐨勬暟缁勪腑 + * @param t + * @return + */ + @SuppressWarnings("unchecked") + public T[] toArray(T[] t){ + if(t.length < size){ + t = (T[]) Arrays.copyOf(elementData, size, t.getClass()); + }else{ + System.arraycopy(elementData, 0, t, 0, size); + } + return t; } @Override public Iterator iterator() { - // TODO Auto-generated method stub - return null; + return new Iter(); } + + private final class Iter implements Iterator{ + + int pos = 0; + int lastRet = -1; + + @Override + public boolean hasNext() { + return pos < size; + } + @Override + public E next() { + if(!hasNext()){ + throw new NoSuchElementException(); + } + lastRet = pos++; + return get(lastRet); + } + + @Override + public void remove() { + if(lastRet < 0){ + throw new IllegalStateException(); + } + ArrayList.this.remove(lastRet); + } + } } diff --git a/group13/1274639949/Exercise/src/lesson01/List.java b/group13/1274639949/Exercise/src/lesson01/List.java index a477383b82..b6b2d7c554 100644 --- a/group13/1274639949/Exercise/src/lesson01/List.java +++ b/group13/1274639949/Exercise/src/lesson01/List.java @@ -1,27 +1,32 @@ package lesson01; public interface List { + /** * 鍦↙ist鐨勬渶鍚庝竴涓厓绱犲悗娣诲姞涓涓厓绱 * @param e 娣诲姞鐨勫厓绱 */ public boolean add(E e); + /** * 鍦↙ist鐨刬ndex浣嶇疆鍔犲叆鍏冪礌element * @param index * @param element */ public void add(int index, E element); + /** * 娓呯┖璇ist */ public void clear(); + /** * 鍒ゆ柇List涓槸鍚﹀惈鏈夊璞 * @param o * @return 濡傛灉o瀛樺湪浜庤List涓垯杩斿洖true锛 鍚﹀垯杩斿洖false */ public boolean contains(Object o); + /** * 濡傛灉o瀛樺湪浜庤List涓紝鍒欒繑鍥炲畠绗竴娆″嚭鐜扮殑浣嶇疆 * 绗竴涓厓绱犵殑浣嶇疆涓0 @@ -31,18 +36,24 @@ public interface List { */ public int indexOf(Object o); + public E get(int index); + public E remove(int index); + public boolean remove(Object o); + public E set(int index, E element); + public int size(); + public Object[] toArray(); + public Iterator iterator(); - } From 01dfe0604569d944bb4c339c5d7c03b7b2602de1 Mon Sep 17 00:00:00 2001 From: liujk <1252327158@qq.com> Date: Sun, 12 Mar 2017 11:02:51 +0800 Subject: [PATCH 308/646] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/ArrayList.java | 2 - .../src/com/coding/BinaryTreeNode.java | 36 +++++++++--- .../src/com/coding/BinaryTreeNodeTest.java | 58 +++++++++++++++++++ .../src/com/coding/LinkedList.java | 44 +++++++++++++- .../src/com/coding/LinkedListTest.java | 5 +- .../task1_20170312/src/com/coding/Queue.java | 15 +++-- .../src/com/coding/QueueTest.java | 46 +++++++++++++++ .../task1_20170312/src/com/coding/Stack.java | 20 ++++--- .../src/com/coding/StackTest.java | 45 ++++++++++++++ 9 files changed, 242 insertions(+), 29 deletions(-) create mode 100644 group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNodeTest.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/QueueTest.java create mode 100644 group27/1252327158/task1_20170312/src/com/coding/StackTest.java diff --git a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java index d182395643..cce789d3b3 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/ArrayList.java @@ -83,7 +83,6 @@ public Iterator iterator(){ private class Iter implements Iterator { int cursor; - int lastRet = -1; int expectedModCount = modCount; @Override @@ -99,7 +98,6 @@ public T next() { } Object item = elementData[cursor]; cursor++; - lastRet++; return (T)item; } diff --git a/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java index 66a43d937d..ce35adcdfe 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java +++ b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNode.java @@ -1,32 +1,52 @@ package com.coding; public class BinaryTreeNode { - - private Object data; + + private int data; private BinaryTreeNode left; private BinaryTreeNode right; - public Object getData() { + public BinaryTreeNode(int data, BinaryTreeNode left, BinaryTreeNode right) { + this.data = data; + this.left = left; + this.right = right; + } + + public int getData() { return data; } - public void setData(Object data) { + public void setData(int data) { this.data = data; } public BinaryTreeNode getLeft() { return left; } public void setLeft(BinaryTreeNode left) { - this.left = left; + if (data >= left.data) { + this.left = left; + } } public BinaryTreeNode getRight() { return right; } public void setRight(BinaryTreeNode right) { - this.right = right; + if (data < right.data) { + this.right = right; + } } - public BinaryTreeNode insert(Object o){ - return null; + public BinaryTreeNode insert(int o) { + return insert(this, o); } + private BinaryTreeNode insert(BinaryTreeNode tree,int o){ + if (null == tree) { + tree = new BinaryTreeNode(o, null, null); + } else if (o > tree.data) { + tree.right =insert(tree.right,o); + } else { + tree.left = insert(tree.left,o); + } + return tree; + } } diff --git a/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNodeTest.java b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..b6d56815c7 --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/BinaryTreeNodeTest.java @@ -0,0 +1,58 @@ +package com.coding; + +import static org.junit.Assert.*; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class BinaryTreeNodeTest { + + public BinaryTreeNode node; + + @Before + public void setUp() throws Exception { + node = new BinaryTreeNode(12, null, null); + node = node.insert(10); + } + + @Test + public void testGetData() { + Assert.assertEquals(12, node.getData()); + } + + @Test + public void testSetData() { + node.setData(15); + Assert.assertEquals(15, node.getData()); + } + + @Test + public void testGetLeft() { + Assert.assertEquals(10, node.getLeft().getData()); + } + + @Test + public void testSetLeft() { + node.setLeft(new BinaryTreeNode(8, null, null)); + Assert.assertEquals(8, node.getLeft().getData()); + } + + @Test + public void testGetRight() { + Assert.assertEquals(null, node.getRight()); + } + + @Test + public void testSetRight() { + node.setRight(new BinaryTreeNode(16, null, null)); + Assert.assertEquals(16, node.getRight().getData()); + } + + @Test + public void testInsert() { + node = node.insert(11); + Assert.assertEquals(11, node.getLeft().getRight().getData()); + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java index 416a82c345..168bb07592 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedList.java @@ -1,10 +1,15 @@ package com.coding; +import java.util.ConcurrentModificationException; +import java.util.NoSuchElementException; + public class LinkedList implements List { private int size; private Node head; + + private int modCount; public LinkedList(){ size = 0; @@ -34,6 +39,7 @@ public void add(int index , T o){ temp.next = item; } size++; + modCount++; } @Override @@ -65,6 +71,7 @@ public T remove(int index){ temp.next = temp.next.next; } size--; + modCount++; return result.data; } @@ -82,6 +89,7 @@ public void addFirst(T o){ head = item; } size++; + modCount++; } public void addLast(T o){ @@ -96,21 +104,23 @@ public void addLast(T o){ tag.next = item; } size++; + modCount++; } public T removeFirst(){ if (size == 0) { - throw new IndexOutOfBoundsException(); /////////////////////////////////// + throw new IndexOutOfBoundsException(); } Node result = head; head = head.next; size--; + modCount++; return result.data; } public T removeLast(){ if (size == 0) { - throw new IndexOutOfBoundsException(); /////////////////////////////////// + throw new IndexOutOfBoundsException(); } Node result = head; if (size == 1) { @@ -124,11 +134,39 @@ public T removeLast(){ temp.next = null; } size--; + modCount++; return result.data; } public Iterator iterator(){ - return null; + return new Iter(); + } + + private class Iter implements Iterator { + int cursor; + int expectedModCount = modCount; + + @Override + public boolean hasNext() { + return cursor != size; + } + + @Override + public T next() { + checkForComodification(); + if (cursor >= size) { + throw new NoSuchElementException(); + } + T item = get(cursor); + cursor++; + return item; + } + + final void checkForComodification() + { + if (modCount != expectedModCount) + throw new ConcurrentModificationException(); + } } private static class Node{ diff --git a/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java b/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java index 37a7a48191..03f7198998 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java +++ b/group27/1252327158/task1_20170312/src/com/coding/LinkedListTest.java @@ -86,7 +86,10 @@ public void testRemoveLast() { @Test public void testIterator() { - fail("Not yet implemented"); + Iterator iter = list.iterator(); + if (iter.hasNext()) { + Assert.assertEquals("second", iter.next()); + } } } diff --git a/group27/1252327158/task1_20170312/src/com/coding/Queue.java b/group27/1252327158/task1_20170312/src/com/coding/Queue.java index e9775d4b7c..38b769237c 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/Queue.java +++ b/group27/1252327158/task1_20170312/src/com/coding/Queue.java @@ -1,19 +1,22 @@ package com.coding; -public class Queue { +public class Queue { - public void enQueue(Object o){ + private LinkedList elementData = new LinkedList(); + + public void enQueue(T o){ + elementData.addFirst(o); } - public Object deQueue(){ - return null; + public T deQueue(){ + return elementData.removeLast(); } public boolean isEmpty(){ - return false; + return elementData.size() == 0; } public int size(){ - return -1; + return elementData.size(); } } diff --git a/group27/1252327158/task1_20170312/src/com/coding/QueueTest.java b/group27/1252327158/task1_20170312/src/com/coding/QueueTest.java new file mode 100644 index 0000000000..cc761cac8c --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/QueueTest.java @@ -0,0 +1,46 @@ +package com.coding; + +import static org.junit.Assert.*; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class QueueTest { + + private Queue queue; + + @Before + public void setUp() throws Exception { + queue = new Queue(); + queue.enQueue("first"); + queue.enQueue("second"); + } + + @Test + public void testEnQueue() { + Assert.assertEquals(2, queue.size()); + queue.enQueue("third"); + Assert.assertEquals(3, queue.size()); + } + + @Test + public void testDeQueue() { + Assert.assertEquals("first", queue.deQueue()); + Assert.assertEquals("second", queue.deQueue()); + } + + @Test + public void testIsEmpty() { + Assert.assertEquals(false, queue.isEmpty()); + queue.deQueue(); + queue.deQueue(); + Assert.assertEquals(true, queue.isEmpty()); + } + + @Test + public void testSize() { + Assert.assertEquals(2, queue.size()); + } + +} diff --git a/group27/1252327158/task1_20170312/src/com/coding/Stack.java b/group27/1252327158/task1_20170312/src/com/coding/Stack.java index 9d64f88b78..17dc2f1bf6 100644 --- a/group27/1252327158/task1_20170312/src/com/coding/Stack.java +++ b/group27/1252327158/task1_20170312/src/com/coding/Stack.java @@ -1,22 +1,24 @@ package com.coding; -public class Stack { - private ArrayList elementData = new ArrayList(); +public class Stack { - public void push(Object o){ + private ArrayList elementData = new ArrayList(); + + public void push(T o){ + elementData.add(o); } - public Object pop(){ - return null; + public T pop(){ + return elementData.remove(elementData.size() - 1); } - public Object peek(){ - return null; + public T peek(){ + return elementData.get(elementData.size() - 1); } public boolean isEmpty(){ - return false; + return elementData.size() == 0; } public int size(){ - return -1; + return elementData.size(); } } diff --git a/group27/1252327158/task1_20170312/src/com/coding/StackTest.java b/group27/1252327158/task1_20170312/src/com/coding/StackTest.java new file mode 100644 index 0000000000..442b13310a --- /dev/null +++ b/group27/1252327158/task1_20170312/src/com/coding/StackTest.java @@ -0,0 +1,45 @@ +package com.coding; + +import static org.junit.Assert.*; +import junit.framework.Assert; + +import org.junit.Before; +import org.junit.Test; + +public class StackTest { + + Stack stack; + + @Before + public void setUp() throws Exception { + stack = new Stack(); + stack.push("first"); + stack.push("second"); + } + + @Test + public void testPush() { + stack.push("third"); + Assert.assertEquals("third", stack.peek()); + } + + @Test + public void testPop() { + Assert.assertEquals("second", stack.pop()); + } + + @Test + public void testPeek() { + Assert.assertEquals("second", stack.peek()); + } + + @Test + public void testIsEmpty() { + Assert.assertEquals(false, stack.isEmpty()); + } + + @Test + public void testSize() { + Assert.assertEquals(2, stack.size()); + } +} From 284a3b6867f546b37c1d935798d3ce825c74ca20 Mon Sep 17 00:00:00 2001 From: guoqixuan <1016908591@qq.com> Date: Sun, 12 Mar 2017 11:27:04 +0800 Subject: [PATCH 309/646] Signed-off-by: guoqixuan <1016908591@qq.com> --- "group27/1016908591/week01/src/\346\265\205\350\260\210CPU.txt" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "group27/1016908591/week01/src/\346\265\205\350\260\210CPU.txt" diff --git "a/group27/1016908591/week01/src/\346\265\205\350\260\210CPU.txt" "b/group27/1016908591/week01/src/\346\265\205\350\260\210CPU.txt" new file mode 100644 index 0000000000..ae0478214c --- /dev/null +++ "b/group27/1016908591/week01/src/\346\265\205\350\260\210CPU.txt" @@ -0,0 +1 @@ +http://blog.csdn.net/weixin_37604160/article/details/61195314 \ No newline at end of file From 9e1a6ebeccad0fd3bfc8059c48b7b0d589ce3f7c Mon Sep 17 00:00:00 2001 From: 240094626 Date: Sun, 12 Mar 2017 11:36:08 +0800 Subject: [PATCH 310/646] 240094626-work0305-linkedlist --- .../com/coderising/linkedlist/Iterator.java | 8 + .../com/coderising/linkedlist/LinkedList.java | 293 ++++++++++++++++++ .../coderising/linkedlist/LinkedListTest.java | 163 ++++++++++ .../src/com/coderising/linkedlist/List.java | 9 + .../coderising/linkedlist/SLinkedList.java | 119 +++++++ 5 files changed, 592 insertions(+) create mode 100644 group17/240094626/work_0305/src/com/coderising/linkedlist/Iterator.java create mode 100644 group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedList.java create mode 100644 group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedListTest.java create mode 100644 group17/240094626/work_0305/src/com/coderising/linkedlist/List.java create mode 100644 group17/240094626/work_0305/src/com/coderising/linkedlist/SLinkedList.java diff --git a/group17/240094626/work_0305/src/com/coderising/linkedlist/Iterator.java b/group17/240094626/work_0305/src/com/coderising/linkedlist/Iterator.java new file mode 100644 index 0000000000..30ea750ecc --- /dev/null +++ b/group17/240094626/work_0305/src/com/coderising/linkedlist/Iterator.java @@ -0,0 +1,8 @@ +package com.coderising.linkedlist; + +public interface Iterator { + + public boolean hasNext(); + + public E next(); +} diff --git a/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedList.java b/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedList.java new file mode 100644 index 0000000000..feddaedd23 --- /dev/null +++ b/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedList.java @@ -0,0 +1,293 @@ +package com.coderising.linkedlist; + +import java.util.HashMap; +import java.util.Map; + +public class LinkedList implements List { + + transient Node head; + transient int size; + + public LinkedList(){ + head = new Node(null,head); + size = 0; + } + public void addFirst(E e){ + head.next = new Node(e,head.next); + size++; + } + + + public void addAfter(Node n, E e){ + if(n == head){ + addFirst(e); + }else{ + Node curr = new Node(e,n.next); + n.next = curr; + size++; + } + } + + + private void checkRange(int index){ + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + } + } + + private Node getNode(int index){ + checkRange(index); + Node curr = head; + for(; index >= 0 ; index--){ + curr = curr.next; + } + return curr; + } + + public void add(E e) { + add(size,e); + } + + public void add(int index, E e) { + if(index < 0 || index > size){ + throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + } + if(index == 0){ + addFirst(e); + }else{ + addAfter(getNode(index-1), e); + } + } + + public E get(int index) { + Node n = getNode(index); + return n.e; + } + + + public E remove(int index) { + checkRange(index); + Node preN = null, + currN = null; + if(index == 0){ + preN = head; + }else{ + preN = getNode(index-1); + } + currN = preN.next; + preN.next = currN.next; + E e = currN.e; + currN.e = null; + currN.next = null; + size--; + return e; + + } + + public int size() { + return size; + } + + + private static class Node{ + E e ; + Node next; + + public Node(E e,Node next){ + this.e = e; + this.next = next; + } + } + + private Iterator iterator(){ + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator{ + + int index; + public LinkedListIterator(){ + index = 0; + } + + @Override + public boolean hasNext() { + if(index < size){ + return true; + } + return false; + } + + @Override + public E next() { + Node curr = (Node) getNode(index++); + return curr.e; + } + + } + + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + if(size > 1){ + int index = 0; + Node a = null, + preA = null, + b = null, + preB = null; + for(;index < size/2; index++){ + if(index == 0){ + preA = head; + a = head.next; + b = getNode(size-1); + preB = getNode(size-2); + + head.next = b; + preB.next = a; + b.next = a.next; + a.next = head; + }else{ + preA = getNode(index-1); + a = preA.next; + preB = getNode(size-2-index); + b = preB.next; + + preA.next = b; + preB.next = a; + Node tmp = a.next; + a.next = b.next; + b.next = tmp; + } + + } + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + remove(0, size/2); + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + while(length > 0){ + remove(i); + length--; + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + int[] a = new int[list.size]; + for(int i = 0; i < list.size; i++){ + Node curr = getNode((int)list.get(i)); + a[i] = (int) curr.e; + } + return a; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * @param list + */ + + public void subtract(LinkedList list){ + int i = 0, + j = 0; + for(; i < list.size; i++){ + E a = (E) list.get(i); + while(j < size){ + E b = get(j); + if(a.equals(b)){ + remove(j); + break; + } + j++; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + Map map = new HashMap(size); + for(int i = 0; i < size; ){ + if(map.get(getNode(i).e) == null){ + map.put(getNode(i).e, i); + i++; + }else{ + remove(i); + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + if(min >= max){ + return ; + } + for(int i = 0; i < size; ){ + int a = (int)get(i); + if(min < a && max > a){ + remove(i); + continue; + } + i++; + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + LinkedList c = new LinkedList(); + if(list.size == 0){ + return c; + } + Map map = new HashMap(); + for(int i = 0; i < list.size; i++){ + E a = list.get(i); + if(null == map.get(a)){ + map.put(a, true); + } + } + for(int i = 0; i < size; i++){ + E a = get(i); + if(null == map.get(a)){ + map.put(a, true); + }else if(map.get(a)){ + c.add(get(i)); + } + } + + return c; + } +} diff --git a/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedListTest.java b/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedListTest.java new file mode 100644 index 0000000000..b245851f2a --- /dev/null +++ b/group17/240094626/work_0305/src/com/coderising/linkedlist/LinkedListTest.java @@ -0,0 +1,163 @@ +package com.coderising.linkedlist; + + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + + +public class LinkedListTest { + LinkedList list = new LinkedList(); + @Before + public void setUp() throws Exception { + list = new LinkedList(); + } + + @After + public void tearDown() throws Exception { + list = new LinkedList(); + } + + @Test + public void testReverse() { + list.add(3); + list.add(5); + list.add(6); + list.add(7); + list.add(9); + list.add(8); + Assert.assertEquals(3, list.get(0)); + Assert.assertEquals(5, list.get(1)); + Assert.assertEquals(6, list.get(2)); + Assert.assertEquals(7, list.get(3)); + Assert.assertEquals(9, list.get(4)); + Assert.assertEquals(8, list.get(5)); + list.reverse(); + Assert.assertEquals(8, list.get(0)); + Assert.assertEquals(9, list.get(1)); + Assert.assertEquals(7, list.get(2)); + Assert.assertEquals(6, list.get(3)); + Assert.assertEquals(5, list.get(4)); + Assert.assertEquals(3, list.get(5)); + } + @Test + public void testRemove(){ + list.add(3); + list.add(5); + list.add(6); + list.add(7); + list.add(9); + list.remove(0); + Assert.assertEquals(5, list.get(0)); + list.remove(1); + Assert.assertEquals(7, list.get(1)); + } + @Test + public void testRemoveFirstHalf(){ + list.add(3); + list.add(5); + list.add(6); + list.add(7); + list.add(9); + list.add(8); + list.removeFirstHalf(); + Assert.assertEquals(7, list.get(0)); + Assert.assertEquals(9, list.get(1)); + Assert.assertEquals(8, list.get(2)); + } + + @Test + public void testGetElements(){ + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(701); + list.add(801); + list.add(901); + list.add(1001); + LinkedList list1 = new LinkedList(); + list1.add(0); + list1.add(2); + list1.add(4); + list1.add(6); + int[] a = list.getElements(list1); + Assert.assertEquals(301, a[0]); + Assert.assertEquals(501, a[1]); + Assert.assertEquals(701, a[2]); + Assert.assertEquals(901, a[3]); + } + @Test + public void testSubtract(){ + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(701); + list.add(801); + list.add(901); + list.add(1001); + LinkedList list1 = new LinkedList(); + list1.add(401); + list1.add(701); + list1.add(801); + list.subtract(list1); + Assert.assertEquals(301, list.get(0)); + Assert.assertEquals(501, list.get(1)); + Assert.assertEquals(901, list.get(3)); + } + @Test + public void testRemoveDuplicateValues(){ + list.add(301); + list.add(401); + list.add(401); + list.add(601); + list.add(601); + list.add(801); + list.add(901); + list.add(1001); + list.removeDuplicateValues(); + Assert.assertEquals(6, list.size); + } + + @Test + public void testRemoveRange(){ + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(801); + list.add(901); + list.removeRange(500, 600); + Assert.assertEquals(301, list.get(0)); + Assert.assertEquals(401, list.get(1)); + Assert.assertEquals(601, list.get(2)); + } + + @Test + public void testIntersection(){ + list.add(301); + list.add(401); + list.add(501); + list.add(601); + list.add(801); + list.add(901); + LinkedList list1 = new LinkedList(); + list1.add(401); + list1.add(601); + list1.add(701); + LinkedList c = list.intersection(list1); + Assert.assertEquals(401,c.get(0)); + Assert.assertEquals(601,c.get(1)); + } + public static void main(String[] args) { + LinkedList list = new LinkedList(); + list.add(3); + list.add(5); + list.add(6); + list.add(8); +// list.reverse(); + java.util.LinkedList list1 =null; + } +} diff --git a/group17/240094626/work_0305/src/com/coderising/linkedlist/List.java b/group17/240094626/work_0305/src/com/coderising/linkedlist/List.java new file mode 100644 index 0000000000..f1587b17c5 --- /dev/null +++ b/group17/240094626/work_0305/src/com/coderising/linkedlist/List.java @@ -0,0 +1,9 @@ +package com.coderising.linkedlist; + +public interface List { + public void add(E e); + public void add(int index, E e); + public E get(int index); + public E remove(int index); + public int size(); +} diff --git a/group17/240094626/work_0305/src/com/coderising/linkedlist/SLinkedList.java b/group17/240094626/work_0305/src/com/coderising/linkedlist/SLinkedList.java new file mode 100644 index 0000000000..cef0226bb3 --- /dev/null +++ b/group17/240094626/work_0305/src/com/coderising/linkedlist/SLinkedList.java @@ -0,0 +1,119 @@ +package com.coderising.linkedlist; + + +/** + * 鍗曞悜閾捐〃绠鍗曞疄鐜 + * @author 240094626 + * + */ +public class SLinkedList implements List{ + transient Node head; + transient Node last; + transient int size; + + public SLinkedList(){ + head = new Node(null,last); + last = null; + size = 0; + } + + + private void addAfter(Node n , E e){ + if(n == null){ + last = new Node(e,head); + head.next = last; + }else{ + n.next = new Node(e,n.next); + } + size++; + } + private void checkRange(int index){ + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + } + } + + private Node getNode(int index){ + checkRange(index); + Node curr = head; + for(; index >= 0 ; index--){ + curr = curr.next; + } + return curr; + } + + public void add(E e) { + addAfter(last,e); + } + + public void add(int index, E e) { + if(index < 0 || index > size){ + throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + } + addAfter(getNode(index-1), e); + } + + public E get(int index) { + Node n = getNode(index); + return n.e; + } + + + public E remove(int index) { + checkRange(index); + Node preN = null, + currN = null; + if(index == 0){ + preN = head; + }else{ + preN = getNode(index-1); + } + currN = preN.next; + preN.next = currN.next; + size--; + return currN.e=null; + + } + + public int size() { + return size; + } + + + private static class Node{ + E e ; + Node next; + + public Node(E e,Node next){ + this.e = e; + this.next = next; + } + } + + private Iterator iterator(){ + return new SLinkedListIterator(); + } + + private class SLinkedListIterator implements Iterator{ + + int index; + public SLinkedListIterator(){ + index = 0; + } + + @Override + public boolean hasNext() { + if(index < size){ + return true; + } + return false; + } + + @Override + public E next() { + Node curr = (Node) getNode(index++); + return curr.e; + } + + } +} From c9b61630b3444c1dde153c7fd9179b8924bb3d52 Mon Sep 17 00:00:00 2001 From: ThomasChant Date: Sun, 12 Mar 2017 11:54:39 +0800 Subject: [PATCH 311/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group24/494800949/.gitignore | 4 + group24/494800949/build.gradle | 29 +++ .../main/java/com/coding/weak1/ArrayList.java | 102 ++++++++ .../java/com/coding/weak1/BinaryTreeNode.java | 32 +++ .../main/java/com/coding/weak1/Iterator.java | 7 + .../java/com/coding/weak1/LinkedList.java | 225 ++++++++++++++++++ .../src/main/java/com/coding/weak1/List.java | 11 + .../src/main/java/com/coding/weak1/Queue.java | 22 ++ .../src/main/java/com/coding/weak1/Stack.java | 29 +++ .../java/com/coding/weak1/ArrayListTest.java | 126 ++++++++++ .../java/com/coding/weak1/LinkedListTest.java | 156 ++++++++++++ .../test/java/com/coding/weak1/QueueTest.java | 47 ++++ .../test/java/com/coding/weak1/StackTest.java | 68 ++++++ 13 files changed, 858 insertions(+) create mode 100644 group24/494800949/.gitignore create mode 100644 group24/494800949/build.gradle create mode 100644 group24/494800949/src/main/java/com/coding/weak1/ArrayList.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/BinaryTreeNode.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/Iterator.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/LinkedList.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/List.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/Queue.java create mode 100644 group24/494800949/src/main/java/com/coding/weak1/Stack.java create mode 100644 group24/494800949/src/test/java/com/coding/weak1/ArrayListTest.java create mode 100644 group24/494800949/src/test/java/com/coding/weak1/LinkedListTest.java create mode 100644 group24/494800949/src/test/java/com/coding/weak1/QueueTest.java create mode 100644 group24/494800949/src/test/java/com/coding/weak1/StackTest.java diff --git a/group24/494800949/.gitignore b/group24/494800949/.gitignore new file mode 100644 index 0000000000..a50868a433 --- /dev/null +++ b/group24/494800949/.gitignore @@ -0,0 +1,4 @@ +.idea/* +*.iml +build/* +.gradle/* diff --git a/group24/494800949/build.gradle b/group24/494800949/build.gradle new file mode 100644 index 0000000000..e88b275214 --- /dev/null +++ b/group24/494800949/build.gradle @@ -0,0 +1,29 @@ +group 'com.hpe' +version '1.0' + +buildscript { + repositories { + mavenCentral() + } +} +apply plugin: 'java' +apply plugin: 'idea' + +sourceCompatibility = 1.8 +sourceCompatibility = 1.8 + +repositories { + mavenCentral() +} + +dependencies{ + compile group: 'junit', name: 'junit', version: '4.11' +} +gradle.projectsEvaluated { + tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:unchecked" + options.encoding = "UTF-8" + } +} + +defaultTasks "build" \ No newline at end of file diff --git a/group24/494800949/src/main/java/com/coding/weak1/ArrayList.java b/group24/494800949/src/main/java/com/coding/weak1/ArrayList.java new file mode 100644 index 0000000000..b878b04045 --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/ArrayList.java @@ -0,0 +1,102 @@ +package com.coding.weak1; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + ensureCapcity(size + 1); + elementData[size++] = o; + } + + /** + * 褰撴暟缁勯暱搴︿笉澶熸椂杩涜鎵╁ + */ + private void ensureCapcity(int requireSize){ + int oldCapacity = elementData.length; + int newCapacity ; + if(oldCapacity < requireSize){ + newCapacity = oldCapacity + (oldCapacity >> 1); + + if(newCapacity < 0){ + newCapacity = Integer.MAX_VALUE; + } + + if(newCapacity > Integer.MAX_VALUE - 8){ + newCapacity = Integer.MAX_VALUE; + } + + Object[] elementDataNew = new Object[newCapacity]; + System.arraycopy(elementData, 0, elementDataNew, 0, oldCapacity); + elementData = elementDataNew; + } + } + + + public void add(int index, Object o){ + indexCheckForAdd(index); + ensureCapcity(index + 1); + Object[] newElementData = new Object[elementData.length]; + if(index > 0) + System.arraycopy(elementData, 0, newElementData, 0, index-1); + System.arraycopy(elementData, index, newElementData, index+1, size-index); + elementData = newElementData; + elementData[index] = o; + size++; + } + + + private void indexCheckForAdd(int index) { + if(index < 0 || index >= size-1){ + throw new IndexOutOfBoundsException("max index is: "+(size-1)); + } + } + + public Object get(int index){ + indexCheck(index); + return elementData[index]; + } + + private void indexCheck(int index) { + if(index < 0 || index > size-1){ + throw new IndexOutOfBoundsException("max index is: "+(size-1)); + } + } + + public Object remove(int index){ + indexCheck(index); + Object obj = elementData[index]; + System.arraycopy(elementData, index+1, elementData, index, size-index-1); + elementData[size--] = null; + return obj; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new ListIter(); + } + + private class ListIter implements Iterator{ + + private int cursor; + + @Override + public boolean hasNext() { + return cursor < size; + } + + @Override + public Object next() { + int index = cursor; + if(index >= size) + throw new IndexOutOfBoundsException(); + cursor++; + return elementData[index]; + } + } +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/BinaryTreeNode.java b/group24/494800949/src/main/java/com/coding/weak1/BinaryTreeNode.java new file mode 100644 index 0000000000..8676a519d8 --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.weak1; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/Iterator.java b/group24/494800949/src/main/java/com/coding/weak1/Iterator.java new file mode 100644 index 0000000000..59ec891396 --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.weak1; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/LinkedList.java b/group24/494800949/src/main/java/com/coding/weak1/LinkedList.java new file mode 100644 index 0000000000..e1dc589104 --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/LinkedList.java @@ -0,0 +1,225 @@ +package com.coding.weak1; + + +public class LinkedList implements List { + + private Node head; + private int size; + public void add(Object o){ + addLast(o); + } + public void add(int index , Object o){ + if (index < 0 || index > size){ + throw new IndexOutOfBoundsException("index: "+index); + } + if (index == size){ + addLast(o); + }else if(index == 0) { + addFirst(o); + }else { + Node preNode = node(index - 1); + Node indexNode = node(index); + preNode.next = new Node(o, indexNode); + size++; + } + + } + + + public Object get(int index){ + Node node = node(index); + return node.data; + } + + private Node node(int index){ + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("index: "+index + ",size: "+size); + } + Node node = head; + for (int i = 0; i < size; i++ ){ + if(i == index){ + return node; + } + node = node.next; + } + return null; + } + + public Object remove(int index){ + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("index: "+index + ",size: "+size); + } + if(index == 0){ + return removeFirst(); + }else if(index == size-1){ + return removeLast(); + } + Node indexNode = node(index); + Node prev = node(index - 1); + Node next = node(index + 1); + prev.next = next; + size--; + return indexNode.data; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + if (head == null) + head = new Node(o, null); + else { + Node node = new Node(o, head); + head = node; + } + size++; + } + + + public void addLast(Object o){ + if(head == null){ + head = new Node(o, null); + }else { + Node node = head; + for(int i = 0; i < size-1; i++){ + node = node.next; + } + node.next = new Node(o, null); + } + size++; + } + + public Object removeFirst(){ + if(head == null) + return null; + Node oldFirst = head; + head = oldFirst.next; + size--; + return oldFirst; + } + public Object removeLast(){ + if(head == null) + return null; + Node oldLast = node(size - 1); + Node preLast; + if (size - 2 >= 0){ + preLast = node(size - 2); + preLast.next = null; + } else { + head = null; + } + size--; + return oldLast; + } + public Iterator iterator(){ + + return new LinkedListIter(); + } + + private class LinkedListIter implements Iterator{ + + private int cursor; + + @Override + public boolean hasNext() { + return cursor++ < size; + } + + @Override + public Object next() { + int index = cursor; + if(index > size) + throw new IndexOutOfBoundsException(); + Node node = node(index); + cursor++; + return node.data; + } + } + + private static class Node{ + Object data; + Node next; + + public Node(Object data, Node next) { + this.data = data; + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/List.java b/group24/494800949/src/main/java/com/coding/weak1/List.java new file mode 100644 index 0000000000..a537a11d7f --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/List.java @@ -0,0 +1,11 @@ +package com.coding.weak1; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); + + public Iterator iterator(); +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/Queue.java b/group24/494800949/src/main/java/com/coding/weak1/Queue.java new file mode 100644 index 0000000000..e3bf0fdadf --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/Queue.java @@ -0,0 +1,22 @@ +package com.coding.weak1; + +public class Queue { + + private ArrayList elementData = new ArrayList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + return elementData.remove(0); + } + + public boolean isEmpty(){ + return elementData.size() == 0; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group24/494800949/src/main/java/com/coding/weak1/Stack.java b/group24/494800949/src/main/java/com/coding/weak1/Stack.java new file mode 100644 index 0000000000..d1088e7db0 --- /dev/null +++ b/group24/494800949/src/main/java/com/coding/weak1/Stack.java @@ -0,0 +1,29 @@ +package com.coding.weak1; + +import java.util.NoSuchElementException; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + if(isEmpty()){ + throw new NoSuchElementException(); + } + return elementData.remove(elementData.size() - 1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return elementData.size() == 0; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group24/494800949/src/test/java/com/coding/weak1/ArrayListTest.java b/group24/494800949/src/test/java/com/coding/weak1/ArrayListTest.java new file mode 100644 index 0000000000..10e6113de8 --- /dev/null +++ b/group24/494800949/src/test/java/com/coding/weak1/ArrayListTest.java @@ -0,0 +1,126 @@ +package com.coding.weak1; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +/** + * Created by Administrator on 2017/3/11 0011. + */ +public class ArrayListTest{ + + @Rule + public ExpectedException thrown= ExpectedException.none(); + + private List list = new ArrayList(); + @Before + public void setup(){ + + } + @Test + public void testAdd() throws Exception { + List list = new ArrayList(); + Assert.assertTrue(list.size() == 0); + list.add(100); + Assert.assertTrue(list.size()==1); + + for(int i = 0; i < 100; i++){ + list.add(i); + } + + Assert.assertTrue(list.size() == 101 ); + + list = new ArrayList(); + for(int i = 0; i < 1000000; i++){ + list.add(i); + } + Assert.assertTrue(list.size() == 1000000); + Assert.assertTrue((int) list.get(1) == 1); + Assert.assertTrue((int)list.get(100) == 100); + Assert.assertTrue((int)list.get(1000) == 1000); + Assert.assertTrue((int) list.get(9999) == 9999); + Assert.assertTrue((int) list.get(999999) == 999999); + } + + @Test + public void testAdd1() throws Exception { + List list = new ArrayList(); + Assert.assertTrue(list.size() == 0); + for(int i = 0; i < 10; i++){ + list.add(i); + } + list.add(3, 9); + Assert.assertEquals(list.get(3), 9); + Assert.assertEquals(list.get(4), 3); + Assert.assertTrue(list.size() == 11); + list = new ArrayList(); + for(int i = 0; i < 10; i++){ + list.add(i); + } + + thrown.expect(IndexOutOfBoundsException.class); + list.add(10, 10); + } + + + @Test + public void indexCheckForAdd2(){ + List list = new ArrayList(); + for(int i = 0; i < 10; i++){ + list.add(i); + } + thrown.expect(IndexOutOfBoundsException.class); + list.add(10,10); + } + + + @Test + public void indexCheck1(){ + List list = new ArrayList(); + for(int i = 0; i < 10; i++){ + list.add(i); + } + thrown.expect(IndexOutOfBoundsException.class); + list.get(-1); + } + + + @Test + public void testGet() throws Exception { + List list = new ArrayList(); + for(int i = 0; i < 10; i++){ + list.add(i); + } + Assert.assertEquals(list.get(1), 1); + Assert.assertEquals(list.get(9), 9); + } + + @Test + public void testRemove() throws Exception { + List list = new ArrayList(); + for (int i = 0; i < 10; i++){ + list.add(i); + } + list.remove(1); + Assert.assertEquals(list.get(1), 2); + } + + + @Test + public void testIter() { + List list = new ArrayList(); + for (int i = 0; i < 5; i++){ + list.add(i); + } + Iterator iterator = list.iterator(); + Assert.assertTrue(iterator.hasNext()); + Assert.assertEquals(iterator.next(), 0); + Assert.assertEquals(iterator.next(), 1); + Assert.assertEquals(iterator.next(), 2); + Assert.assertEquals(iterator.next(), 3); + Assert.assertEquals(iterator.next(), 4); + Assert.assertTrue(!iterator.hasNext()); + } +} \ No newline at end of file diff --git a/group24/494800949/src/test/java/com/coding/weak1/LinkedListTest.java b/group24/494800949/src/test/java/com/coding/weak1/LinkedListTest.java new file mode 100644 index 0000000000..a505f143f0 --- /dev/null +++ b/group24/494800949/src/test/java/com/coding/weak1/LinkedListTest.java @@ -0,0 +1,156 @@ +package com.coding.weak1; + +import org.junit.Assert; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +/** + * Created by Administrator on 2017/3/11 0011. + */ +public class LinkedListTest { + + @Rule + public ExpectedException thrown = ExpectedException.none(); + @Test + public void testAdd() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.add("ssss"); + linkedList.add("ssss1"); + linkedList.add("ssss2"); + linkedList.add("ssss3"); + linkedList.add("ssss4"); + linkedList.add("ssss5"); + Assert.assertEquals(linkedList.size(), 6); + Assert.assertEquals(linkedList.get(0), "ssss"); + Assert.assertEquals(linkedList.get(1), "ssss1"); + Assert.assertEquals(linkedList.get(3), "ssss3"); + Assert.assertEquals(linkedList.get(5), "ssss5"); + } + + @Test + public void testAdd1() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.add("ssss"); + linkedList.add("ssss1"); + linkedList.add("ssss2"); + linkedList.add(1, "ssss3"); + Assert.assertEquals(linkedList.get(0), "ssss"); + Assert.assertEquals(linkedList.get(1), "ssss3"); + Assert.assertEquals(linkedList.get(2), "ssss1"); + Assert.assertEquals(linkedList.get(3), "ssss2"); + } + + @Test + public void testGet() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.addFirst("ssss"); + linkedList.addFirst("ssss1"); + linkedList.addFirst("ssss2"); + linkedList.addFirst("ssss3"); + linkedList.addFirst("ssss4"); + linkedList.addFirst("ssss5"); + Assert.assertEquals(linkedList.size(), 6); + Assert.assertEquals(linkedList.get(0), "ssss5"); + Assert.assertEquals(linkedList.get(1), "ssss4"); + Assert.assertEquals(linkedList.get(3), "ssss2"); + Assert.assertEquals(linkedList.get(5), "ssss"); +// thrown.expect(IndexOutOfBoundsException.class); +// linkedList.get(-1); + thrown.expect(IndexOutOfBoundsException.class); + linkedList.get(6); + } + + @Test + public void testRemove() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.add("ssss"); + linkedList.add("ssss1"); + linkedList.add("ssss2"); + linkedList.add("ssss3"); + linkedList.add("ssss4"); + linkedList.add("ssss5"); + String ret = (String)linkedList.remove(3); + Assert.assertEquals(ret, "ssss3"); + Assert.assertEquals(linkedList.size(), 5); + Assert.assertEquals(linkedList.get(3),"ssss4"); + Assert.assertEquals(linkedList.get(2),"ssss2"); +// + Assert.assertEquals(linkedList.size(), 5); + linkedList.remove(4); + Assert.assertEquals(linkedList.get(3), "ssss4"); + } + + @Test + public void testSize() throws Exception { + LinkedList linkedList = new LinkedList(); + Assert.assertEquals(linkedList.size(), 0); + } + + @Test + public void testAddFirst() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.addFirst("ssss"); + linkedList.addFirst("ssss1"); + linkedList.addFirst("ssss2"); + linkedList.addFirst("ssss3"); + linkedList.addFirst("ssss4"); + linkedList.addFirst("ssss5"); + Assert.assertEquals(linkedList.size(), 6); + } + + @Test + public void testAddLast() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.addLast("ssss"); + linkedList.addLast("ssss1"); + linkedList.addLast("ssss1"); + linkedList.addLast("ssss1"); + linkedList.addLast("ssss1"); + linkedList.addLast("ssss1"); + Assert.assertEquals(linkedList.size(), 6); + } + + @Test + public void testRemoveFirst() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.add("ssss"); + linkedList.add("ssss1"); + Assert.assertEquals(linkedList.size(), 2); + linkedList.removeFirst(); + Assert.assertEquals(linkedList.size(), 1); + Assert.assertEquals(linkedList.get(0), "ssss1"); + linkedList.removeFirst(); + Assert.assertEquals(linkedList.size(), 0); + thrown.expect(IndexOutOfBoundsException.class); + Assert.assertEquals(linkedList.get(0), "ssss1"); + } + + @Test + public void testRemoveLast() throws Exception { + LinkedList linkedList = new LinkedList(); + linkedList.add("ssss"); + linkedList.add("ssss1"); + linkedList.add("ssss2"); + Assert.assertEquals(linkedList.size(), 3); + Assert.assertEquals(linkedList.get(2), "ssss2"); + linkedList.removeLast(); + Assert.assertEquals(linkedList.size(), 2); + thrown.expect(IndexOutOfBoundsException.class); + Assert.assertEquals(linkedList.get(2), "ssss2"); + } + + @Test + public void testIterator() throws Exception { + List list = new LinkedList(); + list.add("ssss"); + list.add("ssss1"); + list.add("ssss2"); + Iterator iterator = list.iterator(); + Assert.assertEquals(iterator.next(), "ssss"); + Assert.assertEquals(iterator.next(), "ssss1"); + Assert.assertEquals(iterator.next(), "ssss2"); + thrown.expect(IndexOutOfBoundsException.class); + Assert.assertEquals(iterator.next(), "ssss2"); + } +} \ No newline at end of file diff --git a/group24/494800949/src/test/java/com/coding/weak1/QueueTest.java b/group24/494800949/src/test/java/com/coding/weak1/QueueTest.java new file mode 100644 index 0000000000..1410e6f595 --- /dev/null +++ b/group24/494800949/src/test/java/com/coding/weak1/QueueTest.java @@ -0,0 +1,47 @@ +package com.coding.weak1; + +import org.junit.Assert; +import org.junit.Test; + +/** + * Created by Administrator on 2017/3/12 0012. + */ +public class QueueTest { + + @Test + public void testEnQueue() throws Exception { + Queue queue = new Queue(); + queue.enQueue("java"); + queue.enQueue("python"); + Assert.assertEquals(queue.size(), 2); + Assert.assertEquals(queue.isEmpty(), false); + Assert.assertEquals(queue.deQueue(), "java"); + } + + @Test + public void testDeQueue() throws Exception { + Queue queue = new Queue(); + queue.enQueue("java"); + queue.enQueue("python"); + Assert.assertEquals(queue.size(), 2); + Assert.assertEquals(queue.isEmpty(), false); + Assert.assertEquals(queue.deQueue(), "java"); + Assert.assertEquals(queue.deQueue(), "python"); + } + + @Test + public void testIsEmpty() throws Exception { + Queue queue = new Queue(); + Assert.assertEquals(queue.isEmpty(), true); + queue.enQueue("java"); + Assert.assertEquals(queue.isEmpty(), false); + } + + @Test + public void testSize() throws Exception { + Queue queue = new Queue(); + Assert.assertEquals(queue.size(), 0); + queue.enQueue("java"); + Assert.assertEquals(queue.size(), 1); + } +} \ No newline at end of file diff --git a/group24/494800949/src/test/java/com/coding/weak1/StackTest.java b/group24/494800949/src/test/java/com/coding/weak1/StackTest.java new file mode 100644 index 0000000000..9bbb965c5e --- /dev/null +++ b/group24/494800949/src/test/java/com/coding/weak1/StackTest.java @@ -0,0 +1,68 @@ +package com.coding.weak1; + +import org.junit.Assert; +import org.junit.Test; + +/** + * Created by Administrator on 2017/3/12 0012. + */ +public class StackTest { + + @Test + public void testPush() throws Exception { + Stack stack = new Stack(); + Assert.assertEquals(stack.size(), 0); + stack.push("java"); + stack.push("c++"); + Assert.assertEquals(stack.size(), 2); + Assert.assertEquals(stack.peek(), "c++"); + } + + @Test + public void testPop() throws Exception { + Stack stack = new Stack(); + stack.push("java"); + stack.push("c++"); + stack.push("c#"); + stack.push("php"); + stack.push("python"); + Assert.assertEquals(stack.pop(), "python"); + Assert.assertEquals(stack.pop(), "php"); + Assert.assertEquals(stack.pop(), "c#"); + Assert.assertEquals(stack.pop(), "c++"); + Assert.assertEquals(stack.pop(), "java"); + Assert.assertEquals(stack.size(), 0); + } + + @Test + public void testPeek() throws Exception { + Stack stack = new Stack(); + stack.push("java"); + stack.push("c++"); + stack.push("c#"); + stack.push("php"); + stack.push("python"); + Assert.assertEquals(stack.peek(), "python"); + Assert.assertEquals(stack.peek(), "python"); + Assert.assertEquals(stack.size(), 5); + } + + @Test + public void testIsEmpty() throws Exception { + Stack stack = new Stack(); + Assert.assertEquals(stack.isEmpty(), true); + stack.push(1); + Assert.assertEquals(stack.isEmpty(), false); + } + + @Test + public void testSize() throws Exception { + Stack stack = new Stack(); + stack.push("java"); + stack.push("c++"); + stack.push("c#"); + stack.push("php"); + stack.push("python"); + Assert.assertEquals(stack.size(), 5); + } +} \ No newline at end of file From d8a2e521a49b6af8dd5001bb51c684b63d37b929 Mon Sep 17 00:00:00 2001 From: Harry Date: Sun, 12 Mar 2017 12:03:20 +0800 Subject: [PATCH 312/646] update litestruts --- .../coding2017/litestruts/Configuration.java | 97 +++++++++++++ .../litestruts/ConfigurationException.java | 18 +++ .../litestruts/ConfigurationTest.java | 43 ++++++ .../coding2017/litestruts/LoginAction.java | 29 ++-- .../coding2017/litestruts/ReflectionUtil.java | 82 +++++++++++ .../litestruts/ReflectionUtilTest.java | 113 +++++++++++++++ .../coding2017/litestruts/Struts.java | 137 +++++------------- .../coding2017/litestruts/StrutsTest.java | 57 ++++---- .../HarryHook/coding2017/litestruts/View.java | 18 +-- .../coding2017/litestruts/struts.xml | 4 +- 10 files changed, 440 insertions(+), 158 deletions(-) create mode 100644 group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Configuration.java create mode 100644 group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationException.java create mode 100644 group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationTest.java create mode 100644 group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtil.java create mode 100644 group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtilTest.java diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Configuration.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Configuration.java new file mode 100644 index 0000000000..c44457c58f --- /dev/null +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Configuration.java @@ -0,0 +1,97 @@ +package com.github.HarryHook.coding2017.litestruts; + +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; + + +public class Configuration { + Map actions = new HashMap<>(); + + public Configuration(String fileName) { + String packageName = this.getClass().getPackage().getName(); + + packageName = packageName.replace('.', '/'); + + InputStream is = this.getClass().getResourceAsStream("/" + packageName + "/" + fileName); + + parseXML(is); + + try { + is.close(); + }catch(IOException e) { + throw new ConfigurationException(e); + } + } + private void parseXML(InputStream is) { + SAXBuilder builder = new SAXBuilder(); + + try { + Document doc = builder.build(is); + + Element root = doc.getRootElement(); + + for(Element actionElement : root.getChildren("action")) { + String actionName = actionElement.getAttributeValue("name"); + String clzName = actionElement.getAttributeValue("class"); + + ActionConfig ac = new ActionConfig(actionName, clzName); + + for(Element resultElement : actionElement.getChildren("result")) { + String resultName = resultElement.getAttributeValue("name"); + String viewName = resultElement.getText().trim(); + + ac.addViewResult(resultName, viewName); + } + this.actions.put(actionName, ac); + } + }catch(JDOMException e) { + throw new ConfigurationException(e); + + }catch(IOException e) { + throw new ConfigurationException(e); + + } + } + + public String getClassName(String action) { + ActionConfig ac = this.actions.get(action); + if(ac == null) { + return null; + } + return ac.getClassName(); + } + public String getResultView(String action, String resultName) { + ActionConfig ac = this.actions.get(action); + if(ac == null) { + return null; + } + return ac.getViewName(resultName); + } + private static class ActionConfig { + String name; + String clzName; + Map viewResult = new HashMap<>(); + + public ActionConfig(String actionName, String clzName) { + this.clzName = clzName; + this.name = actionName; + } + public String getClassName() { + return clzName; + } + public void addViewResult(String name, String viewName) { + viewResult.put(name, viewName); + } + public String getViewName(String resultName) { + return viewResult.get(resultName); + } + + } +} diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationException.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationException.java new file mode 100644 index 0000000000..df763a0ab4 --- /dev/null +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationException.java @@ -0,0 +1,18 @@ +package com.github.HarryHook.coding2017.litestruts; + + +import java.io.IOException; + +import org.jdom2.JDOMException; + +public class ConfigurationException extends RuntimeException { + public ConfigurationException(String msg) { + super(msg); + } + public ConfigurationException(JDOMException e) { + super(e); + } + public ConfigurationException(IOException e) { + super(e); + } +} diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationTest.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationTest.java new file mode 100644 index 0000000000..9e25a7974e --- /dev/null +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ConfigurationTest.java @@ -0,0 +1,43 @@ +package com.github.HarryHook.coding2017.litestruts; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ConfigurationTest { + + Configuration cfg = new Configuration("struts.xml"); + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testGetClassName() { + String clzName = cfg.getClassName("login"); + Assert.assertEquals("com.github.HarryHook.coding2017.litestruts.LoginAction", clzName); + + clzName = cfg.getClassName("logout"); + Assert.assertEquals("com.github.HarryHook.coding2017.litestruts.LogoutAction", clzName); + } + + @Test + public void testGetResultView() { + String jsp = cfg.getResultView("login", "success"); + Assert.assertEquals("/jsp/homepage.jsp", jsp); + + jsp = cfg.getResultView("login", "fail"); + Assert.assertEquals("/jsp/showLogin.jsp", jsp); + + jsp = cfg.getResultView("logout", "success"); + Assert.assertEquals("/jsp/welcome.jsp", jsp); + + jsp = cfg.getResultView("logout", "error"); + Assert.assertEquals("/jsp/error.jsp", jsp); + } + +} diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/LoginAction.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/LoginAction.java index 4b42b92093..d42f7b0cd6 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/LoginAction.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/LoginAction.java @@ -5,41 +5,38 @@ * @author liuxin * */ -public class LoginAction -{ - private String name ; +public class LoginAction { + + private String name ; private String password; private String message; - public String getName() - { + public String getName() { return name; } - public String getPassword() - { + public String getPassword() { return password; } - public String execute() - { - if("test".equals(name) && "1234".equals(password)){ + public String execute() { + if("test".equals(name) && "1234".equals(password)) { this.message = "login successful"; return "success"; } this.message = "login failed,please check your user/pwd"; return "fail"; } - public void setName(String name) - { + + public void setName(String name) { this.name = name; } - public void setPassword(String password) - { + + public void setPassword(String password) { this.password = password; } - public String getMessage() - { + + public String getMessage() { return this.message; } } diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtil.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtil.java new file mode 100644 index 0000000000..1efcb21574 --- /dev/null +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtil.java @@ -0,0 +1,82 @@ +package com.github.HarryHook.coding2017.litestruts; + +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class ReflectionUtil +{ + + public static List getSetterMethods(Class clz) { + + return getMethods(clz, "set"); + } + + public static void setParameters(Object o, Map params) { + + List methods = getSetterMethods(o.getClass()); + + for(String name : params.keySet()) { + + String methodName = "set" + name; + + for(Method m : methods) { + + if(m.getName().equalsIgnoreCase(methodName)) { + try { + m.invoke(o, params.get(name)); + + }catch(IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + } + } + + } + + public static List getGetterMethods(Class clz) { + + return getMethods(clz, "get"); + } + + public static List getMethods(Class clz, String startWithName) { + + List methods = new ArrayList<>(); + for(Method m : clz.getDeclaredMethods()) { + + if(m.getName().startsWith(startWithName)) { + methods.add(m); + } + } + + return methods; + } + + public static Map getParameterMap(Object o) { + + Map params = new HashMap<>(); + + List methods = getGetterMethods(o.getClass()); + + for(Method m : methods) { + + String methodName = m.getName(); + String name = methodName.replaceFirst("get", "").toLowerCase(); + + try { + Object value = m.invoke(o); + params.put(name, value); + + }catch(IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + return params; + } +} diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtilTest.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtilTest.java new file mode 100644 index 0000000000..ff4c30f05d --- /dev/null +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/ReflectionUtilTest.java @@ -0,0 +1,113 @@ +package com.github.HarryHook.coding2017.litestruts; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + + +public class ReflectionUtilTest { + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testGetSetterMethod() throws Exception { + + String name = "com.github.HarryHook.coding2017.litestruts.LoginAction"; + Class clz = Class.forName(name); + List methods = ReflectionUtil.getSetterMethods(clz); + + Assert.assertEquals(2, methods.size()); + + List expectedNames = new ArrayList<>(); + expectedNames.add("setName"); + expectedNames.add("setPassword"); + + Set acctualNames = new HashSet<>(); + for(Method m : methods) { + + acctualNames.add(m.getName()); + } + + Assert.assertTrue(acctualNames.containsAll(expectedNames)); + } + + @Test + public void testSetParameters() throws Exception { + + String name = "com.github.HarryHook.coding2017.litestruts.LoginAction"; + Class clz = Class.forName(name); + Object o = clz.newInstance(); + + Map params = new HashMap(); + params.put("name", "test"); + params.put("password", "1234"); + + ReflectionUtil.setParameters(o, params); + + Field f = clz.getDeclaredField("name"); + + f.setAccessible(true); + Assert.assertEquals("test", f.get(o)); + + f = clz.getDeclaredField("password"); + f.setAccessible(true); + Assert.assertEquals("1234", f.get(o)); + } + + @Test + public void testGetGetterMethod() throws Exception { + + String name = "com.github.HarryHook.coding2017.litestruts.LoginAction"; + Class clz = Class.forName(name); + List methods = ReflectionUtil.getGetterMethods(clz); + + Assert.assertEquals(3, methods.size()); + + List expectedNames = new ArrayList<>(); + expectedNames.add("getMessage"); + expectedNames.add("getName"); + expectedNames.add("getPassword"); + + Set acctualNames = new HashSet<>(); + for(Method m : methods) { + + acctualNames.add(m.getName()); + } + + Assert.assertTrue(acctualNames.containsAll(expectedNames)); + + } + + @Test + public void testGetParameters() throws Exception { + + String name = "com.github.HarryHook.coding2017.litestruts.LoginAction"; + Class clz = Class.forName(name); + LoginAction action = (LoginAction)clz.newInstance(); + action.setName("test"); + action.setPassword("1234"); + + Map params = ReflectionUtil.getParameterMap(action); + Assert.assertEquals(3, params.size()); + Assert.assertEquals(null, params.get("message")); + Assert.assertEquals("test", params.get("name")); + Assert.assertEquals("1234", params.get("password")); + } + +} diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Struts.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Struts.java index 79f662699b..270e26a57d 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Struts.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/Struts.java @@ -1,109 +1,48 @@ package com.github.HarryHook.coding2017.litestruts; -import java.io.File; +import java.lang.reflect.Method; import java.util.Map; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import org.w3c.dom.Attr; -import org.w3c.dom.Comment; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - - -public class Struts -{ - - public static View runAction(String actionName, Map parameters) - { - return null; - } - public static void main(String[] args) throws Exception - { - /* - Class clz = Class.forName("com.github.HarryHook.coding2017.litestruts.LoginAction"); - //鍒涘缓绫荤殑瀹炰緥 - Object obj = clz.newInstance(); - //寰楀埌鏂规硶鐨勫紩鐢 - Method method = clz.getDeclaredMethod("setName", java.lang.String.class); - //璋冪敤璇ユ柟娉 - method.invoke(obj, "test"); - LoginAction b = (LoginAction) obj; - System.out.println(b.getName()); +public class Struts { + + private final static Configuration cfg = new Configuration("struts.xml"); + + public static View runAction(String actionName, Map parameters) { - method = clz.getDeclaredMethod("setPassword", java.lang.String.class); - method.invoke(obj, "1234"); - b = (LoginAction) obj; - System.out.println(b.getPassword()); - */ - - //鑾峰緱dom瑙f瀽鍣ㄥ伐鍘傦紝鐢ㄤ簬鍒涘缓鍏蜂綋鐨勮В鏋愬櫒 - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - //鑾峰緱鍏蜂綋鐨刣om瑙f瀽鍣 - DocumentBuilder db = dbf.newDocumentBuilder(); - //瑙f瀽涓涓獂ml鏂囨。,鑾峰緱Document瀵硅薄(鏍硅妭鐐) - Document doc = db.parse(new File("src/com/github/HarryHook/coding2017/litestruts/struts.xml")); - //瀵规枃妗h繘琛岃В鏋 - Element root = doc.getDocumentElement(); - parseElement(root); - System.out.println(""); - - } - private static void parseElement(Element element) - { - String tagName = element.getNodeName(); - NodeList children = element.getChildNodes(); - System.out.print("<" + tagName); - - //element鍏冪礌鐨勬墍鏈夊睘鎬ф墍鏋勬垚鐨凬amedNodeMap闃熷舰锛岃瀵瑰叾杩涜鍒ゆ柇 - NamedNodeMap nnm = element.getAttributes(); - - //濡傛灉鍏冪礌瀛樺湪灞炴 - if(nnm != null) - { - for(int i=0; i"); - - for(int i=0; i"); - } + String clzName = cfg.getClassName(actionName); + + if(clzName == null) { + + return null; } - System.out.print(""); + + try { + + Class clz = Class.forName(clzName); + Object action = clz.newInstance(); + + ReflectionUtil.setParameters(action, parameters); + + Method m = clz.getDeclaredMethod("execute"); + String resultName = (String)m.invoke(action); + + + Map params = ReflectionUtil.getParameterMap(action); + String resultView = cfg.getResultView(actionName, resultName); + + View view = new View(); + view.setParameters(params); + view.setJsp(resultView); + return view; + + }catch(Exception e) { + + e.printStackTrace(); + } + + return null; + } - - } \ No newline at end of file diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/StrutsTest.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/StrutsTest.java index 458f2b190c..23dd0a0845 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/StrutsTest.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/StrutsTest.java @@ -6,52 +6,45 @@ import org.junit.Assert; import org.junit.Test; - - - - public class StrutsTest { @Test - public void testLoginActionSuccess() - { + public void testLoginActionSuccess() { - String actionName = "login"; + String actionName = "login"; - Map params = new HashMap(); - params.put("name","test"); - params.put("password","1234"); + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); - View view; + View view; - view = Struts.runAction(actionName, params); + view = Struts.runAction(actionName, params); - Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); - Assert.assertEquals("login successful", view.getParameters().get("message")); - - - + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } @Test - public void testLoginActionFailed() - { - String actionName = "login"; - Map params = new HashMap(); - params.put("name","test"); - params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 - try - { - View view; + public void testLoginActionFailed() { + + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + try { + + View view; - view = Struts.runAction(actionName,params); - Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); - Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + view = Struts.runAction(actionName,params); + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); - }catch(Exception e) - { + }catch(Exception e) { e.printStackTrace(); - } + } } } diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/View.java b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/View.java index 5d1977d887..3e35a849c3 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/View.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/View.java @@ -4,27 +4,27 @@ public class View { - private String jsp; + private String jsp; private Map parameters; //瀵瑰簲action鑾峰彇Jsp - public String getJsp() - { + public String getJsp() { + return jsp; } - public View setJsp(String jsp) - { + public View setJsp(String jsp) { + this.jsp = jsp; return this; } //execute()鑾峰彇瀵瑰簲鍙傛暟 - public Map getParameters() - { + public Map getParameters() { + return parameters; } - public View setParameters(Map parameters) - { + public View setParameters(Map parameters) { + this.parameters = parameters; return this; } diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/struts.xml b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/struts.xml index 7d2a8ed4ab..d19d7c80f3 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/struts.xml +++ b/group02/727171008/src/com/github/HarryHook/coding2017/litestruts/struts.xml @@ -1,10 +1,10 @@ - + /jsp/homepage.jsp /jsp/showLogin.jsp - + /jsp/welcome.jsp /jsp/error.jsp From 2798791d2a32483506ba80c54648c97eebcf1967 Mon Sep 17 00:00:00 2001 From: Harry Date: Sun, 12 Mar 2017 12:07:31 +0800 Subject: [PATCH 313/646] update MyLinkedList --- .../coding2017/basic/MyLinkedList.java | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java index fbad1b8f50..9a668faaf0 100644 --- a/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java +++ b/group02/727171008/src/com/github/HarryHook/coding2017/basic/MyLinkedList.java @@ -23,10 +23,15 @@ public void add(int index , Object o) { if (index > size || index < 0) - throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); + { + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); + } + //瀛樺湪鎻掑叆澶寸粨鐐圭殑鎯呭喌 if(index == 0) - addFirst(o); + { + addFirst(o); + } else { //鍗 index != 0 鐨勬儏鍐 // p淇濆瓨寰呮彃鍏ヨ妭鐐圭殑鍓嶄竴鑺傜偣锛寈鎸囧悜瑕佹彃鍏ョ殑鑺傜偣 @@ -51,7 +56,9 @@ public void add(int index , Object o) public Object get(int index) { if(index >= size) + { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); + } Node x = head; int i = 0; while(i < index && x != null) @@ -66,7 +73,9 @@ public Object get(int index) public Object remove(int index) { if (index > size || index < 0) - throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); + { + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); + } //鍏堝垽鏂槸鍚︽槸澶磋妭鐐 if( index == 0) { @@ -109,8 +118,8 @@ public void addLast(Object o) head.data = o; } else - { - Node x = head; + { + Node x = head; while(x.next != null) { x = x.next; @@ -119,7 +128,7 @@ public void addLast(Object o) x.next = n; n.next = null; n.data = o; - } + } size++; } //绉婚櫎绗竴涓妭鐐 @@ -134,7 +143,6 @@ public Object removeFirst() } //绉婚櫎鏈鍚庝竴涓妭鐐 - //removeLast()鏂规硶瀛樺湪bug public Object removeLast() { Node x = head; @@ -157,7 +165,8 @@ public Object removeLast() return Data; } } - public int size(){ + public int size() + { return size; } public Iterator iterator() @@ -185,7 +194,9 @@ public Object next() public void reverse() { if(head == null) + { return ; + } Node p1, p2, p3; p1 = head; p2 = p1.next; @@ -209,7 +220,9 @@ public void reverse() public void removeFirstHalf() { if(size == 0) - return ; + { + return ; + } Node p = head; Node q = null; int i = size / 2; @@ -290,7 +303,9 @@ public void remove(int i, int length) public int[] getElements(MyLinkedList list) { if(list == null) + { return new int[0]; + } int i = 0 ; int[] array = new int[list.size()]; while(i < list.size()) @@ -308,11 +323,13 @@ public int[] getElements(MyLinkedList list) * @param list */ - public void subtract(MyLinkedList list) + public void subtract(MyLinkedList list) { int i = 0; if(list == null) + { return ; + } while(i < list.size()) { for(int index = 0; index < this.size(); index++) @@ -335,6 +352,7 @@ public void subtract(MyLinkedList list) size--; } } + i++; } } @@ -346,7 +364,9 @@ public void subtract(MyLinkedList list) public void removeDuplicateValues() { if(head == null) + { return ; + } Node p = head; Node q = head; //鍓嶉┍ while(p.next != null) @@ -395,7 +415,9 @@ public void removeRange(int min, int max) break ; } if(q == head) //澶寸粨鐐硅鍒犳帀 - head = p; + { + head = p; + } else { q.next = p; @@ -411,14 +433,15 @@ public void removeRange(int min, int max) public MyLinkedList intersection(MyLinkedList list) { if(list == null || this == null) + { return null; + } Node p1 = list.head; Node p2 = this.head; MyLinkedList newList = new MyLinkedList(); while(p1 != null && p2 != null) { - while(((int) p1.data < (int) p2.data) && p1.next != null) { p1 = p1.next; @@ -435,7 +458,9 @@ public MyLinkedList intersection(MyLinkedList list) } if(p1 == null && p2 == null) //鑻ユ渶鍚庝袱涓厓绱犵浉绛 + { break; + } } return newList; } From c8964d7adaebfcc1301ca36e0907a249b0c03d78 Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sun, 12 Mar 2017 13:14:16 +0800 Subject: [PATCH 314/646] update code for 3-12 --- .../download/impl/ConnectionImpl.java | 4 +- .../code/com/coding/basic/BinaryTreeNode.java | 47 +++++++++++++++++++ .../code/com/coding/basic/LinkedList.java | 32 ++++++++++++- .../3-12/code/com/coding/basic/Stack.java | 23 +++++++++ .../code/com/coding/test/LinkedListTest.java | 3 +- 5 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 group08/619057560/3-12/code/com/coding/basic/BinaryTreeNode.java create mode 100644 group08/619057560/3-12/code/com/coding/basic/Stack.java diff --git a/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java index 938e1ff063..980537e946 100644 --- a/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java +++ b/group08/619057560/3-12/code/com/coderising/download/impl/ConnectionImpl.java @@ -33,7 +33,9 @@ public byte[] read(int startPos, int endPos) throws IOException { byte[] buffer = new byte[bytesLen]; if (currPos < startPos) { - iStream.skip(startPos - currPos); + for (int remaining = startPos - currPos; remaining > 0;) { + remaining -= iStream.skip(remaining); + } } else if (currPos > startPos) { // should not read previous bytes of input stream. // return null to end this thread. diff --git a/group08/619057560/3-12/code/com/coding/basic/BinaryTreeNode.java b/group08/619057560/3-12/code/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..af940807e6 --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,47 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + if (data == null || ((Integer)data).intValue() == ((Integer)o).intValue()) { + data = o; + return this; + } + else if (((Integer)o).intValue() < ((Integer)data).intValue()) { + if (left == null) { + left = new BinaryTreeNode(); + } + return left.insert(o); + } + else { + if (right == null) { + right = new BinaryTreeNode(); + } + return right.insert(o); + } + } + +} diff --git a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java index 392194c2f2..efc67a71f1 100644 --- a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java +++ b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java @@ -275,11 +275,13 @@ public int[] getElements(LinkedList list){ * @param list */ - public void subtract(LinkedList list){ - if (list == null) { + public void subtract(LinkedList origList){ + if (origList == null) { return; } + LinkedList list = binaryTreeSort(origList); + Iterator listItr = list.iterator(); Iterator mainItr = iterator(); @@ -361,6 +363,32 @@ public void onElementFound(Object element) { return newList; } + private LinkedList binaryTreeSort(LinkedList list) { + if (list == null) { + return null; + } + + Iterator listItr = list.iterator(); + BinaryTreeNode root = new BinaryTreeNode(); + while (listItr.hasNext()) { + root.insert(listItr.next()); + } + + LinkedList sortedList = new LinkedList(); + addNodeToLinkedList(sortedList, root); + + return sortedList; + } + + private void addNodeToLinkedList(LinkedList list, BinaryTreeNode node) { + if (node == null || node.getData() == null) { + return; + } + addNodeToLinkedList(list, node.getLeft()); + list.add(node.getData()); + addNodeToLinkedList(list, node.getRight()); + } + private interface intersectionIterationCallback { void onElementFound(Object element); } diff --git a/group08/619057560/3-12/code/com/coding/basic/Stack.java b/group08/619057560/3-12/code/com/coding/basic/Stack.java new file mode 100644 index 0000000000..481c88bed7 --- /dev/null +++ b/group08/619057560/3-12/code/com/coding/basic/Stack.java @@ -0,0 +1,23 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return elementData.size() == 0; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java index d8b25594ad..fd5b74a15e 100644 --- a/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java +++ b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java @@ -95,7 +95,8 @@ public void testGetElements() { public void testSubtract() { initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); LinkedList list = new LinkedList(); - initLinkedList(list, new int[] {1,2,3,4,5,9,10}); + //initLinkedList(list, new int[] {1,2,3,4,5,9,10}); + initLinkedList(list, new int[] {10,9,2,9,3,5,4,9,1}); mainList.subtract(list); Assert.assertArrayEquals(new int[] {6,7,8}, getIntegerArray(mainList)); //printMainList(); From fe184bd264406b79166a10db9481e4fce3785f1d Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sun, 12 Mar 2017 13:16:00 +0800 Subject: [PATCH 315/646] upload homework for 3-12 (article) --- ...201\347\232\204\344\273\213\347\273\215.pdf" | Bin 0 -> 68773 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "group08/619057560/3-12/article/Java\346\265\201\347\232\204\344\273\213\347\273\215.pdf" diff --git "a/group08/619057560/3-12/article/Java\346\265\201\347\232\204\344\273\213\347\273\215.pdf" "b/group08/619057560/3-12/article/Java\346\265\201\347\232\204\344\273\213\347\273\215.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..a18a9cbf4d2dd80bcb71bdad08024ca330fb33bd GIT binary patch literal 68773 zcmbrmbyOYOvgl24cMq~~2oT)e-QC^Y-QC^YA-D#24ek!X-Q6GA`|NwpH|~AozA?Uk zR>N&e+&#GTlH;JsEFg4wG256H0z3aV`lAGMA{y}I)04=~q-yE8g6F?(rWNqST z3Sjya$pdJF%`6>_>_3;5dX7edMg}&9MgVSZXa`4oBRwl<*DsYCBk{xoNF4_%ppdEN zQ@j0mX_B)idaSmDa^M%Zrm^ z>K{>$m#+*SH?LG_x|1f(&xd|o9~oXZrx@#yDD8XsEJd{KLybn0vsFtmAGcRRH7YM} z2y$om8!Y)uS;k!qBiTM38v*u}D6J8rbt`zCXp)Rey#AkIFv`aIO)V{VXa;S$RmtXwRlp+@m^@NKLP2G}9?f@LaFS-9ZH&>@(y39^*LGa8Z z1iy&NwyK1k>koe}uj{2&FldkuARkN>;ojYhL03dX{2fp8VEz0e!i?Sxj=qp3TX9k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m5HNoVXF+(5Q}6Ys$PLg{`#>9Db}$vz9SXJPa#?4O0rvvBx#$>h1@_$d{V~iRqq@@nk^ZVn8@stc zF91qy{MX(Mf`SS%JpV!eq$vM~rR!>MY=Xo_#tB4%PU*j1Q0g%d%3L-f`xD~=0im?u zKibHw|Anz}fS&z+e*FjI20Xj^-xzeRpq~CW#sPwI9siDTKRf*2dR$!Kf9U<8@i#qg z4k(fOzcF?w0~5+W{zLoUKL1hsZwv@v14Ea~f9r98p$yQ!VbK1dvGCt|+-y+F^WQKo z&@<=z?|M+0_1`geC?)&v7{@;`FdN%H$K`^~`rmEAQ0n;KFff4g?-+Dmpp@?a)??@9 z{>S}g=i+9EQf{AL|GvLaJt*h(Zy1=3`|tON9n8-5cMQnJ4fuyIV2*$I0@Y*t`?%11 z#PyHz|JoxxX9s07cW9VHIl@XdHjZS^5%V1HlGY|R zWKfGg$|BHh1Nb Date: Sun, 12 Mar 2017 13:18:22 +0800 Subject: [PATCH 316/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group22/1258890344/.gitignore | 48 +++++ .../src/com/coding/basic/ArrayList.java | 76 +++++++ .../src/com/coding/basic/BinaryTreeNode.java | 41 ++++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 203 ++++++++++++++++++ .../1258890344/src/com/coding/basic/List.java | 9 + .../src/com/coding/basic/Queue.java | 27 +++ .../src/com/coding/basic/Stack.java | 27 +++ 8 files changed, 438 insertions(+) create mode 100644 group22/1258890344/.gitignore create mode 100644 group22/1258890344/src/com/coding/basic/ArrayList.java create mode 100644 group22/1258890344/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group22/1258890344/src/com/coding/basic/Iterator.java create mode 100644 group22/1258890344/src/com/coding/basic/LinkedList.java create mode 100644 group22/1258890344/src/com/coding/basic/List.java create mode 100644 group22/1258890344/src/com/coding/basic/Queue.java create mode 100644 group22/1258890344/src/com/coding/basic/Stack.java diff --git a/group22/1258890344/.gitignore b/group22/1258890344/.gitignore new file mode 100644 index 0000000000..ea7fd75f1f --- /dev/null +++ b/group22/1258890344/.gitignore @@ -0,0 +1,48 @@ +/bin/ +# Class files +*.class + +# Package Files +*.jar +*.war +*.ear + +# Virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# Ignore web-site project +*web-site/ + +# Temporary files +.DS_STORE +*.log + +# Maven related +/*/target/ +target + +# Netbeans related +nb-configuration.xml +nbactions.xml +nbproject + +# Eclipse related + +.settings +*.classpath +*.project + +# IntelliJ related +.idea +*.iml +*.ipr +*.iws + +# Jrebel related +rebel.xml +rebel-remote.xml + +# design model +*.eab + +.idea/workspace.xml \ No newline at end of file diff --git a/group22/1258890344/src/com/coding/basic/ArrayList.java b/group22/1258890344/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..b61c1d833c --- /dev/null +++ b/group22/1258890344/src/com/coding/basic/ArrayList.java @@ -0,0 +1,76 @@ +package com.coding.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + if(this.size==elementData.length){ + elementData=Arrays.copyOf(elementData, size+1); + elementData[size]=o; + }else{ + elementData[size]=o; + } + size++; + + } + public void add(int index, Object o){ + if(index<0||index>=this.size){ + throw new ArrayIndexOutOfBoundsException("鏁扮粍瓒婄晫寮傚父"); + }else{ + if(indexelementData.length){ + throw new ArrayIndexOutOfBoundsException("鏁扮粍瓒婄晫寮傚父"); + } + return elementData[index]; + + } + + public Object remove(int index){ + if(index<0||index>=elementData.length){ + throw new ArrayIndexOutOfBoundsException("鏁扮粍瓒婄晫寮傚父"); + }else{ + Object deletedElement=elementData[index]; + if(index7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group22/1258890344/src/com/coding/basic/List.java b/group22/1258890344/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group22/1258890344/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group22/1258890344/src/com/coding/basic/Queue.java b/group22/1258890344/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..1c76d442ef --- /dev/null +++ b/group22/1258890344/src/com/coding/basic/Queue.java @@ -0,0 +1,27 @@ +package com.coding.basic; + +public class Queue { + private LinkedList list=new LinkedList(); + private int size=0; + public void enQueue(Object o){ + list.addLast(o); + size++; + } + + public Object deQueue(){ + Object o= list.removeFirst(); + size--; + return o; + } + + public boolean isEmpty(){ + if(size==0){ + return true; + } + return false; + } + + public int size(){ + return size; + } +} diff --git a/group22/1258890344/src/com/coding/basic/Stack.java b/group22/1258890344/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..8b2ee6c7e2 --- /dev/null +++ b/group22/1258890344/src/com/coding/basic/Stack.java @@ -0,0 +1,27 @@ +package com.coding.basic; + +public class Stack { + private ArrayList list = new ArrayList(); + private int size=0; + public void push(Object o){ + list.add(o); + size++; + } + + public Object pop(){ + Object o=list.remove(size-1); + size--; + return o; + } + + public Object peek(){ + Object o=list.get(size-1); + return o; + } + public boolean isEmpty(){ + return size==0?true:false; + } + public int size(){ + return size; + } +} From a97f2286e92eed8f626f64ca898cf07588cfb316 Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sun, 12 Mar 2017 13:55:59 +0800 Subject: [PATCH 317/646] update code x 2 fix addFirst out of bounds issue and speed up binary sorting --- .../3-12/code/com/coding/basic/LinkedList.java | 15 ++++++++++----- .../3-12/code/com/coding/test/LinkedListTest.java | 10 ++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java index efc67a71f1..91e0ce3714 100644 --- a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java +++ b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java @@ -25,7 +25,9 @@ public void add(Object o){ } public void add(int index , Object o){ - ensureBounds(index); + if (index < 0 || index > size()) { + throw new IndexOutOfBoundsException(); + } Node pNewNode = new Node(); pNewNode.data = o; @@ -90,7 +92,10 @@ public int size(){ } public void addFirst(Object o){ - add(0, o); + Node pNewNode = new Node(); + pNewNode.data = o; + pNewNode.next = head; + head = pNewNode; } public void addLast(Object o){ @@ -363,7 +368,7 @@ public void onElementFound(Object element) { return newList; } - private LinkedList binaryTreeSort(LinkedList list) { + public LinkedList binaryTreeSort(LinkedList list) { if (list == null) { return null; } @@ -384,9 +389,9 @@ private void addNodeToLinkedList(LinkedList list, BinaryTreeNode node) { if (node == null || node.getData() == null) { return; } - addNodeToLinkedList(list, node.getLeft()); - list.add(node.getData()); addNodeToLinkedList(list, node.getRight()); + list.addFirst(node.getData()); + addNodeToLinkedList(list, node.getLeft()); } private interface intersectionIterationCallback { diff --git a/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java index fd5b74a15e..0efdde6a80 100644 --- a/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java +++ b/group08/619057560/3-12/code/com/coding/test/LinkedListTest.java @@ -91,6 +91,16 @@ public void testGetElements() { Assert.assertArrayEquals(new int[] {0,30,40,70}, mainList.getElements(list)); } + @Test + public void testBinarySort() { + initLinkedList(mainList, new int[] {10,9,2,9,3,5,4,9,1}); + mainList = mainList.binaryTreeSort(mainList); + Assert.assertArrayEquals(new int[] {1,2,3,4,5,9,10}, getIntegerArray(mainList)); + initLinkedList(mainList, new int[] {}); + mainList = mainList.binaryTreeSort(mainList); + Assert.assertArrayEquals(new int[] {}, getIntegerArray(mainList)); + } + @Test public void testSubtract() { initLinkedList(mainList, new int[] {1,2,3,4,5,6,7,8,9,10}); From b7bffbf0a783fab856f53613edf2305c90376e2e Mon Sep 17 00:00:00 2001 From: wenGQ Date: Sun, 12 Mar 2017 14:00:11 +0800 Subject: [PATCH 318/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + .../com/github/mrwengq/first/ArrayList.java | 28 ++- .../github/mrwengq/first/ArrayListTest.java | 112 +++++++++ .../github/mrwengq/first/BinaryTreeNode.java | 21 ++ .../mrwengq/first/BinaryTreeNodeTest.java | 37 +++ .../com/github/mrwengq/first/LinkedList.java | 30 ++- .../github/mrwengq/first/LinkedListTest.java | 216 ++++++++++++++++++ .../com/github/mrwengq/first/QueueTest.java | 76 ++++++ .../src/com/github/mrwengq/first/Stack.java | 13 +- .../com/github/mrwengq/first/StackTest.java | 88 +++++++ 10 files changed, 598 insertions(+), 26 deletions(-) create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayListTest.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNodeTest.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedListTest.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/QueueTest.java create mode 100644 group22/1193590951/githubitem/src/com/github/mrwengq/first/StackTest.java diff --git a/.gitignore b/.gitignore index d749cfbd62..3d01d810e2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ rebel.* .rebel.* target +*.classpath +group22/1193590951/githubitem/.project +*.prefs diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java index f627f38abb..0974b8e1dc 100644 --- a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java @@ -51,12 +51,16 @@ public int size() { public Iterator iterator() { return new Iterator() { - int index; + int index=-1; public boolean hasNext() { index++; - Object ob = elementData[index]; - return ob != null; + if(index index && i < size - 1) - elementData[i - 1] = elementData[i]; - else if (i == size - 1) - elementData[i] = null; + for (int i = 0; i < size; i++){ + + if (i > index && i < size ){ + elementData[i - 1] = elementData[i]; + if (i == size - 1){ + elementData[i] = null; + } + } + } } - } diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayListTest.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayListTest.java new file mode 100644 index 0000000000..000ad6e813 --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayListTest.java @@ -0,0 +1,112 @@ +package com.github.mrwengq.first; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ArrayListTest { + ArrayList list = new ArrayList(); + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testAddObject() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + int[] o = new int[] { 1, 2, 3, 4, 5, 6, 7 }; + for (int i = 0; i < list.size(); i++) { + assertEquals(o[i], o[i]); + } + + } + + @Test + public void testAddIntObject() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + list.add(5, 9); + int[] o = new int[] { 1, 2, 3, 4, 5, 9, 6, 7 }; + for (int i = 0; i < list.size(); i++) { + assertEquals(o[i], o[i]); + } + } + + @Test + public void testGet() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + assertEquals(list.get(5), 6); + assertEquals(list.get(2), 3); + assertEquals(list.get(4), 5); + assertEquals(list.get(6), 7); + } + + @Test + public void testRemove() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.remove(3); + assertEquals(list.get(3), 5); + } + + @Test + public void testSize() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + assertEquals(list.size(), 5); + } + + @Test + public void testIterator() { + ArrayList list = new ArrayList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + Iterator iter = list.iterator(); + int i = 0; + int[] o = new int[] { 1, 2, 3, 4, 5}; + + while(iter.hasNext()){ + + assertEquals(iter.next(),o[i]); + i++; + } + } + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java index 37bc363cdb..f832e10521 100644 --- a/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNode.java @@ -73,5 +73,26 @@ public BinaryTreeNode insert(Object o) { } return null; } + //鏂板姞鍏ョ殑鏂规硶鐢ㄤ簬鑾峰彇鑺傜偣锛屽府鍔╂祴璇昳nsert + public BinaryTreeNode findNode(Object o){ + + + if((int)this.data == (int)o){ + return this; + + }else if((int)this.data > (int)o){ + if(this.left!=null){ + return this.left.findNode(o); + } + return null; + }else if((int)this.data <(int)o){ + if(this.right!=null){ + return this.right.findNode(o); + } + return null; + } + return null; + + } } diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNodeTest.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..44fad39594 --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/BinaryTreeNodeTest.java @@ -0,0 +1,37 @@ +package com.github.mrwengq.first; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class BinaryTreeNodeTest { + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testInsert() { + BinaryTreeNode btnt = new BinaryTreeNode(); + btnt.insert(15); + btnt.insert(16); + btnt.insert(23); + btnt.insert(10); + btnt.insert(18); + btnt.insert(9); + + assertEquals(btnt.getData(), 15); + assertEquals(btnt.getLeft().getData(),10); + assertEquals(btnt.getRight().getData(),16); + assertEquals(btnt.findNode(16).getRight().getData(),23); + assertEquals(btnt.findNode(23).getLeft().getData(),18); + assertEquals(btnt.findNode(10).getLeft().getData(),9); + } + +} diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java index a8ef6f6413..846634287e 100644 --- a/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java @@ -20,7 +20,7 @@ public void add(Object o) { head = new Node(o); } else { Node node = new Node(o); - Node lastNode = findNode(size); + Node lastNode = findNode(size-1); lastNode.next = node; } size++; @@ -28,8 +28,8 @@ public void add(Object o) { private Node findNode(int index) { Node no = head; - for (; index - 1 > 0; index--) - no = no.next; + for (; index > 0; index--) + no = no.next; return no; } @@ -71,16 +71,15 @@ public Object remove(int index) { } Node nextNode = null; Node lastNode = null; - if (index + 1 < size - 1) + if (index + 1 <= size - 1) //鍒ゆ柇鏄惁鏈変笅涓涓 nextNode = findNode(index + 1); - if (index - 1 > 0) + if (index - 1 > 0) //鍒ゆ柇鏄惁鏈変笂涓涓 lastNode = findNode(index - 1); if (lastNode == null) { head = nextNode; size--; return indexNode.data; - } - if (nextNode == null) { + }else if (nextNode == null) { lastNode.next = null; size--; return indexNode.data; @@ -116,7 +115,7 @@ public void addLast(Object o) { size++; return; } else { - Node lastNode = findNode(size); + Node lastNode = findNode(size-1); lastNode.next = node; size++; return; @@ -139,9 +138,11 @@ public Object removeLast() { if (size == 0) { return null; } else { - Node node = findNode(size); - Node lastNode = findNode(size - 1); - lastNode.next = null; + Node node = findNode(size-1); + if(size-2>=0){ + Node lastNode = findNode(size - 2); + lastNode.next = null; + } size--; return node.data; } @@ -154,7 +155,12 @@ public Iterator iterator() { public boolean hasNext() { index++; - return findNode(index) != null; + if(indexelementData.size()? null:elementData.get(elementData.size() - index); + if(ob==null){ + index = 0; + } + return ob; + } } public boolean isEmpty() { diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/StackTest.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/StackTest.java new file mode 100644 index 0000000000..7cea2aa985 --- /dev/null +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/StackTest.java @@ -0,0 +1,88 @@ +package com.github.mrwengq.first; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class StackTest { + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + + @Test + public void testPush() { + Stack st =new Stack(); + st.push("1"); + st.push("2"); + st.push("3"); + st.push("4"); + st.push("5"); + + } + + @Test + public void testPop() { + Stack st =new Stack(); + st.push("1"); + st.push("2"); + st.push("3"); + st.push("4"); + st.push("5"); + assertEquals(st.pop(), "5"); + assertEquals(st.pop(), "4"); + assertEquals(st.pop(), "3"); + assertEquals(st.pop(), "2"); + assertEquals(st.pop(), "1"); + assertEquals(st.isEmpty(),true); + } + + @Test + public void testPeek() { + Stack st =new Stack(); + st.push("1"); + st.push("2"); + st.push("3"); + st.push("4"); + st.push("5"); + assertEquals(st.peek(), "5"); + assertEquals(st.peek(), "4"); + assertEquals(st.peek(), "3"); + assertEquals(st.peek(), "2"); + assertEquals(st.peek(), "1"); + assertEquals(st.isEmpty(),false); + } + + @Test + public void testIsEmpty() { + Stack st =new Stack(); + assertEquals(st.isEmpty(),true); + st.push("1"); + st.push("2"); + st.push("3"); + st.push("4"); + st.push("5"); + assertEquals(st.isEmpty(),false); + + } + + @Test + public void testSize() { + Stack st =new Stack(); + assertEquals(st.size(),0); + st.push("1"); + st.push("2"); + st.push("3"); + st.push("4"); + st.push("5"); + assertEquals(st.size(),5); + } + +} From e448e2538cb1dfa65934b563e9627df935d4cc7a Mon Sep 17 00:00:00 2001 From: wenGQ Date: Sun, 12 Mar 2017 14:04:00 +0800 Subject: [PATCH 319/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" | 0 2 files changed, 1 insertion(+) create mode 100644 "group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" diff --git a/.gitignore b/.gitignore index 3d01d810e2..793b2e270c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ target *.classpath group22/1193590951/githubitem/.project *.prefs +group22/1193590951/githubitem/bin/鏂囩珷鍦板潃.txt diff --git "a/group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" "b/group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" new file mode 100644 index 0000000000..e69de29bb2 From ddf87e3bafe3068d50e9b32fc5ef2b541015422f Mon Sep 17 00:00:00 2001 From: wenGQ Date: Sun, 12 Mar 2017 14:19:35 +0800 Subject: [PATCH 320/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/github/mrwengq/first/ArrayList.java | 14 +++---- .../com/github/mrwengq/first/LinkedList.java | 42 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java index 0974b8e1dc..d9d8356b67 100644 --- a/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/ArrayList.java @@ -70,21 +70,21 @@ public Object next() { }; } - private Object[] copyAddArray(Object elementData[]) { + private Object[] copyAddArray(Object elementData[]) { //瀵规暟缁勬墿瀹 澧炲姞閲忎负鍘熼暱搴3/4 Object ob[] = new Object[elementData.length+(elementData.length * 3) / 4]; System.arraycopy(((Object) (elementData)), 0, ((Object) (ob)), 0, elementData.length); return ob; } - private Object[] addUpdateArray(Object elementData[], int index) { - Object temp = null; + private Object[] addUpdateArray(Object elementData[], int index) {//娣诲姞鏃朵慨鏀规暟缁勭储寮 + Object temp = null; //涓棿鍙橀噺 for (int i = 0; i < size; i++) - if (i > index) { + if (i > index) {//鍒ゆ柇鍙楀奖鍝嶇储寮 temp = elementData[index]; elementData[index] = elementData[i]; elementData[i] = temp; - if (i == size - 1) { + if (i == size - 1) { //鍒ゆ柇涓烘渶鍚庝竴浣 if (size > elementData.length) elementData = copyAddArray(elementData); elementData[size] = elementData[index]; @@ -94,10 +94,10 @@ private Object[] addUpdateArray(Object elementData[], int index) { return elementData; } - private void delUpdateArray(Object elementData[], int index) { + private void delUpdateArray(Object elementData[], int index) {//鍒犻櫎鏃朵慨鏀圭储寮 for (int i = 0; i < size; i++){ - if (i > index && i < size ){ + if (i > index && i < size ){//鍒ゆ柇鍙楀奖鍝嶇储寮 elementData[i - 1] = elementData[i]; if (i == size - 1){ elementData[i] = null; diff --git a/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java index 846634287e..1dc4dd4342 100644 --- a/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java +++ b/group22/1193590951/githubitem/src/com/github/mrwengq/first/LinkedList.java @@ -71,9 +71,9 @@ public Object remove(int index) { } Node nextNode = null; Node lastNode = null; - if (index + 1 <= size - 1) //鍒ゆ柇鏄惁鏈変笅涓涓 + if (index + 1 <= size - 1) //鍒ゆ柇鏄惁鏈変笅涓浣 nextNode = findNode(index + 1); - if (index - 1 > 0) //鍒ゆ柇鏄惁鏈変笂涓涓 + if (index - 1 > 0) //鍒ゆ柇鏄惁鏈変笂涓浣 lastNode = findNode(index - 1); if (lastNode == null) { head = nextNode; @@ -138,7 +138,7 @@ public Object removeLast() { if (size == 0) { return null; } else { - Node node = findNode(size-1); + Node node = findNode(size-1); //size -1 涓烘渶鍚庝竴浣 -2涓哄墠涓浣 if(size-2>=0){ Node lastNode = findNode(size - 2); lastNode.next = null; @@ -172,17 +172,17 @@ public Object next() { } /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * 閹跺﹨顕氶柧鎹愩冮柅鍡欑枂 + * 娓氬顩ч柧鎹愩冩稉锟3->7->10 , 闁棛鐤嗛崥搴″綁娑擄拷 10->7->3 */ public void reverse(){ } /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * 閸掔娀娅庢稉锟介嚋閸楁洟鎽肩悰銊ф畱閸撳秴宕愰柈銊ュ瀻 + * 娓氬顩ч敍姝璱st = 2->5->7->8 , 閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟7->8 + * 婵″倹鐏塴ist = 2->5->7->8->10 ,閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟,8,10 */ public void removeFirstHalf(){ @@ -190,7 +190,7 @@ public void removeFirstHalf(){ } /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * 娴犲海顑噄娑擃亜鍘撶槐鐘茬磻婵绱 閸掔娀娅巐ength 娑擃亜鍘撶槐锟介敍锟藉▔銊﹀壈i娴狅拷瀵拷顫 * @param i * @param length */ @@ -198,11 +198,11 @@ public void remove(int i, int length){ } /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * 閸嬪洤鐣捐ぐ鎾冲闁炬崘銆冮崪瀹璱st閸у洤瀵橀崥顐㈠嚒閸楀洤绨幒鎺戝灙閻ㄥ嫭鏆i弫锟 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戦崣鏍у毉闁絼绨簂ist閹碉拷瀵氱规氨娈戦崗鍐 + * 娓氬顩цぐ鎾冲闁炬崘銆 = 11->101->201->301->401->501->601->701 * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 鏉╂柨娲栭惃鍕波閺嬫粌绨茬拠銉︽Ц[101,301,401,601] * @param list */ public static int[] getElements(LinkedList list){ @@ -210,8 +210,8 @@ public static int[] getElements(LinkedList list){ } /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戞稉顓炲灩闂勩倕婀猯ist娑擃厼鍤悳鎵畱閸忓啰绀 * @param list */ @@ -221,16 +221,16 @@ public void subtract(LinkedList list){ } /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + * 瀹歌尙鐓¤ぐ鎾冲闁炬崘銆冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 閸掔娀娅庣悰銊よ厬閹碉拷婀侀崐鑲╂祲閸氬瞼娈戞径姘稇閸忓啰绀岄敍鍫滃▏瀵版鎼锋担婊冩倵閻ㄥ嫮鍤庨幀褑銆冩稉顓熷閺堝鍘撶槐鐘垫畱閸婄厧娼庢稉宥囨祲閸氬矉绱 */ public void removeDuplicateValues(){ } /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 鐠囨洖鍟撴稉锟界彯閺佸牏娈戠粻妤佺《閿涘苯鍨归梽銈堛冩稉顓熷閺堝锟芥径褌绨琺in娑撴柨鐨禍宸慳x閻ㄥ嫬鍘撶槐鐙呯礄閼汇儴銆冩稉顓炵摠閸︺劏绻栭弽椋庢畱閸忓啰绀岄敍锟 * @param min * @param max */ @@ -239,8 +239,8 @@ public void removeRange(int min, int max){ } /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * 閸嬪洩顔曡ぐ鎾冲闁炬崘銆冮崪灞藉棘閺佺櫦ist閹稿洤鐣鹃惃鍕懠鐞涖劌娼庢禒銉ュ帗缁辩姳绶烽崐濂革拷婢х偞婀佹惔蹇斿笓閸掓绱欓崥灞肩鐞涖劋鑵戦惃鍕帗缁辩姴锟介崥鍕瑝閻╃ǹ鎮撻敍锟 + * 閻滄媽顩﹀Ч鍌滄晸閹存劖鏌婇柧鎹愩僀閿涘苯鍙鹃崗鍐娑撳搫缍嬮崜宥夋懠鐞涖劌鎷發ist娑擃厼鍘撶槐鐘垫畱娴溿倝娉﹂敍灞肩瑬鐞涒撴稉顓犳畱閸忓啰绀岄張澶夌贩閸婂ジ锟芥晶鐐存箒鎼村繑甯撻崚锟 * @param list */ public LinkedList intersection( LinkedList list){ From 4c1885d600464387af2b553c448c137489654ce6 Mon Sep 17 00:00:00 2001 From: PG <1067041567@qq.com> Date: Sun, 12 Mar 2017 14:30:41 +0800 Subject: [PATCH 321/646] =?UTF-8?q?1067041567=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=EF=BC=8C=E5=AE=9E=E7=8E=B0=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RemoteSystemsTempFiles/.project | 12 ++ group27/1067041567/TestColleaction/.classpath | 6 + group27/1067041567/TestColleaction/.gitignore | 1 + group27/1067041567/TestColleaction/.project | 17 ++ .../.settings/org.eclipse.jdt.core.prefs | 11 ++ .../src/cn/task1/ArrayList.java | 100 ++++++++++++ .../src/cn/task1/LinkedList.java | 146 ++++++++++++++++++ .../TestColleaction/src/cn/task1/List.java | 14 ++ .../TestColleaction/src/cn/task1/Queue.java | 115 ++++++++++++++ .../TestColleaction/src/cn/task1/Stack.java | 68 ++++++++ .../TestColleaction/src/cn/task1/Test.java | 20 +++ 11 files changed, 510 insertions(+) create mode 100644 group27/1067041567/RemoteSystemsTempFiles/.project create mode 100644 group27/1067041567/TestColleaction/.classpath create mode 100644 group27/1067041567/TestColleaction/.gitignore create mode 100644 group27/1067041567/TestColleaction/.project create mode 100644 group27/1067041567/TestColleaction/.settings/org.eclipse.jdt.core.prefs create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/ArrayList.java create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/LinkedList.java create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/List.java create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/Queue.java create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/Stack.java create mode 100644 group27/1067041567/TestColleaction/src/cn/task1/Test.java diff --git a/group27/1067041567/RemoteSystemsTempFiles/.project b/group27/1067041567/RemoteSystemsTempFiles/.project new file mode 100644 index 0000000000..5447a64fa9 --- /dev/null +++ b/group27/1067041567/RemoteSystemsTempFiles/.project @@ -0,0 +1,12 @@ + + + RemoteSystemsTempFiles + + + + + + + org.eclipse.rse.ui.remoteSystemsTempNature + + diff --git a/group27/1067041567/TestColleaction/.classpath b/group27/1067041567/TestColleaction/.classpath new file mode 100644 index 0000000000..fb565a588d --- /dev/null +++ b/group27/1067041567/TestColleaction/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/group27/1067041567/TestColleaction/.gitignore b/group27/1067041567/TestColleaction/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group27/1067041567/TestColleaction/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group27/1067041567/TestColleaction/.project b/group27/1067041567/TestColleaction/.project new file mode 100644 index 0000000000..955a5e1e5d --- /dev/null +++ b/group27/1067041567/TestColleaction/.project @@ -0,0 +1,17 @@ + + + TestColleaction + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group27/1067041567/TestColleaction/.settings/org.eclipse.jdt.core.prefs b/group27/1067041567/TestColleaction/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..7341ab1683 --- /dev/null +++ b/group27/1067041567/TestColleaction/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/group27/1067041567/TestColleaction/src/cn/task1/ArrayList.java b/group27/1067041567/TestColleaction/src/cn/task1/ArrayList.java new file mode 100644 index 0000000000..b1f4e43e1d --- /dev/null +++ b/group27/1067041567/TestColleaction/src/cn/task1/ArrayList.java @@ -0,0 +1,100 @@ +package cn.task1; + +import java.util.LinkedList; + +public class ArrayList implements List { + + int size; + Object[] obj; + + public ArrayList(){ + size = 0; + obj = new Object[size]; + } + + @Override + public void add(Object object) { + if(size==0){ + obj = new Object[1]; + obj[0] = object; + size = 1; + }else{ + Object[] temp = new Object[size+1]; +// for(int k =0;kindex){ + temp[k-1] = obj[k]; + } + } + obj = temp; + size--; + } + + @Override + public int size() { + return size; + } + + @Override + public boolean isEmpty() { + if(size>0){ + return true; + } + return false; + } + + public void set(int index,Object object){ + Object[] temp = new Object[size+1]; + for(int k=0;kindex){ + temp[k] = obj[k-1]; + } + } + obj = temp; + size++; + } + + + public static void main(String[] args) { + ArrayList list = new ArrayList(); + + list.add("d"); + list.add("dd"); + list.add("cc"); + list.remove(2); + list.set(1, "dwe"); + + System.out.println(list.get(0)); + System.out.println(list.get(1)); + System.out.println(list.get(2)); + System.out.println(list.size()); + System.out.println(list.isEmpty()); + + } + +} diff --git a/group27/1067041567/TestColleaction/src/cn/task1/LinkedList.java b/group27/1067041567/TestColleaction/src/cn/task1/LinkedList.java new file mode 100644 index 0000000000..283129ddd8 --- /dev/null +++ b/group27/1067041567/TestColleaction/src/cn/task1/LinkedList.java @@ -0,0 +1,146 @@ +package cn.task1; + +public class LinkedList{ + + Node head; + int size; + + public LinkedList(){ + head = new Node(); + this.size = 0; + } + + public void add(Object data) { + Node temp = head; + while(temp.next != null){ + temp = temp.next; + } + temp.next = new Node(data); + size++; + } + + public void set(int index,Object obj){ + try { + Node temp = new Node(obj); + Node pre = null; + if (index > 0) { + pre = getNode(index - 1); + } else { + pre = head; + } + Node last = getNode(index); + pre.next = temp; + temp.next = last; + size++; + } catch (Exception e) { + // TODO: handle exception + try { + throw new Exception("瀛樺湪寮傚父閿欒锛"); + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + } + + + public Object get(int index) { + Node temp = head; + if(index>=size){ + throw new ArrayIndexOutOfBoundsException("瓒呭嚭鑼冨洿锛"); + } + for(int k=0;k=size){ + throw new ArrayIndexOutOfBoundsException("瓒呭嚭鑼冨洿锛"); + } + for(int k=0;k=size){ + throw new ArrayIndexOutOfBoundsException("瓒呭嚭鑼冨洿锛"); + } + for(int k=0;k0){ + return true; + }else{ + return false; + } + } + + public void clear(){ + head.next = null; + size=0; + } + + public static void main(String[] args) { + LinkedList list = new LinkedList(); + list.add("aa"); + list.add("bb"); + list.add("cc"); + list.add("dd"); + list.add("ff"); + list.set(4, "4546"); +// list.remove(2);list.remove(2); + System.out.println(list.size()); + System.out.println(list.get(0)); + System.out.println(list.get(1)); + System.out.println(list.get(2)); + System.out.println(list.get(3)); + System.out.println(list.get(4)); + System.out.println(list.get(5)); + System.out.println(list.isEmpty()); + list.clear(); + System.out.println(list.isEmpty()); + } + +} + + +class Node{ + + Object obj; + Node next; + + public Node(){ + this.obj = null; + this.next = null; + } + + public Node(Object obj){ + this.obj = obj; + this.next = null; + } + +} diff --git a/group27/1067041567/TestColleaction/src/cn/task1/List.java b/group27/1067041567/TestColleaction/src/cn/task1/List.java new file mode 100644 index 0000000000..d75d579c80 --- /dev/null +++ b/group27/1067041567/TestColleaction/src/cn/task1/List.java @@ -0,0 +1,14 @@ +package cn.task1; + +public interface List { + + public void add(Object obj); + + public Object get(int index); + + public void remove(int index); + + public int size(); + + public boolean isEmpty(); +} diff --git a/group27/1067041567/TestColleaction/src/cn/task1/Queue.java b/group27/1067041567/TestColleaction/src/cn/task1/Queue.java new file mode 100644 index 0000000000..30a5743ae4 --- /dev/null +++ b/group27/1067041567/TestColleaction/src/cn/task1/Queue.java @@ -0,0 +1,115 @@ +package cn.task1; + +import java.util.Arrays; + +public class Queue { + + private static final int CAPACITY = 1024; + private static int capacity; + private static int front; + private static int tail; + private static Object[] array; + + public Queue() { + this.capacity = CAPACITY; + array = new Object[capacity]; + front = tail = 0; + } + + public static int getSize() { + if (isEmpty()){ + return 0; + }else{ + return (capacity + tail - front) % capacity; + } + } + + + public static boolean isEmpty() { + return (front == tail); + } + + //杩涙爤 + public static void enqueue(Object element) throws ExceptionQueueFull { + if (getSize() == capacity - 1){ + throw new ExceptionQueueFull("Queue is full"); + } + array[tail] = element; + tail = (tail + 1) % capacity; + } + + //鍑烘爤 + public static Object dequeue() throws ExceptionQueueEmpty { + Object element; + if(isEmpty()){ + throw new ExceptionQueueEmpty("Queue is empty"); + } + element = array[front]; + front = (front + 1) % capacity; + return element; + } + + + public static Object frontElement() throws ExceptionQueueEmpty { + if(isEmpty()){ + throw new ExceptionQueueEmpty("Queue is empty"); + } + return array[front]; + } + + public static void getAllElements() { + Object[] arrayList = new Object[getSize()]; + for(int i=front,j=0;j-1); + } + + public int search(Object obj){ + + return -1; + } + + public static void main(String[] args) { + + Stack s = new Stack(); + + s.push("1"); + s.push("2"); + s.push("12"); + s.push("3"); + s.push("34"); + + System.out.println(s.pop()+" "+s.isEmpty()); + + System.out.println(s.size()+" "+s.peek()); + + } +} diff --git a/group27/1067041567/TestColleaction/src/cn/task1/Test.java b/group27/1067041567/TestColleaction/src/cn/task1/Test.java new file mode 100644 index 0000000000..1487409c0e --- /dev/null +++ b/group27/1067041567/TestColleaction/src/cn/task1/Test.java @@ -0,0 +1,20 @@ +package cn.task1; + +import java.util.Queue; +import java.util.Stack; + +public class Test { + public static void main(String[] args) { + + Stack obj = new Stack<>(); + //Queue queue = new + + obj.push("a"); + obj.push("b"); + obj.push("c"); + obj.push("d"); + obj.peek(); + System.out.println(obj.peek()); + System.out.println(obj.size()); + } +} From cc71efb5668b6d445ba650592e83eb5ff4e5afab Mon Sep 17 00:00:00 2001 From: DonaldY <448641125@qq.com> Date: Sun, 12 Mar 2017 14:38:00 +0800 Subject: [PATCH 322/646] first week homework --- group24/.gitignore | 21 + group24/448641125/.gitignore | 27 ++ .../src/com/donaldy/basic/ArrayList.java | 56 +++ .../src/com/donaldy/basic/BinaryTreeNode.java | 54 +++ .../src/com/donaldy/basic/Iterator.java | 7 + .../src/com/donaldy/basic/LinkedList.java | 377 ++++++++++++++++++ .../448641125/src/com/donaldy/basic/List.java | 9 + .../src/com/donaldy/basic/Queue.java | 22 + .../src/com/donaldy/basic/Stack.java | 25 ++ .../src/com/donaldy/test/ArrayListTest.java | 50 +++ .../com/donaldy/test/BinaryTreeNodeTest.java | 39 ++ .../src/com/donaldy/test/LinkedListTest.java | 195 +++++++++ .../src/com/donaldy/test/QueueTest.java | 38 ++ .../src/com/donaldy/test/StackTest.java | 49 +++ .../coding2017/basic/BinaryTreeNode.java | 32 ++ .../donaldy/coding2017/basic/Iterator.java | 7 + .../donaldy/coding2017/basic/LinkedList.java | 124 ++++++ .../com/donaldy/coding2017/basic/List.java | 9 + .../com/donaldy/coding2017/basic/Queue.java | 19 + .../com/donaldy/coding2017/basic/Stack.java | 22 + 20 files changed, 1182 insertions(+) create mode 100644 group24/.gitignore create mode 100644 group24/448641125/.gitignore create mode 100644 group24/448641125/src/com/donaldy/basic/ArrayList.java create mode 100644 group24/448641125/src/com/donaldy/basic/BinaryTreeNode.java create mode 100644 group24/448641125/src/com/donaldy/basic/Iterator.java create mode 100644 group24/448641125/src/com/donaldy/basic/LinkedList.java create mode 100644 group24/448641125/src/com/donaldy/basic/List.java create mode 100644 group24/448641125/src/com/donaldy/basic/Queue.java create mode 100644 group24/448641125/src/com/donaldy/basic/Stack.java create mode 100644 group24/448641125/src/com/donaldy/test/ArrayListTest.java create mode 100644 group24/448641125/src/com/donaldy/test/BinaryTreeNodeTest.java create mode 100644 group24/448641125/src/com/donaldy/test/LinkedListTest.java create mode 100644 group24/448641125/src/com/donaldy/test/QueueTest.java create mode 100644 group24/448641125/src/com/donaldy/test/StackTest.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java create mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java diff --git a/group24/.gitignore b/group24/.gitignore new file mode 100644 index 0000000000..2a5296f902 --- /dev/null +++ b/group24/.gitignore @@ -0,0 +1,21 @@ +*.class +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +#ide config +.metadata +.recommenders +.idea/ +*.iml +rebel.* +.rebel.* + +target diff --git a/group24/448641125/.gitignore b/group24/448641125/.gitignore new file mode 100644 index 0000000000..0aaf6d4349 --- /dev/null +++ b/group24/448641125/.gitignore @@ -0,0 +1,27 @@ +*.class +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +#ide config +.metadata +.recommenders +.idea/ +*.iml +rebel.* +.rebel.* + +# Idea +*.iml +*.ipr +*.iws +.idea + +target diff --git a/group24/448641125/src/com/donaldy/basic/ArrayList.java b/group24/448641125/src/com/donaldy/basic/ArrayList.java new file mode 100644 index 0000000000..b4528176c1 --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/ArrayList.java @@ -0,0 +1,56 @@ +package com.donaldy.basic; + +/** + * Created by donal on 2017/3/7. + */ + + +public class ArrayList implements List { + + private int size = 0; + + private final int MAXNSIZE = 100; + + private Object[] elementData = new Object[MAXNSIZE]; + + public void add(Object o){ + ensureCupacity(size + 1); + elementData[size++] = o; + } + + public void add(int index, Object o){ + ensureCupacity(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = o; + size++; + } + + private void ensureCupacity(int capacitySize){ + if (capacitySize >= MAXNSIZE) + throw new RuntimeException(); + } + + public void clear() { + for (int i = 0 ; i < size() ; ++ i) + elementData[i] = null; + } + + public Object get(int index){ + if (index >= MAXNSIZE || index < 0) + throw new RuntimeException(); + return elementData[index]; + } + + public Object remove(int index){ + ensureCupacity(index); + Object oldElem = elementData[index]; + System.arraycopy(elementData, index + 1, elementData, index, size - index); + elementData[size--] = null; + return oldElem; + } + + public int size(){ + return size; + } + +} \ No newline at end of file diff --git a/group24/448641125/src/com/donaldy/basic/BinaryTreeNode.java b/group24/448641125/src/com/donaldy/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..6594997be0 --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/BinaryTreeNode.java @@ -0,0 +1,54 @@ +package com.donaldy.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(Object data) { + this.data = data; + left = null; + right = null; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o) { + BinaryTreeNode bNode = new BinaryTreeNode(o); + insertNewNode(bNode); + return bNode; + } + private void insertNewNode(BinaryTreeNode node) { + if ((int)data <= (int)node.getData()) { + if (this.right != null) + this.right.insertNewNode(node); + else + this.right = node; + } else { + if (this.left != null) + this.left.insertNewNode(node); + else + this.left.insertNewNode(node); + } + } + +} diff --git a/group24/448641125/src/com/donaldy/basic/Iterator.java b/group24/448641125/src/com/donaldy/basic/Iterator.java new file mode 100644 index 0000000000..aa64981e3e --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.donaldy.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/448641125/src/com/donaldy/basic/LinkedList.java b/group24/448641125/src/com/donaldy/basic/LinkedList.java new file mode 100644 index 0000000000..51cbc74aac --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/LinkedList.java @@ -0,0 +1,377 @@ +package com.donaldy.basic; + +import java.util.*; + +/** + * Created by donal on 2017/3/9. + * single LinkedList + */ +public class LinkedList implements List { + + private int size; + private Node head; + private Node last; + + public void add(Object o) { + addLast(o); + } + + public void addLast(Object o) { + final Node l = last; + final Node newNode = new Node(o, null); + last = newNode; + if (l == null) + head = newNode; + else + l.next = newNode; + size ++; + } + + public void add(int index , Object o) { + makeSure(index); + if (index == 0){ + addFirst(o); + }else { + final Node preNode = getPreNode(index); + final Node nextNode = preNode.next; + final Node newNode = new Node(o, nextNode); + preNode.next = newNode; + } + } + + public void addFirst(Object o){ + final Node h = head; + final Node newNode = new Node(o, head); + head = newNode; + if (h == null) + last = newNode; + size++; + } + + private Node getPreNode(int index) { + Node preNode = head; + for (int i = 0 ; i != index - 1 && preNode != null; ++i) { + preNode = preNode.next; + } + return preNode; + } + + private void makeSure(int index) { + if (index >= size || index < 0) + throw new IndexOutOfBoundsException(); + } + + public Object get(int index) { + Object targetData = null; + makeSure(index); + Iterator iterator = iterator(); + for (int i = 0; iterator.hasNext(); ++i, iterator.next()) { + if (i == index) { + targetData = iterator.next(); + break; + } + } + return targetData; + } + + public Object remove(int index) { + if (size <= 0) + throw new IndexOutOfBoundsException(); + makeSure(index); + Object oldData; + if (index == 0) { + oldData = removeFirst(); + } else if (index == size - 1) { + oldData = removeLast(); + } else { + final Node preNode = getPreNode(index); + final Node nextNode = preNode.next.next; + oldData = preNode.next.data; + preNode.next = nextNode; + size --; + } + return oldData; + } + + public Object removeFirst() { + Object oldData; + final Node h = head.next; + oldData = head.data; + head = h; + size --; + return oldData; + } + + public Object removeLast() { + Object oldData; + final Node l = getPreNode(size); + oldData = last.data; + last = l; + size --; + return oldData; + } + + public int size(){ + return size; + } + + + public Iterator iterator() { + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator{ + private Node pointer = head; + private int nextIndex = 0; + + @Override + public boolean hasNext() { + return nextIndex < size; + } + + @Override + public Object next() { + if (!hasNext()) + throw new NoSuchElementException(); + Object nodeData = pointer.data; + pointer = pointer.next; + nextIndex ++; + return nodeData; + } + } + + private static class Node { + Object data; + Node next; + Node(Object data, Node next) { + this.data = data; + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node node = last; + Node preNode = head; + last = head; + head = node; + node = preNode.next; + Node nextNode; + preNode.next = null; + while (node != null) { + nextNode = node.next; + node.next = preNode; + preNode = node; + node = nextNode; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf() { + int half = size / 2; + Node node = head; + while (half != 0 ) { + head = head.next; + node.next = null; + node = head; + half --; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length) { + if (i + length != size) + makeSure(i + length); + Node node = head; + Node preNode = head; + + if (i > 0) { + for (int j = 0; j < i; ++j) { + preNode = node; + node = node.next; + } + } + + Node tempNode; + for (int j = 0; j < length; ++j) { + tempNode = node.next; + node.next = null; + node = tempNode; + size --; + } + + if (i == 0) { + head = node; + } else { + preNode.next = node; + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list) { + int array[] = new int[list.size()]; + int index = 0; + int i = 0; + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + i = (int)iterator.next(); + makeSure(i); + array[index ++] = (int)get(i); + } + return array; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * (閫傜敤浜巐ist 鏄 List鐨勭湡瀛愰泦) + * @param list + */ + public void subtract(LinkedList list) { + Iterator iterator = list.iterator(); + int index = 0; + Object element; + while (iterator.hasNext()) { + element = iterator.next(); + for (int i = index; i < size; ++i) { + if (element == get(i)) { + index = i; + break; + } + } + remove(index); + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Set set = new HashSet(); + Object element; + int index = 0; + Node node = head; + while (node != null) { + element = node.data; + if (set.contains(element)) { + System.out.println("remove !"); + remove(index); + }else { + set.add(element); + index++; + } + node = node.next; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if (max < min || max < 0 || min < 0) + throw new RuntimeException(); + Node startNode, endNode, node, preNode; + startNode = head; + endNode = last; + node = head; + preNode = node; + int element; + boolean flagS = true, flagT = true; + while (node != null) { + element = (int) node.data; + if (element > min && flagS) { + startNode = node; + flagS = false; + } + if (element >= max && flagT) { + endNode = node; + flagT = false; + } + if (flagS) + preNode = node; + node = node.next; + } + if (head == startNode) { + head = endNode; + } else { + if (last == endNode) { + last = preNode; + preNode.next = null; + endNode = null; + } else { + preNode.next = endNode; + } + } + Node tempNode; + while (startNode != endNode) { + tempNode = startNode; + startNode = startNode.next; + tempNode.next = null; + size --; + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list) { + LinkedList newLink = new LinkedList(); + Iterator it1 = iterator(); + Iterator it2 = list.iterator(); + int element1 = (int)it1.next(); + int element2 = (int)it2.next(); + while (it1.hasNext() && it2.hasNext()) { + if (element1 < element2) { + newLink.add(element1); + element1 = (int) it1.next(); + } else { + newLink.add(element2); + element2 = (int) it2.next(); + } + } + + while (it1.hasNext()) { + if (element1 == 0) + element1 = (int)it1.next(); + newLink.add(element1); + element1 = 0; + } + while (it2.hasNext()) { + if (element2 == 0) + element2 = (int)it2.next(); + newLink.add(element2); + element2 = 0; + } + if (element1 < element2) + newLink.add(element2); + else if (element2 < element1) + newLink.add(element1); + + return newLink; + } +} diff --git a/group24/448641125/src/com/donaldy/basic/List.java b/group24/448641125/src/com/donaldy/basic/List.java new file mode 100644 index 0000000000..b4af6b7948 --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/List.java @@ -0,0 +1,9 @@ +package com.donaldy.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/448641125/src/com/donaldy/basic/Queue.java b/group24/448641125/src/com/donaldy/basic/Queue.java new file mode 100644 index 0000000000..1dfa6d78a3 --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/Queue.java @@ -0,0 +1,22 @@ +package com.donaldy.basic; + +public class Queue { + + private LinkedList linkedList = new LinkedList(); + + public void enQueue(Object o) { + linkedList.add(o); + } + + public Object deQueue() { + return linkedList.remove(0); + } + + public boolean isEmpty() { + return size() == 0; + } + + public int size() { + return linkedList.size(); + } +} diff --git a/group24/448641125/src/com/donaldy/basic/Stack.java b/group24/448641125/src/com/donaldy/basic/Stack.java new file mode 100644 index 0000000000..22fcbbf4bd --- /dev/null +++ b/group24/448641125/src/com/donaldy/basic/Stack.java @@ -0,0 +1,25 @@ +package com.donaldy.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + elementData.add(o); + } + + public Object pop() { + return elementData.remove(size() - 1); + } + + public Object peek() { + return elementData.get(size() - 1); + } + + public boolean isEmpty() { + return size() == 0; + } + + public int size(){ + return elementData.size(); + } +} diff --git a/group24/448641125/src/com/donaldy/test/ArrayListTest.java b/group24/448641125/src/com/donaldy/test/ArrayListTest.java new file mode 100644 index 0000000000..068aa0236e --- /dev/null +++ b/group24/448641125/src/com/donaldy/test/ArrayListTest.java @@ -0,0 +1,50 @@ +package com.donaldy.test; + +import com.donaldy.basic.ArrayList; +import org.junit.*; + +import static org.junit.Assert.assertEquals; + + +/** + * Created by donal on 2017/3/7. + */ +public class ArrayListTest { + + ArrayList arrayList; + + @Before + public void before() throws Exception { + arrayList = new ArrayList(); + arrayList.add(98); + } + + @Test + public void testAddWithArg() { + assertEquals(98, arrayList.get(0)); + } + + @Test(expected = RuntimeException.class) + public void testRuntimeException(){ + arrayList.get(100); + arrayList.get(-1); + } + + @Test + public void testAddWithArgs() { + arrayList.add(0, 99); + assertEquals(99, arrayList.get(0)); + assertEquals(98, arrayList.get(1)); + } + + @Test + public void testRemove(){ + arrayList.add(88); + arrayList.add(78); + assertEquals(3, arrayList.size()); + assertEquals(88, arrayList.remove(1)); + assertEquals(78, arrayList.get(1)); + assertEquals(2, arrayList.size()); + } + +} diff --git a/group24/448641125/src/com/donaldy/test/BinaryTreeNodeTest.java b/group24/448641125/src/com/donaldy/test/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..585f4d63fb --- /dev/null +++ b/group24/448641125/src/com/donaldy/test/BinaryTreeNodeTest.java @@ -0,0 +1,39 @@ +package com.donaldy.test; + +import com.donaldy.basic.BinaryTreeNode; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import static org.junit.Assert.assertEquals; + +/** + * Created by donal on 2017/3/11. + */ +public class BinaryTreeNodeTest { + + private BinaryTreeNode root = new BinaryTreeNode(10); + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void before() { + BinaryTreeNode node = new BinaryTreeNode(4); + BinaryTreeNode node2 = new BinaryTreeNode(13); + root.setLeft(node); + root.setRight(node2); + node.setLeft(new BinaryTreeNode(3)); + node2.setRight(new BinaryTreeNode(19)); + } + + @Test + public void testSet() { + root.getLeft().setData(4); + assertEquals(4, root.getLeft().getData()); + assertEquals(13, root.getRight().getData()); + assertEquals(5, root.insert(5).getData()); + } + +} diff --git a/group24/448641125/src/com/donaldy/test/LinkedListTest.java b/group24/448641125/src/com/donaldy/test/LinkedListTest.java new file mode 100644 index 0000000000..71eda580de --- /dev/null +++ b/group24/448641125/src/com/donaldy/test/LinkedListTest.java @@ -0,0 +1,195 @@ +package com.donaldy.test; + +import com.donaldy.basic.LinkedList; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; + +/** + * Created by donal on 2017/3/9. + */ +public class LinkedListTest { + + private LinkedList linkedList; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void before() throws Exception { + linkedList = new LinkedList(); + for (String s : "GEGE lala haha momo dada!".split(" ")) + linkedList.add(s); + } + + @Test + public void testAddWithArg() { + assertEquals("GEGE", linkedList.get(0)); + assertEquals("dada!", linkedList.get(4)); + + } + + @Test + public void testAddWithArgs() { + String str = "kunkun"; + linkedList.add(3, str); + assertEquals(str, linkedList.get(3)); + linkedList.add(0, str); + assertEquals(str, linkedList.get(0)); + } + + @Test + public void testRuntimeException() { + thrown.expect(RuntimeException.class); + linkedList.get(10); + } + + @Test + public void testRuntimeException2() { + thrown.expect(IndexOutOfBoundsException.class); + linkedList.get(-1); + } + + @Test + public void testRemove() { + assertEquals("GEGE", linkedList.remove(0)); + assertEquals("dada!", linkedList.remove(3)); + assertEquals("haha", linkedList.remove(1)); + + } + + @Test + public void testRuntimeExceptionByremove() { + thrown.expect(IndexOutOfBoundsException.class); + LinkedList linkedList2 = new LinkedList(); + linkedList2.remove(0); + } + + @Test + public void testSize() { + assertEquals(5, linkedList.size()); + } + + @Test + public void testReverse() { + linkedList.reverse(); + assertEquals("GEGE", linkedList.get(4)); + assertEquals("lala", linkedList.get(3)); + assertEquals("haha", linkedList.get(2)); + assertEquals("momo", linkedList.get(1)); + assertEquals("dada!", linkedList.get(0)); + } + + @Test + public void testRemoveFirstHalf() { + linkedList.removeFirstHalf(); + assertEquals("haha", linkedList.get(0)); + assertEquals("momo", linkedList.get(1)); + assertEquals("dada!", linkedList.get(2)); + } + + @Test + public void testRemoveWithArgs() { + linkedList.remove(1, 2); + assertEquals("GEGE", linkedList.get(0)); + assertEquals("momo", linkedList.get(1)); + assertEquals("dada!", linkedList.get(2)); + } + + @Test + public void testRemoveWithArgs2() { + linkedList.remove(0, 2); + assertEquals("haha", linkedList.get(0)); + assertEquals("momo", linkedList.get(1)); + assertEquals("dada!", linkedList.get(2)); + } + + @Test + public void testRemoveWithArgs3() { + linkedList.remove(4, 1); + int size = linkedList.size(); + System.out.println(); + assertEquals("momo", linkedList.get(size - 1)); + } + + @Test + public void testGetElements() { + LinkedList link = new LinkedList(); + LinkedList linkB = new LinkedList(); + int test[] = {101, 301, 401, 601}; + link.add(11); + link.add(101); + link.add(201); + link.add(301); + link.add(401); + link.add(501); + link.add(601); + link.add(701); + linkB.add(1); + linkB.add(3); + linkB.add(4); + linkB.add(6); + assertArrayEquals(test, link.getElements(linkB)); + } + + @Test + public void testSubtract() { + LinkedList link = new LinkedList(); + LinkedList linkB = new LinkedList(); + for (int i = 0; i < 5; ++i) + linkB.add(i); + for (int i = 0; i < 10; ++i) + link.add(i); + link.subtract(linkB); + assertEquals(5, link.size()); + assertEquals(5, link.get(0)); + assertEquals(6, link.get(1)); + assertEquals(7, link.get(2)); + assertEquals(8, link.get(3)); + assertEquals(9, link.get(4)); + } + + @Test + public void testRemoveDuplicateValues() { + linkedList.add("GEGE"); + linkedList.add("haha"); + linkedList.add("dada!"); + linkedList.removeDuplicateValues(); + assertEquals(5, linkedList.size()); + assertEquals("GEGE", linkedList.get(0)); + assertEquals("haha", linkedList.get(2)); + assertEquals("dada!", linkedList.get(4)); + } + + @Test + public void testRemoveRange() { + LinkedList link = new LinkedList(); + for (int i = 10; i < 30; ++i) { + link.add(i); + } + link.removeRange(15, 19); + assertEquals(17, link.size()); + link.removeRange(9, 13); + assertEquals(14, link.size()); + assertEquals(13, (int)link.get(0)); + link.removeRange(26, 30); + assertEquals(11, link.size()); + assertEquals(26, (int)link.get(10)); + } + + @Test + public void testIntersection() { + LinkedList link = new LinkedList(); + LinkedList linkB = new LinkedList(); + for (int i = 10; i < 30; ++i) + link.add(i); + for (int j = 5; j < 20; ++j) + linkB.add(j); + LinkedList newLink = link.intersection(linkB); + assertEquals(35, newLink.size()); + } +} diff --git a/group24/448641125/src/com/donaldy/test/QueueTest.java b/group24/448641125/src/com/donaldy/test/QueueTest.java new file mode 100644 index 0000000000..7ae2701c8a --- /dev/null +++ b/group24/448641125/src/com/donaldy/test/QueueTest.java @@ -0,0 +1,38 @@ +package com.donaldy.test; + +import com.donaldy.basic.Queue; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import static org.junit.Assert.assertEquals; + + +/** + * Created by donal on 2017/3/11. + */ +public class QueueTest { + + private Queue queue; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void before() { + queue = new Queue(); + for (int i = 0 ; i < 3; ++i) + queue.enQueue(i); + } + + @Test + public void testRuntimeException() { + assertEquals(3, queue.size()); + assertEquals(false, queue.isEmpty()); + for (int i = 0; i < 3; ++i) + assertEquals(i, (int) queue.deQueue()); + thrown.expect(RuntimeException.class); + queue.deQueue(); + } +} diff --git a/group24/448641125/src/com/donaldy/test/StackTest.java b/group24/448641125/src/com/donaldy/test/StackTest.java new file mode 100644 index 0000000000..1985cecef0 --- /dev/null +++ b/group24/448641125/src/com/donaldy/test/StackTest.java @@ -0,0 +1,49 @@ +package com.donaldy.test; + +import com.donaldy.basic.Stack; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import static org.junit.Assert.assertEquals; + +/** + * Created by donal on 2017/3/11. + */ +public class StackTest { + + private Stack stack; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Before + public void before() { + stack = new Stack(); + for (int i = 0; i < 3; ++i) + stack.push(i); + } + + + @Test + public void testPeek() { + assertEquals(false, stack.isEmpty()); + assertEquals(3, stack.size()); + assertEquals(2, (int)stack.peek()); + } + + @Test + public void testPop() { + assertEquals(2, (int)stack.pop()); + } + + @Test + public void testRuntimeException() { + for (int i = 0; i < 3; ++i) + stack.pop(); + thrown.expect(RuntimeException.class); + stack.pop(); + } + +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..4fdb03db8a --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java @@ -0,0 +1,124 @@ +package com.coding.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java new file mode 100644 index 0000000000..36e516e266 --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java new file mode 100644 index 0000000000..a5a04de76d --- /dev/null +++ b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From ca0704aab1ba72866568719eaa613a2e343db39a Mon Sep 17 00:00:00 2001 From: DonaldY <448641125@qq.com> Date: Sun, 12 Mar 2017 14:44:12 +0800 Subject: [PATCH 323/646] IDEA error --- .../coding2017/basic/BinaryTreeNode.java | 32 ----- .../donaldy/coding2017/basic/Iterator.java | 7 - .../donaldy/coding2017/basic/LinkedList.java | 124 ------------------ .../com/donaldy/coding2017/basic/List.java | 9 -- .../com/donaldy/coding2017/basic/Queue.java | 19 --- .../com/donaldy/coding2017/basic/Stack.java | 22 ---- 6 files changed, 213 deletions(-) delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java delete mode 100644 group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java deleted file mode 100644 index d7ac820192..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/BinaryTreeNode.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.coding.basic; - -public class BinaryTreeNode { - - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public Object getData() { - return data; - } - public void setData(Object data) { - this.data = data; - } - public BinaryTreeNode getLeft() { - return left; - } - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - public BinaryTreeNode getRight() { - return right; - } - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o){ - return null; - } - -} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java deleted file mode 100644 index 06ef6311b2..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.coding.basic; - -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java deleted file mode 100644 index 4fdb03db8a..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/LinkedList.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.coding.basic; - - - -public class LinkedList implements List { - - private Node head; - - public void add(Object o){ - - } - public void add(int index , Object o){ - - } - public Object get(int index){ - return null; - } - public Object remove(int index){ - return null; - } - - public int size(){ - return -1; - } - - public void addFirst(Object o){ - - } - public void addLast(Object o){ - - } - public Object removeFirst(){ - return null; - } - public Object removeLast(){ - return null; - } - public Iterator iterator(){ - return null; - } - - - private static class Node{ - Object data; - Node next; - - } - - /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public static int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } -} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java deleted file mode 100644 index 10d13b5832..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.coding.basic; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java deleted file mode 100644 index 36e516e266..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Queue.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.coding.basic; - -public class Queue { - - public void enQueue(Object o){ - } - - public Object deQueue(){ - return null; - } - - public boolean isEmpty(){ - return false; - } - - public int size(){ - return -1; - } -} diff --git a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java b/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java deleted file mode 100644 index a5a04de76d..0000000000 --- a/group24/448641125Learning/src/com/donaldy/coding2017/basic/Stack.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.coding.basic; - -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ - } - - public Object pop(){ - return null; - } - - public Object peek(){ - return null; - } - public boolean isEmpty(){ - return false; - } - public int size(){ - return -1; - } -} From 1c68a382095ef4570ec4a75d7fd5e360cda5a004 Mon Sep 17 00:00:00 2001 From: maishihang <446031103@qq.com> Date: Sun, 12 Mar 2017 14:48:03 +0800 Subject: [PATCH 324/646] =?UTF-8?q?=E7=AE=97=E6=B3=95=E5=B7=B2=E5=81=9A?= =?UTF-8?q?=EF=BC=8C=E7=BA=BF=E7=A8=8B=E6=9C=AA=E5=81=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 绠楁硶宸插仛锛岀嚎绋嬫湭鍋 --- .../coderising/download/DownloadThread.java | 20 +++ .../coderising/download/FileDownloader.java | 73 +++++++++ .../download/FileDownloaderTest.java | 59 +++++++ .../coderising/download/api/Connection.java | 23 +++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 27 ++++ .../download/impl/ConnectionManagerImpl.java | 15 ++ .../src/com/coding/basic/ArrayList.java | 68 +++++--- .../src/com/coding/basic/LinkedList.java | 145 ++++++++++++++++++ 11 files changed, 426 insertions(+), 24 deletions(-) create mode 100644 group12/446031103/src/com/coderising/download/DownloadThread.java create mode 100644 group12/446031103/src/com/coderising/download/FileDownloader.java create mode 100644 group12/446031103/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group12/446031103/src/com/coderising/download/api/Connection.java create mode 100644 group12/446031103/src/com/coderising/download/api/ConnectionException.java create mode 100644 group12/446031103/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group12/446031103/src/com/coderising/download/api/DownloadListener.java create mode 100644 group12/446031103/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group12/446031103/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group12/446031103/src/com/coderising/download/DownloadThread.java b/group12/446031103/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..900a3ad358 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,20 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + + } +} diff --git a/group12/446031103/src/com/coderising/download/FileDownloader.java b/group12/446031103/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..c3c8a3f27d --- /dev/null +++ b/group12/446031103/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group12/446031103/src/com/coderising/download/FileDownloaderTest.java b/group12/446031103/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4ff7f46ae0 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group12/446031103/src/com/coderising/download/api/Connection.java b/group12/446031103/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group12/446031103/src/com/coderising/download/api/ConnectionException.java b/group12/446031103/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ b/group12/446031103/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group12/446031103/src/com/coderising/download/api/ConnectionManager.java b/group12/446031103/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group12/446031103/src/com/coderising/download/api/DownloadListener.java b/group12/446031103/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group12/446031103/src/com/coderising/download/impl/ConnectionImpl.java b/group12/446031103/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..36a9d2ce15 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group12/446031103/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/446031103/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..172371dd55 --- /dev/null +++ b/group12/446031103/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} diff --git a/group12/446031103/src/com/coding/basic/ArrayList.java b/group12/446031103/src/com/coding/basic/ArrayList.java index c627a7d2fa..bc3d75c3f6 100644 --- a/group12/446031103/src/com/coding/basic/ArrayList.java +++ b/group12/446031103/src/com/coding/basic/ArrayList.java @@ -2,6 +2,8 @@ import java.util.Arrays; + + /** * * arrayList闆嗗悎-鏁扮粍 @@ -11,10 +13,8 @@ * @date 2017骞2鏈21鏃 涓嬪崍3:49:24 */ public class ArrayList implements List { - // 璁板綍ArrayList闆嗗悎澶у皬 private int size = 0; - // 鍒濆鍖栧瓨鍌ㄦ暟缁 - private Object[] elementData = new Object[100]; + private Object[] elementData = new Object[0]; /** * * 鍚戞渶鍚庢彃鍏ュ厓绱 @@ -24,10 +24,9 @@ public class ArrayList implements List { * @see com.coding.basic.List#add(java.lang.Object) */ public void add(Object o){ - // 鏁扮粍涓嶅鏃跺闀 - growOrNot(size + 1); + ensureCapacity(size + 1); elementData[size] = o; - ++size; + size++; } /** * @@ -40,10 +39,10 @@ public void add(Object o){ */ public void add(int index, Object o){ validate(index); - growOrNot(size + 1); + ensureCapacity(size + 1); System.arraycopy(elementData, index, elementData, index + 1, size - index); elementData[index] = o; - ++size; + size++; } /** * @@ -67,12 +66,12 @@ public Object get(int index){ * @return 鍒犻櫎鐨勫厓绱 * @see com.coding.basic.List#remove(int) */ - public Object remove(int index){ - Object oldValue = elementData[index]; + public Object remove(int index){ validate(index); + Object oldValue = elementData[index]; System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); elementData[size] = null; - --size; + size--; return oldValue; } /** @@ -84,25 +83,24 @@ public Object remove(int index){ * @see com.coding.basic.List#size() */ public int size(){ - return size; + return this.size; } - + /** + * 杩唬 + * @return + */ public Iterator iterator(){ - return null; + return new ArrayListIterator(); } /** - * - * 鍒ゆ柇鏄惁闇瑕佸闀挎暟缁 - * - * @MethodName growOrNot - * @author msh - * @date 2017骞2鏈21鏃 涓嬪崍3:53:29 + * 鍒ゆ柇鏄惁闇瑕佹暟缁勫闀 * @param minCapacity */ - private void growOrNot(int minCapacity) { - // 褰撳鍔犻暱搴﹀ぇ浜庢暟缁勯暱搴︽椂锛屽闀 - if (minCapacity > elementData.length) { - elementData = Arrays.copyOf(elementData, elementData.length * 2); + private void ensureCapacity(int minCapacity) { + if(minCapacity>elementData.length){ + int newCapacity = Math.max(minCapacity, elementData.length*2); + Object[] newElementData = new Object[newCapacity]; + System.arraycopy(elementData, 0, newElementData, 0, elementData.length); } } /** @@ -118,4 +116,26 @@ private void validate(int index) { if (index < 0 || index >= size) throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } + /** + * + * @author Administrator + * + */ + private class ArrayListIterator implements Iterator{ + private int position; + private ArrayList list; + @Override + public boolean hasNext() { + return position < list.size(); + } + + @Override + public Object next() { + if (hasNext()) { + return list.get(position++); + } + return null; + } + + } } diff --git a/group12/446031103/src/com/coding/basic/LinkedList.java b/group12/446031103/src/com/coding/basic/LinkedList.java index de508694a0..33f6d79e65 100644 --- a/group12/446031103/src/com/coding/basic/LinkedList.java +++ b/group12/446031103/src/com/coding/basic/LinkedList.java @@ -1,5 +1,12 @@ package com.coding.basic; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.junit.experimental.theories.Theories; + +import sun.reflect.Reflection; + /** * * LinkedList闆嗗悎-閾 @@ -222,4 +229,142 @@ public Node(Object data, Node next) { this.next = next; } } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + for (int i = size; i <0; i--) { + Node last=(Node) get(i); + if(0==i) + last.next = null; + else + last.next = (Node) get(i-1); + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf(){ + + for (int i = 0; i < size%2; i++) { + remove(i); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + for (int a = i; a < i+length; a++) { + remove(a); + } + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + int [] result =new int[list.size]; + Class callClass=Reflection.getCallerClass(); + for (int i = 0; i < list.size; i++) { + Node node=(Node) list.get(i); + try { + Method method=callClass.getDeclaredMethod("get", new Class[]{int.class}); + result[i]=(int) method.invoke(callClass, new Object[]{node.data}); + } catch (NoSuchMethodException | SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + for (int i = 0; i < list.size; i++) { + Node node=(Node) list.get(i); + for (int j = 0; j < size; j++) { + Node orgNode=(Node) get(i); + if (node.data.equals(orgNode.data)) { + remove(j); + } + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + for (int i = 0; i < size; i++) { + Node node=(Node) get(i); + for (int j = i+1; j < size; j++) { + Node newNode=(Node) get(j); + if(newNode.data.equals(node.data)) + remove(j); + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + for (int i = 0; i < size; i++) { + Node node=(Node) get(i); + if((int)node.data>min && (int)node.data Date: Sun, 12 Mar 2017 15:17:41 +0800 Subject: [PATCH 325/646] homework --- group22/592864103/ArrayList.java | 123 +++++++++++++ group22/592864103/BinaryTreeNode.java | 59 ++++++ group22/592864103/Iterator.java | 7 + group22/592864103/LinkedList.java | 249 ++++++++++++++++++++++++++ group22/592864103/List.java | 9 + group22/592864103/Queue.java | 34 ++++ group22/592864103/Stack.java | 22 +++ 7 files changed, 503 insertions(+) create mode 100644 group22/592864103/ArrayList.java create mode 100644 group22/592864103/BinaryTreeNode.java create mode 100644 group22/592864103/Iterator.java create mode 100644 group22/592864103/LinkedList.java create mode 100644 group22/592864103/List.java create mode 100644 group22/592864103/Queue.java create mode 100644 group22/592864103/Stack.java diff --git a/group22/592864103/ArrayList.java b/group22/592864103/ArrayList.java new file mode 100644 index 0000000000..cf716f728e --- /dev/null +++ b/group22/592864103/ArrayList.java @@ -0,0 +1,123 @@ +import java.util.Arrays; +//import java.util.Objects; + +public class ArrayList implements List { + + //private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o) { + if (o == null) { + System.out.println("浼犲叆瀵硅薄涓嶈兘涓虹┖锛"); + return; + } else { + if (size() == elementData.length) { + Object[] elementData2 = Arrays.copyOf(elementData, ((int) (elementData.length * 1.2))); + elementData2[size()] = o; + elementData = elementData2; + } else { + elementData[size()] = o; + } + } + } + + public void add(int index, Object o) { + if (o == null) { + System.out.println("浼犲叆瀵硅薄涓嶈兘涓虹┖锛"); + return; + } + if ((index > size())) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return; + } else { + if (size() == elementData.length) { + Object[] elementData2 = Arrays.copyOf(elementData, ((int) (elementData.length * 1.2))); + rightShift(elementData2, index); + elementData2[index] = o; + elementData = elementData2; + return; + } else { + rightShift(elementData, index); + elementData[size()] = o; + return; + } + } + } + + public Object get(int index) { + if ((index > size() - 1)) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return null; + } else { + return elementData[index]; + } + } + + public Object remove(int index) { + if (index > size() - 1) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return null; + }else{ + Object o = elementData[index]; + elementData[index]=null; + leftShift(elementData,index); + return o; + } + } + + public int size() { + int n; + for (n = 0; n < elementData.length; n++) { + if (elementData[n] == null) { + break; + } + } + return n; + } + + + public Iterator iterator() { + return new ArrayListIterator(this); + } + + public class ArrayListIterator implements Iterator{ + ArrayList list = new ArrayList(); + int pos = 0; + ArrayListIterator(ArrayList list){ + this.list = list; + } + + @Override + public boolean hasNext() { + if (pos index; k--) { + o[k] = o[k - 1]; + } + } + + public void leftShift(Object[] o, int index) { + for (int k = index; k < size(); k++) { + o[k] = o[k + 1]; + } + } +} diff --git a/group22/592864103/BinaryTreeNode.java b/group22/592864103/BinaryTreeNode.java new file mode 100644 index 0000000000..b6aa3100b6 --- /dev/null +++ b/group22/592864103/BinaryTreeNode.java @@ -0,0 +1,59 @@ +public class BinaryTreeNode { + + private Integer data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Integer getData() { + return data; + } + public void setData(Integer data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Integer o){ + if(o>getData()){ + if(this.right==null){ + BinaryTreeNode node = new BinaryTreeNode(); + node.data = o; + node.left = null; + node.right = null; + this.right = node; + return node; + }else{ + getRight(); + insert(o); + return null; + } + }else if(o size())) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return; + } else if (index == 0) { + Node temp = new Node(); + temp.data = head.data; + temp.next = head.next; + head.data = o; + head.next = temp; + } else { + Node cursor = head; + Node temp = new Node(); + for (int i = 0; i < index - 1; i++) { + cursor = cursor.next; + } + temp.data = o; + temp.next = cursor.next; + cursor.next = temp; + } + } + + public Object get(int index) { + if ((index > size())) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return null; + } else { + Node cursor = head; + for (int i = 0; i < index; i++) { + cursor = cursor.next; + } + return cursor; + } + } + + public Object remove(int index) { + if ((index > size())) { + System.out.println("瓒呭嚭鏁扮粍闀垮害锛"); + return null; + } else if (index == 0) { + Node temp = new Node(); + temp.data = head.data; + temp.next = head.next; + head = head.next; + return temp; + } else { + Node cursor = head; + for (int i = 0; i < index - 1; i++) { + cursor = cursor.next; + } + Node temp = new Node(); + Node target = cursor.next; + temp.data = target.data; + temp.next = target.next; + cursor.next = target.next; + return temp; + } + } + + + public int size() { + Node cursor = head; + int size = 0; + while (cursor != null) { + cursor = cursor.next; + size++; + } + return size; + } + + public void addFirst(Object o) { + Node temp = new Node(); + temp.data = head.data; + temp.next = head.next; + head.data = o; + head.next = temp; + } + + public void addLast(Object o) { + if (o == null) { + System.out.println("浼犲叆瀵硅薄涓嶈兘涓虹┖锛"); + } else if (head == null) { + head.data = o; + head.next = null; + } else { + Node cursor = head; + for (int i = 0; i < size(); i++) { + cursor = cursor.next; + } + cursor.data = o; + cursor.next = null; + } + } + + public Object removeFirst() { + Node temp = new Node(); + temp.data = head.data; + temp.next = head.next; + head = head.next; + return temp; + } + + public Object removeLast() { + Node temp = new Node(); + Node cursor = head; + for (int i = 0; i < size() - 2; i++) { + cursor = cursor.next; + } + Node last = cursor.next; + temp.data = last.data; + temp.next = null; + cursor.next = null; + return temp; + } + + public Iterator iterator() { + return new LinkedListIterator(this); + } + public class LinkedListIterator implements Iterator{ + int pos = 0; + LinkedList list = new LinkedList(); + LinkedListIterator(LinkedList list){ + this.list = list; + } + @Override + public boolean hasNext() { + if (pos7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public static int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } +} diff --git a/group22/592864103/List.java b/group22/592864103/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group22/592864103/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group22/592864103/Queue.java b/group22/592864103/Queue.java new file mode 100644 index 0000000000..764d265c1e --- /dev/null +++ b/group22/592864103/Queue.java @@ -0,0 +1,34 @@ +public class Queue { + + LinkedList elementData = new LinkedList(); + + public void enQueue(Object o) { + if (o == null) { + System.out.println("浼犲叆瀵硅薄涓嶈兘涓虹┖"); + } else { + elementData.add(o); + } + } + + public Object deQueue() { + if (isEmpty()==true){ + System.out.println("璇ラ槦鍒椾负绌洪槦鍒楋紒"); + return null; + }else{ + Object o = elementData.removeFirst(); + return o; + } + } + + public boolean isEmpty() { + if (elementData.size()==0){ + return true; + }else { + return false; + } + } + + public int size() { + return elementData.size(); + } +} diff --git a/group22/592864103/Stack.java b/group22/592864103/Stack.java new file mode 100644 index 0000000000..a5a04de76d --- /dev/null +++ b/group22/592864103/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From 36fa18679ad9979375d51a75249eb94df065eef9 Mon Sep 17 00:00:00 2001 From: wenGQ Date: Sun, 12 Mar 2017 15:20:07 +0800 Subject: [PATCH 326/646] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" diff --git "a/group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" "b/group22/1193590951/githubitem/src/\346\226\207\347\253\240\345\234\260\345\235\200.txt" deleted file mode 100644 index e69de29bb2..0000000000 From 083701d12574e12f8c1fa34e70f7dfb1287bfdb2 Mon Sep 17 00:00:00 2001 From: Cary Date: Sun, 12 Mar 2017 15:20:10 +0800 Subject: [PATCH 327/646] [#week03_0312] homework: multithread download and linkedlist util. --- .../349209948/src/week1_0226/LinkedList.java | 218 ++++++++++++++++++ .../src/week3_0312/DownloadThread.java | 39 ++++ .../src/week3_0312/FileDownloader.java | 86 +++++++ .../src/week3_0312/FileDownloaderTest.java | 63 +++++ .../src/week3_0312/api/Connection.java | 23 ++ .../week3_0312/api/ConnectionException.java | 5 + .../src/week3_0312/api/ConnectionManager.java | 10 + .../src/week3_0312/api/DownloadListener.java | 5 + .../src/week3_0312/impl/ConnectionImpl.java | 55 +++++ .../impl/ConnectionManagerImpl.java | 15 ++ 10 files changed, 519 insertions(+) create mode 100644 group01/349209948/src/week3_0312/DownloadThread.java create mode 100644 group01/349209948/src/week3_0312/FileDownloader.java create mode 100644 group01/349209948/src/week3_0312/FileDownloaderTest.java create mode 100644 group01/349209948/src/week3_0312/api/Connection.java create mode 100644 group01/349209948/src/week3_0312/api/ConnectionException.java create mode 100644 group01/349209948/src/week3_0312/api/ConnectionManager.java create mode 100644 group01/349209948/src/week3_0312/api/DownloadListener.java create mode 100644 group01/349209948/src/week3_0312/impl/ConnectionImpl.java create mode 100644 group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java diff --git a/group01/349209948/src/week1_0226/LinkedList.java b/group01/349209948/src/week1_0226/LinkedList.java index 51c9ab8844..33c7f8d43d 100644 --- a/group01/349209948/src/week1_0226/LinkedList.java +++ b/group01/349209948/src/week1_0226/LinkedList.java @@ -126,4 +126,222 @@ private static class Node{ next = null; } } + /******************************************************************************************************************************************** + * + * 绗簩娆′綔涓 + * + * + * + */ + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Node reversedNode = null; + while (head != null) { + Node temp = head; + head = head.next; + temp.next = reversedNode; + reversedNode = temp; + } + head = reversedNode; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int newStartIndex = size/2; + for (int i =0;i size) { + length = size -i; + } + if (i == 0) { + for (int j = 0; j< length; j ++) { + head = head.next; + } + } else { + Node startNode = (Node) this.get(i); + Node endNode = (Node) this.get(i + length); + startNode.next = endNode; + } + size = size - length; + + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + checkList(list); + int[] dest = new int[list.size]; + int arrayIndex = 0; + while (list.head != null) { + dest[arrayIndex] = (int)this.get((int)list.head.data); + ++ arrayIndex; + list.head = list.head.next; + } + return dest; + } + + private void checkList(LinkedList list) { + for (int i = 0; i = this.size || listIndex >= list.size) { + break; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + if (this.size == 0) { + return; + } + Node subHead = head; + Node subTail = head; + while(true) { + if (subTail == null) { + break; + } + if ((int)subTail.data == (int)subHead.data) { + if (!(subTail ==subHead)){ + this.size --; + } + Node temp = head; + int index = 0; + while(temp != null) { + if (temp == subTail) { + this.remove(index); + break; + } + ++index; + temp = temp.next; + } + subTail = subTail.next; + } else { + subTail = subTail.next; + subHead = subHead.next; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + //涓鍦癰ug銆傘傘 + public void removeRange(int min, int max){ + if (this.size ==0) { + return; + } + if ((int)head.data > max) { + throw new IllegalArgumentException(); + } + Node temp = head; + int index = 0; + int from = 0; + int to = 0; + while (temp != null) { + if ((int)temp.data <= min) { + temp = temp.next; + } else if ((int)temp.data > min && from == 0){ + from = index; + } + if ((int)temp.data < max && from > 0) { + temp = temp.next; + } else if((int)temp.data > max && to == 0) { + to = index; + } + ++ index; + } + if (to == 0) { + this.remove(from, this.size - from); + } else { + this.remove(from, to - from); + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + if (this.size ==0 || list.size == 0){ + return null; + } + Node tempHead = head; + int listIndex = 0; + LinkedList newList = new LinkedList(); + while (true) { + if(tempHead == null || list.size < listIndex) { + break; + } + if ((int)tempHead.data < (int)list.get(listIndex)){ + tempHead = head.next; + } else if ((int)tempHead.data > (int)list.get(listIndex)){ + listIndex ++; + } else if ((int)tempHead.data == (int)list.get(listIndex)){ + newList.add(tempHead); + tempHead = tempHead.next; + ++ listIndex; + } + } + + return newList; + } } diff --git a/group01/349209948/src/week3_0312/DownloadThread.java b/group01/349209948/src/week3_0312/DownloadThread.java new file mode 100644 index 0000000000..173a5fa873 --- /dev/null +++ b/group01/349209948/src/week3_0312/DownloadThread.java @@ -0,0 +1,39 @@ +package week3_0312; + +import java.io.IOException; +import java.io.RandomAccessFile; + +import week3_0312.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + byte[] data = new byte[endPos - startPos]; + try { + data = conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + writeToFile(data); + } + public void writeToFile(byte[] data) { + RandomAccessFile file; + try { + file = new RandomAccessFile("downloadTest.jpg","rw"); + file.seek(startPos); + file.write(data, 0, data.length); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group01/349209948/src/week3_0312/FileDownloader.java b/group01/349209948/src/week3_0312/FileDownloader.java new file mode 100644 index 0000000000..04ef55b93a --- /dev/null +++ b/group01/349209948/src/week3_0312/FileDownloader.java @@ -0,0 +1,86 @@ +package week3_0312; + +import java.io.IOException; + +import week3_0312.api.Connection; +import week3_0312.api.ConnectionException; +import week3_0312.api.ConnectionManager; +import week3_0312.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + DownloadThread downloadThread1 = new DownloadThread(conn,0,length/3); + downloadThread1.start(); + DownloadThread downloadThread2 = new DownloadThread(conn, length/3+1, length/3 *2); + downloadThread2.start(); + DownloadThread downloadThread3 = new DownloadThread(conn, length/3*2 +1, length -1); + downloadThread3.start(); + try { + downloadThread1.join(); + downloadThread2.join(); + downloadThread3.join(); + } catch(InterruptedException e) { + e.printStackTrace(); + } + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group01/349209948/src/week3_0312/FileDownloaderTest.java b/group01/349209948/src/week3_0312/FileDownloaderTest.java new file mode 100644 index 0000000000..6e632a27f1 --- /dev/null +++ b/group01/349209948/src/week3_0312/FileDownloaderTest.java @@ -0,0 +1,63 @@ +package week3_0312; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import week3_0312.api.ConnectionManager; +import week3_0312.api.DownloadListener; +import week3_0312.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://121.42.185.101/forum/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + new Thread (){ + public void run(){ + downloader.execute(); + } + }.start(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group01/349209948/src/week3_0312/api/Connection.java b/group01/349209948/src/week3_0312/api/Connection.java new file mode 100644 index 0000000000..3366f53928 --- /dev/null +++ b/group01/349209948/src/week3_0312/api/Connection.java @@ -0,0 +1,23 @@ +package week3_0312.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/349209948/src/week3_0312/api/ConnectionException.java b/group01/349209948/src/week3_0312/api/ConnectionException.java new file mode 100644 index 0000000000..15785deb1e --- /dev/null +++ b/group01/349209948/src/week3_0312/api/ConnectionException.java @@ -0,0 +1,5 @@ +package week3_0312.api; + +public class ConnectionException extends Exception { + +} diff --git a/group01/349209948/src/week3_0312/api/ConnectionManager.java b/group01/349209948/src/week3_0312/api/ConnectionManager.java new file mode 100644 index 0000000000..630fd6693f --- /dev/null +++ b/group01/349209948/src/week3_0312/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package week3_0312.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/349209948/src/week3_0312/api/DownloadListener.java b/group01/349209948/src/week3_0312/api/DownloadListener.java new file mode 100644 index 0000000000..3bd8c92c24 --- /dev/null +++ b/group01/349209948/src/week3_0312/api/DownloadListener.java @@ -0,0 +1,5 @@ +package week3_0312.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/349209948/src/week3_0312/impl/ConnectionImpl.java b/group01/349209948/src/week3_0312/impl/ConnectionImpl.java new file mode 100644 index 0000000000..44146b211b --- /dev/null +++ b/group01/349209948/src/week3_0312/impl/ConnectionImpl.java @@ -0,0 +1,55 @@ +package week3_0312.impl; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + +import org.omg.CORBA.portable.InputStream; + +import week3_0312.api.Connection; + +public class ConnectionImpl implements Connection{ + + private URL url = null; + private HttpURLConnection conn = null; + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + try { + conn = (HttpURLConnection) url.openConnection(); + } catch (IOException e) { + e.printStackTrace(); + } + conn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + InputStream inputStream = (InputStream) conn.getInputStream(); + byte[] result = new byte[endPos - startPos + 1]; + byte[] data = new byte[1024]; + int read = -1; + int i = 0; + while ((read = inputStream.read(data,0, data.length)) != -1) { + System.arraycopy(data, 0, result, i, read); + i += read; + } + return result; + } + + @Override + public int getContentLength() { + HttpURLConnection openConnection = null; + try { + openConnection = (HttpURLConnection) url.openConnection(); + } catch(IOException e) { + e.printStackTrace(); + } + int contentLength = openConnection.getContentLength(); + openConnection.disconnect(); + return contentLength; + } + + @Override + public void close() { + conn.disconnect(); + conn = null; + } + +} diff --git a/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java b/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..336e3e1678 --- /dev/null +++ b/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java @@ -0,0 +1,15 @@ +package week3_0312.impl; + +import week3_0312.api.Connection; +import week3_0312.api.ConnectionException; +import week3_0312.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + +} From 8402a9701f8a89794c71b1a202e20d2c6703a8ca Mon Sep 17 00:00:00 2001 From: Viscaria233 Date: Sun, 12 Mar 2017 15:38:07 +0800 Subject: [PATCH 328/646] Create week3.md --- group01/895457260/journal/week3.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 group01/895457260/journal/week3.md diff --git a/group01/895457260/journal/week3.md b/group01/895457260/journal/week3.md new file mode 100644 index 0000000000..d597f97c0f --- /dev/null +++ b/group01/895457260/journal/week3.md @@ -0,0 +1,25 @@ +涓婂懆浠跨湡cpu鐨勮ˉ鍏 +============== +涓婂懆鐨勪豢鐪焎pu鍋氬嚭鏉ョ粰鍚屽鐪嬪悗锛岃闂埌涓涓棶棰橈紝杩欐鎶婄瓟妗堣涓嬫潵銆 +>闂锛氫粠鍐呭瓨鍙栧嚭8bit涔嬪悗锛屾湁鏃跺簲璇ラ佸線IR璇戠爜锛屾湁鏃跺簲璇ラ佸線鍒殑鍦版柟锛屽浣曞垽鏂繖浜沚it鏄寚浠よ繕鏄暟鎹紝浠ュ強搴旇鎶婂畠浠佸埌鍝噷锛 + +杩欎釜闂寮勯敊浜嗕竴涓叧閿偣锛 +>鍦ㄨ绠楁満鍐咃紝涓嶈鎸囦护杩樻槸鏁版嵁锛屾湰璐ㄤ笂娌℃湁浠讳綍宸埆锛岄兘鏄簩杩涘埗bit銆傝绠楁満鏍规湰涓嶉渶瑕佸仛杩欎簺鍒ゆ柇銆 + +鎴戜滑鍏堟潵鎯充竴涓嬮偅涓猚pu鐨勫伐浣滄柟寮忥細 +>PC鍊兼斁涓婃荤嚎 +>AR浠庢荤嚎涓婅鍊 +>AR鍊艰繘鍏AM鍦板潃绔 +>RAM涓殑鎸囦护璇诲嚭鏉ユ斁涓婃荤嚎 +>IR浠庢荤嚎涓婅鍊硷紝璇戠爜锛孭C+1 +>鎵ц杩欐潯鎸囦护 +>鍙嶅杩欎竴杩囩▼ + +鍦ㄨ繖涓繃绋嬩腑锛孭C鍏堟妸鍊兼斁鍒版荤嚎锛孉R鍐嶄粠鎬荤嚎涓婅锛屽悇涓儴浠朵箣闂存湁鍏堝悗椤哄簭銆傝繖涓厛鍚庨『搴忔槸鐢辫皝鏉ユ帶鍒剁殑锛熺瓟妗堟槸鐢辨帶鍒朵俊鍙锋潵鎺у埗鐨勩傛帶鍒朵俊鍙锋湁寰堝浣嶏紝姣忎竴浣嶈繛鍒版煇涓儴浠剁殑鏌愪釜鎺у埗绔紝姣斿绗1浣嶅氨杩炲埌PC閫氬線鎬荤嚎鐨勪笁鎬侀棬浣庢湁鏁堟帶鍒剁锛岀2浣嶈繛鍒癆R鐨勬椂閽熻緭鍏モ︹ +杩欑鍏堝悗椤哄簭锛屽氨鍙互閫氳繃涓嶅悓鎺у埗淇″彿鐨勫厛鍚庨『搴忔潵瀹炵幇锛屾瘮濡傦細 +>绗1鏉℃帶鍒朵俊鍙峰氨鏄00鈥︹︼紙PC涓夋侀棬鎵撳紑锛孉R鏃堕挓涓嶅姩锛 +>绗2鏉℃帶鍒朵俊鍙锋槸01鈥︹︼紙PC涓夋侀棬淇濇寔鎵撳紑锛孉R鏃堕挓涓婂崌娌匡級 +>绗3鏉℃帶鍒朵俊鍙锋槸10鈥︹︼紙PC涓夋侀棬鍏充笂锛孉R鏃堕挓鎭㈠0锛 + +鎸夐『搴忛佸嚭杩3鏉℃帶鍒朵俊鍙凤紝灏卞疄鐜颁簡PC鍊煎厛鏀句笂鎬荤嚎锛孉R鍐嶄粠鎬荤嚎涓婅鍊艰繖涓鍔ㄤ綔銆 +>鍥炲埌闂鏈韩锛宑pu鎶婂彇鍑虹殑bit浼犵粰IR锛屼笉鏄洜涓篶pu鍒ゆ柇鍑鸿繖浜沚it鏄寚浠わ紝鑰屾槸鍙楀埌鎺у埗淇″彿搴忓垪鐨勬帶鍒讹紝鎺у埗淇″彿璁㊣R浠庢荤嚎涓婅鍊硷紝閭d箞鎬荤嚎涓婄殑鍊煎氨鏄寚浠ゃ傜紪绋嬭呭仛鐨勶紝鍙槸绠楀噯浜嗗摢浜涘湴鏂圭殑bit浼氳IR璇昏蛋锛岀劧鍚庡湪杩欎簺鍦版柟鏀句笂鑷繁鐨勬寚浠ょ舰浜嗐 From 35b0f6d6897e883110d24b659f2a36a37baf3f5e Mon Sep 17 00:00:00 2001 From: eloise <851113375@qq.com> Date: Sun, 12 Mar 2017 15:43:55 +0800 Subject: [PATCH 329/646] finish linkedlist and multi-thread downloader --- .../coding2017/basic/LinkedList.java | 223 ++++++++++++- .../coding2017/basic/test/LinkedListTest.java | 308 ++++++++++++++++-- .../coding2017/download/DownloadThread.java | 41 +++ .../coding2017/download/FileDownloader.java | 117 +++++++ .../coding2017/download/api/Connection.java | 26 ++ .../download/api/ConnectionException.java | 7 + .../download/api/ConnectionManager.java | 11 + .../download/api/DownloadListener.java | 7 + .../download/impl/ConnectionImpl.java | 49 +++ .../download/impl/ConnectionManagerImpl.java | 29 ++ .../download/test/FileDownloaderTest.java | 44 +++ 11 files changed, 824 insertions(+), 38 deletions(-) create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/DownloadThread.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/FileDownloader.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/Connection.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionException.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionManager.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/DownloadListener.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionImpl.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionManagerImpl.java create mode 100644 group02/851113375/src/com/github/eloiseSJTU/coding2017/download/test/FileDownloaderTest.java diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/LinkedList.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/LinkedList.java index 19833b1853..8163c114fd 100644 --- a/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/LinkedList.java +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/LinkedList.java @@ -1,11 +1,12 @@ package com.github.eloiseSJTU.coding2017.basic; +import java.security.InvalidParameterException; import java.util.NoSuchElementException; public class LinkedList implements List { private int size = 0; - + private Node head; public void add(Object o) { @@ -14,7 +15,7 @@ public void add(Object o) { public void add(int index, Object o) { checkBoundsForAdd(index); - + if (index == 0) { addFirst(o); } else if (index == size) { @@ -32,7 +33,7 @@ public void add(int index, Object o) { public Object get(int index) { checkBounds(index); - + Node cur = head; while (index-- > 0) { cur = cur.next; @@ -42,7 +43,7 @@ public Object get(int index) { public Object remove(int index) { checkBounds(index); - + if (index == 0) { return removeFirst(); } else if (index == size - 1) { @@ -91,7 +92,7 @@ public Object removeFirst() { if (head == null) { throw new NoSuchElementException(); } - + Object o = head.data; Node node = head.next; head.data = null; @@ -105,11 +106,11 @@ public Object removeLast() { if (head == null) { throw new NoSuchElementException(); } - + if (head.next == null) { return removeFirst(); } - + Node cur = head; int index = 0; while (++index < size - 1) { @@ -125,9 +126,9 @@ public Object removeLast() { public Iterator iterator() { return new Itr(); } - + private class Itr implements Iterator { - + private Node cur = head; @Override @@ -144,24 +145,222 @@ public Object next() { cur = cur.next; return o; } - + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + if (head == null) { + return; + } + Node cur = head.next; + head.next = null; + while (cur != null) { + Node tmp = new Node(cur.data, head); + head = tmp; + tmp = cur; + cur = cur.next; + tmp.data = null; + tmp.next = null; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8, 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10, 鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + Node fast = head; + Node slow = head; + while (fast != null && fast.next != null) { + Node tmp = slow; + slow = slow.next; + fast = fast.next.next; + tmp.data = null; + tmp.next = null; + size--; + } + head = slow; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + if (length < 0) { + throw new InvalidParameterException(); + } + while (length-- > 0) { + remove(i); + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + if (list == null || list.size() == 0) { + return new int[0]; + } + int size = list.size(); + int[] result = new int[size]; + Iterator iter = list.iterator(); + for (int i = 0; i < size; i++) { + result[i] = (int) get((int) iter.next()); + } + return result; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑鍒犻櫎鍦╨ist涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + if (list == null || list.size() == 0) { + return; + } + int index = 0; + Node cur = head; + Iterator iter = list.iterator(); + Object tmp = iter.next(); + while (cur != null) { + if ((int) cur.data < (int) tmp) { + cur = cur.next; + index++; + } else if ((int) cur.data > (int) tmp) { + if (!iter.hasNext()) { + return; + } + tmp = iter.next(); + } else { + cur = cur.next; + remove(index); + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + if (size <= 1) { + return; + } + int index = 0; + Node cur = head; + while (cur.next != null) { + if ((int) cur.data == (int) cur.next.data) { + cur = cur.next; + remove(index); + } else { + cur = cur.next; + index++; + } + } + } + + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if (min >= max || head == null) { + return; + } + Node left = head; + while (left != null && (int) left.data <= min && left.next != null && (int) left.next.data <= min) { + left = left.next; + } + Node right = left.next; + while (right != null && (int) right.data < max) { + Node tmp = right; + right = right.next; + tmp.data = null; + tmp.next = null; + size--; + } + left.next = right; + if ((int) head.data > min && (int) head.data < max) { + head = right; + left.data = null; + left.next = null; + size--; + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌涔熶緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + if (list == null) { + return null; + } + LinkedList linkedList = new LinkedList(); + if (list.size() == 0) { + return linkedList; + } + Node cur = head; + Iterator iter = list.iterator(); + Object tmp = iter.next(); + while (cur != null) { + if ((int) cur.data < (int) tmp) { + cur = cur.next; + } else if ((int) cur.data > (int) tmp) { + if (!iter.hasNext()) { + return linkedList; + } + tmp = iter.next(); + } else { + linkedList.add(tmp); + if (!iter.hasNext()) { + return linkedList; + } + tmp = iter.next(); + cur = cur.next; + } + } + return linkedList; } private static class Node { Object data; Node next; + public Node(Object data, Node next) { this.data = data; this.next = next; } } - + private void checkBounds(int index) { if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(); } } - + private void checkBoundsForAdd(int index) { if (index < 0 || index > size) { throw new IndexOutOfBoundsException(); diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/test/LinkedListTest.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/test/LinkedListTest.java index 0ad905694c..8be0bdc404 100644 --- a/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/test/LinkedListTest.java +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/basic/test/LinkedListTest.java @@ -5,10 +5,10 @@ import org.junit.Test; import com.github.eloiseSJTU.coding2017.basic.LinkedList; -public class LinkedListTest extends ListTest{ +public class LinkedListTest extends ListTest { private LinkedList aLinkedList; - + @Before public void setUpLinkedList() { aList = new LinkedList(); @@ -19,75 +19,331 @@ public void setUpLinkedList() { public void testAddFirst() { aLinkedList.addFirst(5); assertEquals(5, aLinkedList.get(0)); - + aLinkedList.addFirst(6); assertEquals(6, aLinkedList.get(0)); assertEquals(5, aLinkedList.get(1)); assertEquals(2, aLinkedList.size()); } - + @Test public void testAddLast() { aLinkedList.addLast("hello"); assertEquals("hello", aLinkedList.get(0)); - + aLinkedList.addLast("world"); assertEquals("hello", aLinkedList.get(0)); assertEquals("world", aLinkedList.get(1)); assertEquals(2, aLinkedList.size()); } - + @Test public void testRemoveFirst() { aLinkedList.addLast("hello"); aLinkedList.addLast("world"); - + aLinkedList.removeFirst(); assertEquals("world", aLinkedList.get(0)); assertEquals(1, aLinkedList.size()); - + aLinkedList.removeFirst(); assertEquals(0, aLinkedList.size()); } - + @Test public void testRemoveLast() { aLinkedList.addFirst("world"); aLinkedList.addFirst("hello"); - + aLinkedList.removeLast(); assertEquals("hello", aLinkedList.get(0)); assertEquals(1, aLinkedList.size()); - + aLinkedList.removeLast(); assertEquals(0, aLinkedList.size()); } - + @Test public void testLinkedListFunctional() { - for (int i=1; i<4; i++) { - aLinkedList.add(i); // [1,2,3] + for (int i = 1; i < 4; i++) { + aLinkedList.add(i); // [1,2,3] } - aLinkedList.remove(1); // [1,3] - - aLinkedList.add(1, 0); // [1,0,3] - for (int i=4; i<6; i++) { - aLinkedList.addFirst(i); // [5, 4, 1, 0, 3] + aLinkedList.remove(1); // [1,3] + + aLinkedList.add(1, 0); // [1,0,3] + for (int i = 4; i < 6; i++) { + aLinkedList.addFirst(i); // [5, 4, 1, 0, 3] } assertEquals(5, aLinkedList.size()); assertEquals(5, aLinkedList.get(0)); assertEquals(1, aLinkedList.get(2)); assertEquals(0, aLinkedList.get(3)); - - aLinkedList.remove(3); // [5, 4, 1, 3] - assertEquals(3, aLinkedList.get(aLinkedList.size()-1)); - aLinkedList.removeLast(); // [5, 4, 1] - assertEquals(1, aLinkedList.get(aLinkedList.size()-1)); - aLinkedList.removeFirst(); // [4,1] - + + aLinkedList.remove(3); // [5, 4, 1, 3] + assertEquals(3, aLinkedList.get(aLinkedList.size() - 1)); + aLinkedList.removeLast(); // [5, 4, 1] + assertEquals(1, aLinkedList.get(aLinkedList.size() - 1)); + aLinkedList.removeFirst(); // [4,1] + assertEquals(4, aLinkedList.get(0)); assertEquals(1, aLinkedList.get(1)); assertEquals(2, aLinkedList.size()); } + + @Test + public void testReverse() { + // 娴嬭瘯褰揳LinkedList涓虹┖鏃剁殑鎯呭喌 + aLinkedList.reverse(); + assertEquals(0, aLinkedList.size()); + + // 娴嬭瘯褰揳LinkedList闀垮害涓1鏃剁殑鎯呭喌 + aLinkedList.add(4); + aLinkedList.reverse(); + assertEquals(1, aLinkedList.size()); + assertEquals(4, aLinkedList.get(0)); + + for (int i = 1; i < 4; i++) { + aLinkedList.add(i); // [4,1,2,3] + } + aLinkedList.reverse(); + assertEquals(4, aLinkedList.size()); + assertEquals(3, aLinkedList.get(0)); + assertEquals(2, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10, 鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + @Test + public void testRemoveFirstHalf() { + aLinkedList.removeFirstHalf(); + assertEquals(0, aLinkedList.size()); + + aLinkedList.add(2); + aLinkedList.add(5); + aLinkedList.add(7); + aLinkedList.add(8); // [2,5,7,8] + + aLinkedList.removeFirstHalf(); // [7,8] + assertEquals(2, aLinkedList.size()); + assertEquals(7, aLinkedList.get(0)); + assertEquals(8, aLinkedList.get(1)); + + aLinkedList.add(10); // [7,8,10] + + aLinkedList.removeFirstHalf(); // [8,10] + assertEquals(2, aLinkedList.size()); + assertEquals(8, aLinkedList.get(0)); + assertEquals(10, aLinkedList.get(1)); + + aLinkedList.removeFirstHalf(); // [10] + aLinkedList.removeFirstHalf(); // [10] + assertEquals(1, aLinkedList.size()); + assertEquals(10, aLinkedList.get(0)); + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + @Test + public void testRemoveIntInt() { + for (int i = 0; i < 4; i++) { + aLinkedList.add(i); // [0,1,2,3] + } + + expectedEx.expect(Exception.class); + aLinkedList.remove(1, -1); + + expectedEx.expect(Exception.class); + aLinkedList.remove(-1, 1); + + aLinkedList.remove(0, 2); // [2,3] + assertEquals(2, aLinkedList.size()); + assertEquals(2, aLinkedList.get(0)); + assertEquals(3, aLinkedList.get(1)); + + aLinkedList.remove(1, 0); + aLinkedList.remove(0, 0); + assertEquals(2, aLinkedList.size()); + + aLinkedList.remove(1, 1); // [2] + assertEquals(1, aLinkedList.size()); + assertEquals(2, aLinkedList.get(0)); + + aLinkedList.remove(0, 1); // [] + assertEquals(0, aLinkedList.size()); + + expectedEx.expect(Exception.class); + aLinkedList.remove(1, 3); + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + @Test + public void testGetElements() { + for (int i = 0; i < 4; i++) { + aLinkedList.add(i * i); // [0,1,4,9] + } + + LinkedList bLinkedList = new LinkedList(); + int[] z1 = aLinkedList.getElements(bLinkedList); // [] + assertArrayEquals(new int[0], z1); + + bLinkedList.add(1); + bLinkedList.add(3); // [1, 3] + + z1 = aLinkedList.getElements(bLinkedList); // [1, 9] + assertArrayEquals(new int[] { 1, 9 }, z1); + + bLinkedList.add(1, 2); // bLinkedList = [1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [1, 4, 9] + assertArrayEquals(new int[] { 1, 4, 9 }, z1); + + bLinkedList.add(0, 0); // bLinkedList = [0, 1, 2, 3] + z1 = aLinkedList.getElements(bLinkedList); // [0, 1, 4, 9] + assertArrayEquals(new int[] { 0, 1, 4, 9 }, z1); + + // aLinkedList涓嶅簲璇ュ彉鍖 + assertEquals(4, aLinkedList.size()); + for (int i = 0; i < 4; i++) { + assertEquals(i * i, aLinkedList.get(i)); // [0,1,4,9] + } + + // Exception + bLinkedList.add(5); // bLinkedList = [0, 1, 2, 3, 5] + expectedEx.expect(Exception.class); + z1 = aLinkedList.getElements(bLinkedList); + } + @Test + public void TestSubtract() { + // 浼犺繘鐨刲ist涓簄ull,浠涔堥兘涓嶅共 + LinkedList list = null; + for (int i = 0; i < 6; i++) { + aLinkedList.add(i); // [0,1,2,3,4,5] + } + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + for (int i = 0; i < 6; i++) { + assertEquals(i, aLinkedList.get(i)); // [0,1,2,3,4,5] + } + + // 浼犺繘鐨刲ist涓虹┖閾捐〃 + list = new LinkedList(); + aLinkedList.subtract(list); + assertEquals(6, aLinkedList.size()); + for (int i = 0; i < 6; i++) { + assertEquals(i, aLinkedList.get(i)); // [0,1,2,3,4,5] + } + + aLinkedList.add(1, 1); // [0,1,1,2,3,4,5] + aLinkedList.add(4, 3); // [0, 1, 1, 2, 3, 3, 4, 5] + + // list娣诲姞鍏冪礌[0, 1, 3, 7] + list.add(0); + list.add(1); + list.add(3); + list.add(7); + + aLinkedList.subtract(list); // [2, 4, 5] + + assertEquals(3, aLinkedList.size()); + assertEquals(2, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + } + + @Test + public void testRemoveDuplicateValues() { + aLinkedList.add(3); + aLinkedList.add(3); + aLinkedList.add(3); + aLinkedList.add(4); + aLinkedList.add(5); + aLinkedList.add(6); + aLinkedList.add(6); // [3, 3, 3, 4, 5, 6, 6] + + aLinkedList.removeDuplicateValues(); // [3, 4, 5, 6] + + assertEquals(4, aLinkedList.size()); + assertEquals(3, aLinkedList.get(0)); + assertEquals(4, aLinkedList.get(1)); + assertEquals(5, aLinkedList.get(2)); + assertEquals(6, aLinkedList.get(3)); + } + + @Test + public void testRemoveRange() { + for (int i = 0; i < 6; i++) { + aLinkedList.add(i); // [0, 1, 2, 3, 4, 5] //鑰冭檻閲嶅鍏冪礌 + } + aLinkedList.addFirst(0); // [0, 0, 1, 2, 3, 4, 5] + aLinkedList.add(3, 2); // [0, 0, 1, 2, 2, 3, 4, 5] + + aLinkedList.removeRange(1, 4); // 澶т簬1灏忎簬4 [0, 0, 1, 4, 5] + + assertEquals(5, aLinkedList.size()); + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + + // 鑻ュ嚭鐜 min >= max鐨勬儏鍐碉紝浠涔堥兘涓嶅仛 + aLinkedList.removeRange(4, 1); + assertEquals(5, aLinkedList.size()); + assertEquals(0, aLinkedList.get(0)); + assertEquals(0, aLinkedList.get(1)); + assertEquals(1, aLinkedList.get(2)); + assertEquals(4, aLinkedList.get(3)); + assertEquals(5, aLinkedList.get(4)); + + // 灏嗘暣涓摼琛ㄤ腑鐨勫厓绱犲垹闄 + aLinkedList.removeRange(-1, 9); + assertEquals(0, aLinkedList.size()); + } + + @Test + public void testIntersection() { + for (int i = 0; i < 6; i++) { + aLinkedList.add(i); + } + aLinkedList.add(6); + aLinkedList.add(7); // [0锛 1, 2, 3, 4, 5, 6, 7] + // list涓簄ull + LinkedList list = null; + LinkedList newList1 = aLinkedList.intersection(list); + assertNull(newList1); + + // list涓虹┖閾捐〃 + list = new LinkedList(); + LinkedList newList2 = aLinkedList.intersection(list); + assertEquals(0, newList2.size()); + + list.add(0); + list.add(3); + list.add(4); + list.add(7); + list.add(8); // [0, 3, 4, 7, 8] + LinkedList newList3 = aLinkedList.intersection(list); + + assertEquals(4, newList3.size()); + assertEquals(0, newList3.get(0)); + assertEquals(3, newList3.get(1)); + assertEquals(4, newList3.get(2)); + assertEquals(7, newList3.get(3)); + } } diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/DownloadThread.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/DownloadThread.java new file mode 100644 index 0000000000..fd6f18733e --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/DownloadThread.java @@ -0,0 +1,41 @@ +package com.github.eloiseSJTU.coding2017.download; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.github.eloiseSJTU.coding2017.download.api.Connection; + +public class DownloadThread extends Thread { + + Connection conn; + int startPos; + int endPos; + String fileName; + + public DownloadThread(Connection conn, int startPos, int endPos, String fileName) { + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.fileName = fileName; + } + + public void run() { + System.out.println("涓嬭浇绾跨▼寮濮嬶細" + startPos + ", " + endPos); + try { + if (conn != null) { + byte[] result = conn.read(startPos, endPos); + if (result != null) { + RandomAccessFile file = new RandomAccessFile(new File(fileName), "rwd"); + file.seek(startPos); + file.write(result, 0, result.length); + file.close(); + } + } + System.out.println("涓嬭浇绾跨▼缁撴潫锛" + startPos + ", " + endPos); + } catch (IOException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } + } +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/FileDownloader.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/FileDownloader.java new file mode 100644 index 0000000000..b01697dcd9 --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/FileDownloader.java @@ -0,0 +1,117 @@ +package com.github.eloiseSJTU.coding2017.download; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.github.eloiseSJTU.coding2017.download.api.Connection; +import com.github.eloiseSJTU.coding2017.download.api.ConnectionException; +import com.github.eloiseSJTU.coding2017.download.api.ConnectionManager; +import com.github.eloiseSJTU.coding2017.download.api.DownloadListener; + +public class FileDownloader { + + String url; + DownloadListener listener; + ConnectionManager cm; + int threadNum = 3; + + public FileDownloader(String url) { + this.url = url; + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager, + // 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos,endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + System.out.println("涓荤嚎绋嬪紑濮"); + Connection conn = null; + try { + if ((conn = cm.open(url)) != null) { + int length = conn.getContentLength(); + System.out.println("闀垮害锛" + length); + if (length != -1) { + String fileName = url.substring(url.lastIndexOf("/") + 1); + RandomAccessFile file = new RandomAccessFile(new File(fileName), "rwd"); + file.setLength(length); + file.close(); + if (length < threadNum) { + threadNum = 1; + } + Connection[] connections = new Connection[threadNum]; + DownloadThread[] threads = new DownloadThread[threadNum]; + int step = Math.floorDiv(length + threadNum - 1, threadNum); + for (int i = 0; i < threadNum; i++) { + connections[i] = cm.open(url); + threads[i] = new DownloadThread(connections[i], i * step, + Math.min((i + 1) * step - 1, length - 1), fileName); + threads[i].start(); + } + new Thread(new Runnable() { + + @Override + public void run() { + System.out.println("鐩戞帶绾跨▼寮濮"); + try { + for (int i = 0; i < threadNum; i++) { + threads[i].join(); + } + if (listener != null) { + listener.notifyFinished(); + } + } catch (InterruptedException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } finally { + for (int i = 0; i < threadNum; i++) { + if (connections[i] != null) { + connections[i].close(); + } + } + System.out.println("鐩戞帶绾跨▼缁撴潫"); + } + } + }).start(); + } + } + } catch (ConnectionException e) { + e.printStackTrace(); + } catch (FileNotFoundException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } catch (IOException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + System.out.println("涓荤嚎绋嬬粨鏉"); + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager cm) { + this.cm = cm; + } + + public void setThreadNum(int threadNum) { + this.threadNum = threadNum; + } + +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/Connection.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/Connection.java new file mode 100644 index 0000000000..162126ce57 --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/Connection.java @@ -0,0 +1,26 @@ +package com.github.eloiseSJTU.coding2017.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionException.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionException.java new file mode 100644 index 0000000000..88864a4a9f --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionException.java @@ -0,0 +1,7 @@ +package com.github.eloiseSJTU.coding2017.download.api; + +public class ConnectionException extends Exception { + + private static final long serialVersionUID = 5463120592216729412L; + +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionManager.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionManager.java new file mode 100644 index 0000000000..d33c2fdaaf --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package com.github.eloiseSJTU.coding2017.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/DownloadListener.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/DownloadListener.java new file mode 100644 index 0000000000..8d79023d4f --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/api/DownloadListener.java @@ -0,0 +1,7 @@ +package com.github.eloiseSJTU.coding2017.download.api; + +public interface DownloadListener { + + public void notifyFinished(); + +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionImpl.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..32080160ee --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionImpl.java @@ -0,0 +1,49 @@ +package com.github.eloiseSJTU.coding2017.download.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URLConnection; + +import com.github.eloiseSJTU.coding2017.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private URLConnection urlConnection; + + public ConnectionImpl(URLConnection urlConnection) { + this.urlConnection = urlConnection; + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + if (startPos > endPos) { + return null; + } + byte[] result = new byte[endPos - startPos + 1]; + if (urlConnection != null) { + urlConnection.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + InputStream inputStream = urlConnection.getInputStream(); + int len = 0; + int offset = 0; + while ((len = inputStream.read(result, offset, result.length - offset)) != -1) { + offset += len; + } + inputStream.close(); + } + return result; + } + + @Override + public int getContentLength() { + if (urlConnection != null) { + return urlConnection.getContentLength(); + } + return -1; + } + + @Override + public void close() { + urlConnection = null; + } + +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionManagerImpl.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..bef5c4b2e6 --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,29 @@ +package com.github.eloiseSJTU.coding2017.download.impl; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import com.github.eloiseSJTU.coding2017.download.api.Connection; +import com.github.eloiseSJTU.coding2017.download.api.ConnectionException; +import com.github.eloiseSJTU.coding2017.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + Connection connection = null; + try { + connection = new ConnectionImpl(new URL(url).openConnection()); + } catch (MalformedURLException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } catch (IOException ex) { + // TODO Auto-generated catch block + ex.printStackTrace(); + } + + return connection; + } + +} diff --git a/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/test/FileDownloaderTest.java b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/test/FileDownloaderTest.java new file mode 100644 index 0000000000..f72a27dda7 --- /dev/null +++ b/group02/851113375/src/com/github/eloiseSJTU/coding2017/download/test/FileDownloaderTest.java @@ -0,0 +1,44 @@ +package com.github.eloiseSJTU.coding2017.download.test; + +import org.junit.Test; + +import com.github.eloiseSJTU.coding2017.download.FileDownloader; +import com.github.eloiseSJTU.coding2017.download.api.ConnectionManager; +import com.github.eloiseSJTU.coding2017.download.api.DownloadListener; +import com.github.eloiseSJTU.coding2017.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Test + public void testDownload() { + + String url = "https://www.baidu.com/img/bd_logo.png"; + FileDownloader downloader = new FileDownloader(url); + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } + +} From 26177079c59fa620faafa65b27d88c8506cb1cc0 Mon Sep 17 00:00:00 2001 From: Kewy2017 Date: Sun, 12 Mar 2017 15:59:28 +0800 Subject: [PATCH 330/646] Blog for first week MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduction about CPU锛孧emory锛宒isk and instructions --- .../\345\215\232\345\256\242\345\234\260\345\235\200.txt" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "group22/1014331282/\345\215\232\345\256\242\345\234\260\345\235\200.txt" diff --git "a/group22/1014331282/\345\215\232\345\256\242\345\234\260\345\235\200.txt" "b/group22/1014331282/\345\215\232\345\256\242\345\234\260\345\235\200.txt" new file mode 100644 index 0000000000..4fba7167a8 --- /dev/null +++ "b/group22/1014331282/\345\215\232\345\256\242\345\234\260\345\235\200.txt" @@ -0,0 +1 @@ +http://www.cnblogs.com/kk9518/p/6538126.html \ No newline at end of file From e3f10e939fa7d4f6266aa8764580509995059baa Mon Sep 17 00:00:00 2001 From: zhaog Date: Sun, 12 Mar 2017 16:03:20 +0800 Subject: [PATCH 331/646] =?UTF-8?q?425044891=E7=9A=84=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../425044891/src/coding/JustForCommit.java | 10 - .../src/com/coding/basic/ArrayList.java | 97 +++++++ .../src/com/coding/basic/BinaryTreeNode.java | 41 +++ .../src/com/coding/basic/Iterator.java | 6 + .../src/com/coding/basic/LinkedList.java | 274 ++++++++++++++++++ .../425044891/src/com/coding/basic/List.java | 9 + .../425044891/src/com/coding/basic/Queue.java | 37 +++ .../425044891/src/com/coding/basic/Stack.java | 29 ++ 8 files changed, 493 insertions(+), 10 deletions(-) delete mode 100644 group27/425044891/src/coding/JustForCommit.java create mode 100644 group27/425044891/src/com/coding/basic/ArrayList.java create mode 100644 group27/425044891/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/425044891/src/com/coding/basic/Iterator.java create mode 100644 group27/425044891/src/com/coding/basic/LinkedList.java create mode 100644 group27/425044891/src/com/coding/basic/List.java create mode 100644 group27/425044891/src/com/coding/basic/Queue.java create mode 100644 group27/425044891/src/com/coding/basic/Stack.java diff --git a/group27/425044891/src/coding/JustForCommit.java b/group27/425044891/src/coding/JustForCommit.java deleted file mode 100644 index 693856cfe6..0000000000 --- a/group27/425044891/src/coding/JustForCommit.java +++ /dev/null @@ -1,10 +0,0 @@ -package coding; - -public class JustForCommit { - - - public static void main(String[] args) { - System.out.println("JustForCommit..."); - } - -} diff --git a/group27/425044891/src/com/coding/basic/ArrayList.java b/group27/425044891/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..929a41661c --- /dev/null +++ b/group27/425044891/src/com/coding/basic/ArrayList.java @@ -0,0 +1,97 @@ +package com.coding.basic; + +/** + * ArrayList + * + * @author Guang + * @date 2017骞3鏈12鏃 涓嬪崍1:55:47 + */ +public class ArrayList implements List { + + /** + * 鏁扮粍涓厓绱犱釜鏁 + */ + private int size = 0; + + /** + * 鏁扮粍 + */ + private Object[] elementData = new Object[100]; + + public void add(Object o) { + if (size >= 100 || size < 0) { + throw new IndexOutOfBoundsException("瓒婄晫."); + } + if (null == o) { + return; + } + elementData[size] = o; + size++; + } + + public void add(int index, Object o) { + checkRangeForAdd(index); + if (null == o) { + return; + } + for (int i = size; i > index; i--) { + elementData[i] = elementData[i - 1]; + } + elementData[index] = o; + size++; + } + + private void checkRangeForAdd(int index) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException("瓒婄晫."); + } + } + + private void checkRangeForGet(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException("瓒婄晫."); + } + } + + public Object get(int index) { + checkRangeForGet(index); + return elementData[index]; + } + + /** + * 绉婚櫎绗琲ndex浣嶇疆鐨勫厓绱狅紝鍚庣画鍏冪礌鍓嶇Щ + */ + public Object remove(int index) { + checkRangeForGet(index); + int i = index; + Object o = elementData[index]; + for (; i < size - 1; i++) { + elementData[i] = elementData[i + 1]; + } + elementData[i] = null; + size--; + return o; + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new Iterator() { + int index = 0; + @Override + public Object next() { + checkRangeForGet(index); + Object o = elementData[index]; + index++; + return o; + } + + @Override + public boolean hasNext() { + return index < size && index >= 0; + } + }; + } +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/BinaryTreeNode.java b/group27/425044891/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..c702b191e4 --- /dev/null +++ b/group27/425044891/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,41 @@ +package com.coding.basic; + +public class BinaryTreeNode> { + + private T data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(T o) { + if (o.compareTo(data) <= 0) { + return getLeft().insert(o); + } else { + return getRight().insert(o); + } + } + +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/Iterator.java b/group27/425044891/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..de308cef25 --- /dev/null +++ b/group27/425044891/src/com/coding/basic/Iterator.java @@ -0,0 +1,6 @@ +package com.coding.basic; +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/LinkedList.java b/group27/425044891/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..0c8520c62e --- /dev/null +++ b/group27/425044891/src/com/coding/basic/LinkedList.java @@ -0,0 +1,274 @@ +package com.coding.basic; + +public class LinkedList implements List { + + private Node head = null; + + private int size = 0; + + public LinkedList() { + this.head = new Node(); + this.head.next = null; + this.head.data = null; + this.size = 0; + } + + public void add(Object o) { + if (null == o) { + return; + } + Node next = new Node(); + next.data = o; + next.next = null; + + /** + * 瀵绘壘灏鹃儴鑺傜偣 + */ + Node p = head; + while (p.next != null) { + p = p.next; + } + p.next = next; + size++; + } + + public void add(int index, Object o) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + if (null == o) { + return; + } + Node next = new Node(); + next.data = o; + next.next = null; + + Node p = head.next; + Node pre = head; + int pos = 0; + while (p != null && pos < index) { + pre = p; + p = p.next; + pos++; + } + next.next = p; + pre.next = next; + size++; + } + + public Object get(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + Node p = head.next; + int pos = 0; + while (p != null && pos < index) { + p = p.next; + pos++; + } + return p == null ? null : p.data; + } + + public Object remove(int index) { + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + Node p = head.next; + Node pre = p; + int pos = 0; + while (p != null && pos < index) { + pre = p; + p = p.next; + pos++; + } + Object o = p.data; + pre.next = p.next; + size--; + return o; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + if (null == o) { + return; + } + Node next = new Node(); + next.next = null; + next.data = o; + + next.next = head.next; + head.next = next; + size++; + } + + public void addLast(Object o) { + if (null == o) { + return; + } + Node p = head; + while (p.next != null) { + p = p.next; + } + + Node next = new Node(); + next.data = o; + next.next = null; + + p.next = next; + size++; + } + + public Object removeFirst() { + if (size <= 0) { + throw new IndexOutOfBoundsException(); + } + Node p = head.next; + Object o = p.data; + + head.next = p.next; + size--; + return o; + } + + public Object removeLast() { + if (size <= 0) { + throw new IndexOutOfBoundsException(); + } + Node p = head.next; + Node pre = head; + while (p.next != null) { + pre = p; + p = p.next; + } + Object o = p.data; + pre.next = p.next; + size--; + return o; + } + + public Iterator iterator() { + return new Iterator() { + Node current = head; + + @Override + public Object next() { + Object o = current.next.data; + current = current.next; + return o; + } + + @Override + public boolean hasNext() { + return current.next != null; + } + }; + } + + private static class Node { + Object data; + Node next; + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node p = head.next.next; + Node pre = head.next; + pre.next = null; + while (p != null) { + Node pp = p.next; + p.next = pre; + pre = p; + p = pp; + } + head.next = pre; + // --- --- --- + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } + + public static void main(String[] args) { + + LinkedList list = new LinkedList(); + list.add("A"); + list.add("B"); + list.add("C"); + list.add("D"); + list.reverse(); + Iterator it = list.iterator(); + while (it.hasNext()) { + Object o = it.next(); + System.out.println(o); + } + + } +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/List.java b/group27/425044891/src/com/coding/basic/List.java new file mode 100644 index 0000000000..c86b745572 --- /dev/null +++ b/group27/425044891/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/Queue.java b/group27/425044891/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..fcec6ac57c --- /dev/null +++ b/group27/425044891/src/com/coding/basic/Queue.java @@ -0,0 +1,37 @@ +package com.coding.basic; + +public class Queue { + + private Object[] elementData = new Object[100]; + + int size = 0; + + public void enQueue(Object o) { + if (size < 0 || size >= 100) { + throw new IndexOutOfBoundsException(); + } + elementData[size++] = o; + } + + public Object deQueue() { + if (size <= 0) { + throw new IndexOutOfBoundsException(); + } + Object o = elementData[0]; + int i = 0; + for (; i < size - 1; i++) { + elementData[i] = elementData[i + 1]; + } + elementData[i] = null; + size--; + return o; + } + + public boolean isEmpty() { + return elementData.length != 0; + } + + public int size() { + return elementData.length; + } +} \ No newline at end of file diff --git a/group27/425044891/src/com/coding/basic/Stack.java b/group27/425044891/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..1217d25fbe --- /dev/null +++ b/group27/425044891/src/com/coding/basic/Stack.java @@ -0,0 +1,29 @@ +package com.coding.basic; + +public class Stack { + + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + int size = elementData.size(); + elementData.add(size, o); + } + + public Object pop() { + int size = elementData.size(); + return elementData.remove(size - 1); + } + + public Object peek() { + int size = elementData.size(); + return elementData.get(size - 1); + } + + public boolean isEmpty() { + return elementData.size() != 0; + } + + public int size() { + return elementData.size(); + } +} \ No newline at end of file From 4f9a4c2fe058d488fda98c1f0b180fec6e8e3a15 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Sun, 12 Mar 2017 16:09:52 +0800 Subject: [PATCH 332/646] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=AE=8C=E6=88=90=20=E4=B8=8D=E8=BF=87=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0=E7=9A=84=E4=B8=8D=E5=A4=AA?= =?UTF-8?q?=E5=AF=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miniyk2012/coding2017/basic/Iterator.java | 4 +- .../miniyk2012/coding2017/basic/List.java | 12 +- .../coderising/download/DownloadThread.java | 36 +++++ .../coderising/download/FileDownloader.java | 124 ++++++++++++++++++ .../download/FileDownloaderTest.java | 57 ++++++++ .../coderising/download/api/Connection.java | 24 ++++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 13 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 64 +++++++++ .../download/impl/ConnectionManagerImpl.java | 23 ++++ .../download/impl/ConnectionImplTest.java | 58 ++++++++ group02/812350401/test.png | Bin 0 -> 100384 bytes 13 files changed, 417 insertions(+), 8 deletions(-) create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/Connection.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionException.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionManager.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/DownloadListener.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImpl.java create mode 100644 group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group02/812350401/src/test/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImplTest.java create mode 100644 group02/812350401/test.png diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/Iterator.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/Iterator.java index 229ba41b05..7705715c84 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/Iterator.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/Iterator.java @@ -1,6 +1,6 @@ package com.github.miniyk2012.coding2017.basic; public interface Iterator { - public boolean hasNext(); - public Object next(); + boolean hasNext(); + Object next(); } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/List.java b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/List.java index ff6718f462..c9eae11190 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/basic/List.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/basic/List.java @@ -1,10 +1,10 @@ package com.github.miniyk2012.coding2017.basic; public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); - public Iterator iterator(); + void add(Object o); + void add(int index, Object o); + Object get(int index); + Object remove(int index); + int size(); + Iterator iterator(); } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..0f6d837a82 --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java @@ -0,0 +1,36 @@ +package com.github.miniyk2012.coding2017.coderising.download; + +import com.github.miniyk2012.coding2017.coderising.download.api.Connection; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + String fileName; + + public DownloadThread(String name, Connection conn, int startPos, int endPos, String fileName){ + super(name); + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.fileName = fileName; + } + public void run(){ + try (RandomAccessFile raf = new RandomAccessFile(new File(fileName), "rwd")) { + int length = endPos - startPos+1; + raf.seek(startPos); + byte[] buf = conn.read(startPos, endPos); + String desc = Thread.currentThread().getName()+"startPos:"+startPos+",length:"+length + "buf size:"+buf.length; + System.out.println(desc); + raf.write(buf, 0, buf.length); + } catch (IOException e) { + e.printStackTrace(); + } finally { + conn.close(); + } + } +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..30cd52c4dd --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java @@ -0,0 +1,124 @@ +package com.github.miniyk2012.coding2017.coderising.download; + +import com.github.miniyk2012.coding2017.coderising.download.api.Connection; +import com.github.miniyk2012.coding2017.coderising.download.api.ConnectionException; +import com.github.miniyk2012.coding2017.coderising.download.api.ConnectionManager; +import com.github.miniyk2012.coding2017.coderising.download.api.DownloadListener; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + + +public class FileDownloader { + + private String url; + private String fileName; + private DownloadListener listener; + private ConnectionManager cm; + private int threadNum = 30; + private int length = 0; + private Connection conn; + + + public FileDownloader(String _url, String _fileName) { + this.url = _url; + this.fileName = _fileName; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + + try (RandomAccessFile raf = new RandomAccessFile(new File(fileName), "rwd")) { + conn = cm.open(this.url); + raf.setLength(length); + length = conn.getContentLength(); + threadPoolDownload(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (ConnectionException e) { + e.printStackTrace(); + } + + } + + public void oneThreadDownload() { + Connection conn = null; + try { + Thread thread = new DownloadThread("oneThread", conn,0,length, fileName); + thread.start(); + thread.join(); + listener.notifyFinished(); + } catch (InterruptedException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + } + + public void threadPoolDownload() throws ConnectionException { + ExecutorService threadPool = Executors.newFixedThreadPool(3); + int len = conn.getContentLength(); + for(int i = 0; i< threadNum; i++) + { + int start=i*len/ threadNum; + int end = (i+1)*len/ threadNum -1; + conn = cm.open(this.url); + if(i== threadNum -1) + { + end =len; + } + Thread thread = new DownloadThread("thread"+i, conn, start, end, fileName); + threadPool.execute(thread); + } + threadPool.shutdown(); + while(true){ + if(threadPool.isTerminated()){ + break; + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + listener.notifyFinished(); + if (conn != null) { + conn.close(); + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..6f23aea27a --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java @@ -0,0 +1,57 @@ +package com.github.miniyk2012.coding2017.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.github.miniyk2012.coding2017.coderising.download.api.ConnectionManager; +import com.github.miniyk2012.coding2017.coderising.download.api.DownloadListener; +import com.github.miniyk2012.coding2017.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://inews.gtimg.com/newsapp_bt/0/1209438116/1000"; +// String url = "https://www.baidu.com/img/bd_logo.png"; + + FileDownloader downloader = new FileDownloader(url, "test.png"); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + } + +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/Connection.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/Connection.java new file mode 100644 index 0000000000..9845729e18 --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/Connection.java @@ -0,0 +1,24 @@ +package com.github.miniyk2012.coding2017.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + byte[] read(int startPos, int endPos) throws IOException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + void close(); +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionException.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..7d185584dc --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.github.miniyk2012.coding2017.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionManager.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..19bd1a092e --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/ConnectionManager.java @@ -0,0 +1,13 @@ +package com.github.miniyk2012.coding2017.coderising.download.api; + +import java.io.IOException; +import java.net.ProtocolException; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + Connection open(String url) throws ConnectionException; +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/DownloadListener.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..1488a94f22 --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.github.miniyk2012.coding2017.coderising.download.api; + +public interface DownloadListener { + void notifyFinished(); +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImpl.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..b928e0ced7 --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,64 @@ +package com.github.miniyk2012.coding2017.coderising.download.impl; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Arrays; + +import com.github.miniyk2012.coding2017.basic.ArrayList; +import com.github.miniyk2012.coding2017.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + private HttpURLConnection downLoadConn; + private HttpURLConnection getLengthConn; + + public ConnectionImpl(URL urlObject) { + HttpURLConnection conn = null; + try { + downLoadConn = (HttpURLConnection) urlObject.openConnection(); + downLoadConn.setRequestMethod("GET"); + + getLengthConn = (HttpURLConnection) urlObject.openConnection(); + getLengthConn.setRequestMethod("GET"); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + downLoadConn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + + InputStream in = downLoadConn.getInputStream(); + byte[] buf = new byte[endPos-startPos+1]; + byte[] tempBuf = new byte[1024]; + BufferedInputStream bis = new BufferedInputStream(in); + int len = 0; + int totalLen = 0; + while((len=bis.read(tempBuf,0,tempBuf.length))!=-1){ + System.arraycopy(tempBuf, 0, buf, totalLen, len); + totalLen += len; + } + String desc = " bytes=" + startPos + "-" + endPos + " "; + System.out.println(Thread.currentThread().getName()+desc+totalLen); + in.close(); + bis.close(); + return Arrays.copyOf(buf, totalLen); + } + + @Override + public int getContentLength() { + int len = getLengthConn.getContentLength(); + return len; + } + + @Override + public void close() { + downLoadConn.disconnect(); + getLengthConn.disconnect(); + } + +} diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionManagerImpl.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..c7870f9127 --- /dev/null +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,23 @@ +package com.github.miniyk2012.coding2017.coderising.download.impl; + +import com.github.miniyk2012.coding2017.coderising.download.api.Connection; +import com.github.miniyk2012.coding2017.coderising.download.api.ConnectionException; +import com.github.miniyk2012.coding2017.coderising.download.api.ConnectionManager; + +import java.io.IOException; +import java.net.URL; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + URL urlObject; + try { + urlObject = new URL(url); + return new ConnectionImpl(urlObject); + } catch (IOException e) { + e.printStackTrace(); + throw new ConnectionException(); + } + } +} diff --git a/group02/812350401/src/test/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImplTest.java b/group02/812350401/src/test/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImplTest.java new file mode 100644 index 0000000000..6007cf7b94 --- /dev/null +++ b/group02/812350401/src/test/com/github/miniyk2012/coding2017/coderising/download/impl/ConnectionImplTest.java @@ -0,0 +1,58 @@ +package test.com.github.miniyk2012.coding2017.coderising.download.impl; + +import com.github.miniyk2012.coding2017.coderising.download.api.Connection; +import com.github.miniyk2012.coding2017.coderising.download.impl.ConnectionImpl; +import com.github.miniyk2012.coding2017.coderising.download.impl.ConnectionManagerImpl; +import org.junit.Test; +import org.junit.Before; +import org.junit.After; + +import java.net.URL; + +/** +* ConnectionImpl Tester. +* +* @author +* @since
Mar 12, 2017
+* @version 1.0 +*/ +public class ConnectionImplTest { + String url = "http://inews.gtimg.com/newsapp_bt/0/1209438116/1000"; + ConnectionManagerImpl connectionManager = null; + Connection connection = null; + + @Before + public void before() throws Exception { + connectionManager = new ConnectionManagerImpl(); + connection = connectionManager.open(url); + + } + + @After + public void after() { + connection.close(); + } + /** + * + * Method: read(int startPos, int endPos) + * + */ + @Test + public void testRead() throws Exception { + int length = connection.getContentLength(); + byte[] biz = connection.read(0, length-1); + System.out.println(biz.length); + } + + /** + * + * Method: getContentLength() + * + */ + @Test + public void testGetContentLength() throws Exception { + int length = connection.getContentLength(); + System.out.println(length); + } + +} diff --git a/group02/812350401/test.png b/group02/812350401/test.png new file mode 100644 index 0000000000000000000000000000000000000000..40c982a45cc70d81071ffcee052e71b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4cuxE0*q;M-l>-joYg5MxkHYW zx_e;2@y%#th#IA>LH4UO%EaI4hC*;DJ7~lX@y5L z+Sb61aZb}uDtb`~X@SLO50OH`Q>9+AHZk6r8((^=NJ4|}S_RJ|QC3J?bgG>JZj{4M zKnSKQ@KQmHaaO!uo|M8UcPKcoO92A5!7);%gSpNPFuPKQmQ5yeT>5Gg-JPbWisNh1 zS4dg9P~rpaisyCEeZ9bL)O<{Yaw#-OREj<&V_W9dEW=m=Z8*hxtF}Y1@m{U60xOd8 zePoJ_?fg+k>MdTcRVo4a0tfw*S&O}97Lt2V3)CyAy<3lkOt zy$<@(lou|=y{pyg#p<;oO~#=#vIi`9Jt@YSf4NkvVXM{ZCs$37;WadoN=%`%#%U(4 zq@~$o2;}o#uUB4JW-qi0uclN4cB*W=CoHY#Qbu|j^?H=mS@>2+6mE?P1Nf#9X%Z(J z0Iyf7stipwKq~n3qT?G$uUD%DYUpD;fIoUN-$zs<0AyFI)u^fEow$uaz~ZiQ>bzI0 z)u2~d<=58v_!G@%95oYe#AB(iSF0@<#T4!VRpO0@PnEuN)`fN zr8?8?cHrPwtJP1cw6>7?KGl1m0N1P4(Sqxi+sLY;oSOA|v1@U7m9g_xNh@Z(UZYkb zllK1ry%QS}E7j_`T?f0jE~Mg=O=iH71$w<&qAOUOaf+9g_~~A+R!gZH9x+x6c0EOU zy+T53ZaEpDjlcY&ydRME|z=Mn))W1=3V`4-pRjEuUD&53-H1ib|+5t>h*e&AOG0~ CkEzK3 literal 0 HcmV?d00001 From 43c317fd5f93b2acd3e3fa11746b589c0676b08a Mon Sep 17 00:00:00 2001 From: Alvin Date: Sun, 12 Mar 2017 00:10:31 -0800 Subject: [PATCH 333/646] Homework 3rd --- .../coderising/download/DownloadThread.java | 26 ++++++++++++--- .../coderising/download/FileDownloader.java | 17 ++++++---- .../download/FileDownloaderTest.java | 3 +- .../download/impl/ConnectionImpl.java | 33 ++++++++++++++----- 4 files changed, 58 insertions(+), 21 deletions(-) diff --git a/group20/404130810/src/com/coderising/download/DownloadThread.java b/group20/404130810/src/com/coderising/download/DownloadThread.java index 1bbba90c30..02e36f5d10 100644 --- a/group20/404130810/src/com/coderising/download/DownloadThread.java +++ b/group20/404130810/src/com/coderising/download/DownloadThread.java @@ -1,6 +1,9 @@ package com.coderising.download; +import java.io.File; import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.concurrent.CountDownLatch; import com.coderising.download.api.Connection; @@ -9,19 +12,34 @@ public class DownloadThread extends Thread{ Connection conn; int startPos; int endPos; + CountDownLatch latch; + + File file = new File("C://download.mp3"); - public DownloadThread( Connection conn, int startPos, int endPos){ - + public DownloadThread( Connection conn, int startPos, int endPos, CountDownLatch latch){ this.conn = conn; this.startPos = startPos; this.endPos = endPos; + this.latch = latch; } public void run(){ + RandomAccessFile raf = null; try { - conn.read(startPos, endPos); + byte[] byteRead = conn.read(startPos, endPos); + raf = new RandomAccessFile(file, "rw");; + raf.seek(startPos); + raf.write(byteRead); + } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); + }finally{ + latch.countDown(); + try { + raf.close(); + } catch (IOException e) { + e.printStackTrace(); + } + conn.close(); } } } \ No newline at end of file diff --git a/group20/404130810/src/com/coderising/download/FileDownloader.java b/group20/404130810/src/com/coderising/download/FileDownloader.java index 5193eaba99..0619cdbc32 100644 --- a/group20/404130810/src/com/coderising/download/FileDownloader.java +++ b/group20/404130810/src/com/coderising/download/FileDownloader.java @@ -1,6 +1,8 @@ package com.coderising.download; import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.CyclicBarrier; import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; @@ -43,22 +45,25 @@ public void execute() throws IOException { conn = cm.open(url); int length = conn.getContentLength(); int[] posArr = FileDownloadUtil.generateDownloadPosArr(length); + CountDownLatch latch = new CountDownLatch(3); for (int i = 0; i < posArr.length; i++) { - if(i == posArr.length - 1){ - new DownloadThread(cm.open(url), posArr[i], length).start(); - }else{ - new DownloadThread(cm.open(url), posArr[i], posArr[i + 1] - 1).start(); + if (i == posArr.length - 1) { + new DownloadThread(cm.open(url), posArr[i], length, latch).start(); + } else { + new DownloadThread(cm.open(url), posArr[i], posArr[i + 1] - 1, latch).start(); } } - + latch.await(); + System.out.println("Download Finished"); } catch (ConnectionException e) { e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); } finally { if (conn != null) { conn.close(); } } - } public void setListener(DownloadListener listener) { diff --git a/group20/404130810/src/com/coderising/download/FileDownloaderTest.java b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java index 46444c9710..784ec00c8a 100644 --- a/group20/404130810/src/com/coderising/download/FileDownloaderTest.java +++ b/group20/404130810/src/com/coderising/download/FileDownloaderTest.java @@ -23,7 +23,7 @@ public void tearDown() throws Exception { @Test public void testDownload() throws IOException { - String url = "http://localhost:8080/test.jpg"; + String url = "http://localhost:8080/MyServer/Test.mp3"; FileDownloader downloader = new FileDownloader(url); @@ -38,7 +38,6 @@ public void notifyFinished() { } }); - downloader.execute(); diff --git a/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java index 33f693bc96..0970d41749 100644 --- a/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group20/404130810/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,5 +1,7 @@ package com.coderising.download.impl; +import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.RandomAccessFile; @@ -24,16 +26,29 @@ public ConnectionImpl(String urlStr) { @Override public byte[] read(int startPos, int endPos) throws IOException { - int length = endPos - startPos; - byte[] rtnByte = new byte[length]; - - RandomAccessFile raf = new RandomAccessFile("test.mp3", "rw"); - raf.seek(startPos); + System.out.println("Start Reading"); + System.out.println("StartPos: " + startPos); + System.out.println("EndPos: " + endPos); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream is = httpConn.getInputStream(); - while ((length = is.read(rtnByte)) != -1) { - raf.write(rtnByte, 0, length); - } - return rtnByte; + is.skip(startPos); + + int downloadLengh = endPos - startPos; + + byte[] b = new byte[1024]; + int total = 0; + int len = -1; + while ((len = is.read(b)) != -1) { + baos.write(b, 0, len); + total = total + len; + if (total == downloadLengh) { + break; + } + } + is.close(); + baos.close(); + System.out.println("End Reading"); + return baos.toByteArray(); } @Override From 08444ea6b21a22ebbe972d71bcdbfd076009e202 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Sun, 12 Mar 2017 16:16:51 +0800 Subject: [PATCH 334/646] Little fix --- .../coding2017/coderising/download/FileDownloader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java index 30cd52c4dd..5d7f793d0f 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java @@ -47,8 +47,8 @@ public void execute(){ try (RandomAccessFile raf = new RandomAccessFile(new File(fileName), "rwd")) { conn = cm.open(this.url); - raf.setLength(length); length = conn.getContentLength(); + raf.setLength(length); threadPoolDownload(); } catch (FileNotFoundException e) { e.printStackTrace(); From be3217cd1713215c248618499564185ef39269fb Mon Sep 17 00:00:00 2001 From: Cary Date: Sun, 12 Mar 2017 16:19:12 +0800 Subject: [PATCH 335/646] [#week3_0312] fix bug --- group01/349209948/src/week1_0226/LinkedList.java | 12 +----------- group01/349209948/src/week3_0312/FileDownloader.java | 1 + .../src/week3_0312/impl/ConnectionImpl.java | 11 ++++++++++- .../src/week3_0312/impl/ConnectionManagerImpl.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/group01/349209948/src/week1_0226/LinkedList.java b/group01/349209948/src/week1_0226/LinkedList.java index 33c7f8d43d..2815f8fc58 100644 --- a/group01/349209948/src/week1_0226/LinkedList.java +++ b/group01/349209948/src/week1_0226/LinkedList.java @@ -259,19 +259,9 @@ public void removeDuplicateValues(){ if (!(subTail ==subHead)){ this.size --; } - Node temp = head; - int index = 0; - while(temp != null) { - if (temp == subTail) { - this.remove(index); - break; - } - ++index; - temp = temp.next; - } subTail = subTail.next; } else { - subTail = subTail.next; + subHead.next = subTail; subHead = subHead.next; } } diff --git a/group01/349209948/src/week3_0312/FileDownloader.java b/group01/349209948/src/week3_0312/FileDownloader.java index 04ef55b93a..e25fdf0b8a 100644 --- a/group01/349209948/src/week3_0312/FileDownloader.java +++ b/group01/349209948/src/week3_0312/FileDownloader.java @@ -52,6 +52,7 @@ public void execute(){ downloadThread1.join(); downloadThread2.join(); downloadThread3.join(); + listener.notifyFinished(); } catch(InterruptedException e) { e.printStackTrace(); } diff --git a/group01/349209948/src/week3_0312/impl/ConnectionImpl.java b/group01/349209948/src/week3_0312/impl/ConnectionImpl.java index 44146b211b..09141c65a2 100644 --- a/group01/349209948/src/week3_0312/impl/ConnectionImpl.java +++ b/group01/349209948/src/week3_0312/impl/ConnectionImpl.java @@ -2,9 +2,10 @@ import java.io.IOException; import java.net.HttpURLConnection; +import java.net.MalformedURLException; import java.net.URL; -import org.omg.CORBA.portable.InputStream; +import java.io.InputStream; import week3_0312.api.Connection; @@ -12,6 +13,14 @@ public class ConnectionImpl implements Connection{ private URL url = null; private HttpURLConnection conn = null; + + public ConnectionImpl(String url){ + try{ + this.url = new URL(url); + } catch(MalformedURLException e) { + e.printStackTrace(); + } + } @Override public byte[] read(int startPos, int endPos) throws IOException { diff --git a/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java b/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java index 336e3e1678..cfe8b80efc 100644 --- a/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java +++ b/group01/349209948/src/week3_0312/impl/ConnectionManagerImpl.java @@ -9,7 +9,7 @@ public class ConnectionManagerImpl implements ConnectionManager { @Override public Connection open(String url) throws ConnectionException { - return null; + return new ConnectionImpl(url); } } From e86803d6f051b643a6d368c9a1925491c7f6fb79 Mon Sep 17 00:00:00 2001 From: RalfNick Date: Sun, 12 Mar 2017 16:19:14 +0800 Subject: [PATCH 336/646] Ralf --- .../coderising/download/DownloadThread.java" | 85 +++ .../coderising/download/FileDownloader.java" | 76 +++ .../download/FileDownloaderTest.java" | 58 ++ .../coderising/download/api/Connection.java" | 23 + .../download/api/ConnectionException.java" | 17 + .../download/api/ConnectionManager.java" | 15 + .../download/api/DownloadListener.java" | 5 + .../download/impl/ConnectionImpl.java" | 64 +++ .../download/impl/ConnectionManagerImpl.java" | 56 ++ .../linkedlist/LinkedListTest.java" | 46 ++ .../linkedlist/MyLinkedList.java" | 528 ++++++++++++++++++ ...7\347\253\240\351\223\276\346\216\245.txt" | 1 + 12 files changed, 974 insertions(+) create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/Connection.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedList.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" new file mode 100644 index 0000000000..80ec43e852 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" @@ -0,0 +1,85 @@ +package com.coderising.download; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +public class DownloadThread extends Thread { + + + ConnectionManager cm; + int startPos; + int endPos; + String url; + DownloadListener downloadListener; + + public DownloadThread(ConnectionManager cm, String url, int startPos, int endPos, DownloadListener listener) { + + this.cm = cm; + this.startPos = startPos; + this.endPos = endPos; + this.url = url; + this.downloadListener = listener; + } + + @Override + public void run() { + + Connection conn = null; + RandomAccessFile raf = null; + // 闅忔満鍐欐枃浠剁殑鏃跺欎粠鍝釜浣嶇疆寮濮嬪啓 + try { + conn = cm.open(url,startPos,endPos); + } catch (ConnectionException e3) { + // TODO Auto-generated catch block + e3.printStackTrace(); + } + + try { + + byte[] byeArr = conn.read(startPos, endPos); + System.out.println("----::" + byeArr.length); + File file = new File("D:\\111.jpg"); + synchronized (file) { + if (!file.exists()) { + file.createNewFile(); + } + raf = new RandomAccessFile(file, "rw"); + } + //raf.setLength(34134); + raf.seek(startPos);// 瀹氫綅鏂囦欢 + raf.write(byeArr); + + System.out.println("-------"); + + } catch (FileNotFoundException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (raf != null) { + raf.close(); + } + + } catch (Exception e2) { + // TODO: handle exception + e2.printStackTrace(); + } + if (conn != null) { + conn.close(); + } + if (downloadListener != null) { + downloadListener.notifyFinished(); + } + + } + } +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" new file mode 100644 index 0000000000..e97c0a711e --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" @@ -0,0 +1,76 @@ +package com.coderising.download; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +public class FileDownloader { + + String url; + DownloadListener listener; + ConnectionManager cm; + int threadSum = 0; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + // Connection conn = null; + + int threadNum = 3; + + int length = cm.getContentLength(url); + for (int i = 0; i < threadNum; i++) { + + int threadLoadLength = length / threadNum; + int startPos = threadLoadLength * i; + int endPos; + if (i != threadNum - 1) { + endPos = threadLoadLength * (i + 1) - 1; + } else { + endPos = length - 1; + } + threadSum++; + new DownloadThread(cm, this.url, startPos, endPos, new DownloadListener() { + @Override + public void notifyFinished() { + if ((threadSum--) == 0) { + if (listener != null) { + listener.notifyFinished(); + } + } + } + }).start(); + + } + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" new file mode 100644 index 0000000000..293e9e00e4 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" @@ -0,0 +1,58 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://img002.21cnimg.com/photos/album/20160326/m600/B920004B5414AE4C7D6F2BAB2966491E.jpeg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/Connection.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/Connection.java" new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/Connection.java" @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" new file mode 100644 index 0000000000..1737339909 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" @@ -0,0 +1,17 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 4776347926322882920L; + + /** + * + */ + public ConnectionException(){ + super(); + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" new file mode 100644 index 0000000000..3fa8460afb --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" @@ -0,0 +1,15 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + //public Connection open(String url) throws ConnectionException; + + public int getContentLength(String url); + + Connection open(String url, int startPos, int endPos) + throws ConnectionException; +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" new file mode 100644 index 0000000000..b3c26416be --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" @@ -0,0 +1,64 @@ +package com.coderising.download.impl; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + private HttpURLConnection httpConn; + private InputStream inputStream; + + public ConnectionImpl(HttpURLConnection httpconn) { + // TODO Auto-generated constructor stub + this.httpConn = httpconn; + } + + + //read() 鏂规硶鏈夐棶棰 + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + inputStream = httpConn.getInputStream(); + + System.out.println(startPos + "----" + endPos); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + int len = 0; + byte[] by = new byte[1024]; + + while((len = inputStream.read(by))!= -1){ + byteArrayOutputStream.write(by, 0, len); + } + System.out.println(byteArrayOutputStream.toByteArray().length); + return byteArrayOutputStream.toByteArray(); + + } + + @Override + public int getContentLength() { + if (httpConn != null) { + return httpConn.getContentLength(); + } + return 0; + } + + @Override + public void close() { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + if (httpConn != null) { + httpConn.disconnect(); + } + + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" new file mode 100644 index 0000000000..2928fb247f --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" @@ -0,0 +1,56 @@ +package com.coderising.download.impl; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + private HttpURLConnection httpConnection; + + @Override + public Connection open(String url,int startPos,int endPos) throws ConnectionException { + + if (url != null && !("".equals(url))) { + try { + URL urlconn = new URL(url); + httpConnection = (HttpURLConnection) urlconn.openConnection(); + httpConnection.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + return new ConnectionImpl(httpConnection); + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return null; + } + + @Override + public int getContentLength(String url) { + // TODO Auto-generated method stub + if (url != null && !("".equals(url))) { + try { + URL urlconn = new URL(url); + httpConnection = (HttpURLConnection) urlconn.openConnection(); + httpConnection.disconnect(); + return httpConnection.getContentLength(); + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return 0; + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" new file mode 100644 index 0000000000..4a800335e5 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" @@ -0,0 +1,46 @@ +package com.ralf.linkedlist; + +import BasicData.MyIterator; + +public class LinkedListTest { + + /** + * @param args + */ + @SuppressWarnings("unchecked") + public static void main(String[] args) { + // TODO Auto-generated method stub + MyLinkedList list = new MyLinkedList<>(); + + MyLinkedList listB = new MyLinkedList<>(); + MyLinkedList listC = new MyLinkedList<>(); + list.add(11); + list.add(12); + list.add(13); + list.add(14); + list.add(15); + list.add(17); + list.add(18); + + listB.add(10); + listB.add(12); + listB.add(14); + listB.add(15); + listB.add(18); + + + listC = (MyLinkedList) list.intersection(listB); + + + System.out.println(listC.size()); + + MyIterator iterator = listC.iterator(); + while(iterator.hasNext()){ + Integer integer = iterator.Next(); + System.out.println(integer); + } + + + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedList.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedList.java" new file mode 100644 index 0000000000..7ae0787ed0 --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedList.java" @@ -0,0 +1,528 @@ +package com.ralf.linkedlist; + +import java.util.Arrays; +import java.util.Objects; +import java.util.TreeSet; + +import BasicData.MyArrayList; +import BasicData.MyIterator; +import BasicData.MyList; + +public class MyLinkedList> implements MyList { + + private Node head;// 指向头部,始终设置为空 + // private Node tail;// 指向尾部的节点 + private int size; + + public MyLinkedList() { + this.head = new Node(null); + this.size = 0; + } + + private static class Node { + Node next = null; + T item = null; + + public Node(T t) { + item = t; + } + + } + + @Override + public boolean add(T t) { + // TODO Auto-generated method stub + return addLast(t); + } + + @Override + public void add(int index, T t) { + // TODO Auto-generated method stub + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + Node newNode = new Node(t); + if (index == 0) { + Node oldNode = head.next; + head.next = newNode; + newNode.next = oldNode; + size++; + } + + else { + Node current = getNode(index - 1); + newNode.next = current.next; + current.next = newNode; + size++; + } + + } + + @Override + public int size() { + // TODO Auto-generated method stub + return size; + } + + @Override + public T remove(int index) { + // TODO Auto-generated method stub + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } else if (index == 0) { + return removeFirst(); + } else if (index == size - 1) { + return removeLast(); + } else { + Node current = getNode(index - 1); + T data = current.next.item; + current.next.item = null; + current.next = current.next.next; + size--; + return data; + } + } + + @Override + public T set(int index, T t) { + // TODO Auto-generated method stub + Node current = getNode(index); + T data = current.item; + current.item = t; + return data; + } + + @Override + public T get(int index) { + // TODO Auto-generated method stub + T data = getNode(index).item; + return data; + } + + public int indexOf(T t) { + Node current = this.head; + int index = 0; + while (current.next != null) { + current = current.next; + if (Objects.equals(current.item, t)) { + return index; + } + index++; + } + return -1; + } + + private Node getNode(int index) { + + if (index < 0 || index >= size) { + throw new IndexOutOfBoundsException(); + } + Node current = this.head; + int m_size = 0; + while (current.next != null && m_size <= index) { + current = current.next; + m_size++; + } + return current; + } + + public boolean addFirst(T t) { + + if (head.next == null) { + Node current = new Node(t); + head.next = current; + current = null; + size++; + return true; + } else { + Node current = new Node(t); + current.next = head.next; + head.next = current; + size++; + return true; + } + } + + public boolean addLast(T t) { + + if (head.next == null) { + Node current = new Node(t); + head.next = current; + current.next = null; + size++; + return true; + } else { + Node current = new Node(t); + Node oldNode = getNode(size - 1); + oldNode.next = current; + current.next = null; + size++; + return true; + } + + } + + public T removeFirst() { + if (head.next == null) { + return null; + } else if (head.next.next == null) { + T data = head.next.item; + head.next.item = null; + head = null; + size--; + return data; + } else { + T data = head.next.item; + Node current = head.next.next; + head.next.item = null; + head.next = current; + size--; + return data; + } + } + + public T removeLast() { + if (head.next == null) { + return null; + } else if (head.next.next == null) { + T data = head.next.item; + head.next.item = null; + size--; + return data; + } else { + Node current = getNode(size - 2); + T data = current.next.item; + current.next.item = null; + current.next = null; + size--; + return data; + } + } + + public boolean isContain(T t){ + + if (head.next == null) { + return false; + } + Node current = head; + while(current.next != null){ + current = current.next; + if (Objects.equals(t, current.item)) { + return true; + } + } + return false; + } + + /** + * 把该链表逆置 例如链表为 3->7->10 , 逆置后变为 10->7->3 + */ + public void reverse() { + this.head.next = reverseList(head.next); + } + + private Node reverseList(Node mhead) { + + if (mhead == null || mhead.next == null) { + return mhead; + } + Node reHead = reverseList(mhead.next); + mhead.next.next = mhead; + mhead.next = null; + return reHead; + } + + /** + * 删除一个单链表的后半部分 例如:list = 2->5->7->8 , 删除以后的值为 2->5 如果list = 2->5->7->8->10 + * ,删除以后的值为2,5,7 + */ + public void removeLastHalf() { + + if (size < 2) { + return; + } + int index = (size - 1) / 2 + 1; + Node current = getNode(index - 1); + Node temp = current; + while (index < size) { + temp = temp.next; + temp.item = null; + index++; + } + size = (size - 1) / 2 + 1; + current.next = null; + } + + /** + * 删除一个单链表的前半部分 例如:list = 2->5->7->8 , 删除以后的值为 7->8 如果list = 2->5->7->8->10 + * ,删除以后的值为7,8,10 + */ + public void removeFirstHalf() { + + if (size < 2) { + return; + } + int maxIndex = size/ 2; + int index = 0; + Node current = head; + while (index < maxIndex) { + current = current.next; + current.item = null; + index++; + size--; + } + //size = (size - 1) / 2 + 1; + head.next = current.next; + } + + /** + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + + if (i < 0 || i >= size || (i + length - 1) > size) { + throw new IndexOutOfBoundsException(); + } + int index = 0; + Node current; + if (i == 0) { + current = head; + } else { + current = getNode(i - 1); + } + Node temp = current; + while (index < length) { + current = current.next; + current.item = null; + index++; + } + if (current.next == null) { + if (i == 0) { + head.next = null; + } else { + temp.next = null; + } + } else { + if (i == 0) { + head.next = current.next; + } else { + temp.next = current.next; + } + } + size = size - length; + + } + + /** + * 假定当前链表和list均包含已升序排列的整数 从当前链表中取出那些list所指定的元素 例如当前链表 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * + * @param list + */ + @SuppressWarnings("unchecked") + public int[] getElements(MyLinkedList list) { + int[] elements = new int[list.size]; + int i = 0; + MyIterator iterator = (MyIterator) list.iterator(); + while (iterator.hasNext()) { + int index = iterator.Next(); + if (index < this.size) { + Node current = getNode(index); + elements[i++] = (Integer) current.item; + } else { + elements[i++] = 0;// 没有该元素时值为零,由于是int类型,引用类型时为null + } + } + return Arrays.copyOf(elements, i); + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 从当前链表中中删除在list中出现的元素 + * + * @param list + */ + + public void subtract(MyLinkedList list) { + + if (list.size == 0) { + return; + } + MyIterator iterator = list.iterator(); + + while (iterator.hasNext()) { + T element = iterator.Next(); + int index = indexOf(element);// 当前链表的索引 + if (index != -1) { + remove(index); + } + } + } + + /** + * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) + */ + public void removeRepeatValues() { + if (head.next == null || head.next.next == null) { + return; + } + // 利用自己的MyArrayList + MyArrayList list = new MyArrayList<>(); + // 遍历链表 + Node current = head; + T obj = null; + while (current.next != null) { + current = current.next; + obj = current.item; + if (list.isContain(obj)) { + // int index = indexOf(obj); + remove(indexOf(obj)); // 可以增加remove(T t)方法,供调用 + + } else { + list.add(obj); + } + } + } + + /** + * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) + */ + public void removeDuplicateValues() { + + if (head.next == null || head.next.next == null) { + return; + } + Node current = head; + T obj = null; + while (current.next != null) { + current = current.next; + obj = current.item; + if (current.next != null && Objects.equals(obj, current.next.item)) { + // int index = indexOf(obj); + remove(indexOf(obj)); // 可以增加remove(T t)方法,供调用 + } + } + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + + if (head.next == null) { + return; + } + Node current = head; + Integer integer;// 目前只比较数据类型的,若是应用类型,需要实现Comparable接口 + while (current.next != null) { + current = current.next; + integer = (Integer) current.item; + if (integer.intValue() > min && integer.intValue() < max) { + remove(indexOf(current.item)); + } + } + } + + /** + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 + * + * @param list + */ + public MyLinkedList intersection(MyLinkedList list) { + + if (list.size == 0 || head.next == null) { + return null; + } + MyLinkedList newLinked = new MyLinkedList(); + MyIterator iterator = list.iterator(); + //MyArrayList arrayList = new MyArrayList<>();//没增加排序功能 + //ArrayList arrayList = new ArrayList<>(); + TreeSet treeSet = new TreeSet<>(); + + while (iterator.hasNext()) { + T element = iterator.Next(); + if (isContain(element)) { + treeSet.add(element); + } + } + + for(T t : treeSet){ + newLinked.add(t); + } + return newLinked; + + } + /* + @SuppressWarnings("unchecked") + public MyLinkedList union(MyLinkedList list) { + + if (head.next == null) { + + if (list.size == 0) { + return null; + } else { + return list; + } + } else { + if (list.size == 0) { + return this; + } else { + + MyLinkedList newList = new MyLinkedList(); + TreeSet treeSet = new TreeSet<>();// 可用MyArrayList装所有不同元素,并排序添加到linkedlist中 + + Node current = head; + while (current.next != null) { + current = current.next; + treeSet.add(current.item); + } + MyIterator iterator = (MyIterator) list.iterator(); + while (iterator.hasNext()) { + treeSet.add(iterator.Next()); + } + for (T t : treeSet) { + newList.add(t); + } + return newList; + } + } + + } + + */ + public MyIterator iterator() { + + return new LinkedListIterator(); + } + + private class LinkedListIterator implements MyIterator { + + private int current = 0; + T data = null; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return (current < size); + } + + @Override + public T Next() { + // TODO Auto-generated method stub + if (hasNext()) { + data = getNode(current).item; + current++; + return data; + } + return null; + } + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" new file mode 100644 index 0000000000..a200b0a2fc --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" @@ -0,0 +1 @@ +csdn在审核,稍后给出 \ No newline at end of file From 7151515f34700bd373c4ce43a13868afb18c55d9 Mon Sep 17 00:00:00 2001 From: C-BoBo <183127807@qq.com> Date: Sun, 12 Mar 2017 16:24:40 +0800 Subject: [PATCH 337/646] LinkList LinkList --- .../.idea/libraries/dom4j_1_6_1.xml | 9 + group05/183127807/HomeWork0305/.idea/misc.xml | 6 + .../183127807/HomeWork0305/.idea/modules.xml | 8 + group05/183127807/HomeWork0305/.idea/vcs.xml | 6 + .../HomeWork0305/.idea/workspace.xml | 1393 +++++++++++++++++ .../183127807/HomeWork0305/HomeWork0305.iml | 22 + .../com/coderising/array/ArrayUtil.class | Bin 0 -> 3170 bytes .../coderising/litestruts/LoginAction.class | Bin 0 -> 1180 bytes .../com/coderising/litestruts/Struts.class | Bin 0 -> 5367 bytes .../coderising/litestruts/StrutsTest.class | Bin 0 -> 1721 bytes .../com/coderising/litestruts/View.class | Bin 0 -> 859 bytes group05/183127807/HomeWork0312/.idea/misc.xml | 22 + .../183127807/HomeWork0312/.idea/modules.xml | 8 + group05/183127807/HomeWork0312/.idea/vcs.xml | 6 + .../HomeWork0312/.idea/workspace.xml | 1039 ++++++++++++ .../183127807/HomeWork0312/HomeWork0312.iml | 21 + .../production/HomeWork0312/Iterator.class | Bin 0 -> 159 bytes .../HomeWork0312/LinkedList$1.class | Bin 0 -> 178 bytes .../LinkedList$LinkedListIterator.class | Bin 0 -> 1041 bytes .../HomeWork0312/LinkedList$Node.class | Bin 0 -> 514 bytes .../production/HomeWork0312/LinkedList.class | Bin 0 -> 4697 bytes .../out/production/HomeWork0312/List.class | Bin 0 -> 236 bytes .../download/DownloadThread.class | Bin 0 -> 555 bytes .../download/FileDownloader.class | Bin 0 -> 1653 bytes .../download/FileDownloaderTest$1.class | Bin 0 -> 678 bytes .../download/FileDownloaderTest.class | Bin 0 -> 1871 bytes .../download/api/Connection.class | Bin 0 -> 241 bytes .../download/api/ConnectionException.class | Bin 0 -> 311 bytes .../download/api/ConnectionManager.class | Bin 0 -> 252 bytes .../download/api/DownloadListener.class | Bin 0 -> 157 bytes .../download/impl/ConnectionImpl.class | Bin 0 -> 640 bytes .../download/impl/ConnectionManagerImpl.class | Bin 0 -> 565 bytes .../183127807/HomeWork0312/src/Iterator.java | 5 + .../HomeWork0312/src/LinkedList.java | 297 ++++ group05/183127807/HomeWork0312/src/List.java | 7 + .../src/download/DownloadThread.java | 67 + .../src/download/FileDownloader.java | 73 + .../src/download/FileDownloaderTest.java | 59 + .../src/download/api/Connection.java | 23 + .../src/download/api/ConnectionException.java | 5 + .../src/download/api/ConnectionManager.java | 11 + .../src/download/api/DownloadListener.java | 5 + .../src/download/impl/ConnectionImpl.java | 27 + .../download/impl/ConnectionManagerImpl.java | 27 + 44 files changed, 3146 insertions(+) create mode 100644 group05/183127807/HomeWork0305/.idea/libraries/dom4j_1_6_1.xml create mode 100644 group05/183127807/HomeWork0305/.idea/misc.xml create mode 100644 group05/183127807/HomeWork0305/.idea/modules.xml create mode 100644 group05/183127807/HomeWork0305/.idea/vcs.xml create mode 100644 group05/183127807/HomeWork0305/.idea/workspace.xml create mode 100644 group05/183127807/HomeWork0305/HomeWork0305.iml create mode 100644 group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/array/ArrayUtil.class create mode 100644 group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/litestruts/LoginAction.class create mode 100644 group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/litestruts/Struts.class create mode 100644 group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/litestruts/StrutsTest.class create mode 100644 group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/litestruts/View.class create mode 100644 group05/183127807/HomeWork0312/.idea/misc.xml create mode 100644 group05/183127807/HomeWork0312/.idea/modules.xml create mode 100644 group05/183127807/HomeWork0312/.idea/vcs.xml create mode 100644 group05/183127807/HomeWork0312/.idea/workspace.xml create mode 100644 group05/183127807/HomeWork0312/HomeWork0312.iml create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/Iterator.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$1.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$LinkedListIterator.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$Node.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/List.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/DownloadThread.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloader.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloaderTest$1.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloaderTest.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/Connection.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionException.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionManager.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/DownloadListener.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionImpl.class create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionManagerImpl.class create mode 100644 group05/183127807/HomeWork0312/src/Iterator.java create mode 100644 group05/183127807/HomeWork0312/src/LinkedList.java create mode 100644 group05/183127807/HomeWork0312/src/List.java create mode 100644 group05/183127807/HomeWork0312/src/download/DownloadThread.java create mode 100644 group05/183127807/HomeWork0312/src/download/FileDownloader.java create mode 100644 group05/183127807/HomeWork0312/src/download/FileDownloaderTest.java create mode 100644 group05/183127807/HomeWork0312/src/download/api/Connection.java create mode 100644 group05/183127807/HomeWork0312/src/download/api/ConnectionException.java create mode 100644 group05/183127807/HomeWork0312/src/download/api/ConnectionManager.java create mode 100644 group05/183127807/HomeWork0312/src/download/api/DownloadListener.java create mode 100644 group05/183127807/HomeWork0312/src/download/impl/ConnectionImpl.java create mode 100644 group05/183127807/HomeWork0312/src/download/impl/ConnectionManagerImpl.java diff --git a/group05/183127807/HomeWork0305/.idea/libraries/dom4j_1_6_1.xml b/group05/183127807/HomeWork0305/.idea/libraries/dom4j_1_6_1.xml new file mode 100644 index 0000000000..da646ef61f --- /dev/null +++ b/group05/183127807/HomeWork0305/.idea/libraries/dom4j_1_6_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/.idea/misc.xml b/group05/183127807/HomeWork0305/.idea/misc.xml new file mode 100644 index 0000000000..05483570e0 --- /dev/null +++ b/group05/183127807/HomeWork0305/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/.idea/modules.xml b/group05/183127807/HomeWork0305/.idea/modules.xml new file mode 100644 index 0000000000..254b8efe7c --- /dev/null +++ b/group05/183127807/HomeWork0305/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/.idea/vcs.xml b/group05/183127807/HomeWork0305/.idea/vcs.xml new file mode 100644 index 0000000000..c2365ab11f --- /dev/null +++ b/group05/183127807/HomeWork0305/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/.idea/workspace.xml b/group05/183127807/HomeWork0305/.idea/workspace.xml new file mode 100644 index 0000000000..67f07687b8 --- /dev/null +++ b/group05/183127807/HomeWork0305/.idea/workspace.xml @@ -0,0 +1,1393 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1488162832036 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + HomeWork0305 + + + + + + + + 1.8 + + + + + + + + dom4j-1.6.1 + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/HomeWork0305.iml b/group05/183127807/HomeWork0305/HomeWork0305.iml new file mode 100644 index 0000000000..ff558941a5 --- /dev/null +++ b/group05/183127807/HomeWork0305/HomeWork0305.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/array/ArrayUtil.class b/group05/183127807/HomeWork0305/out/production/HomeWork0305/com/coderising/array/ArrayUtil.class new file mode 100644 index 0000000000000000000000000000000000000000..dd2dc26d1bbc21db3ad7aacb08e4b0dee99fb986 GIT binary patch literal 3170 zcmaJ@ZF3t}6@ISvO_CKSjKqN>Zmulgd`WO$rS!UdwBHQ_C_d z*=Yg{ox#%#P$o1}I!()mOu}I3w4E}%WtdwuEPT(;MC*#m@N}3@?8ym~=E zOAnkC(8sH@uE6%9x8zQ)RAyZN31?=JmYv0F*;zd6_?~&z)4q)!oXnfH=vI$Ip2tRQ0`iZ%H6> zj#hKgU7D{i2yC0GJLRV*oaON7xbIe~tL{^-U!|7}C*4I|AX;6V4UdT}xfhCI0F!H) z749x(P;vcv;)-%>xY=}M!uuIcEk>AiU}=O19!DCF(IBF8kDTN323v`})&`QBsILthzsw;lkJ?=>%wI6NBVpxVrAcnYw$plI`ZQ%b>A-|%^co<25kjMZOt7FXQToPf<@w!{s|W-05{U@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%Du6@i0luqr+o>Y58QLQx@5(oWDq3dK%oD91y;a%{SOOaxu z?{K%tJ*oXLm{3=eSSt;u-?be=deWz^wkwtJl{Zwr-IU@+w`mJ?q&1eRwJ4P-Kg@4e zzo%<|^Jj?vY+}&Ddz*<-Gt^_UW-DyyKb}L0N`uY7|74 z-d6a|Ax|Dd0Y$Q(!S{&WegT`2;2D%c@P42TFzOo*h}Fk%lM+CNgk}SZxxhCt>Q8`R pAT4_qa}i47W2(^@g-9jyScp;*|E8owN@jmhqF1VwEC$0by#Z=tpVR;V literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/.idea/misc.xml b/group05/183127807/HomeWork0312/.idea/misc.xml new file mode 100644 index 0000000000..2e47c90c3c --- /dev/null +++ b/group05/183127807/HomeWork0312/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + + + 1.8 + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0312/.idea/modules.xml b/group05/183127807/HomeWork0312/.idea/modules.xml new file mode 100644 index 0000000000..6548e6d473 --- /dev/null +++ b/group05/183127807/HomeWork0312/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0312/.idea/vcs.xml b/group05/183127807/HomeWork0312/.idea/vcs.xml new file mode 100644 index 0000000000..c2365ab11f --- /dev/null +++ b/group05/183127807/HomeWork0312/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0312/.idea/workspace.xml b/group05/183127807/HomeWork0312/.idea/workspace.xml new file mode 100644 index 0000000000..795fe7d83b --- /dev/null +++ b/group05/183127807/HomeWork0312/.idea/workspace.xml @@ -0,0 +1,1039 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1488857272285 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0312/HomeWork0312.iml b/group05/183127807/HomeWork0312/HomeWork0312.iml new file mode 100644 index 0000000000..3a8ffcf1f5 --- /dev/null +++ b/group05/183127807/HomeWork0312/HomeWork0312.iml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/Iterator.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/Iterator.class new file mode 100644 index 0000000000000000000000000000000000000000..ce5861f59f3e3be10c56dfe6988612825e608760 GIT binary patch literal 159 zcmX^0Z`VEs1_l!bZgvJvb_Om+2KJ1^V!zai5=I7Q4b3P<29`W9M?^!@Co8cmQ9ma! zFJ0e1DJwO(#F~+TD>%QjC^^+FGbfdif!DJnwJ5P9zeo?Hl97P}#%E*@K-bI0$iT?J e1hkrgfr$lZ7Xu3e1CVBAU;~N(T>%nj-~a%rgCdv! literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$1.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$1.class new file mode 100644 index 0000000000000000000000000000000000000000..c7274ab62c75420a3f468d6400eaa87ead60a3b2 GIT binary patch literal 178 zcmX^0Z`VEs1_l!bZgvKCb_PyH2Cm@z(xT*4x6GVWMh1SL%)IQ>6rarE61}X%vP7VW zYhH3resN}Ax^HSpMt%xA0~aF$4?>xWA&~2tmzP@PoRe5woLbDtAOO;-pOcuEuJ50e vm6}`vv;?6+K!JggfeGja5MTyE1|W}xffY!zFt7nh4j|?Ns$m4u3<4Yg*A6E? literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$LinkedListIterator.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList$LinkedListIterator.class new file mode 100644 index 0000000000000000000000000000000000000000..d5ca58cedcc601f91d59e895abeeb4ec945f8e57 GIT binary patch literal 1041 zcmZuwO>fgc6r6ROI5BRTG^Nm%kN_#o2Q*D7T!Ii%5u#EEhoT<1Z5)fb4GD@}h`0d1 zh6@LfS`~3XoH+2K5VMX+ozly$-`m-ld1L$cpYJ~aY~r4YBvw*fZkkA8)kGPU6bw|= zQZsPNz-L{f6w(w>jGA*<@OJpZp-!jCj0l@zUw~_m@P*SD!T&u)}ZU~fOw~U z_^RU!pUX~dNX_kj-x+T8q~|%r6e3Ec|M7HX z>`AZfjC_Gux$;6_X2+NI!BhGApIARQoG({e`|^#f_hkQN{aI(4 zs;O4f0CUJs%^SrunreD&M36RW2&AVE1sClG6ekwzj@kZA#L07ywb)xhbl}> zUWrZ@#G_u~S-mET{LWG!6+|YZ#^X1rLsQeTI~#nF8f(C;){dc7PZ0acN<)Tgf*9Z} zvRtj;*~Ak!K`e z5QR|i5i#m!qFOtFI6s8q7!mTQfQn%-30%WS6ot>EX;Wiu)2OY#;G&D_!dP%46*mPz2z8-!KWzt1jVUCl^a*?)SAq*4 zz=smg424>ekhybzzH{%LukVjf0OvS#Q9#p$ji!TL2YUkcSmsi|4=3_P2C+;Yg4^Ll zjq)yYiJIp${pnZnKB`I$gk4$1V`qpcl{z z+TzJOtT&Uc@+_I)D{8#!QZ3?X+yh~s5e;9^ng)c$|8Qe5fq{+8CbkT=P0vCDYqUOZ N1?-^A7IpgY%0JJnUEcrz literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/LinkedList.class new file mode 100644 index 0000000000000000000000000000000000000000..debd23f03bdedaa8e38b67f93042e7451d8c807c GIT binary patch literal 4697 zcmb7GTWnO<60du8^$k(gIyA1TNTCUjs-#U+scx08&?>D`scM@()Y7VzQl*uMQ@ZxK=iV6u`RK>o zxsP+sUTf{O_c?F<_Xj@$(1UYPG~n47mgBhGJtvnF7VH?p7?1KYA(xB=Cx$4FTR0g* z9Fs8)o03abE~n&j+CnadI!wz$-olLhbHW)5&s!)cBnI<&r!bJSi$$lX5E`DzI12UY zZ2q*9NoR|t!ID$3OEVlAnsV%nLS4H2u}y~e@>4PUSx!@f3f9DIq2T083RQjCe73Y( zA=tiolw$_;(lwmz49`xFJB6q0@th7eGhydO?Lt1iBhjbP&0!3zE8xIch0%QmK`qH6Q_slGdc_f%|Tvj2R z&1anR3_R(OQDghy=KIHzX~CJEIZG;JN(mxFxi4ENa)w0SuVu6NGHuJdxI5a6XlQ@n zk}-FXJJ&q8)2-5!Gwhs~#bq+X2LQMsN{dVpo zdA1J@YR;#~Cg<#LV2ijafi-AN zU@g`quu|?;VfB(xdMO!DOrV601oog+VSU+=gW{%xv!#P4_sq=ZGsV53r+wm~#v2yv6GwBo(I4k3x!qX&FUW+L#4|U6ia=D31 zl!vu-bInS%+PZahg)(-D<5LL_13Q?)3Iq`l!PwgZqM81ul>Bex zck0ROdOnTtyW;mbc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k|##9}St9oQrBhIPi_>x+I7gQ6zrJC`IO5%oE ziPu#t-coCEORdAZstvzW8}JvkNheEAwgWr^jM7SytlNHV+%~mQ$C^68W)Q$}eBO+c zv^BztF5(FbM;5Vy&ifF1TdJ#TBRoosxd~*SDIdD@aj){wrF4An(De)>$U)$!z8+(r X1W)EcQ32qhVb**L3n9+`Bm(~fXv;4# literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/List.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/List.class new file mode 100644 index 0000000000000000000000000000000000000000..9df54036fde2ed6e001fcf024f863d0d8b9b40e9 GIT binary patch literal 236 zcmX^0Z`VEs1_l!bes%_4b_PC12Ij<+6h;P74WF#UvPAuy#JqHU|D>$cz%(nEW@BIn(;QHmlYtAUl97QM JNHQ_-006DAFroke literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/DownloadThread.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/DownloadThread.class new file mode 100644 index 0000000000000000000000000000000000000000..8ce867cdb759ff930cf55cc7524495ce14d614db GIT binary patch literal 555 zcmZ`#O;5rw7=F6V0doQZf+(1H!;!d)H;osJ2?;SK67FSNq-M5e4EGQQ00 mw6kS)+S?}2I-Rea`-JOT?AOLMfEETtG>2jS literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloader.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloader.class new file mode 100644 index 0000000000000000000000000000000000000000..f60cf3e216e5a555c040498d0ba21ae95f4d5925 GIT binary patch literal 1653 zcmah}U31e$6g?};7PdtaLLf~`O%lEwJBbTPX+u7sm;^$VFpx}Uc^d-UpkQ+_#3uw*JVgtX36#4 zXhq;c@$;NhI|6z&s7ZlA%k|}E>tI)g+xD(U&#)CZwzp%4uChB$J=$}d0%QHeYpy4| z{NjxIFL8;6Jd#c;VxUw}<;i%`uSa_VVx51wC;Kr}jeYW~M~-Z$Do9^@d#9Ov^Ox_ zsVwHD zIBXAC;S?r4&Gn!m+5DL=O>R=sem6J}LzJHmUZu$D%p6CM8Wm3M;o|zb>V3Ky*&!=Q zJ6_OaCk7k5no&Go+oA19Oz+juije zF?0=9`50+|<-d@5UQS)oYj0q@#+mXzDDzEL-~}c(re7mZ&sf(pv`H)5wr2i*MM@g3 zV~&Z{zREOn{FJFZ6_dVA0f1|KTO_d(i<~CzCZBE*Im<6(h4`CTqP@!fG52R!h>I(c z_9$h$jB%cyr!|2|KCzTe!5W_83a+xyYxIso|Hz=4f$IitKo}@KH8Ay_fN-%Gk ztCD(!kyNaVlG*IbtSSNdq_KQL;!IECOx!>fYZ^0Oik12_)_umRo)T-8L!e?+@LeZX hCAK*jY?S$uRNCFo(5>b}b={1g(;Z5JvMJQ9{{Uh2VU+*? literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloaderTest$1.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloaderTest$1.class new file mode 100644 index 0000000000000000000000000000000000000000..72e6273576e4e9769aaf8f5663662a35642f3428 GIT binary patch literal 678 zcmaJ<(MlUZ6g`uyuDh-##@1*xCboId2&RJIgOZo1P>AhAiw}L9WXEJ=ot5mW_*p`w z;DaB~j}p(U2^NGb?47xnbI(2Z-ud_Z_yk}NpFKEO_A!MO4@>yuV%5c(i;BQ>I?ze| zt3ag_#dU<+UT?;P}`h{+&U9*+Ht4^3LS0K_v_0pNn|%- zq|}LfGCGq(ZT(Tuu@VG=Z^o!$JCaGF=vF6Hsqa$JyopnNes@A$$v}ky`Au8g{~2Eo zd&)K;P=4Rb&V{^@6nAWTQJiSgKUL`<4qdDVsG=0W#Y_Ot-fGz3U?$9^zAI3)e9cIj ze)C87LiN)BQ{9i-)}n7Ceq;LqqVX5G`wSD%GK;o`IohRH6y{N+M|{R6h*&^r#I;Y1&F~t3Ae;x} m->Cd7{R;)uGrHgvIHJpAk!d-6z(<}AiL{ZunI}4eDEIxPY4RSZ z3?QeY0YjB|3BwgQso^ah35;lXTSqyD)Z~ zZ|FFSa~e`QYB5=XDGlc}To5oOTvz%@#|i=&2<*>!pSzA{<;HE-4(4S}KwK3lKgnr0 zA`oxym=;JRy_^)NPT8)UDlE=QKV!{0T&YQUS<9KWd|S=878BvTP3Y#-Hnur#J92C* z5PfA34hxh8GQ6A@(9c}Y%6w>hZlK|!K;xx?8`_I<+74`jj=HWFTG4hC&!00F3M6Nq zme)LA5~w1SmapIiUQBt#{n2Zo^to+>jJF+~>5+D8YQg%uUFtWJu|4ww4@XE9q_xP--_&dOvVfLXMh?$u z31DWPKD>6y0!K<-2Z{Exif?sf8y$>{Z)GK3<*nGjt4;97uI8BFGn<@aGiQT{MSFVZ z3Pfl87sT#zHHH?BI{$$xdKh?xPsXMtT8XL<4-q9Ep>#!auI)INN5<79jubp{JWOLn zq76s*r0iac++Tk_TN@PdkD8^8zlIWxiDlF+ZTz9O>bZ57^m{Ra zQNA$Zk!mBTW~`SvJ3z&nQODIrrhWt+{C3m2hpH=|etPvGiDP^P_2V3lBaIVLh6CiA zW>|+)MC)U`W3(iTr|8houVFyL@hckMs4VLICJkZ? QuErCjs7fsOT8uvb03vnEcK`qY literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/Connection.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/Connection.class new file mode 100644 index 0000000000000000000000000000000000000000..20dd1430b3857157f927a359bfa6d376254dff0e GIT binary patch literal 241 zcmYL@Jr06E5QX0$g5nP*7G41wxA6oTO-M{EOl+)H*dT=L8eMfZo+5DdI2n2^;2U;#4h0D6ls_q^W9~~BiE&`^69#;qbFKZSxy#N3J literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionException.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionException.class new file mode 100644 index 0000000000000000000000000000000000000000..06c68aa91464053cecfe45f36991b207f9e0b130 GIT binary patch literal 311 zcmah^Jx>Bb5Pfsp2b`x6XeiN2E!f6RVnd+1&_J%=yW8lRbC(ruvf&|O4A}-Rv>B5l O570r(ig3Z`Avply$4Gtv literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionManager.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/ConnectionManager.class new file mode 100644 index 0000000000000000000000000000000000000000..acc6558dba967f0282654c798bb8e160c6e55477 GIT binary patch literal 252 zcmZ{fJr06E5QX0;vWgZ~mc~*G-Nug6Xoa!h1S@RF5;98=f6iv%0X&p(NsLq!lbJ7h z^XAR_^Lzo=Vj?gS2ne1nH51m$C|5Tn3&oj?>&kEzuAI_K^hVbQVk58x9BJ@*wr S9-$A<@xW2jeOJQGJq*7`C`H-; literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/DownloadListener.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/api/DownloadListener.class new file mode 100644 index 0000000000000000000000000000000000000000..767c2f281c4be75dbe4305d72776b04f294cee60 GIT binary patch literal 157 zcmX^0Z`VEs1_l!bPId-%b_Nbc2EM%flFYP9x6HiE;*8W3Mh0dL%`ip=uHgLAqU2P! z%$!t422q#%^1Ph<#1x;*;*!+7)FQpC#Ii(22H6y-xPD?mrarnNMg{?pGX0#yymWp4 iq^#8B5;jH#Mg}IJ0~i<>S%6kCuz*+$tU!{9feio&k|;9( literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionImpl.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..161432498aaea8699d82b7e79817c6c37f0db7dc GIT binary patch literal 640 zcmaJ;%SyvQ6upx^qP1GBk6K^ou2nG`cZ!Ij5GYnq+_;)1Lpvp%DarWwC>OdCT=)Tg zlz1kV5*1wJ-Z^*9x%b@3$LHHS5$)4@iE^~;Qr)E$msS}S52cdkh*7T5ykV3-)uCWi zX-Oq6?gkwZU-M3cO0}f}9^LR*T0AP|O;09_Hd>*6P?6@LCkMmGJJm{wz(}opzyoxR z1rIT+;rq?o6Gjt>;jy{Y&@vx&p~4iD&K?6Xw8F%tHAb^tVbIJ7Wm-aYO)s?xMInfE z0#~IgeHRDfTw06sKj-fC`8_XFfr^aQ{xgU2}FBMAWR~bzX?>LDIf+s4VD!j1Lcq% z_H1KDSx%Lk-?t;BWz0||?dH%dP7cjMXAM>H&C>#+?YoO?=R3KlUwx|?N6y&M;&`1M U@U8OCD)o#IKW4PbQrf=u1w@W*^#A|> literal 0 HcmV?d00001 diff --git a/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionManagerImpl.class b/group05/183127807/HomeWork0312/out/production/HomeWork0312/download/impl/ConnectionManagerImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..70e371304298bc2790f7117a28388c0b91a520b7 GIT binary patch literal 565 zcma)3O;5r=6r9%rRYXBl{5TkmF#!|p#dyJZA)1&}Jz%&mWrIt~Zc~c-v-D)*!5`p{ zGQI@@8a46IH<|a|%+7Y-KVIJe9Ah&N7porDJXAca6LP0YtMrWER%(?Ad)~0|ga)iBq size) { + throw new IndexOutOfBoundsException(); + } + for (int i = 0; i < index - 2; i++) { + + current = current.next; + } + + newNode.next = current.next; + current.next = newNode; + size++; + } + public Object get(int index){ + + + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } else if (index == 0) { + return head; + } + for (int i = 0;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Node p = null; + + while (head != null) { + Node next = head.next; + head.next = p; + p = head; + head = next; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎鍚庣殑鍊间负7,8,10 + + */ + public void removeFirstHalf(){ + for (int i = 0;i101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + int[] newList = new int[list.size()]; + for (int i=0;i min && (int) get(i) < max) { + remove(i); + } + } + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + if (list.size() == 0) { + return null; + } + LinkedList newList = new LinkedList(); + this.head = list.head; + Node temp; + + //纭畾鏂扮殑澶寸粨鐐 + if((int)this.head.data <= (int)list.head.data){ + head = this.head; + temp = this.head; + this.head = this.head.next; + }else{ + head = list.head; + temp = list.head; + list.head = list.head.next; + } + //鍚堝苟 + while(this.head != null && list.head!=null){ + if((int)this.head.data <= (int)list.head.data){ + temp.next = this.head; + temp = temp.next; + this.head = this.head.next; + }else{ + temp.next = list.head; + temp = temp.next; + list.head = list.head.next; + } + } + //鍚堝苟鍓╀綑鐨勫厓绱 + if(this.head != null){ + temp.next = this.head; + } + if(list.head != null){ + temp.next = list.head;; + } + return newList; + } +} diff --git a/group05/183127807/HomeWork0312/src/List.java b/group05/183127807/HomeWork0312/src/List.java new file mode 100644 index 0000000000..4f7bcc71a8 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/List.java @@ -0,0 +1,7 @@ +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group05/183127807/HomeWork0312/src/download/DownloadThread.java b/group05/183127807/HomeWork0312/src/download/DownloadThread.java new file mode 100644 index 0000000000..0bbd0184dc --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/DownloadThread.java @@ -0,0 +1,67 @@ +package download; + +import download.api.Connection; +import download.api.DownloadListener; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.RandomAccessFile; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +public class DownloadThread extends Thread{ + + + int startPos; + int endPos; + int threadID; + String url; + String savePath; + DownloadListener listener; + + + public DownloadThread( int threadID ,String url,int startPos, int endPos, + String savePath,DownloadListener listener){ + + this.threadID=threadID; + this.url = url; + this.startPos = startPos; + this.endPos = endPos; + this.savePath = savePath; + this.listener = listener; + } + public void run(){ + Connection conn=null; + RandomAccessFile raf = null; + try { + URL fileURL = new URL(url); + HttpURLConnection httpURLConnection = (HttpURLConnection) fileURL.openConnection(); + httpURLConnection.setReadTimeout(5000); + httpURLConnection.setRequestMethod("GET"); + + httpURLConnection.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + + File file = new File(savePath); + + if (file != null) { + raf = new RandomAccessFile(file, "rwd"); + } + raf.seek(startPos); + + InputStream inputStream = httpURLConnection.getInputStream(); + byte[] bytes = new byte[1024]; + int length = 0; + while ((length = inputStream.read(bytes)) != -1) { + raf.write(bytes,0,length); + } + inputStream.close(); + raf.close(); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group05/183127807/HomeWork0312/src/download/FileDownloader.java b/group05/183127807/HomeWork0312/src/download/FileDownloader.java new file mode 100644 index 0000000000..4c98345202 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/FileDownloader.java @@ -0,0 +1,73 @@ +package download; + +import download.api.Connection; +import download.api.ConnectionException; +import download.api.ConnectionManager; +import download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + int threadCount=3; + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + //new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group05/183127807/HomeWork0312/src/download/FileDownloaderTest.java b/group05/183127807/HomeWork0312/src/download/FileDownloaderTest.java new file mode 100644 index 0000000000..90c5184df7 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import download.api.ConnectionManager; +import download.api.DownloadListener; +import download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group05/183127807/HomeWork0312/src/download/api/Connection.java b/group05/183127807/HomeWork0312/src/download/api/Connection.java new file mode 100644 index 0000000000..1a467a8086 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/api/Connection.java @@ -0,0 +1,23 @@ +package download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group05/183127807/HomeWork0312/src/download/api/ConnectionException.java b/group05/183127807/HomeWork0312/src/download/api/ConnectionException.java new file mode 100644 index 0000000000..7873ff7dbd --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group05/183127807/HomeWork0312/src/download/api/ConnectionManager.java b/group05/183127807/HomeWork0312/src/download/api/ConnectionManager.java new file mode 100644 index 0000000000..a1d81751c3 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; + +} diff --git a/group05/183127807/HomeWork0312/src/download/api/DownloadListener.java b/group05/183127807/HomeWork0312/src/download/api/DownloadListener.java new file mode 100644 index 0000000000..4119e46144 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group05/183127807/HomeWork0312/src/download/impl/ConnectionImpl.java b/group05/183127807/HomeWork0312/src/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..6cfc55e3d8 --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/impl/ConnectionImpl.java @@ -0,0 +1,27 @@ +package download.impl; + +import java.io.IOException; + +import download.api.Connection; + +public class ConnectionImpl implements Connection{ + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + + return null; + } + + @Override + public int getContentLength() { + + return 0; + } + + @Override + public void close() { + + + } + +} diff --git a/group05/183127807/HomeWork0312/src/download/impl/ConnectionManagerImpl.java b/group05/183127807/HomeWork0312/src/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..393d761c9c --- /dev/null +++ b/group05/183127807/HomeWork0312/src/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,27 @@ +package download.impl; + +import download.api.Connection; +import download.api.ConnectionException; +import download.api.ConnectionManager; + +import java.net.MalformedURLException; +import java.net.URL; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + + return null; + } + + public int getContentLength(String url) throws ConnectionException{ + try { + URL newURL = new URL(url); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + return -1; + } + +} From bcec4f888b22c94ba1fb65616ed8275020046505 Mon Sep 17 00:00:00 2001 From: RalfNick Date: Sun, 12 Mar 2017 16:25:28 +0800 Subject: [PATCH 338/646] Ralf --- .../linkedlist/LinkedListTest.java" | 46 --- .../linkedlist/MyLinkedListTest.java" | 276 ++++++++++++++++++ ...7\347\253\240\351\223\276\346\216\245.txt" | 2 +- 3 files changed, 277 insertions(+), 47 deletions(-) delete mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" create mode 100644 "group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedListTest.java" diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" deleted file mode 100644 index 4a800335e5..0000000000 --- "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/LinkedListTest.java" +++ /dev/null @@ -1,46 +0,0 @@ -package com.ralf.linkedlist; - -import BasicData.MyIterator; - -public class LinkedListTest { - - /** - * @param args - */ - @SuppressWarnings("unchecked") - public static void main(String[] args) { - // TODO Auto-generated method stub - MyLinkedList list = new MyLinkedList<>(); - - MyLinkedList listB = new MyLinkedList<>(); - MyLinkedList listC = new MyLinkedList<>(); - list.add(11); - list.add(12); - list.add(13); - list.add(14); - list.add(15); - list.add(17); - list.add(18); - - listB.add(10); - listB.add(12); - listB.add(14); - listB.add(15); - listB.add(18); - - - listC = (MyLinkedList) list.intersection(listB); - - - System.out.println(listC.size()); - - MyIterator iterator = listC.iterator(); - while(iterator.hasNext()){ - Integer integer = iterator.Next(); - System.out.println(integer); - } - - - } - -} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedListTest.java" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedListTest.java" new file mode 100644 index 0000000000..8c3085962a --- /dev/null +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\225\260\346\215\256\347\273\223\346\236\204\347\273\203\344\271\240/linkedlist/MyLinkedListTest.java" @@ -0,0 +1,276 @@ +package MyLinkedListTest; + +import static org.junit.Assert.*; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.ralf.linkedlist.MyLinkedList; + +public class MyLinkedListTest { + + private MyLinkedList list = new MyLinkedList<>(); + @Before + public void setUp() throws Exception { + + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + + } + + @Test + public void reverse() { + + list.reverse(); + Assert.assertEquals(5, list.size()); + for(int i=0; i listA = new MyLinkedList<>(); + listA.add(2); + listA.add(5); + listA.add(7); + listA.add(8); + listA.removeFirstHalf(); + + Assert.assertEquals(2, listA.size()); + Assert.assertEquals(7, listA.get(0).intValue()); + Assert.assertEquals(8, listA.get(1).intValue()); + + } + + @Test + public void removeLastHalf(){ + + list.removeLastHalf(); + Assert.assertEquals(3, list.size()); + + for(int i=0; i listA = new MyLinkedList<>(); + listA.add(2); + listA.add(5); + listA.add(7); + listA.add(8); + listA.removeLastHalf(); + + Assert.assertEquals(2, listA.size()); + Assert.assertEquals(2, listA.get(0).intValue()); + Assert.assertEquals(5, listA.get(1).intValue()); + } + + //remove(int i, int length) + @Test + public void remove(){ + + list.remove(0, 5); + Assert.assertEquals(0, list.size()); + + MyLinkedList listA = new MyLinkedList<>(); + listA.add(2); + listA.add(5); + listA.add(7); + listA.add(8); + listA.add(9); + listA.add(10); + + listA.remove(1, 3); + Assert.assertEquals(3, listA.size()); + Assert.assertEquals(2, listA.get(0).intValue()); + Assert.assertEquals(9, listA.get(1).intValue()); + Assert.assertEquals(10, listA.get(2).intValue()); + } + + + //int[] getElements(MyLinkedList list) + @Test + public void getElements(){ + + MyLinkedList listA = new MyLinkedList<>(); + listA.add(11); + listA.add(101); + listA.add(201); + listA.add(301); + listA.add(401); + listA.add(501); + listA.add(601); + listA.add(701); + + MyLinkedList listB = new MyLinkedList<>(); + listB.add(1); + listB.add(3); + listB.add(4); + listB.add(6); + + int[] aar; + aar = listA.getElements(listB); + Assert.assertEquals(4, aar.length); + + Assert.assertEquals(101, aar[0]); + Assert.assertEquals(301, aar[1]); + Assert.assertEquals(401, aar[2]); + Assert.assertEquals(601, aar[3]); + + } + + + //subtract(MyLinkedList list) + @Test + public void subtract(){ + + MyLinkedList listA = new MyLinkedList<>(); + listA.add(11); + listA.add(101); + listA.add(201); + listA.add(301); + listA.add(401); + listA.add(501); + listA.add(601); + listA.add(701); + + MyLinkedList listB = new MyLinkedList<>(); + listB.add(201); + listB.add(301); + listB.add(501); + listB.add(801); + + listA.subtract(listB); + Assert.assertEquals(5, listA.size()); + + Assert.assertEquals(11, listA.get(0).intValue()); + Assert.assertEquals(101, listA.get(1).intValue()); + Assert.assertEquals(401, listA.get(2).intValue()); + Assert.assertEquals(601, listA.get(3).intValue()); + Assert.assertEquals(701, listA.get(4).intValue()); + } + + @Test + public void removeRepeatValues(){ + //自己的方法,但是是无序的,删除时是删除前面的相同元素 + MyLinkedList listA = new MyLinkedList<>(); + listA.add(11);// + listA.add(101);// + listA.add(101); + listA.add(301);// + listA.add(11); + listA.add(301); + listA.add(201);// + listA.add(701);// + + listA.removeRepeatValues(); + Assert.assertEquals(5, listA.size()); + + Assert.assertEquals(101, listA.get(0).intValue()); + Assert.assertEquals(11, listA.get(1).intValue()); + Assert.assertEquals(301, listA.get(2).intValue()); + Assert.assertEquals(201, listA.get(3).intValue()); + Assert.assertEquals(701, listA.get(4).intValue()); + } + + @Test + public void removeDuplicateValues(){ + + MyLinkedList listA = new MyLinkedList<>(); + + listA.add(11); + listA.add(11); + listA.add(12); + listA.add(13); + listA.add(14); + listA.add(14); + listA.add(15); + listA.add(16); + listA.add(16); + + listA.removeDuplicateValues(); + Assert.assertEquals(6, listA.size()); + + Assert.assertEquals(11, listA.get(0).intValue()); + Assert.assertEquals(12, listA.get(1).intValue()); + Assert.assertEquals(13, listA.get(2).intValue()); + Assert.assertEquals(14, listA.get(3).intValue()); + Assert.assertEquals(15, listA.get(4).intValue()); + Assert.assertEquals(16, listA.get(5).intValue()); + + } + + + //removeRange(int min, int max) + @Test + public void removeRange(){ + + MyLinkedList listA = new MyLinkedList<>(); + + listA.add(11); + listA.add(11); + listA.add(12); + listA.add(13); + listA.add(14); + listA.add(14); + listA.add(15); + listA.add(16); + listA.add(16); + + listA.removeRange(12, 16); + + Assert.assertEquals(5, listA.size()); + Assert.assertEquals(11, listA.get(0).intValue()); + Assert.assertEquals(11, listA.get(1).intValue()); + Assert.assertEquals(12, listA.get(2).intValue()); + Assert.assertEquals(16, listA.get(3).intValue()); + Assert.assertEquals(16, listA.get(4).intValue()); + + } + + @Test + public void intersection(){ + + MyLinkedList list = new MyLinkedList<>(); + MyLinkedList listB = new MyLinkedList<>(); + MyLinkedList listC = new MyLinkedList<>(); + + list.add(11); + list.add(12); + list.add(13); + list.add(14); + list.add(15); + list.add(17); + list.add(18); + + listB.add(10); + listB.add(12); + listB.add(14); + listB.add(15); + listB.add(18); + + + listC = (MyLinkedList) list.intersection(listB); + + Assert.assertEquals(4, listC.size()); + Assert.assertEquals(12, listC.get(0).intValue()); + Assert.assertEquals(14, listC.get(1).intValue()); + Assert.assertEquals(15, listC.get(2).intValue()); + Assert.assertEquals(18, listC.get(3).intValue()); + } + +} diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" index a200b0a2fc..b765c9b696 100644 --- "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" @@ -1 +1 @@ -csdn在审核,稍后给出 \ No newline at end of file +锘縞sdn鍦ㄥ鏍镐腑锛岀◢鍚庤ˉ涓 \ No newline at end of file From 17737812fd084d5ae3033984e4ad8ccecfe16978 Mon Sep 17 00:00:00 2001 From: Cary Date: Sun, 12 Mar 2017 16:25:52 +0800 Subject: [PATCH 339/646] fix bug --- group01/349209948/src/week1_0226/LinkedList.java | 1 + 1 file changed, 1 insertion(+) diff --git a/group01/349209948/src/week1_0226/LinkedList.java b/group01/349209948/src/week1_0226/LinkedList.java index 2815f8fc58..e11e41f81b 100644 --- a/group01/349209948/src/week1_0226/LinkedList.java +++ b/group01/349209948/src/week1_0226/LinkedList.java @@ -253,6 +253,7 @@ public void removeDuplicateValues(){ Node subTail = head; while(true) { if (subTail == null) { + subHead.next = null; break; } if ((int)subTail.data == (int)subHead.data) { From 1598694e06831c44288a693623ad832480eaf5fe Mon Sep 17 00:00:00 2001 From: Liam Cao Date: Sun, 12 Mar 2017 16:26:14 +0800 Subject: [PATCH 340/646] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鍩烘湰鏁版嵁缁撴瀯鐨勫疄鐜 --- group27/276961139/src/learn/ArrayList.java | 93 +++++++ .../276961139/src/learn/BinaryTreeNode.java | 46 ++++ group27/276961139/src/learn/Iterator.java | 7 + group27/276961139/src/learn/LinkedList.java | 249 ++++++++++++++++++ group27/276961139/src/learn/List.java | 9 + group27/276961139/src/learn/Queue.java | 23 ++ group27/276961139/src/learn/Stack.java | 23 ++ 7 files changed, 450 insertions(+) create mode 100644 group27/276961139/src/learn/ArrayList.java create mode 100644 group27/276961139/src/learn/BinaryTreeNode.java create mode 100644 group27/276961139/src/learn/Iterator.java create mode 100644 group27/276961139/src/learn/LinkedList.java create mode 100644 group27/276961139/src/learn/List.java create mode 100644 group27/276961139/src/learn/Queue.java create mode 100644 group27/276961139/src/learn/Stack.java diff --git a/group27/276961139/src/learn/ArrayList.java b/group27/276961139/src/learn/ArrayList.java new file mode 100644 index 0000000000..c0993491d1 --- /dev/null +++ b/group27/276961139/src/learn/ArrayList.java @@ -0,0 +1,93 @@ +package com.liam.learn.code2017; + +import java.lang.reflect.Array; +import java.util.Arrays; + +public class ArrayList implements List { + + private int capacity = 10; + private int size = 0; + + private Object[] elementData = null; //new Object[100]; + + public ArrayList(){ + this.capacity = capacity; + elementData = new Object[capacity]; + } + + public ArrayList(int custCapacity) { + if(custCapacity <= 0){ + throw new IllegalArgumentException("Arraylist 闀垮害涓嶈兘涓鸿礋鏁版垨0"); + } + this.capacity = custCapacity; + elementData = new Object[capacity]; + } + + public void add(Object o){ + if (size >= capacity){ + enlargeCapacity(); + } + elementData[size] = o; + size++; + } + public void add(int index, Object o){ + if(index <0 || index >= size){ + throw new IllegalArgumentException("鏁扮粍瓒婄晫"); + } + if (size >= capacity){ + enlargeCapacity(); + } + System.arraycopy(elementData, index, elementData, index+1, size - index); + elementData[index] = o; + size++; + } + + public Object get(int index){ + if(index <0 || index >= size){ + throw new IllegalArgumentException("鏁扮粍瓒婄晫"); + } + return elementData[index]; + } + + public Object remove(int index){ + Object removedObj = get(index); + + int movedSize = size - (index + 1); + if (movedSize > 0) { + System.arraycopy(elementData, index+1, elementData, index, movedSize); + } + elementData[--size] = null; + + return removedObj; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return null; + } + + + @Override + public String toString() { + if (size < capacity){ + //int needRemove = capacity - size; + Object[] toStringObj = new Object[size]; + System.arraycopy(elementData, 0, toStringObj, 0, size); + return Arrays.toString(toStringObj); + } + return Arrays.toString(elementData); + } + + private void enlargeCapacity(){ + capacity = capacity * 2; + Object[] temp = new Object[capacity]; + System.arraycopy(elementData, 0, temp, 0, size); + elementData = temp; + } + + + +} diff --git a/group27/276961139/src/learn/BinaryTreeNode.java b/group27/276961139/src/learn/BinaryTreeNode.java new file mode 100644 index 0000000000..86e8d5ce7b --- /dev/null +++ b/group27/276961139/src/learn/BinaryTreeNode.java @@ -0,0 +1,46 @@ +package com.liam.learn.code2017; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(Object data) { + this.data = data; + } + + public BinaryTreeNode() { + } + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + + if (left != null){ + return left = new BinaryTreeNode(o); + } + if (right !=null){ + return right = new BinaryTreeNode(o); + } + throw new RuntimeException("宸﹀彸瀛愭爲宸茬粡閮芥湁鍊间簡"); + } + +} diff --git a/group27/276961139/src/learn/Iterator.java b/group27/276961139/src/learn/Iterator.java new file mode 100644 index 0000000000..0f85a64dfd --- /dev/null +++ b/group27/276961139/src/learn/Iterator.java @@ -0,0 +1,7 @@ +package com.liam.learn.code2017; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group27/276961139/src/learn/LinkedList.java b/group27/276961139/src/learn/LinkedList.java new file mode 100644 index 0000000000..7a47325468 --- /dev/null +++ b/group27/276961139/src/learn/LinkedList.java @@ -0,0 +1,249 @@ +package com.liam.learn.code2017; + + + +public class LinkedList implements List { + private int size; + + private Node head; + + private Node tail; + + public void add(Object o){ + Node node = new Node(o, null); + if(head == null){ + head = node; + tail = node; + }else{ + tail.setNext(node); + tail = node; + } + size++; + } + public void add(int index , Object o){ + if (index < 0 || index >= size){ + throw new IllegalArgumentException("閾捐〃瓒婄晫"); + } + if (index == 0){ + addFirst(o); + }else if(index == size-1){ + addLast(o); + }else{ + Node indexNode = getNode(index); + Node newNode = new Node(o, indexNode); + Node previousNode = getNode(index-1); + previousNode.setNext(newNode); + } + size++; + } + public Object get(int index){ + Node node = getNode(index); + return node.getData(); + } + + private Node getNode(int index){ + if (index < 0 || index >= size){ + throw new IllegalArgumentException("閾捐〃瓒婄晫"); + } + if(index == 0){ + return head; + } + if(index == size-1){ + return tail; + } + Node temp = head; + for(int i=0; i= size){ + throw new IllegalArgumentException("閾捐〃瓒婄晫"); + } + + if (index == 0){ + return removeFirst(); + }else if(index == size-1){ + return removeLast(); + }else{ + Node previousNode = getNode(index-1); + Node nextNode = getNode(index+1); + previousNode.setNext(nextNode); + size--; + } + return get(index); + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + Node node = new Node(o, null); + if(head == null){ + head = node; + tail = node; + }else{ + node.setNext(head); + head = node; + } + size++; + } + public void addLast(Object o){ + Node node = new Node(o, null); + if(head == null){ + head = node; + tail = node; + }else{ + tail.setNext(node); + tail = node; + } + size++; + } + public Object removeFirst(){ + if (head == null){ + throw new RuntimeException("閾捐〃涓虹┖"); + } + Object headData = head.getData(); + head = getNode(1); + size--; + return headData; + } + public Object removeLast(){ + if (head == null){ + throw new RuntimeException("閾捐〃涓虹┖"); + } + Object tailData = tail.getData(); + tail = getNode(size-2); + size--; + return tailData; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + private Object data; + private Node next; + + public Node(Object data, Node next) { + this.data = data; + this.next = next; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + if(size == 0 || size ==1){ + return; + } + /*LinkedList linkedList = new LinkedList(); + for(int i=size-1; i>=0; i--){ + linkedList.add(getNode(i)); + }*/ + + Node temp = head; + head = tail; + tail = temp; + for(int i=size-2; i>=1; i--){ + getNode(i+1).setNext(getNode(i)); + } + getNode(1).setNext(tail); + } + + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int pre = size/2; + for (int i=0; i101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/276961139/src/learn/List.java b/group27/276961139/src/learn/List.java new file mode 100644 index 0000000000..9b5fc82f83 --- /dev/null +++ b/group27/276961139/src/learn/List.java @@ -0,0 +1,9 @@ +package com.liam.learn.code2017; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/276961139/src/learn/Queue.java b/group27/276961139/src/learn/Queue.java new file mode 100644 index 0000000000..e69a97da88 --- /dev/null +++ b/group27/276961139/src/learn/Queue.java @@ -0,0 +1,23 @@ +package com.liam.learn.code2017; + +public class Queue { + + private LinkedList linkedList; + + public void enQueue(Object o){ + linkedList = new LinkedList(); + linkedList.add(o); + } + + public Object deQueue(){ + return linkedList.removeFirst(); + } + + public boolean isEmpty(){ + return linkedList.size()==0; + } + + public int size(){ + return linkedList.size(); + } +} diff --git a/group27/276961139/src/learn/Stack.java b/group27/276961139/src/learn/Stack.java new file mode 100644 index 0000000000..1fc79645f1 --- /dev/null +++ b/group27/276961139/src/learn/Stack.java @@ -0,0 +1,23 @@ +package com.liam.learn.code2017; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return elementData.size()==0; + } + public int size(){ + return elementData.size(); + } +} From dcd38a89240c06c8c2301d2a92f52900ecda44de Mon Sep 17 00:00:00 2001 From: Haochen Date: Sun, 12 Mar 2017 16:26:15 +0800 Subject: [PATCH 341/646] refactor multi-thread downloading --- .../code/src/download/FileDownloader.java | 7 +++---- .../code/src/download/impl/ConnectionImpl.java | 16 ++++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/group01/895457260/code/src/download/FileDownloader.java b/group01/895457260/code/src/download/FileDownloader.java index 2086463bbc..f72d371788 100644 --- a/group01/895457260/code/src/download/FileDownloader.java +++ b/group01/895457260/code/src/download/FileDownloader.java @@ -17,10 +17,9 @@ public class FileDownloader { private final int[] completedThreadCount = new int[1]; /** - * 涓嬭浇鐩綍瑙 Config + * 涓嬭浇涓涓猽rl鎸囧悜鐨勬枃浠讹紝涓嬭浇鐩綍瑙 Config + * * @see Config#targetDirectory - * @see #setConnectionManager(ConnectionManager) - * @see #setListener(DownloadListener) * @see #execute() */ public FileDownloader(String url) { @@ -201,7 +200,7 @@ public void setListener(DownloadListener listener) { /** * - * @param manager 閫氳繃url锛屾墦寮杩炴帴 + * @param manager 閫氳繃url鎵撳紑杩炴帴 * @see ConnectionManager#open(String) */ public void setConnectionManager(ConnectionManager manager) { diff --git a/group01/895457260/code/src/download/impl/ConnectionImpl.java b/group01/895457260/code/src/download/impl/ConnectionImpl.java index b9bcc3b3e6..74e431a324 100644 --- a/group01/895457260/code/src/download/impl/ConnectionImpl.java +++ b/group01/895457260/code/src/download/impl/ConnectionImpl.java @@ -12,19 +12,19 @@ public class ConnectionImpl implements Connection { private InputStream inputStream; ConnectionImpl(String url) throws ConnectionException { - init(url); - } - - private void init(String url) { try { - connection = new URL(url).openConnection(); - inputStream = new BufferedInputStream(connection.getInputStream()); - inputStream.mark(connection.getContentLength()); // 鏍囪鍦ㄥ紑澶 + init(url); } catch (IOException e) { - e.printStackTrace(); + throw new ConnectionException(); } } + private void init(String url) throws IOException { + connection = new URL(url).openConnection(); + inputStream = new BufferedInputStream(connection.getInputStream()); + inputStream.mark(connection.getContentLength()); // 鏍囪鍦ㄥ紑澶 + } + @Override public byte[] read(int startPos, int endPos) throws IOException { inputStream.reset(); // reset鍥炲埌鏍囪澶 From bfd4740508b70d0f06decc4659243366850e7f34 Mon Sep 17 00:00:00 2001 From: zheng <765324639@qq.com> Date: Sun, 12 Mar 2017 16:26:33 +0800 Subject: [PATCH 342/646] =?UTF-8?q?=E4=BF=AE=E5=A4=8DremoveDuplicateValues?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=AD=E6=B2=A1=E6=9C=89=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=B0=BE=E9=83=A8=E9=87=8D=E5=A4=8D=E5=85=83=E7=B4=A0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group01/765324639/src/zavier/week01/basic/LinkedList.java | 1 + 1 file changed, 1 insertion(+) diff --git a/group01/765324639/src/zavier/week01/basic/LinkedList.java b/group01/765324639/src/zavier/week01/basic/LinkedList.java index 5f2a191739..6e15220b34 100644 --- a/group01/765324639/src/zavier/week01/basic/LinkedList.java +++ b/group01/765324639/src/zavier/week01/basic/LinkedList.java @@ -290,6 +290,7 @@ public void removeDuplicateValues() { while (true) { if (subTail == null) { + subHead.next = null; // 娓呴櫎灏鹃儴閲嶅鐨勫厓绱 break; } if ((int) subTail.data == (int) subHead.data) { From d861153596bd52f79d5ffb20eff07a5221bafe7a Mon Sep 17 00:00:00 2001 From: kilien Date: Sun, 12 Mar 2017 16:27:28 +0800 Subject: [PATCH 343/646] week03 --- .../coderising/download/DownloadThread.java | 42 +++++++ .../coderising/download/FileDownloader.java | 111 ++++++++++++++++++ .../download/FileDownloaderTest.java | 59 ++++++++++ .../coderising/download/api/Connection.java | 26 ++++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 ++ .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 51 ++++++++ .../download/impl/ConnectionManagerImpl.java | 35 ++++++ 9 files changed, 344 insertions(+) create mode 100644 group09/790466157/src/com/coderising/download/DownloadThread.java create mode 100644 group09/790466157/src/com/coderising/download/FileDownloader.java create mode 100644 group09/790466157/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group09/790466157/src/com/coderising/download/api/Connection.java create mode 100644 group09/790466157/src/com/coderising/download/api/ConnectionException.java create mode 100644 group09/790466157/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group09/790466157/src/com/coderising/download/api/DownloadListener.java create mode 100644 group09/790466157/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group09/790466157/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group09/790466157/src/com/coderising/download/DownloadThread.java b/group09/790466157/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..a1f93a1134 --- /dev/null +++ b/group09/790466157/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,42 @@ +package com.coderising.download; + + +import java.io.RandomAccessFile; +import java.util.concurrent.CyclicBarrier; + + +//import org.omg.CORBA.portable.InputStream; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + CyclicBarrier barrier ; + String filePath; + + public DownloadThread(CyclicBarrier barrier , Connection conn, int startPos, int endPos , String filePath){ + + this.barrier = barrier; + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.filePath = filePath; + } + public void run(){ + try{ + System.out.println("begin download startPos="+startPos+",endPos="+endPos); + byte[] buffer = conn.read(startPos , endPos); + RandomAccessFile file = new RandomAccessFile(filePath, "rw"); + file.seek(startPos); + file.write(buffer, 0, buffer.length); + file.close(); + barrier.await(); + }catch(Exception e){ + System.out.println("download error:startPos="+startPos+",endPos="+endPos); + } + } + +} diff --git a/group09/790466157/src/com/coderising/download/FileDownloader.java b/group09/790466157/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..107e4cc433 --- /dev/null +++ b/group09/790466157/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,111 @@ +package com.coderising.download; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.concurrent.CyclicBarrier; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + private static final int THREAD_NUM = 3; + + private static final String BASE_PATH = "C:/Users/Liner/Desktop/Document/Doc"; + + boolean isFinished = false; + + public FileDownloader(String _url) { + this.url = _url; + File baseFile = new File(BASE_PATH); + if(!baseFile.exists()){ + baseFile.mkdirs(); + } + } + + public void execute(){ + + CyclicBarrier barrier = new CyclicBarrier(THREAD_NUM, new Runnable() { + + @Override + public void run() { + listener.notifyFinished(); + } + }); + + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + String filePath = BASE_PATH + "download."+getFileType(this.url); + //System.out.println(filePath); + + File file = new File(filePath); + if(!file.exists()){ + try { + file.createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + } + } + try{ + FileOutputStream fos = new FileOutputStream(file); + fos.write(new byte[length], 0, length);//鍗犱綅 + fos.close(); + } + catch (IOException e) { + System.out.println(e.getMessage()); + } + + int blockSize = (length % THREAD_NUM == 0 ) ? length / THREAD_NUM : (length / THREAD_NUM + 1); + for (int i = 0; i < THREAD_NUM; i++) { + int startPos = i * blockSize; + int endPos = startPos + blockSize - 1; + if(endPos >= length - 1){ + endPos = length - 1; + } + new DownloadThread(barrier , conn, startPos, endPos , filePath).start(); + } + + } catch (ConnectionException e) { + System.out.println(e.getMessage()); + } finally{ + if(conn != null){ + conn.close(); + } + } + + } + + private String getFileType(String url) { + int index = url.lastIndexOf("."); + return url.substring(index + 1 , url.length()); + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/FileDownloaderTest.java b/group09/790466157/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..a79d23d9c5 --- /dev/null +++ b/group09/790466157/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1488796402240&di=8ca9322617d5338cad61232a06f6ed7a&imgtype=0&src=http%3A%2F%2Fjiangsu.china.com.cn%2Fuploadfile%2F2017%2F0212%2F1486868426284307.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 锟饺达拷锟斤拷锟竭筹拷锟斤拷锟截筹拷锟斤拷执锟斤拷锟斤拷锟 + while (!downloadFinished) { + try { + System.out.println("锟斤拷没锟斤拷锟斤拷锟斤拷锟斤拷桑锟斤拷锟斤拷锟斤拷锟斤拷锟"); + //锟斤拷锟斤拷5锟斤拷 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("锟斤拷锟斤拷锟斤拷桑锟"); + + + + } + +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/api/Connection.java b/group09/790466157/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..fe772d969c --- /dev/null +++ b/group09/790466157/src/com/coderising/download/api/Connection.java @@ -0,0 +1,26 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 给定开始和结束位置, 读取数据, 返回值是字节数组 + * @param startPos 开始位置, 从0开始 + * @param endPos 结束位置 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 得到数据内容的长度 + * @return + */ + public int getContentLength(); + + /** + * 关闭连接 + */ + public void close(); + public Connection open(Object url); +} + + diff --git a/group09/790466157/src/com/coderising/download/api/ConnectionException.java b/group09/790466157/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..132bf8fbdd --- /dev/null +++ b/group09/790466157/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/api/ConnectionManager.java b/group09/790466157/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..e6a9811662 --- /dev/null +++ b/group09/790466157/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 给定一个url , 打开一个连接 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/api/DownloadListener.java b/group09/790466157/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..64ac13231b --- /dev/null +++ b/group09/790466157/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/impl/ConnectionImpl.java b/group09/790466157/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..a0bea92f06 --- /dev/null +++ b/group09/790466157/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,51 @@ +package com.coderising.download.impl; + + +import java.io.IOException; + + + +import org.omg.CORBA.portable.InputStream; + +import com.coderising.download.api.Connection; + + +import java.net.URLConnection; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + +private URLConnection connection; + + @Override + public byte[] read(int startPos, int endPos) throws IOException { +// connection.setAllowUserInteraction(true); +// connection.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + InputStream inputstream = (InputStream) connection.getInputStream(); + byte[] buffer = new byte[endPos - startPos + 1]; + inputstream.skip(startPos); + inputstream.read(buffer); + inputstream.close(); + return buffer; + } + + @Override + public int getContentLength(){ + return connection.getContentLength(); + } + + @Override + public void close() { + } + + public void setConnection(URLConnection connection) { + this.connection = connection; + } + + @Override + public Connection open(Object url) { + // TODO Auto-generated method stub + return null; + } +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group09/790466157/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..99bdec847f --- /dev/null +++ b/group09/790466157/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,35 @@ +package com.coderising.download.impl; + + + + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + + + + +import com.coderising.download.api.Connection; +import com.coderising.download.impl.ConnectionImpl; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + URL urlObj ; + ConnectionImpl connection = null; + try { + urlObj = new URL(url); + connection = new ConnectionImpl(); + } catch (MalformedURLException e) { + throw new ConnectionException(); + } + return connection; + } +} \ No newline at end of file From 5fba770f425477461b4a53cddc1f22fbd1c8f7c5 Mon Sep 17 00:00:00 2001 From: Fred Qin Date: Sun, 12 Mar 2017 00:29:28 -0800 Subject: [PATCH 344/646] =?UTF-8?q?downloader=20=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E4=BB=8D=E7=84=B6=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group11/395443277/.gitignore | 3 +- group11/395443277/pom.xml | 35 ++++++++ .../coderising/download/DownloadThread.java | 29 +++++-- .../coderising/download/FileDownloader.java | 80 ++++++++++++------- .../download/FileDownloaderTest.java | 4 +- .../coderising/download/api/Connection.java | 2 +- .../download/impl/ConnectionImpl.java | 45 +++++++++-- .../download/impl/ConnectionManagerImpl.java | 4 +- .../src/com/coderising/litestruts/struts.xml | 16 ++-- 9 files changed, 160 insertions(+), 58 deletions(-) create mode 100644 group11/395443277/pom.xml diff --git a/group11/395443277/.gitignore b/group11/395443277/.gitignore index e02fdb6730..ad2c4db410 100644 --- a/group11/395443277/.gitignore +++ b/group11/395443277/.gitignore @@ -108,4 +108,5 @@ local.properties .scala_dependencies -.worksheet \ No newline at end of file +.worksheet +/target/ diff --git a/group11/395443277/pom.xml b/group11/395443277/pom.xml new file mode 100644 index 0000000000..becb81d519 --- /dev/null +++ b/group11/395443277/pom.xml @@ -0,0 +1,35 @@ + + 4.0.0 + 2017Learning + 2017Learning + 0.0.1-SNAPSHOT + + src + + + src + + **/*.java + + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + + com.google.guava + guava + 21.0 + + + \ No newline at end of file diff --git a/group11/395443277/src/com/coderising/download/DownloadThread.java b/group11/395443277/src/com/coderising/download/DownloadThread.java index 900a3ad358..8428d2ada8 100644 --- a/group11/395443277/src/com/coderising/download/DownloadThread.java +++ b/group11/395443277/src/com/coderising/download/DownloadThread.java @@ -1,20 +1,35 @@ package com.coderising.download; -import com.coderising.download.api.Connection; +import java.io.IOException; +import java.io.RandomAccessFile; -public class DownloadThread extends Thread{ +import com.coderising.download.api.Connection; +public class DownloadThread extends Thread { Connection conn; int startPos; int endPos; + String filePath; - public DownloadThread( Connection conn, int startPos, int endPos){ - - this.conn = conn; + public DownloadThread(Connection conn, int startPos, int endPos, String filePath) { + this.conn = conn; this.startPos = startPos; this.endPos = endPos; + this.filePath = filePath; } - public void run(){ - + + public void run() { + try { + synchronized (filePath.getClass()) { + byte[] bytes = conn.read(startPos, endPos); + RandomAccessFile RAFile = new RandomAccessFile(filePath, "rw"); + RAFile.seek(startPos); + RAFile.write(bytes, 0, bytes.length); + RAFile.close(); + } + + } catch (IOException e) { + e.printStackTrace(); + } } } diff --git a/group11/395443277/src/com/coderising/download/FileDownloader.java b/group11/395443277/src/com/coderising/download/FileDownloader.java index c3c8a3f27d..7cd70f4b81 100644 --- a/group11/395443277/src/com/coderising/download/FileDownloader.java +++ b/group11/395443277/src/com/coderising/download/FileDownloader.java @@ -1,73 +1,91 @@ package com.coderising.download; +import java.io.File; +import java.io.RandomAccessFile; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; - public class FileDownloader { - + String url; - + DownloadListener listener; - + ConnectionManager cm; - public FileDownloader(String _url) { this.url = _url; - } - - public void execute(){ + + public void execute() { // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; try { - conn = cm.open(this.url); + + int length = conn.getContentLength(); + + // Separate length to 3 + int partLen = (int) Math.ceil(length / 3); + + // create a file + String filePath = "D://java_learning//test.jpg"; + + // create three threads +// DownloadThread t1 = new DownloadThread(cm.open(this.url), 0, partLen - 1, filePath); +// t1.start(); +// t1.join(); +// +// DownloadThread t2 = new DownloadThread(cm.open(this.url), partLen, partLen * 2 - 1, filePath); +// t2.start(); +// t2.join(); +// +// DownloadThread t3 =new DownloadThread(cm.open(this.url), partLen * 2, length - 1, filePath); +// t3.start(); +// t3.join(); + + new DownloadThread(cm.open(this.url), 0, length-1, filePath).start(); - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); +// getListener().notifyFinished(); - } catch (ConnectionException e) { + } catch (ConnectionException e) { e.printStackTrace(); - }finally{ - if(conn != null){ + } finally { + if (conn != null) { conn.close(); } } - - - - + } - + public void setListener(DownloadListener listener) { this.listener = listener; } - - - public void setConnectionManager(ConnectionManager ucm){ + public void setConnectionManager(ConnectionManager ucm) { this.cm = ucm; } - - public DownloadListener getListener(){ + + public DownloadListener getListener() { return this.listener; } - + } diff --git a/group11/395443277/src/com/coderising/download/FileDownloaderTest.java b/group11/395443277/src/com/coderising/download/FileDownloaderTest.java index 4ff7f46ae0..7e4d8d789d 100644 --- a/group11/395443277/src/com/coderising/download/FileDownloaderTest.java +++ b/group11/395443277/src/com/coderising/download/FileDownloaderTest.java @@ -21,7 +21,9 @@ public void tearDown() throws Exception { @Test public void testDownload() { - String url = "http://localhost:8080/test.jpg"; +// String url = "https://s-media-cache-ak0.pinimg.com/564x/8e/bd/00/8ebd00b1f2ef862b6c80d57c2b45d129.jpg"; + // http://wallpapercraze.com/images/wallpapers/dota2_nevermore_w1.jpeg + String url = "https://i.ytimg.com/vi/xMV2s5f3f0E/hqdefault.jpg"; FileDownloader downloader = new FileDownloader(url); diff --git a/group11/395443277/src/com/coderising/download/api/Connection.java b/group11/395443277/src/com/coderising/download/api/Connection.java index 0957eaf7f4..5443fca61e 100644 --- a/group11/395443277/src/com/coderising/download/api/Connection.java +++ b/group11/395443277/src/com/coderising/download/api/Connection.java @@ -2,7 +2,7 @@ import java.io.IOException; -public interface Connection { +public interface Connection{ /** * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 * @param startPos 寮濮嬩綅缃紝 浠0寮濮 diff --git a/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java b/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java index 36a9d2ce15..cde4246282 100644 --- a/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group11/395443277/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,27 +1,58 @@ package com.coderising.download.impl; import java.io.IOException; - +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; import com.coderising.download.api.Connection; -public class ConnectionImpl implements Connection{ +public class ConnectionImpl implements Connection { + HttpURLConnection urlcon = null; + InputStream is; + + public ConnectionImpl(String url) { + try { + URL imgUrl = new URL(url); + urlcon = (HttpURLConnection) imgUrl.openConnection(); + is = urlcon.getInputStream(); + } catch (Exception e) { + System.out.println(e); + } + } @Override public byte[] read(int startPos, int endPos) throws IOException { - - return null; + byte[] bytes = new byte[endPos - startPos + 1]; + + // Read in the bytes + int offset = startPos; + int numRead = 0; + while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) { + offset += numRead; + } + + return bytes; } @Override public int getContentLength() { - + String contentLength = urlcon.getHeaderField("content-Length"); + + if (contentLength != null) { + return Integer.parseInt(contentLength); + } + return 0; } @Override public void close() { - - + try { + is.close(); + System.out.println("one connection is closed"); + } catch (IOException e) { + e.printStackTrace(); + } } } diff --git a/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java index 172371dd55..21ae4b4f08 100644 --- a/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group11/395443277/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -8,8 +8,8 @@ public class ConnectionManagerImpl implements ConnectionManager { @Override public Connection open(String url) throws ConnectionException { - - return null; + Connection cn = new ConnectionImpl(url); + return cn; } } diff --git a/group11/395443277/src/com/coderising/litestruts/struts.xml b/group11/395443277/src/com/coderising/litestruts/struts.xml index 7f8d558286..1b5028b0bd 100644 --- a/group11/395443277/src/com/coderising/litestruts/struts.xml +++ b/group11/395443277/src/com/coderising/litestruts/struts.xml @@ -1,11 +1,11 @@ - - /jsp/homepage.jsp - /jsp/showLogin.jsp - - - /jsp/welcome.jsp - /jsp/error.jsp - + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + \ No newline at end of file From 8d4190b7e007490b935776df04641d49b89b269b Mon Sep 17 00:00:00 2001 From: RalfNick Date: Sun, 12 Mar 2017 16:30:40 +0800 Subject: [PATCH 345/646] Ralf --- .../\346\226\207\347\253\240\351\223\276\346\216\245.txt" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" index b765c9b696..d3f65d64ee 100644 --- "a/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" +++ "b/group20/925290009/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\207\347\253\240\351\223\276\346\216\245.txt" @@ -1 +1 @@ -锘縞sdn鍦ㄥ鏍镐腑锛岀◢鍚庤ˉ涓 \ No newline at end of file +锘縣ttp://blog.csdn.net/u011371324/article/details/61618954 \ No newline at end of file From 821f3598c4fe2fc0e1f66726f12c14557c9e3744 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Sun, 12 Mar 2017 16:36:33 +0800 Subject: [PATCH 346/646] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group02/812350401/test.png | Bin 100384 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 group02/812350401/test.png diff --git a/group02/812350401/test.png b/group02/812350401/test.png deleted file mode 100644 index 40c982a45cc70d81071ffcee052e71bf6a5f52cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 100384 zcmb5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_e;2@y%#th#IA>LH4UO%EaI4hC*;DJ7~lX@y5L z+Sb61aZb}uDtb`~X@SLO50OH`Q>9+AHZk6r8((^=NJ4|}S_RJ|QC3J?bgG>JZj{4M zKnSKQ@KQmHaaO!uo|M8UcPKcoO92A5!7);%gSpNPFuPKQmQ5yeT>5Gg-JPbWisNh1 zS4dg9P~rpaisyCEeZ9bL)O<{Yaw#-OREj<&V_W9dEW=m=Z8*hxtF}Y1@m{U60xOd8 zePoJ_?fg+k>MdTcRVo4a0tfw*S&O}97Lt2V3)CyAy<3lkOt zy$<@(lou|=y{pyg#p<;oO~#=#vIi`9Jt@YSf4NkvVXM{ZCs$37;WadoN=%`%#%U(4 zq@~$o2;}o#uUB4JW-qi0uclN4cB*W=CoHY#Qbu|j^?H=mS@>2+6mE?P1Nf#9X%Z(J z0Iyf7stipwKq~n3qT?G$uUD%DYUpD;fIoUN-$zs<0AyFI)u^fEow$uaz~ZiQ>bzI0 z)u2~d<=58v_!G@%95oYe#AB(iSF0@<#T4!VRpO0@PnEuN)`fN zr8?8?cHrPwtJP1cw6>7?KGl1m0N1P4(Sqxi+sLY;oSOA|v1@U7m9g_xNh@Z(UZYkb zllK1ry%QS}E7j_`T?f0jE~Mg=O=iH71$w<&qAOUOaf+9g_~~A+R!gZH9x+x6c0EOU zy+T53ZaEpDjlcY&ydRME|z=Mn))W1=3V`4-pRjEuUD&53-H1ib|+5t>h*e&AOG0~ CkEzK3 From 63baa65db94958b318422b9fef9ef0079d4e658f Mon Sep 17 00:00:00 2001 From: vegetableDogBai Date: Sun, 12 Mar 2017 16:39:28 +0800 Subject: [PATCH 347/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coderising/array/ArrayUtil.java | 96 +++++ .../coderising/download/DownloadThread.java | 35 ++ .../coderising/download/FileDownloader.java | 73 ++++ .../download/FileDownloaderTest.java | 59 +++ .../coderising/download/api/Connection.java | 27 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 65 ++++ .../download/impl/ConnectionManagerImpl.java | 21 ++ .../coderising/litestruts/LoginAction.java | 39 ++ .../src/com/coderising/litestruts/Struts.java | 34 ++ .../com/coderising/litestruts/StrutsTest.java | 43 +++ .../src/com/coderising/litestruts/View.java | 23 ++ .../week3/src/com/coding/basic/ArrayList.java | 32 ++ .../src/com/coding/basic/BinaryTreeNode.java | 32 ++ .../week3/src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 345 ++++++++++++++++++ .../week3/src/com/coding/basic/List.java | 9 + .../week3/src/com/coding/basic/Queue.java | 19 + .../week3/src/com/coding/basic/Stack.java | 22 ++ .../test/com/coding/basic/LinkedListTest.java | 297 +++++++++++++++ 22 files changed, 1298 insertions(+) create mode 100644 group12/563253496/week3/src/com/coderising/array/ArrayUtil.java create mode 100644 group12/563253496/week3/src/com/coderising/download/DownloadThread.java create mode 100644 group12/563253496/week3/src/com/coderising/download/FileDownloader.java create mode 100644 group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group12/563253496/week3/src/com/coderising/download/api/Connection.java create mode 100644 group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java create mode 100644 group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java create mode 100644 group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group12/563253496/week3/src/com/coderising/litestruts/LoginAction.java create mode 100644 group12/563253496/week3/src/com/coderising/litestruts/Struts.java create mode 100644 group12/563253496/week3/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group12/563253496/week3/src/com/coderising/litestruts/View.java create mode 100644 group12/563253496/week3/src/com/coding/basic/ArrayList.java create mode 100644 group12/563253496/week3/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group12/563253496/week3/src/com/coding/basic/Iterator.java create mode 100644 group12/563253496/week3/src/com/coding/basic/LinkedList.java create mode 100644 group12/563253496/week3/src/com/coding/basic/List.java create mode 100644 group12/563253496/week3/src/com/coding/basic/Queue.java create mode 100644 group12/563253496/week3/src/com/coding/basic/Stack.java create mode 100644 group12/563253496/week3/src/test/com/coding/basic/LinkedListTest.java diff --git a/group12/563253496/week3/src/com/coderising/array/ArrayUtil.java b/group12/563253496/week3/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..e5ddb476a6 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,96 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + return null; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + return null; + } + /** + * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size + * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 + * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 + * [2,3,6,0,0,0] + * @param oldArray + * @param size + * @return + */ + public int[] grow(int [] oldArray, int size){ + return null; + } + + /** + * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 + * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] + * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] + * @param max + * @return + */ + public int[] fibonacci(int max){ + return null; + } + + /** + * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 + * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] + * @param max + * @return + */ + public int[] getPrimes(int max){ + return null; + } + + /** + * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 + * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 + * @param max + * @return + */ + public int[] getPerfectNumbers(int max){ + return null; + } + + /** + * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 + * 渚嬪array= [3,8,9], seperator = "-" + * 鍒欒繑鍥炲间负"3-8-9" + * @param array + * @param s + * @return + */ + public String join(int[] array, String seperator){ + return null; + } + + +} diff --git a/group12/563253496/week3/src/com/coderising/download/DownloadThread.java b/group12/563253496/week3/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..f72faffa7f --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,35 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.RandomAccessFile; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + private String position; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + try { + + RandomAccessFile raf = new RandomAccessFile(new File(position),"rws") + byte[] + + + + + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } +} diff --git a/group12/563253496/week3/src/com/coderising/download/FileDownloader.java b/group12/563253496/week3/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..f3a5eeb960 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,73 @@ +package com.coderising.download; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + + new DownloadThread(conn,0,length-1).start(); + + } catch (ConnectionException e) { + e.printStackTrace(); + }finally{ + if(conn != null){ + conn.close(); + } + } + + + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java b/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..4ff7f46ae0 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group12/563253496/week3/src/com/coderising/download/api/Connection.java b/group12/563253496/week3/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..d111b71664 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/api/Connection.java @@ -0,0 +1,27 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + + + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); + public String getName(); +} diff --git a/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java b/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java b/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java b/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..1fbf06b16f --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,65 @@ +package com.coderising.download.impl; + +import java.io.ByteArrayOutputStream; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private static int bufferSize = 1024; + private URL url; + private HttpURLConnection huc; + boolean finished = false; + + public ConnectionImpl(String url) { + try { + this.url = new URL(url); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + InputStream input; + ByteArrayOutputStream output = new ByteArrayOutputStream(endPos - startPos + 1); + + byte[] buffer = new byte[bufferSize]; + + input = huc.getInputStream(); + input.skip(startPos); + int len = input.read(buffer); + while (len != -1) { + output.write(buffer, 0, len); + } + this.finished=true; + return output.toByteArray(); + } + + @Override + public int getContentLength() { + + return huc.getContentLength(); + } + + @Override + public void close() { + huc.disconnect(); + + } + + @Override + public String getName() { + String fileName = huc.getURL().getFile(); + return fileName.substring(fileName.lastIndexOf("\\") + 1); + } + public boolean isFinished(){ + return this.finished; + } +} diff --git a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..7d3c6ec6bb --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,21 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + + private String url; + @Override + public Connection open(String url) throws ConnectionException { + this.url=url; + + Connection conn = new ConnectionImpl(url); + + + return conn; + } + +} diff --git a/group12/563253496/week3/src/com/coderising/litestruts/LoginAction.java b/group12/563253496/week3/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group12/563253496/week3/src/com/coderising/litestruts/Struts.java b/group12/563253496/week3/src/com/coderising/litestruts/Struts.java new file mode 100644 index 0000000000..85e2e22de3 --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/litestruts/Struts.java @@ -0,0 +1,34 @@ +package com.coderising.litestruts; + +import java.util.Map; + + + +public class Struts { + + public static View runAction(String actionName, Map parameters) { + + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + return null; + } + +} diff --git a/group12/563253496/week3/src/com/coderising/litestruts/StrutsTest.java b/group12/563253496/week3/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/563253496/week3/src/com/coderising/litestruts/View.java b/group12/563253496/week3/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group12/563253496/week3/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/563253496/week3/src/com/coding/basic/ArrayList.java b/group12/563253496/week3/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..1f185736f9 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/ArrayList.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group12/563253496/week3/src/com/coding/basic/BinaryTreeNode.java b/group12/563253496/week3/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..d7ac820192 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group12/563253496/week3/src/com/coding/basic/Iterator.java b/group12/563253496/week3/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group12/563253496/week3/src/com/coding/basic/LinkedList.java b/group12/563253496/week3/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..f50db4c7a1 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/LinkedList.java @@ -0,0 +1,345 @@ +package com.coding.basic; + + +import javax.management.ListenerNotFoundException; + +public class LinkedList implements List { + + private Node head = new Node(-1); + + private int size = 0; + + public void add(Object o) { + Node addNode = new Node(o); + if (size == 0) { + head.next = addNode; + size++; + } else { + /*Node n = getNode(size); + n.next = temp; + size++;*/ + Node temp = head; + for (int i = 0; i < size; i++) { + temp = temp.next; + } + temp.next = addNode; + size++; + } + + } + + + public String toString() { + Node temp = head; + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < size; i++) { + + temp = temp.next; + sb.append(temp.data); + sb.append("->"); + + } + sb.deleteCharAt((sb.length() - 1)); + sb.deleteCharAt((sb.length() - 1)); + String result = sb.toString(); + return result; + } + + public void add(int index, Object o) { + /*if (index <= 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + Node addNode = new Node(o); + Node temp = head; + for (int i = 1; i <= index; i++) { + temp = temp.next; + }*/ + } + + public Object get(int index) { + if (index <= 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + Node temp = head; + for (int i = 1; i <= index; i++) { + temp = temp.next; + + } + return temp.data; + } + + public Object remove(int index) { + return null; + } + +/* public Node getNode(int index) { + Node temp = head; + for (int i = 1; i <= index; i++) { + temp = head.next; + } + return temp; + }*/ + + public int size() { + return this.size; + } + + public void addFirst(Object o) { + Node addNode = new Node(o); + addNode.next = head.next; + head.next = addNode; + size++; + + } + + public void addLast(Object o) { + + } + + public Object removeFirst() { + return null; + } + + public Object removeLast() { + return null; + } + + public Iterator iterator() { + return null; + } + + + private static class Node { + Object data; + Node next; + + Node() { + this.data = null; + this.next = null; + } + + Node(Object o) { + this.data = o; + this.next = null; + } + + Node(Node n) { + this.data = n.data; + this.next = n.next; + } + + public boolean hasNext() { + if (this.next == null) { + return false; + } else { + return true; + } + } + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + /*LinkedList ll = new LinkedList(); + ll.add(3); + ll.add(7); + ll.add(8); + ll.add(9); + ll.add(10); + System.out.println(ll);*/ + //System.out.println(this); + LinkedList result = new LinkedList(); + Node temp = this.head; + for (int i = 0; i < this.size(); i++) { + temp = temp.next; + result.addFirst(temp.data); + } + this.head = result.head; + //System.out.println(this); + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + Node temp = this.head; + for (int i = 0; i < (int) (this.size / 2); i++) { + temp = temp.next; + + } + this.size = this.size - this.size / 2; + this.head.next = temp.next; + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + Node startNode = this.head; + + for (int j = 0; j < i; j++) { + startNode = startNode.next; + + } + Node endNode = startNode; + for (int j = 0; j < length; j++) { + endNode = endNode.next; + } + startNode.next = endNode.next; + size = size - length; + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + int[] result = new int[list.size()]; + Node node = list.head; + + for (int i = 0; i < result.length; i++) { + node = node.next; + result[i] = (int) (this.get(((int) (node.data)) + 1)); + } + return result; + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + Node posNode = this.head; + Node listNode = list.head.next; + + for (int i = 0; i < list.size(); i++) { + while (posNode.next.data != listNode.data) { + posNode = posNode.next; + } + posNode.next = posNode.next.next; + listNode = listNode.next; + } + this.size = size - list.size(); + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node posnode = this.head; + //Node temp; + while(posnode.hasNext()){ + if(posnode.data==posnode.next.data){ + posnode.next=posnode.next.next; + this.size--; + continue; + } + posnode=posnode.next; + } + + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + Node startPos = this.head; + Node endPos; + int count1 = 0; + int count2 = 1; + for (int i = 0; i < this.size(); i++) { + if ((int) startPos.next.data > min) { + break; + } + startPos = startPos.next; + count1++; + } + endPos = startPos.next; + for (int i = count1; i < this.size(); i++) { + if ((int) endPos.data > max) { + break; + } + endPos = endPos.next; + count2++; + } + size = size - count2; + startPos.next = endPos; + } + + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList result = new LinkedList(); + Node a = this.head.next; + Node b = list.head.next; + + while (a.hasNext() && b.hasNext()) { + if ((int) a.data == (int) b.data) { + result.add(a.data); + a = a.next; + b = b.next; + } else if ((int) a.data > (int) b.data) { + b = b.next; + } else if ((int) a.data < (int) b.data) { + a = a.next; + } + + + } + if (a.hasNext() == false) { + while (b.hasNext() == true) { + if ((int) a.data == (int) b.data) { + result.add(a.data); + break; + } else { + b = b.next; + } + } + } else if (b.hasNext() == false) { + while (a.hasNext() == true) { + if ((int) a.data == (int) b.data) { + result.add(a.data); + break; + } else { + a = a.next; + } + } + } + return result; + + + } + + +} diff --git a/group12/563253496/week3/src/com/coding/basic/List.java b/group12/563253496/week3/src/com/coding/basic/List.java new file mode 100644 index 0000000000..10d13b5832 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group12/563253496/week3/src/com/coding/basic/Queue.java b/group12/563253496/week3/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..36e516e266 --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group12/563253496/week3/src/com/coding/basic/Stack.java b/group12/563253496/week3/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..a5a04de76d --- /dev/null +++ b/group12/563253496/week3/src/com/coding/basic/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} diff --git a/group12/563253496/week3/src/test/com/coding/basic/LinkedListTest.java b/group12/563253496/week3/src/test/com/coding/basic/LinkedListTest.java new file mode 100644 index 0000000000..d00b12ea3e --- /dev/null +++ b/group12/563253496/week3/src/test/com/coding/basic/LinkedListTest.java @@ -0,0 +1,297 @@ +package test.com.coding.basic; + +import com.coding.basic.LinkedList; +import org.junit.Assert; +import org.junit.Test; +import org.junit.Before; +import org.junit.After; +import sun.awt.image.ImageWatched; + +/** + * LinkedList Tester. + * + * @author + * @version 1.0 + * @since
三月 9, 2017
+ */ +public class LinkedListTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + /** + * Method: add(Object o) + */ + @Test + public void testAddO() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: toString() + */ + @Test + public void testToString() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: add(int index, Object o) + */ + @Test + public void testAddForIndexO() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: get(int index) + */ + @Test + public void testGet() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: remove(int index) + */ + @Test + public void testRemoveIndex() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: getNode(int index) + */ + @Test + public void testGetNode() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: size() + */ + @Test + public void testSize() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: addFirst(Object o) + */ + @Test + public void testAddFirst() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: addLast(Object o) + */ + @Test + public void testAddLast() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: removeFirst() + */ + @Test + public void testRemoveFirst() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: removeLast() + */ + @Test + public void testRemoveLast() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: iterator() + */ + @Test + public void testIterator() throws Exception { +//TODO: Test goes here... + } + + /** + * Method: reverse() + */ + @Test + public void testReverse() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(3); + ll.add(7); + ll.add(10); + ll.reverse(); + Assert.assertEquals("10->7->3", ll.toString()); + + } + + /** + * Method: removeFirstHalf() + */ + @Test + public void testRemoveFirstHalf() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(2); + ll.add(5); + ll.add(7); + ll.add(8); + ll.add(10); + ll.removeFirstHalf(); + Assert.assertEquals("7->8->10", ll.toString()); + } + + /** + * Method: remove(int i, int length) + */ + @Test + public void testRemoveForILength() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(1); + ll.add(2); + ll.add(3); + ll.add(4); + ll.add(5); + ll.add(6); + ll.add(7); + ll.remove(2, 2); + Assert.assertEquals("1->2->5->6->7", ll.toString()); + + } + + /** + * Method: getElements(LinkedList list) + */ + @Test + public void testGetElements() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(11); + ll.add(101); + ll.add(201); + ll.add(301); + ll.add(401); + ll.add(501); + ll.add(601); + ll.add(701); + LinkedList listB = new LinkedList(); + listB.add(1); + listB.add(3); + listB.add(4); + listB.add(6); + int[] result = ll.getElements(listB); + int[] exresult = {101, 301, 401, 601}; + for (int i = 0; i < result.length; i++) { + Assert.assertEquals(exresult[i], result[i]); + } + //Assert.assertEquals("[101,301,401,601]",result.toString()); + } + + /** + * Method: subtract(LinkedList list) + */ + @Test + public void testSubtract() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(1); + ll.add(2); + ll.add(3); + ll.add(4); + ll.add(5); + ll.add(6); + LinkedList listB = new LinkedList(); + listB.add(1); + listB.add(3); + listB.add(5); + ll.subtract(listB); + Assert.assertEquals("2->4->6", ll.toString()); + + } + + /** + * Method: removeDuplicateValues() + */ + @Test + public void testRemoveDuplicateValues() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(1); + ll.add(2); + ll.add(2); + ll.add(2); + ll.add(3); + ll.add(4); + ll.add(4); + ll.add(4); + ll.add(4); + ll.removeDuplicateValues(); + Assert.assertEquals("1->2->3->4",ll.toString()); + + } + + /** + * Method: removeRange(int min, int max) + */ + @Test + public void testRemoveRange() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + ll.add(1); + ll.add(2); + ll.add(3); + ll.add(4); + ll.add(5); + ll.add(6); + ll.add(7); + ll.add(8); + ll.removeRange(3,8); + Assert.assertEquals("1->2",ll.toString()); + + } + + /** + * Method: intersection(LinkedList list) + */ + @Test + public void testIntersection() throws Exception { +//TODO: Test goes here... + LinkedList ll = new LinkedList(); + LinkedList l = new LinkedList(); + ll.add(1); + ll.add(2); + ll.add(3); + ll.add(4); + ll.add(5); + ll.add(6); + l.add(2); + l.add(4); + l.add(6); + l.add(7); + l.add(8); + l.add(9); + LinkedList re = ll.intersection(l); + Assert.assertEquals("2->4->6",re.toString()); + } + + /** + * Method: main(String[] args) + */ + @Test + public void testMain() throws Exception { +//TODO: Test goes here... + } + + +} From 0033e864ebe7dd12be85db6156c4581c7cb59b6b Mon Sep 17 00:00:00 2001 From: vegetableDogBai Date: Sun, 12 Mar 2017 16:49:24 +0800 Subject: [PATCH 348/646] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 35 --------- .../coderising/download/FileDownloader.java | 73 ------------------- .../download/FileDownloaderTest.java | 59 --------------- .../coderising/download/api/Connection.java | 27 ------- .../download/api/ConnectionException.java | 5 -- .../download/api/ConnectionManager.java | 10 --- .../download/api/DownloadListener.java | 5 -- .../download/impl/ConnectionImpl.java | 65 ----------------- .../download/impl/ConnectionManagerImpl.java | 21 ------ 9 files changed, 300 deletions(-) delete mode 100644 group12/563253496/week3/src/com/coderising/download/DownloadThread.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/FileDownloader.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/api/Connection.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java delete mode 100644 group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group12/563253496/week3/src/com/coderising/download/DownloadThread.java b/group12/563253496/week3/src/com/coderising/download/DownloadThread.java deleted file mode 100644 index f72faffa7f..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/DownloadThread.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.coderising.download; - -import com.coderising.download.api.Connection; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.RandomAccessFile; - -public class DownloadThread extends Thread{ - - Connection conn; - int startPos; - int endPos; - private String position; - - public DownloadThread( Connection conn, int startPos, int endPos){ - - this.conn = conn; - this.startPos = startPos; - this.endPos = endPos; - } - public void run(){ - try { - - RandomAccessFile raf = new RandomAccessFile(new File(position),"rws") - byte[] - - - - - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - } -} diff --git a/group12/563253496/week3/src/com/coderising/download/FileDownloader.java b/group12/563253496/week3/src/com/coderising/download/FileDownloader.java deleted file mode 100644 index f3a5eeb960..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/FileDownloader.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.coderising.download; - -import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; -import com.coderising.download.api.ConnectionManager; -import com.coderising.download.api.DownloadListener; - - -public class FileDownloader { - - String url; - - DownloadListener listener; - - ConnectionManager cm; - - - public FileDownloader(String _url) { - this.url = _url; - - } - - public void execute(){ - // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 - // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 - // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 - // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 - // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 - // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 - // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; - try { - - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); - - } catch (ConnectionException e) { - e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); - } - } - - - - - } - - public void setListener(DownloadListener listener) { - this.listener = listener; - } - - - - public void setConnectionManager(ConnectionManager ucm){ - this.cm = ucm; - } - - public DownloadListener getListener(){ - return this.listener; - } - -} diff --git a/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java b/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java deleted file mode 100644 index 4ff7f46ae0..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/FileDownloaderTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.coderising.download; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.coderising.download.api.ConnectionManager; -import com.coderising.download.api.DownloadListener; -import com.coderising.download.impl.ConnectionManagerImpl; - -public class FileDownloaderTest { - boolean downloadFinished = false; - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testDownload() { - - String url = "http://localhost:8080/test.jpg"; - - FileDownloader downloader = new FileDownloader(url); - - - ConnectionManager cm = new ConnectionManagerImpl(); - downloader.setConnectionManager(cm); - - downloader.setListener(new DownloadListener() { - @Override - public void notifyFinished() { - downloadFinished = true; - } - - }); - - - downloader.execute(); - - // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 - while (!downloadFinished) { - try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 - Thread.sleep(5000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - System.out.println("涓嬭浇瀹屾垚锛"); - - - - } - -} diff --git a/group12/563253496/week3/src/com/coderising/download/api/Connection.java b/group12/563253496/week3/src/com/coderising/download/api/Connection.java deleted file mode 100644 index d111b71664..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/api/Connection.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.coderising.download.api; - -import java.io.IOException; - -public interface Connection { - /** - * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 - * @param startPos 寮濮嬩綅缃紝 浠0寮濮 - * @param endPos 缁撴潫浣嶇疆 - * @return - */ - public byte[] read(int startPos,int endPos) throws IOException; - /** - * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 - * @return - */ - public int getContentLength(); - - - - - /** - * 鍏抽棴杩炴帴 - */ - public void close(); - public String getName(); -} diff --git a/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java b/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java deleted file mode 100644 index 1551a80b3d..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/api/ConnectionException.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.coderising.download.api; - -public class ConnectionException extends Exception { - -} diff --git a/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java b/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java deleted file mode 100644 index ce045393b1..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/api/ConnectionManager.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.coderising.download.api; - -public interface ConnectionManager { - /** - * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 - * @param url - * @return - */ - public Connection open(String url) throws ConnectionException; -} diff --git a/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java b/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java deleted file mode 100644 index bf9807b307..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/api/DownloadListener.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.coderising.download.api; - -public interface DownloadListener { - public void notifyFinished(); -} diff --git a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java deleted file mode 100644 index 1fbf06b16f..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.coderising.download.impl; - -import java.io.ByteArrayOutputStream; - -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; - -import com.coderising.download.api.Connection; - -public class ConnectionImpl implements Connection { - - private static int bufferSize = 1024; - private URL url; - private HttpURLConnection huc; - boolean finished = false; - - public ConnectionImpl(String url) { - try { - this.url = new URL(url); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - - @Override - public byte[] read(int startPos, int endPos) throws IOException { - InputStream input; - ByteArrayOutputStream output = new ByteArrayOutputStream(endPos - startPos + 1); - - byte[] buffer = new byte[bufferSize]; - - input = huc.getInputStream(); - input.skip(startPos); - int len = input.read(buffer); - while (len != -1) { - output.write(buffer, 0, len); - } - this.finished=true; - return output.toByteArray(); - } - - @Override - public int getContentLength() { - - return huc.getContentLength(); - } - - @Override - public void close() { - huc.disconnect(); - - } - - @Override - public String getName() { - String fileName = huc.getURL().getFile(); - return fileName.substring(fileName.lastIndexOf("\\") + 1); - } - public boolean isFinished(){ - return this.finished; - } -} diff --git a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java deleted file mode 100644 index 7d3c6ec6bb..0000000000 --- a/group12/563253496/week3/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.coderising.download.impl; - -import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; -import com.coderising.download.api.ConnectionManager; - -public class ConnectionManagerImpl implements ConnectionManager { - - - private String url; - @Override - public Connection open(String url) throws ConnectionException { - this.url=url; - - Connection conn = new ConnectionImpl(url); - - - return conn; - } - -} From 681f0993dc7053ad17fd754e7a720201441a65df Mon Sep 17 00:00:00 2001 From: Liam Cao Date: Sun, 12 Mar 2017 16:52:55 +0800 Subject: [PATCH 349/646] Update for Queue and LinkedList --- group27/276961139/src/learn/LinkedList.java | 6 ++++++ group27/276961139/src/learn/Queue.java | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/group27/276961139/src/learn/LinkedList.java b/group27/276961139/src/learn/LinkedList.java index 7a47325468..79924fa07f 100644 --- a/group27/276961139/src/learn/LinkedList.java +++ b/group27/276961139/src/learn/LinkedList.java @@ -106,6 +106,12 @@ public Object removeFirst(){ if (head == null){ throw new RuntimeException("閾捐〃涓虹┖"); } + if (size ==1){ + Object ret = head.getData(); + head = null; + tail = null; + return ret; + } Object headData = head.getData(); head = getNode(1); size--; diff --git a/group27/276961139/src/learn/Queue.java b/group27/276961139/src/learn/Queue.java index e69a97da88..dd6ed22559 100644 --- a/group27/276961139/src/learn/Queue.java +++ b/group27/276961139/src/learn/Queue.java @@ -3,13 +3,19 @@ public class Queue { private LinkedList linkedList; - + + public Queue() { + this.linkedList = new LinkedList(); + } + public void enQueue(Object o){ - linkedList = new LinkedList(); linkedList.add(o); } public Object deQueue(){ + if (linkedList == null || isEmpty()){ + return null; + } return linkedList.removeFirst(); } @@ -18,6 +24,9 @@ public boolean isEmpty(){ } public int size(){ + if (linkedList == null || isEmpty()){ + return 0; + } return linkedList.size(); } } From ad672d56fcd691c9712206bcbd3e4971a9f5f16c Mon Sep 17 00:00:00 2001 From: xugogo Date: Sun, 12 Mar 2017 17:04:40 +0800 Subject: [PATCH 350/646] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E9=83=A8=E5=88=86=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/basic/LinkedList.java | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/group03/1753176091/src/com/coding/basic/LinkedList.java b/group03/1753176091/src/com/coding/basic/LinkedList.java index 8484491d03..caf0683e22 100644 --- a/group03/1753176091/src/com/coding/basic/LinkedList.java +++ b/group03/1753176091/src/com/coding/basic/LinkedList.java @@ -117,4 +117,91 @@ private Node(Object data, Node next) { this.next = next; } } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node p = head; + Node q = head.next; + Node t = null; + while(q!= null){ + t = q.next; + q.next = p; + p = q; + q = t; + } + head = p ; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int l = size/2; + for(int i = 0; i < l-1 ; i++){ + removeFirst(); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(List list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } } From b252d7487284d4bd5174f5ad0decb25cd1574aa4 Mon Sep 17 00:00:00 2001 From: xiongyilun Date: Sun, 12 Mar 2017 17:05:50 +0800 Subject: [PATCH 351/646] =?UTF-8?q?3-12=E8=A6=81=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3-12瑕佹彁浜ょ殑浣滀笟 --- .../LinkedList.java" | 338 ++++++++++++++++++ .../coderising/download/DownloadThread.java" | 35 ++ .../coderising/download/FileDownloader.java" | 84 +++++ .../download/FileDownloaderTest.java" | 56 +++ .../coderising/download/api/Connection.java" | 23 ++ .../download/api/ConnectionException.java" | 5 + .../download/api/ConnectionManager.java" | 11 + .../download/api/DownloadListener.java" | 5 + .../download/impl/ConnectionImpl.java" | 45 +++ .../download/impl/ConnectionManagerImpl.java" | 23 ++ 10 files changed, 625 insertions(+) create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/LinkedList.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/Connection.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" create mode 100644 "group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/LinkedList.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/LinkedList.java" new file mode 100644 index 0000000000..b91e9b5956 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/LinkedList.java" @@ -0,0 +1,338 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private int size = 0; + // 澶寸粨鐐 + private Node head; + // 灏剧粨鐐 + private Node tail; + + private void rangeCheck(int index) { + if (index < 0 || index > size) { + throw new IndexOutOfBoundsException(); + } + } + + @Override + public void add(Object o) { + Node node = new Node(o, null); + if (head == null) { + head = tail = node; + } + Node oldTail = tail; + tail = node; + oldTail.next = tail; + size++; + } + + @Override + public void add(int index, Object o) { + rangeCheck(index); + if (index == size) { + this.add(o); + } else { + // 淇濆瓨index澶勮妭鐐 + Node x = head; + // 淇濆瓨index-1澶勭殑鑺傜偣 + Node y = null; + for (int i = 0; i < index; i++) { + y = x; + x = x.next; + } + Node node = new Node(o, x); + y.next = node; + size++; + } + } + + @Override + public Object get(int index) { + rangeCheck(index); + Node x = head; + for (int i = 0; i < index; i++) { + x = x.next; + } + return x.data; + } + + @Override + public Object remove(int index) { + rangeCheck(index); + Object removeData; + if (index == 0) { + removeData = removeFirst(); + } else if (index == size - 1) { + removeData = removeLast(); + } else { + Node x = head; + Node y = head; + for (int i = 0; i < index; i++) { + y = x; + x = x.next; + } + y.next = x.next; + size--; + removeData = x.data; + } + return removeData; + } + + @Override + public int size() { + return size; + } + + public void addFirst(Object o) { + Node oldHead = head; + head = new Node(o, oldHead); + size++; + } + + public void addLast(Object o) { + Node oldTail = tail; + tail = new Node(o, null); + oldTail.next = tail; + size++; + } + + public Object removeFirst() { + Node next = head.next; + Object data = head.data; + head.data = null; + head.next = null; + head = next; + size--; + return data; + } + + public Object removeLast() { + Node oldTail = tail; + Node temp = head; + for (int i = 0; i < size - 2; i++) { + temp = temp.next; + } + tail = temp; + size--; + return oldTail.data; + } + + public void clear() { + for (Node x = head; x != null;) { + Node next = x.next; + x.data = null; + x.next = null; + x = next; + } + head = tail = null; + size = 0; + } + + public Object getTail() { + Node l = tail; + // 濡傛灉閾捐〃涓虹┖ + if (l == null) { + throw new NoSuchElementException(); + } + return l.data; + } + + public Object getHead() { + Node l = head; + // 濡傛灉閾捐〃涓虹┖ + if (l == null) { + throw new NoSuchElementException(); + } + return l.data; + } + + public Iterator iterator() { + return new LinkedListIterator(); + } + + private static class Node { + Object data; + Node next; + + Node(Object data, Node next) { + this.data = data; + this.next = next; + } + + } + + private class LinkedListIterator implements Iterator { + Node x = head; + + @Override + public boolean hasNext() { + return x != null; + } + + @Override + public Object next() { + Object data = x.data; + x = x.next; + return data; + } + + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Object[] temp = new Object[size]; + for (int i = 0; i < size; i++) { + temp[i] = this.get(i); + } + this.clear(); + for (int i = temp.length - 1; i >= 0; i--) { + this.add(temp[i]); + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + int s = size; + for (int i = 0; i < s / 2; i++) { + this.removeFirst(); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + * @throws Exception + */ + public void remove(int i, int length) throws Exception { + if (i + length > size) { + throw new Exception(); + } + for (int j = i; j < i + length; j++) { + this.remove(i); + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + * @throws Exception + */ + public int[] getElements(LinkedList list) throws Exception { + if ((int) list.getTail() > this.size()) { + throw new Exception(); + } + int[] temp = new int[list.size()]; + for (int i = 0; i < list.size(); i++) { + temp[i] = (int) this.get((int) list.get(i)); + } + return temp; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + Node x = head; + Node y = list.head; + while (x != null && y != null) { + if ((int) x.data < (int) y.data) { + x = x.next; + continue; + } + if ((int) x.data == (int) y.data) { + Node next = x.next; + continue; + } + if ((int) x.data > (int) y.data) { + y = y.next; + continue; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + for (Node x = head; x != null;) { + Node next = x.next; + if (next == null) { + return; + } + if (x.data == next.data) { + x.next = next.next; + size--; + } else { + x = x.next; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + if ((int) this.getTail() < min) { + this.clear(); + } + + if ((int) this.getHead() > max) { + return; + } + + for (Node x = head; x != null; x = x.next) { + if ((int) x.data <= min) { + continue; + } + + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList linkedList = new LinkedList(); + Node x = head; + Node y = list.head; + while (x != null && y != null) { + if ((int) x.data < (int) y.data) { + x = x.next; + continue; + } + if ((int) x.data == (int) y.data) { + linkedList.add(x.data); + x = x.next; + y = y.next; + continue; + } + if ((int) x.data > (int) y.data) { + y = y.next; + continue; + } + } + return linkedList; + } +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" new file mode 100644 index 0000000000..2a98927ca8 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/DownloadThread.java" @@ -0,0 +1,35 @@ +package com.coderising.download; + +import java.io.IOException; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread { + + private Connection conn; + private int startPos; + private int endPos; + private CyclicBarrier barrier; + + public DownloadThread(Connection conn, int startPos, int endPos, CyclicBarrier barrier) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.barrier = barrier; + } + + @Override + public void run() { + try { + conn.read(startPos, endPos); + barrier.await(); + } catch (IOException | InterruptedException | BrokenBarrierException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" new file mode 100644 index 0000000000..539ac105b1 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloader.java" @@ -0,0 +1,84 @@ +package com.coderising.download; + +import java.util.concurrent.CyclicBarrier; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + private static final int NUM_OF_THREAD = 5; + + public FileDownloader(String _url) { + url = _url; + } + + public void execute() throws InterruptedException { + int blockSize; + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(url); + int length = conn.getContentLength(); + blockSize = length / NUM_OF_THREAD; + CyclicBarrier barrier = new CyclicBarrier(NUM_OF_THREAD, new Runnable() { + @Override + public void run() { + getListener().notifyFinished(); + } + }); + for (int i = 0; i < NUM_OF_THREAD; i++) { + Connection connection = cm.open(url); + if (i == (NUM_OF_THREAD - 1)) { + new DownloadThread(connection, i * blockSize, length - 1, barrier).start(); + } else { + new DownloadThread(connection, i * blockSize, (i + 1) * blockSize - 1, barrier).start(); + } + } + + } catch (ConnectionException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + cm = ucm; + } + + public DownloadListener getListener() { + return listener; + } + +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" new file mode 100644 index 0000000000..6b61c3ff27 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/FileDownloaderTest.java" @@ -0,0 +1,56 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() throws InterruptedException { + + String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1488998448101&di=d8d8a444cf4ecb4edfca14a45f6e9d4c&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F1%2F55f00045a31ea.jpg"; + + FileDownloader downloader = new FileDownloader(url); + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + } + +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/Connection.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/Connection.java" new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/Connection.java" @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" new file mode 100644 index 0000000000..1551a80b3d --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionException.java" @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" new file mode 100644 index 0000000000..ddf5064f1f --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/ConnectionManager.java" @@ -0,0 +1,11 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/api/DownloadListener.java" @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" new file mode 100644 index 0000000000..fff4eb28ce --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionImpl.java" @@ -0,0 +1,45 @@ +package com.coderising.download.impl; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + private HttpURLConnection httpURLConnection; + + public ConnectionImpl(String url) throws MalformedURLException, IOException { + httpURLConnection = (HttpURLConnection) new URL(url).openConnection(); + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + httpURLConnection.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + System.out.println("寮濮嬶細" + startPos + "-----缁撴潫:" + endPos); + RandomAccessFile raf = new RandomAccessFile(new File("D:\\aaa.jpg"), "rw"); + raf.seek(startPos); + BufferedInputStream is = new BufferedInputStream(httpURLConnection.getInputStream()); + int length = 0; + byte[] b = new byte[1024]; + while ((length = is.read(b, 0, b.length)) != -1) { + raf.write(b, 0, length); + } + raf.close(); + return null; + } + + @Override + public int getContentLength() { + return httpURLConnection.getContentLength(); + } + + @Override + public void close() { + } + +} diff --git "a/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" new file mode 100644 index 0000000000..b34bef9b3b --- /dev/null +++ "b/group08/529757467/2017-03-12\344\275\234\344\270\232/com/coderising/download/impl/ConnectionManagerImpl.java" @@ -0,0 +1,23 @@ +package com.coderising.download.impl; + +import java.io.IOException; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + Connection connection = null; + try { + connection = new ConnectionImpl(url); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return connection; + } + +} From 055f2d044304e42937f33a6d59291c73c7afd24f Mon Sep 17 00:00:00 2001 From: teapoter Date: Sun, 12 Mar 2017 17:15:55 +0800 Subject: [PATCH 352/646] init --- group27/282287610/src/learn/test.java | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 group27/282287610/src/learn/test.java diff --git a/group27/282287610/src/learn/test.java b/group27/282287610/src/learn/test.java deleted file mode 100644 index 58ba327953..0000000000 --- a/group27/282287610/src/learn/test.java +++ /dev/null @@ -1,5 +0,0 @@ -package learn; - -public class test { - -} From e44a293bd14c73c5fe37fd5e8570e8b3346e2f9c Mon Sep 17 00:00:00 2001 From: teapoter Date: Sun, 12 Mar 2017 17:16:29 +0800 Subject: [PATCH 353/646] init --- .../src/com/coding/basic/ArrayList.java | 32 +++++ .../src/com/coding/basic/BinaryTreeNode.java | 32 +++++ .../src/com/coding/basic/Iterator.java | 7 + .../src/com/coding/basic/LinkedList.java | 124 ++++++++++++++++++ .../282287610/src/com/coding/basic/List.java | 9 ++ .../282287610/src/com/coding/basic/Queue.java | 19 +++ .../282287610/src/com/coding/basic/Stack.java | 22 ++++ 7 files changed, 245 insertions(+) create mode 100644 group27/282287610/src/com/coding/basic/ArrayList.java create mode 100644 group27/282287610/src/com/coding/basic/BinaryTreeNode.java create mode 100644 group27/282287610/src/com/coding/basic/Iterator.java create mode 100644 group27/282287610/src/com/coding/basic/LinkedList.java create mode 100644 group27/282287610/src/com/coding/basic/List.java create mode 100644 group27/282287610/src/com/coding/basic/Queue.java create mode 100644 group27/282287610/src/com/coding/basic/Stack.java diff --git a/group27/282287610/src/com/coding/basic/ArrayList.java b/group27/282287610/src/com/coding/basic/ArrayList.java new file mode 100644 index 0000000000..57412dcf7f --- /dev/null +++ b/group27/282287610/src/com/coding/basic/ArrayList.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + } + public void add(int index, Object o){ + + } + + public Object get(int index){ + return null; + } + + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public Iterator iterator(){ + return null; + } + +} diff --git a/group27/282287610/src/com/coding/basic/BinaryTreeNode.java b/group27/282287610/src/com/coding/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..266eff3d56 --- /dev/null +++ b/group27/282287610/src/com/coding/basic/BinaryTreeNode.java @@ -0,0 +1,32 @@ +package com.coding.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group27/282287610/src/com/coding/basic/Iterator.java b/group27/282287610/src/com/coding/basic/Iterator.java new file mode 100644 index 0000000000..dbe8b9afb2 --- /dev/null +++ b/group27/282287610/src/com/coding/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group27/282287610/src/com/coding/basic/LinkedList.java b/group27/282287610/src/com/coding/basic/LinkedList.java new file mode 100644 index 0000000000..d6f6ffebec --- /dev/null +++ b/group27/282287610/src/com/coding/basic/LinkedList.java @@ -0,0 +1,124 @@ +package com.coding.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group27/282287610/src/com/coding/basic/List.java b/group27/282287610/src/com/coding/basic/List.java new file mode 100644 index 0000000000..396b1f6416 --- /dev/null +++ b/group27/282287610/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group27/282287610/src/com/coding/basic/Queue.java b/group27/282287610/src/com/coding/basic/Queue.java new file mode 100644 index 0000000000..08d2d86b14 --- /dev/null +++ b/group27/282287610/src/com/coding/basic/Queue.java @@ -0,0 +1,19 @@ +package com.coding.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group27/282287610/src/com/coding/basic/Stack.java b/group27/282287610/src/com/coding/basic/Stack.java new file mode 100644 index 0000000000..4bfe28057f --- /dev/null +++ b/group27/282287610/src/com/coding/basic/Stack.java @@ -0,0 +1,22 @@ +package com.coding.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + } + + public Object pop(){ + return null; + } + + public Object peek(){ + return null; + } + public boolean isEmpty(){ + return false; + } + public int size(){ + return -1; + } +} From ab015765c5d7a1a1053d708aceab1d81275f6e6a Mon Sep 17 00:00:00 2001 From: XiangYangHan Date: Sun, 12 Mar 2017 17:17:20 +0800 Subject: [PATCH 354/646] record03 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 瀹屾垚浜哃inkedList锛屾湭娴嬭瘯銆 --- .../Exercise/src/lesson01/LinkedList.java | 242 ++++++++++++++++++ .../Exercise/src/lesson01/List.java | 40 ++- 2 files changed, 275 insertions(+), 7 deletions(-) create mode 100644 group13/1274639949/Exercise/src/lesson01/LinkedList.java diff --git a/group13/1274639949/Exercise/src/lesson01/LinkedList.java b/group13/1274639949/Exercise/src/lesson01/LinkedList.java new file mode 100644 index 0000000000..0c30737c8b --- /dev/null +++ b/group13/1274639949/Exercise/src/lesson01/LinkedList.java @@ -0,0 +1,242 @@ +package lesson01; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private int size; + private Node head; + private Node last; + private Node temp; + + public LinkedList() { + head = new Node(); + } + + + @Override + public boolean add(E e) { + add(size, e); + return true; + } + + @Override + public void add(int index, E element) { + if(index < 0 || index > size){ + throw new IndexOutOfBoundsException("Error index:" + index); + } + temp = new Node(); + temp.data = element; + if(last == null){ + //閾捐〃涓繕娌℃湁鍏冪礌 + head.next = temp; + temp.pre = head; + }else{ + //閾捐〃涓凡缁忔湁鍏冪礌 + last.next = temp; + temp.pre = last; + } + last = temp; + size++; + temp = null; + } + + @Override + public void clear() { + while(size > 0){ + temp = last.pre; + last.pre = null; + temp.next = null; + + if(temp == head){ + last = null; + }else{ + last = temp; + } + size--; + } + temp = null; + } + + @Override + public boolean contains(Object o) { + temp = head.next; + if(o == null){ + while(temp != null){ + if(temp.data == null){ + return true; + } + temp = temp.next; + } + } + return false; + } + + @Override + public int indexOf(Object o) { + temp = head.next; + if(o == null){ + for(int i = 0; i < size; i++){ + if(temp.data == null){ + temp = null; + return i; + } + temp = temp.next; + } + }else{ + for(int i = 0; i < size; i++){ + if(o.equals(temp.data)){ + temp = null; + return i; + } + temp = temp.next; + } + } + return -1; + } + + @Override + public E get(int index) { + checkIndex(index); + + temp = head.next; + for(int i = 0; i < index; i++){ + temp = temp.next; + } + E obj = temp.data; + temp = null; + return obj; + } + + private void checkIndex(int index) { + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("Error index: " + index); + } + } + + @Override + public E remove(int index) { + checkIndex(index); + E obj = null; + if(size == 1){ + //閾捐〃涓彧鏈変竴涓厓绱 + obj = last.data; + head.next = null; + last.pre = null; + last = null; + }else if(index == 0){ + //閾捐〃涓湁涓や釜鎴栨洿澶氱殑鍏冪礌锛屼絾鏄Щ闄や笅鏍囦负0鐨勫厓绱 + temp = head.next; + obj = temp.data; + + head.next = temp.next; + temp.next.pre = head; + temp.pre = null; + temp.next = null; + temp = null; + }else if(index == size - 1){ + //閾捐〃涓湁涓や釜鎴栨洿澶氱殑鍏冪礌锛屼絾鏄Щ闄や笅鏍囦负size()-1鐨勫厓绱 + obj = head.data; + + last = last.pre; + last.next.pre = null; + last.next = null; + }else{ + temp = head.next; + for(int i = 0; i < index; i++){ + temp = temp.next; + } + obj = temp.data; + + temp.pre.next = temp.next; + temp.next.pre = temp.pre; + temp.pre = null; + temp.next = null; + temp = null; + } + return obj; + } + + @Override + public boolean remove(Object o) { + int index = indexOf(o); + if(index >= 0){ + remove(index); + return true; + } + return false; + } + + @Override + public E set(int index, E element) { + checkIndex(index); + + temp = head.next; + for(int i = 0; i < index; i++){ + temp = temp.next; + } + E obj = temp.data; + temp.data = element; + temp = null; + return obj; + } + + @Override + public int size() { + return size; + } + + @Override + public Object[] toArray() { + Object[] arr = new Object[size]; + temp = head.next; + for(int i = 0; i < size; i++){ + arr[i] = temp.data; + temp = temp.next; + } + return arr; + } + + @Override + public Iterator iterator() { + return new Ite(); + } + + private class Ite implements Iterator{ + int pos; + int lastRet = -1; + + @Override + public boolean hasNext() { + return pos < size; + } + + @Override + public E next() { + if(pos == size){ + throw new NoSuchElementException(); + } + E element = get(pos); + lastRet = pos; + pos++; + return element; + } + + @Override + public void remove() { + if(lastRet == -1){ + throw new RuntimeException(); + } + LinkedList.this.remove(lastRet); + lastRet = -1; + } + + } + + private static final class Node{ + E data; + Node next; + Node pre; + } + +} diff --git a/group13/1274639949/Exercise/src/lesson01/List.java b/group13/1274639949/Exercise/src/lesson01/List.java index b6b2d7c554..d350a6e75f 100644 --- a/group13/1274639949/Exercise/src/lesson01/List.java +++ b/group13/1274639949/Exercise/src/lesson01/List.java @@ -36,24 +36,50 @@ public interface List { */ public int indexOf(Object o); - + /** + * 鑾峰彇鎸囧畾浣嶇疆涓婄殑鍏冪礌 + * @param index + * @return List涓笅鏍囦负index鐨勫厓绱 + */ public E get(int index); - + /** + * 绉婚櫎鎸囧畾浣嶇疆涓婄殑鍏冪礌 + * @param index + * @return 琚Щ闄ょ殑鍏冪礌銆 + */ public E remove(int index); - + /** + * 鍦↙ist涓Щ闄ゆ寚瀹氱殑鍏冪礌锛屽鏋滃瓨鍦ㄥ涓紝鍒欏彧绉婚櫎涓嬫爣鏈灏忕殑閭d釜 + * @param o + * @return 鑻ユ寚瀹氬厓绱犺绉婚櫎鍒欒繑鍥瀟rue锛屽惁鍒欒繑鍥瀎alse + */ public boolean remove(Object o); - + /** + * 浣跨敤鎸囧畾鐨勫厓绱犳浛鎹㈡寚瀹氫綅缃笂鐨勫厓绱犮 + * @param index + * @param element + * @return 琚浛鎹㈡帀鐨勫厓绱 + */ public E set(int index, E element); - + /** + * 杩斿洖List涓厓绱犵殑涓暟 + * @return + */ public int size(); - + /** + * 灏哃ist涓殑鍏ㄩ儴鍏冪礌瀛樻斁浜庝竴涓暟缁勪腑骞惰繑鍥炶鏁扮粍 + * @return + */ public Object[] toArray(); - + /** + * 杩斿洖璇ist涓婄殑杩唬鍣 + * @return + */ public Iterator iterator(); } From 4b070785e78f85be9957b6ce820d4645bda5e237 Mon Sep 17 00:00:00 2001 From: MicheyGarcia <857999411@qq.com> Date: Sun, 12 Mar 2017 17:17:59 +0800 Subject: [PATCH 355/646] ThirdHomework ThirdHomework --- .../857999411/RemoteSystemsTempFiles/.project | 12 + group14/857999411/ThirdHomework/.classpath | 7 + group14/857999411/ThirdHomework/.gitignore | 1 + group14/857999411/ThirdHomework/.project | 17 ++ .../.settings/org.eclipse.jdt.core.prefs | 11 + .../src/com/coding/basic/List.java | 9 + .../src/com/coding/basic/MyLinkedList.java | 288 ++++++++++++++++++ .../src/com/coding/test/MyLinkedListTest.java | 178 +++++++++++ 8 files changed, 523 insertions(+) create mode 100644 group14/857999411/RemoteSystemsTempFiles/.project create mode 100644 group14/857999411/ThirdHomework/.classpath create mode 100644 group14/857999411/ThirdHomework/.gitignore create mode 100644 group14/857999411/ThirdHomework/.project create mode 100644 group14/857999411/ThirdHomework/.settings/org.eclipse.jdt.core.prefs create mode 100644 group14/857999411/ThirdHomework/src/com/coding/basic/List.java create mode 100644 group14/857999411/ThirdHomework/src/com/coding/basic/MyLinkedList.java create mode 100644 group14/857999411/ThirdHomework/src/com/coding/test/MyLinkedListTest.java diff --git a/group14/857999411/RemoteSystemsTempFiles/.project b/group14/857999411/RemoteSystemsTempFiles/.project new file mode 100644 index 0000000000..5447a64fa9 --- /dev/null +++ b/group14/857999411/RemoteSystemsTempFiles/.project @@ -0,0 +1,12 @@ + + + RemoteSystemsTempFiles + + + + + + + org.eclipse.rse.ui.remoteSystemsTempNature + + diff --git a/group14/857999411/ThirdHomework/.classpath b/group14/857999411/ThirdHomework/.classpath new file mode 100644 index 0000000000..373dce4005 --- /dev/null +++ b/group14/857999411/ThirdHomework/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group14/857999411/ThirdHomework/.gitignore b/group14/857999411/ThirdHomework/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group14/857999411/ThirdHomework/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group14/857999411/ThirdHomework/.project b/group14/857999411/ThirdHomework/.project new file mode 100644 index 0000000000..97d4071a84 --- /dev/null +++ b/group14/857999411/ThirdHomework/.project @@ -0,0 +1,17 @@ + + + ThirdHomework + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group14/857999411/ThirdHomework/.settings/org.eclipse.jdt.core.prefs b/group14/857999411/ThirdHomework/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..3a21537071 --- /dev/null +++ b/group14/857999411/ThirdHomework/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group14/857999411/ThirdHomework/src/com/coding/basic/List.java b/group14/857999411/ThirdHomework/src/com/coding/basic/List.java new file mode 100644 index 0000000000..c86b745572 --- /dev/null +++ b/group14/857999411/ThirdHomework/src/com/coding/basic/List.java @@ -0,0 +1,9 @@ +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} \ No newline at end of file diff --git a/group14/857999411/ThirdHomework/src/com/coding/basic/MyLinkedList.java b/group14/857999411/ThirdHomework/src/com/coding/basic/MyLinkedList.java new file mode 100644 index 0000000000..a7aa4c9afd --- /dev/null +++ b/group14/857999411/ThirdHomework/src/com/coding/basic/MyLinkedList.java @@ -0,0 +1,288 @@ +package com.coding.basic; + +import java.util.NoSuchElementException; + + +public class MyLinkedList implements List { + + //鐢ㄥ唴閮ㄧ被瀹氫箟閾捐〃涓殑鑺傜偣 + private class Node{ + //鑺傜偣涓寘鍚暟鎹拰寮曠敤 + Object data; + Node next; + + + //姣忎釜鑺傜偣鍖呭惈鏁版嵁鍜屽紩 + public Node (Object data,Node next){ + this.data =data; + this.next =next; + } + } + //瀹氫箟澶磋妭鐐瑰拰灏捐妭 + public Node head; + public Node tail; + public int size; + + //鏃犲弬鏁版瀯閫犲嚱鏁板垱寤虹┖閾捐〃 + public MyLinkedList(){ + head =null; + tail =null; + } + + //閾捐〃涓紶鍏ュ厓 + public MyLinkedList(Object element){ + head.data =element; + head.next =tail; + size++; + } + + public void add(Object o){ + addLast(o); + } + public void addFirst(Object element) { + + head =new Node(element,head); + if(tail == null){ + tail=head; + } + size++; + } + + public void addLast(Object element) { + if(head == null) { + head =new Node (element,null); + tail =head; + }else{ + Node newNode =new Node(element,null); + tail.next =newNode; + tail=newNode; + } + size++; + + } + + public void add(int index,Object element){ + + if(index < 0 || index > size) { + throw new IndexOutOfBoundsException("绱㈠紩瓒婄晫"); + } + if(index == 0) { + head =new Node(element,head); + } + Node frontNode =getNode(index-1); + frontNode.next =new Node(element,frontNode.next); + size++; + } + public Node getNode(int index) + { + if(index < 0 || index > size-1) { + + throw new IndexOutOfBoundsException("绱㈠紩瓒婄晫"); + } + Node current=head; + for(int i=0;i < size; i++,current =current.next) { + if(i == index) { + return current; + } + } + return null; + } + public int indexOf(Object o){ + + for(int i=0; i size-1) { + throw new IndexOutOfBoundsException("绱㈠紩瓒婄晫"); + } + Node delNode =null; + if(index == 0) { + delNode =head; + head =head.next; + }else{ + Node frontNode =getNode(index-1); + delNode =frontNode.next; + frontNode.next =delNode.next; + delNode.next =null; + } + size--; + return delNode.data; + } + + public Object removeFirst(){ + if(head == null || head.next == null) + throw new NoSuchElementException(); + Node oldhead =head; + head =head.next; + oldhead.next =null; + size--; + return oldhead.data; + + } + + public Object removeLast(){ + return remove(size - 1); + + } + + + public int size() { + return size; + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * @return + */ + public void reverse(){ + Node tail =null,a,b; + a = head; + while(a!= null){ + b=a.next; + a.next=tail; + tail =a; + a=b; + } + head=tail; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf(){ + int len =size; + + for(int i=0;i=0 && i+length <= size){ + int len=0; + if(i == 0){ + len =i+length; + }else{ + len =i+length-1; + } + for(int j=1; j <=len; j++){ + remove(i); + } + }else{ + System.out.println("鍙傛暟閿欒"); + } + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(MyLinkedList list){ + + int [] array =new int [list.size]; + + for(int j=0;j101->201->301->401->501->601->701 + ml.add(11); + ml.add(101); + ml.add(201); + ml.add(301); + ml.add(401); + ml.add(501); + ml.add(601); + ml.add(701); + + MyLinkedList list=new MyLinkedList(); + //1->3->4->6 + list.add(1); + list.add(3); + list.add(4); + list.add(6); + + int[] elements = ml.getElements(list); + + for (int i : elements) { + System.out.println(i); + } + } + @Test + public void subtractTest(){ + MyLinkedList ml= new MyLinkedList(); + //11->101->201->301->401->501->601->701 + ml.add(11); + ml.add(101); + ml.add(201); + ml.add(301); + ml.add(401); + ml.add(501); + ml.add(601); + ml.add(701); + + MyLinkedList list=new MyLinkedList(); + //1->3->4->6 + list.add(1); + list.add(3); + list.add(4); + list.add(6); + + ml.subtract(list); + for(int i=0;i Date: Sun, 12 Mar 2017 17:27:43 +0800 Subject: [PATCH 356/646] L3 --- .../github/vxzh/download/DownloadThread.java | 40 ++ .../github/vxzh/download/FileDownloader.java | 76 ++++ .../vxzh/download/FileDownloaderTest.java | 52 +++ .../io/github/vxzh/download/LinkedList.java | 354 ++++++++++++++++++ .../github/vxzh/download/api/Connection.java | 26 ++ .../download/api/ConnectionException.java | 9 + .../vxzh/download/api/ConnectionManager.java | 11 + .../vxzh/download/api/DownloadListener.java | 7 + .../vxzh/download/impl/ConnectionImpl.java | 76 ++++ .../download/impl/ConnectionManagerImpl.java | 21 ++ 10 files changed, 672 insertions(+) create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/DownloadThread.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/FileDownloader.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/FileDownloaderTest.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/LinkedList.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/api/Connection.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionException.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionManager.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/api/DownloadListener.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionImpl.java create mode 100644 group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionManagerImpl.java diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/DownloadThread.java b/group13/2729382520/L3/src/io/github/vxzh/download/DownloadThread.java new file mode 100644 index 0000000000..2a67e5dbbf --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/DownloadThread.java @@ -0,0 +1,40 @@ +package io.github.vxzh.download; + +import io.github.vxzh.download.api.Connection; + +import java.io.RandomAccessFile; +import java.util.concurrent.CyclicBarrier; + +public class DownloadThread extends Thread { + + private Connection conn; + private int startPos; + private int endPos; + private CyclicBarrier barrier; + + public DownloadThread(Connection conn, int startPos, int endPos, CyclicBarrier barrier) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.barrier = barrier; + } + + public void run() { + + try { + + byte[] buffer = conn.read(startPos, endPos); + RandomAccessFile raf = new RandomAccessFile("/Users/xuxiaoqing/Documents/demo.jpg", "rw"); + raf.seek(startPos); + raf.write(buffer, 0, buffer.length); + //raf.write(buffer); + raf.close(); + barrier.await(); + + } catch (Exception e) { + e.printStackTrace(); + } + + } +} \ No newline at end of file diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloader.java b/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloader.java new file mode 100644 index 0000000000..23b6327c05 --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloader.java @@ -0,0 +1,76 @@ +package io.github.vxzh.download; + +import io.github.vxzh.download.api.Connection; +import io.github.vxzh.download.api.ConnectionManager; +import io.github.vxzh.download.api.DownloadListener; + +import java.util.concurrent.CyclicBarrier; + +public class FileDownloader { + + private String path; + + private DownloadListener listener; + + private ConnectionManager cm; + + private static final int THREAD_NUM = 3; + + public FileDownloader(String path) { + this.path = path; + + } + + public void execute() { + + CyclicBarrier barrier = new CyclicBarrier(THREAD_NUM, new Runnable() { + @Override + public void run() { + listener.notifyFinished(); + } + }); + + Connection conn = null; + try { + + conn = cm.open(this.path); + //瀹為檯鐨勬枃浠堕暱搴 + int length = conn.getContentLength(); + //骞冲潎姣忎竴涓嚎绋嬩笅杞界殑鏂囦欢澶у皬. + int blockSize = length / THREAD_NUM; + for (int threadId = 1; threadId <= THREAD_NUM; threadId++) { + int startIndex = (threadId - 1) * blockSize; + int endIndex = threadId * blockSize - 1; + //鏈鍚庝竴涓嚎绋嬩笅杞界殑闀垮害 + if (threadId == THREAD_NUM) { + endIndex = length - 1; + } + + System.out.println("绾跨▼锛" + threadId + "涓嬭浇:---" + startIndex + "--->" + endIndex); + new DownloadThread(conn, startIndex, endIndex, barrier).start(); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } + + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloaderTest.java b/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloaderTest.java new file mode 100644 index 0000000000..8f926c4875 --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/FileDownloaderTest.java @@ -0,0 +1,52 @@ +package io.github.vxzh.download; + +import io.github.vxzh.download.api.ConnectionManager; +import io.github.vxzh.download.api.DownloadListener; +import io.github.vxzh.download.impl.ConnectionManagerImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class FileDownloaderTest { + private boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://c.hiphotos.baidu.com/zhidao/pic/item/29381f30e924b8999bfaab046d061d950b7bf6cc.jpg"; + + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + } +} \ No newline at end of file diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/LinkedList.java b/group13/2729382520/L3/src/io/github/vxzh/download/LinkedList.java new file mode 100644 index 0000000000..0ab689946b --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/LinkedList.java @@ -0,0 +1,354 @@ +package io.github.vxzh.download; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private Node head; + private int size; + + @Override + public boolean remove(Object o) { + return false; + } + + @Override + public boolean isEmpty() { + return size == 0; + } + + + @Override + public boolean contains(Object o) { + return false; + } + + @Override + public void clear() { + + } + + /** + * 浠庡ご閮ㄦ坊鍔犺妭鐐 + * + * @return + */ + public boolean add(E o) { + Node node = new Node(); + node.data = o; + if (null == head) { + head = node; + } else { + node.next = head.next; + head.next = node; + } + size++; + return true; + } + + @Override + public void set(int index, E e) { + checkIndex(index); + Node node = new Node(); + node.data = e; + Node prev = node(index - 1); + node.next = prev.next; + prev.next = node; + + } + + public E get(int index) { + checkIndex(index); + return (E) node(index).data; + } + + public E remove(int index) { + checkIndex(index); + if (0 == index) { + E data = head.data; + head = head.next; + return data; + } + Node prev = node(index - 1); + E data = (E) prev.next.data; + Node current = prev.next; + prev.next = current.next; + current.next = null; + return data; + } + + public int size() { + return size; + } + + public void addLast(E o) { + Node node = new Node(); + node.data = o; + + if (size == 0) { + head = node; + } else { + Node last = node(size - 1); + last.next = node; + } + size++; + } + + public E removeFirst() { + checkIndex(0); + E data = head.data; + head = head.next; + size--; + return data; + } + + public E removeLast() { + if (size == 0) { + return removeFirst(); + } + + Node node = node(size - 2); + E data = (E) node.next.data; + node.next = null; + size--; + return data; + } + + public Iterator iterator() { + return new It(); + } + + private void checkIndex(int index) { + if (index < 0 || index > size - 1) { + throw new NoSuchElementException("index " + index + " not found!"); + } + } + + private class It implements Iterator { + Node currentNode = head; + int currentIndex; + + @Override + public boolean hasNext() { + return currentIndex < size - 1; + } + + @Override + public E next() { + currentNode = currentNode.next; + currentIndex++; + return currentNode.data; + } + + @Override + public void remove() { + if (currentIndex == 0) { + removeFirst(); + } else { + Node prev = node(currentIndex - 1); + Node cur = prev.next; + cur.next = null; + prev.next = cur.next; + size--; + } + + } + + } + + private Node node(int index) { + Node current = head; + for (int i = 0; i < size; i++) { + if (index == i) { + return current; + } + current = current.next; + } + return null; + } + + private static class Node { + E data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + if (isEmpty()) { + return; + } + int half = size / 2; + + Node current = head; + for (int i = 0; i < half; i++) { + Node next = current.next; + current.next = null; + current = next; + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + checkIndex(i); + if (i + length > size) { + throw new NoSuchElementException("瑕佸垹闄ょ殑鍏冪礌涓嶅瓨鍦紒"); + } + + Node current = node(i); + for (int index = i; index <= length; index++) { + Node next = current.next; + current.next = null; + current = next; + } + + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public static int[] getElements(LinkedList list) { + List listB = new ArrayList(); + + int[] array = new int[listB.size()]; + for (int i = 0; i < array.length; i++) { + array[i] = (Integer) list.get(i); + } + return array; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + + public void subtract(LinkedList list) { + Node prev = head; + + while (prev.next != null) { + if (list.contains(prev.next.data)) { + Node current = prev.next; + prev.next = current.next; + current.next = null; + } + } + prev = head; + if (prev.data == prev.next.data) { + head = prev.next; + prev.next = null; + prev = head; + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node prev = head; + + while (prev.next != null) { + Node current = prev.next; + if (prev.data == prev.next.data) {//濡傛灉鍓嶄竴涓殑data涓庡綋鍓嶈妭鐐圭殑data鍚岀瓑锛屽氨鍒犻櫎褰撳墠鐨 + prev.next = current.next; + current.next = null; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + Node prev = head; + + while (prev.next != null) {//鍏堝垹闄ゅご鑺傜偣涔嬪悗鐨 + Node current = prev.next; + if (min < (Integer) prev.data && (Integer) prev.data < max) { + prev.next = current.next; + current.next = null; + } + + } + prev = head; + if (min < (Integer) prev.data && (Integer) prev.data < max) {//濡傛灉澶磋妭鐐规弧瓒虫潯浠讹紝鍒犻櫎澶磋妭鐐 + head = prev.next; + prev.next = null; + prev = head; + } + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + LinkedList ret = new LinkedList(); + + Iterator it1 = list.iterator(); + Iterator it2 = this.iterator(); + + E data1 = it1.hasNext() ? it1.next() : null; + E data2 = it2.hasNext() ? it2.next() : null; + while (it1.hasNext() || it2.hasNext()) { + + + if (data1 == null && data2 != null) { + ret.add(data2); + data2 = it2.hasNext() ? it2.next() : null; + } else if (data2 == null && data1 != null) { + ret.add(data1); + data1 = it1.hasNext() ? it1.next() : null; + } else {// if(data1 != null && data2 != null) + if (data1.compareTo(data2) < 0) { + ret.add(data1); + data1 = it1.hasNext() ? it1.next() : null; + } else if (data1.compareTo(data2) > 0) { + ret.add(data2); + data2 = it2.hasNext() ? it2.next() : null; + } else {//equal + ret.add(data1); + data1 = it1.hasNext() ? it1.next() : null; + data2 = it2.hasNext() ? it2.next() : null; + } + } + } + + return ret; + } +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/api/Connection.java b/group13/2729382520/L3/src/io/github/vxzh/download/api/Connection.java new file mode 100644 index 0000000000..d91930a36a --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/api/Connection.java @@ -0,0 +1,26 @@ +package io.github.vxzh.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + byte[] read(int startPos, int endPos) throws IOException,ConnectionException; + + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * + * @return + */ + int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + void close(); +} \ No newline at end of file diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionException.java b/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionException.java new file mode 100644 index 0000000000..5ed88448c2 --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionException.java @@ -0,0 +1,9 @@ +package io.github.vxzh.download.api; + +public class ConnectionException extends Exception { + + public ConnectionException(String msg) { + super(msg); + } + +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionManager.java b/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionManager.java new file mode 100644 index 0000000000..d019a9c1a1 --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/api/ConnectionManager.java @@ -0,0 +1,11 @@ +package io.github.vxzh.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * + * @param url + * @return + */ + Connection open(String url) throws ConnectionException; +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/api/DownloadListener.java b/group13/2729382520/L3/src/io/github/vxzh/download/api/DownloadListener.java new file mode 100644 index 0000000000..d34556b38a --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/api/DownloadListener.java @@ -0,0 +1,7 @@ +package io.github.vxzh.download.api; + +public interface DownloadListener { + + void notifyFinished(); + +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionImpl.java b/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..2981d5a2aa --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionImpl.java @@ -0,0 +1,76 @@ +package io.github.vxzh.download.impl; + +import io.github.vxzh.download.api.Connection; +import io.github.vxzh.download.api.ConnectionException; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; + +public class ConnectionImpl implements Connection { + + + private String path; + + private static final int BUFFER_MAX_SIZE = 1024; + + public ConnectionImpl(String path) { + this.path = path; + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException, ConnectionException { + + if (startPos > endPos) + throw new ConnectionException("startPos > endPos "); + + URL url = new URL(path); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setConnectTimeout(5000); + conn.setRequestMethod("GET"); + conn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + int responseCode = conn.getResponseCode(); + if (responseCode == HttpURLConnection.HTTP_PARTIAL) { + int blockSize = endPos - startPos + 1; + InputStream is = conn.getInputStream(); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + byte[] buffer = new byte[Math.min(blockSize, BUFFER_MAX_SIZE)]; + int len = -1; + while ((len = is.read(buffer)) != -1) { + outputStream.write(buffer, 0, len); + } + outputStream.close(); + is.close(); + return outputStream.toByteArray(); + + + } else { + throw new ConnectionException("response code: " + responseCode); + } + + + } + + @Override + public int getContentLength() { + HttpURLConnection conn = null; + try { + URL url = new URL(path); + conn = (HttpURLConnection) url.openConnection(); + conn.setConnectTimeout(5000); + conn.setRequestMethod("GET"); + + } catch (Exception e) { + e.printStackTrace(); + } + return conn.getContentLength(); + } + + @Override + public void close() { + + } + +} diff --git a/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionManagerImpl.java b/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..100e550bec --- /dev/null +++ b/group13/2729382520/L3/src/io/github/vxzh/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,21 @@ +package io.github.vxzh.download.impl; + +import io.github.vxzh.download.api.Connection; +import io.github.vxzh.download.api.ConnectionException; +import io.github.vxzh.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String path) throws ConnectionException { + + ConnectionImpl connection = null; + try { + connection = new ConnectionImpl(path); + } catch (Exception e) { + e.printStackTrace(); + } + return connection; + } + +} \ No newline at end of file From dcf2f2d29a8aa24880f23f73b1b53169fa21c63e Mon Sep 17 00:00:00 2001 From: wdn <626451284@163.com> Date: Sun, 12 Mar 2017 17:28:50 +0800 Subject: [PATCH 357/646] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=9C=AC=E5=91=A8?= =?UTF-8?q?=E4=B8=8D=E7=9B=B8=E5=85=B3=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/array/ArrayUtil.java | 96 ------------------- .../coderising/download/DownloadThread.java | 20 ---- .../coderising/download/FileDownloader.java | 73 -------------- .../download/FileDownloaderTest.java | 59 ------------ .../coderising/download/api/Connection.java | 23 ----- .../download/api/ConnectionException.java | 5 - .../download/api/ConnectionManager.java | 10 -- .../download/api/DownloadListener.java | 5 - .../download/impl/ConnectionImpl.java | 27 ------ .../download/impl/ConnectionManagerImpl.java | 15 --- .../coderising/litestruts/LoginAction.java | 39 -------- .../coderising/litestruts/Struts.java | 34 ------- .../coderising/litestruts/StrutsTest.java | 43 --------- .../coderising/litestruts/View.java | 23 ----- .../coderising/litestruts/struts.xml | 11 --- 15 files changed, 483 deletions(-) delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java deleted file mode 100644 index 45c32815f4..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.github.wdn.coding2017.coderising.array; - -public class ArrayUtil { - - /** - * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 - 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] - 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] - * @param origin - * @return - */ - public void reverseArray(int[] origin){ - - } - - /** - * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} - * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 - * {1,3,4,5,6,6,5,4,7,6,7,5} - * @param oldArray - * @return - */ - - public int[] removeZero(int[] oldArray){ - return null; - } - - /** - * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 - * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 - * @param array1 - * @param array2 - * @return - */ - - public int[] merge(int[] array1, int[] array2){ - return null; - } - /** - * 鎶婁竴涓凡缁忓瓨婊℃暟鎹殑鏁扮粍 oldArray鐨勫閲忚繘琛屾墿灞曪紝 鎵╁睍鍚庣殑鏂版暟鎹ぇ灏忎负oldArray.length + size - * 娉ㄦ剰锛岃佹暟缁勭殑鍏冪礌鍦ㄦ柊鏁扮粍涓渶瑕佷繚鎸 - * 渚嬪 oldArray = [2,3,6] , size = 3,鍒欒繑鍥炵殑鏂版暟缁勪负 - * [2,3,6,0,0,0] - * @param oldArray - * @param size - * @return - */ - public int[] grow(int [] oldArray, int size){ - return null; - } - - /** - * 鏂愭尝閭e鏁板垪涓猴細1锛1锛2锛3锛5锛8锛13锛21...... 锛岀粰瀹氫竴涓渶澶у硷紝 杩斿洖灏忎簬璇ュ肩殑鏁板垪 - * 渚嬪锛 max = 15 , 鍒欒繑鍥炵殑鏁扮粍搴旇涓 [1锛1锛2锛3锛5锛8锛13] - * max = 1, 鍒欒繑鍥炵┖鏁扮粍 [] - * @param max - * @return - */ - public int[] fibonacci(int max){ - return null; - } - - /** - * 杩斿洖灏忎簬缁欏畾鏈澶у糾ax鐨勬墍鏈夌礌鏁版暟缁 - * 渚嬪max = 23, 杩斿洖鐨勬暟缁勪负[2,3,5,7,11,13,17,19] - * @param max - * @return - */ - public int[] getPrimes(int max){ - return null; - } - - /** - * 鎵璋撯滃畬鏁扳濓紝 鏄寚杩欎釜鏁版伆濂界瓑浜庡畠鐨勫洜瀛愪箣鍜岋紝渚嬪6=1+2+3 - * 缁欏畾涓涓渶澶у糾ax锛 杩斿洖涓涓暟缁勶紝 鏁扮粍涓槸灏忎簬max 鐨勬墍鏈夊畬鏁 - * @param max - * @return - */ - public int[] getPerfectNumbers(int max){ - return null; - } - - /** - * 鐢╯eperator 鎶婃暟缁 array缁欒繛鎺ヨ捣鏉 - * 渚嬪array= [3,8,9], seperator = "-" - * 鍒欒繑鍥炲间负"3-8-9" - * @param array - * @param s - * @return - */ - public String join(int[] array, String seperator){ - return null; - } - - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java deleted file mode 100644 index cc0e750c98..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.github.wdn.coding2017.coderising.download; - -import com.coderising.download.api.Connection; - -public class DownloadThread extends Thread{ - - Connection conn; - int startPos; - int endPos; - - public DownloadThread( Connection conn, int startPos, int endPos){ - - this.conn = conn; - this.startPos = startPos; - this.endPos = endPos; - } - public void run(){ - - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java deleted file mode 100644 index a5c19a7d77..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.github.wdn.coding2017.coderising.download; - -import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; -import com.coderising.download.api.ConnectionManager; -import com.coderising.download.api.DownloadListener; - - -public class FileDownloader { - - String url; - - DownloadListener listener; - - ConnectionManager cm; - - - public FileDownloader(String _url) { - this.url = _url; - - } - - public void execute(){ - // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 - // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 - // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 - // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 - // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 - // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 - // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; - try { - - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); - - } catch (ConnectionException e) { - e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); - } - } - - - - - } - - public void setListener(DownloadListener listener) { - this.listener = listener; - } - - - - public void setConnectionManager(ConnectionManager ucm){ - this.cm = ucm; - } - - public DownloadListener getListener(){ - return this.listener; - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java deleted file mode 100644 index 490db5c08b..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.github.wdn.coding2017.coderising.download; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.coderising.download.api.ConnectionManager; -import com.coderising.download.api.DownloadListener; -import com.coderising.download.impl.ConnectionManagerImpl; - -public class FileDownloaderTest { - boolean downloadFinished = false; - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testDownload() { - - String url = "http://localhost:8080/test.jpg"; - - FileDownloader downloader = new FileDownloader(url); - - - ConnectionManager cm = new ConnectionManagerImpl(); - downloader.setConnectionManager(cm); - - downloader.setListener(new DownloadListener() { - @Override - public void notifyFinished() { - downloadFinished = true; - } - - }); - - - downloader.execute(); - - // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 - while (!downloadFinished) { - try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 - Thread.sleep(5000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - System.out.println("涓嬭浇瀹屾垚锛"); - - - - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java deleted file mode 100644 index 91e8aa463b..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.api; - -import java.io.IOException; - -public interface Connection { - /** - * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 - * @param startPos 寮濮嬩綅缃紝 浠0寮濮 - * @param endPos 缁撴潫浣嶇疆 - * @return - */ - public byte[] read(int startPos, int endPos) throws IOException; - /** - * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 - * @return - */ - public int getContentLength(); - - /** - * 鍏抽棴杩炴帴 - */ - public void close(); -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java deleted file mode 100644 index 5c90080401..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.api; - -public class ConnectionException extends Exception { - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java deleted file mode 100644 index f814016839..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.api; - -public interface ConnectionManager { - /** - * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 - * @param url - * @return - */ - public Connection open(String url) throws ConnectionException; -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java deleted file mode 100644 index 078b14365d..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.api; - -public interface DownloadListener { - public void notifyFinished(); -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java deleted file mode 100644 index e2bc4dcd10..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.impl; - -import java.io.IOException; - -import com.coderising.download.api.Connection; - -public class ConnectionImpl implements Connection{ - - @Override - public byte[] read(int startPos, int endPos) throws IOException { - - return null; - } - - @Override - public int getContentLength() { - - return 0; - } - - @Override - public void close() { - - - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java deleted file mode 100644 index 082e2af8fd..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.github.wdn.coding2017.coderising.download.impl; - -import com.coderising.download.api.Connection; -import com.coderising.download.api.ConnectionException; -import com.coderising.download.api.ConnectionManager; - -public class ConnectionManagerImpl implements ConnectionManager { - - @Override - public Connection open(String url) throws ConnectionException { - - return null; - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java deleted file mode 100644 index b342a51061..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.github.wdn.coding2017.coderising.litestruts; - -/** - * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 - * @author liuxin - * - */ -public class LoginAction{ - private String name ; - private String password; - private String message; - - public String getName() { - return name; - } - - public String getPassword() { - return password; - } - - public String execute(){ - if("test".equals(name) && "1234".equals(password)){ - this.message = "login successful"; - return "success"; - } - this.message = "login failed,please check your user/pwd"; - return "fail"; - } - - public void setName(String name){ - this.name = name; - } - public void setPassword(String password){ - this.password = password; - } - public String getMessage(){ - return this.message; - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java deleted file mode 100644 index cf3d0564f1..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.wdn.coding2017.coderising.litestruts; - -import java.util.Map; - - - -public class Struts { - - public static View runAction(String actionName, Map parameters) { - - /* - - 0. 璇诲彇閰嶇疆鏂囦欢struts.xml - - 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 - 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 - ("name"="test" , "password"="1234") , - 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" - - 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, - 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , - 鏀惧埌View瀵硅薄鐨刾arameters - - 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 - 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 - - */ - - return null; - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java deleted file mode 100644 index 9fee464283..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.github.wdn.coding2017.coderising.litestruts; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Assert; -import org.junit.Test; - - - - - -public class StrutsTest { - - @Test - public void testLoginActionSuccess() { - - String actionName = "login"; - - Map params = new HashMap(); - params.put("name","test"); - params.put("password","1234"); - - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); - Assert.assertEquals("login successful", view.getParameters().get("message")); - } - - @Test - public void testLoginActionFailed() { - String actionName = "login"; - Map params = new HashMap(); - params.put("name","test"); - params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 - - View view = Struts.runAction(actionName,params); - - Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); - Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java deleted file mode 100644 index 31e1805dc7..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.wdn.coding2017.coderising.litestruts; - -import java.util.Map; - -public class View { - private String jsp; - private Map parameters; - - public String getJsp() { - return jsp; - } - public View setJsp(String jsp) { - this.jsp = jsp; - return this; - } - public Map getParameters() { - return parameters; - } - public View setParameters(Map parameters) { - this.parameters = parameters; - return this; - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml deleted file mode 100644 index 171848ecd1..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /jsp/homepage.jsp - /jsp/showLogin.jsp - - - /jsp/welcome.jsp - /jsp/error.jsp - - From 298d86cf43142288bfe13aacadf5a5a546fec006 Mon Sep 17 00:00:00 2001 From: HuiZhou-Xmu <1814014897@qq.com> Date: Sun, 12 Mar 2017 17:57:47 +0800 Subject: [PATCH 358/646] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/week01/datastructure/ArrayList.java | 75 +++++ .../week01/datastructure/BinaryTreeNode.java | 56 ++++ .../src/week01/datastructure/Iterator.java | 7 + .../src/week01/datastructure/LinkedList.java | 113 ++++++++ .../src/week01/datastructure/List.java | 9 + .../src/week01/datastructure/Queue.java | 25 ++ .../src/week01/datastructure/Stack.java | 25 ++ .../src/week01/datastructuretest/AllTest.java | 18 ++ .../datastructuretest/ArrayListTest.java | 72 +++++ .../datastructuretest/BinaryTreeNodeTest.java | 80 ++++++ .../datastructuretest/LinkedListTest.java | 107 +++++++ .../week01/datastructuretest/QueueTest.java | 56 ++++ .../week01/datastructuretest/StackTest.java | 71 +++++ .../zhouhui/src/week02/litestruts/Struts.java | 5 +- .../src/week03/download/DownloadThread.java | 38 +++ .../src/week03/download/FileDownloader.java | 93 +++++++ .../week03/download/FileDownloaderTest.java | 57 ++++ .../src/week03/download/api/Connection.java | 25 ++ .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 11 + .../week03/download/api/DownloadListener.java | 5 + .../week03/download/impl/ConnectionImpl.java | 65 +++++ .../download/impl/ConnectionManagerImpl.java | 13 + .../src/week03/linkedlist/Iterator.java | 7 + .../src/week03/linkedlist/LinkedList.java | 263 ++++++++++++++++++ .../src/week03/linkedlist/LinkedListTest.java | 170 +++++++++++ .../zhouhui/src/week03/linkedlist/List.java | 9 + 27 files changed, 1478 insertions(+), 2 deletions(-) create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/ArrayList.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/BinaryTreeNode.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/Iterator.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/LinkedList.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/List.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/Queue.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructure/Stack.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/AllTest.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/ArrayListTest.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/BinaryTreeNodeTest.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/LinkedListTest.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/QueueTest.java create mode 100644 group01/1814014897/zhouhui/src/week01/datastructuretest/StackTest.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/DownloadThread.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/FileDownloader.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/FileDownloaderTest.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/api/Connection.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/api/ConnectionException.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/api/ConnectionManager.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/api/DownloadListener.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/impl/ConnectionImpl.java create mode 100644 group01/1814014897/zhouhui/src/week03/download/impl/ConnectionManagerImpl.java create mode 100644 group01/1814014897/zhouhui/src/week03/linkedlist/Iterator.java create mode 100644 group01/1814014897/zhouhui/src/week03/linkedlist/LinkedList.java create mode 100644 group01/1814014897/zhouhui/src/week03/linkedlist/LinkedListTest.java create mode 100644 group01/1814014897/zhouhui/src/week03/linkedlist/List.java diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/ArrayList.java b/group01/1814014897/zhouhui/src/week01/datastructure/ArrayList.java new file mode 100644 index 0000000000..96f1b23737 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/ArrayList.java @@ -0,0 +1,75 @@ +package week01.datastructure; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + ensureCapacity(size + 1); //size increase,in order to have enough capacity. + elementData[size++] = o; //similar to: elementData[size]=o; size++; + } + + private void ensureCapacity(int minCapacity){ + if(minCapacity > elementData.length){ + grow(minCapacity); + } + } + + private void grow(int minCapacity){ + int oldCapacity = elementData.length; + int newCapacity = oldCapacity + ( oldCapacity >> 1 ); + if(newCapacity < minCapacity){ + newCapacity = minCapacity; + } + elementData = Arrays.copyOf(elementData, newCapacity); + + } + + public void add(int index, Object o){ + if(index < 0 || index > size) throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + ensureCapacity(size+1); + System.arraycopy(elementData, index, elementData, index + 1, size - index); + elementData[index] = o; + size++; + } + + public Object get(int index){ + if(index < 0 || index >= size) throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + return elementData[index]; + } + + public Object remove(int index){ + if(index < 0 || index >= size) throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + Object data_index = elementData[index]; + System.arraycopy(elementData, index + 1, elementData, index, size - index - 1); + elementData[size - 1] = null; + size--; + return data_index; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new ArrayListIterator(); + } + + private class ArrayListIterator implements Iterator{ + + private int pos = 0; + + public boolean hasNext() { + return pos < size; + } + + public Object next() { + return elementData[pos++]; + } + } + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/BinaryTreeNode.java b/group01/1814014897/zhouhui/src/week01/datastructure/BinaryTreeNode.java new file mode 100644 index 0000000000..f546122f4c --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/BinaryTreeNode.java @@ -0,0 +1,56 @@ +package week01.datastructure; + +public class BinaryTreeNode{ + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(Object data){ + this.data = data; + left = null; + right = null; + } + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + if((Integer)o < (Integer)this.data) + { + if(this.left == null){ + BinaryTreeNode node = new BinaryTreeNode(o); + this.setLeft(node); + return node; + }else{ + return this.left.insert(o); + } + }else{ + if(this.right == null){ + BinaryTreeNode node = new BinaryTreeNode(o); + this.setRight(node); + return node; + }else{ + return this.right.insert(o); + } + } + } + } + + diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/Iterator.java b/group01/1814014897/zhouhui/src/week01/datastructure/Iterator.java new file mode 100644 index 0000000000..bf59b406cc --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/Iterator.java @@ -0,0 +1,7 @@ +package week01.datastructure; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/LinkedList.java b/group01/1814014897/zhouhui/src/week01/datastructure/LinkedList.java new file mode 100644 index 0000000000..15ef81ed3e --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/LinkedList.java @@ -0,0 +1,113 @@ +package week01.datastructure; + +public class LinkedList implements List { + + private Node head; + private int size = 0; + + public void add(Object o){ + if(head == null){ + head = new Node(o); + }else{ + Node pos = head; + while(pos.next != null){ + pos = pos.next; + } + pos.next = new Node(o); + } + size++; + } + + public void add(int index , Object o){ + if(index < 0 || index >size ) throw new IndexOutOfBoundsException("Index:"+index+",Size"+size); + if(index == 0) { + Node node = new Node(o); + node.next = head; + head = node; + } + else{ + Node pos = head; + for(int i = 0;i < index-1;i++){ + pos = pos.next; + } + Node node = new Node(o); + node.next = pos.next; + pos.next = node; + } + size++; + } + + public Object get(int index){ + if(index < 0 || index >=size ) throw new IndexOutOfBoundsException("Index:"+index+",Size"+size); + Node pos = head; + for(int i = 0;i < index;i++){ + pos = pos.next; + } + return pos.data; + } + + public Object remove(int index){ + if(index < 0 || index >=size ) throw new IndexOutOfBoundsException("Index:"+index+",Size:"+size); + Node element = head; + if(index == 0){ + head = head.next; + }else{ + Node pos = head; + for(int i = 0;i < index - 1;i++){ + pos = pos.next; + } + element = pos.next; + pos.next = pos.next.next; + } + size--; + return element.data; + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + add(0,o); + } + public void addLast(Object o){ + add(size,o); + } + public Object removeFirst(){ + return remove(0); + } + public Object removeLast(){ + return remove(size-1); + } + public Iterator iterator(){ + return new LinkedListIterator(); + } + + class LinkedListIterator implements Iterator{ + + private Node node = head; + private int pos = 0; + @Override + public boolean hasNext() { + return pos < size; + } + + @Override + public Object next() { + pos++; + if(pos != 1){ + node = node.next; + } + return node.data; + } + } + + private static class Node{ + Object data; + Node next; + public Node(Object data){ + this.data = data; + next = null; + } + } +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/List.java b/group01/1814014897/zhouhui/src/week01/datastructure/List.java new file mode 100644 index 0000000000..0f54344c2c --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/List.java @@ -0,0 +1,9 @@ +package week01.datastructure; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/Queue.java b/group01/1814014897/zhouhui/src/week01/datastructure/Queue.java new file mode 100644 index 0000000000..48fd480698 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/Queue.java @@ -0,0 +1,25 @@ +package week01.datastructure; + +public class Queue { + + private LinkedList linkedList = new LinkedList(); + private int size = 0; + + public void enQueue(Object o){ + linkedList.add(o); + size++; + } + + public Object deQueue(){ + size--; + return linkedList.removeFirst(); + } + + public boolean isEmpty(){ + return linkedList.size() == 0; + } + + public int size(){ + return size; + } +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructure/Stack.java b/group01/1814014897/zhouhui/src/week01/datastructure/Stack.java new file mode 100644 index 0000000000..5d8c66c087 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructure/Stack.java @@ -0,0 +1,25 @@ +package week01.datastructure; + +public class Stack { + private ArrayList elementData = new ArrayList(); + private int size = 0; + + public void push(Object o){ + elementData.add(o); + size++; + } + + public Object pop(){ + return elementData.remove(--size); + } + + public Object peek(){ + return elementData.get(size - 1); + } + public boolean isEmpty(){ + return elementData.size() == 0; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/AllTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/AllTest.java new file mode 100644 index 0000000000..bfb1259a20 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/AllTest.java @@ -0,0 +1,18 @@ +package week01.datastructuretest; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + ArrayListTest.class, + BinaryTreeNodeTest.class, + LinkedListTest.class, + QueueTest.class, + StackTest.class +}) + +public class AllTest { + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/ArrayListTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/ArrayListTest.java new file mode 100644 index 0000000000..75412b9b5b --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/ArrayListTest.java @@ -0,0 +1,72 @@ +package week01.datastructuretest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.datastructure.ArrayList; +import week01.datastructure.Iterator; + +public class ArrayListTest { + + private ArrayList arrayList = new ArrayList(); + + @Before + public void setUp() throws Exception { + for(int i = 0;i < 100 ; i++){ + arrayList.add(i); + } + } + + @Test + public void testAddObject() { + for(int i = 0;i < 100;i++){ + Assert.assertEquals(arrayList.get(i), i); + } + } + + @Test + public void testAddIntObject() { + arrayList.add(0,10); + arrayList.add(22, 44); + arrayList.add(40, 5); + arrayList.add(100,88); + Assert.assertEquals(arrayList.get(0), 10); + Assert.assertEquals(arrayList.get(22),44); + Assert.assertEquals(arrayList.get(40), 5); + Assert.assertEquals(arrayList.get(100), 88); + } + + @Test + public void testGet() { + Assert.assertEquals(arrayList.get(0), 0); + Assert.assertEquals(arrayList.get(33), 33); + Assert.assertEquals(arrayList.get(77), 77); + Assert.assertEquals(arrayList.get(99), 99); + } + + @Test + public void testRemove() { + Assert.assertEquals(arrayList.remove(0), 0); + Assert.assertEquals(arrayList.remove(0), 1); + Assert.assertEquals(arrayList.remove(97), 99); + Assert.assertEquals(arrayList.size(), 97); + } + + @Test + public void testSize() { + Assert.assertEquals(arrayList.size(), 100); + arrayList.add(5,5); + Assert.assertEquals(arrayList.size(),101); + arrayList.remove(5); + Assert.assertEquals(arrayList.size(), 100); + } + + @Test + public void testIterator() { + Iterator iterator = arrayList.iterator(); + for(int i=0;iterator.hasNext();i++){ + Assert.assertEquals(iterator.next(),i); + } + } +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/BinaryTreeNodeTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..b7f6dccfe4 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/BinaryTreeNodeTest.java @@ -0,0 +1,80 @@ +package week01.datastructuretest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.datastructure.BinaryTreeNode; + + +public class BinaryTreeNodeTest { + + private BinaryTreeNode root = new BinaryTreeNode(5); + + @Before + public void setUp() throws Exception { + root.insert(2); + root.insert(7); + root.insert(1); + root.insert(6); + } + + @Test + public void testGetData() { + Assert.assertEquals(root.getData(), 5); + Assert.assertEquals(root.getLeft().getData(), 2); + Assert.assertEquals(root.getRight().getData(), 7); + Assert.assertEquals(root.getLeft().getLeft().getData(), 1); + Assert.assertEquals(root.getRight().getLeft().getData(), 6); + } + + @Test + public void testSetData() { + root.setData(8); + Assert.assertEquals(root.getData(),8); + root.getLeft().setData(88); + Assert.assertEquals(root.getLeft().getData(),88); + root.getRight().setData(888); + Assert.assertEquals(root.getRight().getData(),888); + } + + @Test + public void testGetLeft() { + BinaryTreeNode node_left = root.getLeft(); + Assert.assertEquals(node_left.getData(), 2); + BinaryTreeNode node_left_left = root.getLeft().getLeft(); + Assert.assertEquals(node_left_left.getData(), 1); + } + + @Test + public void testSetLeft() { + BinaryTreeNode node = new BinaryTreeNode(100); + root.setLeft(node); + Assert.assertEquals(root.getLeft().getData(), 100); + } + + @Test + public void testGetRight() { + BinaryTreeNode node_right = root.getRight(); + Assert.assertEquals(node_right.getData(), 7); + root.insert(8); + BinaryTreeNode node_right_right = root.getRight().getRight(); + Assert.assertEquals(node_right_right.getData(), 8); + } + + @Test + public void testSetRight() { + BinaryTreeNode node = new BinaryTreeNode(100); + root.setRight(node); + Assert.assertEquals(root.getRight().getData(), 100); + } + + @Test + public void testInsert() { + root.insert(4); + root.insert(8); + Assert.assertEquals(root.getLeft().getRight().getData(), 4); + Assert.assertEquals(root.getRight().getRight().getData(), 8); + } + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/LinkedListTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/LinkedListTest.java new file mode 100644 index 0000000000..945982e23e --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/LinkedListTest.java @@ -0,0 +1,107 @@ +package week01.datastructuretest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.datastructure.Iterator; +import week01.datastructure.LinkedList; + +public class LinkedListTest { + + private LinkedList linkedList = new LinkedList(); + + @Before + public void setUp() throws Exception { + for(int i=0;i<100;i++){ + linkedList.add(i); + } + } + + @Test + public void testAddObject() { + for(int i=0;i<200;i++){ + linkedList.add(i); + } + for(int i=0;i<100;i++){ + Assert.assertEquals(linkedList.get(i), i); + } + for(int i=100;i<300;i++){ + Assert.assertEquals(linkedList.get(i), i-100); + } + } + + @Test + public void testAddIntObject() { + linkedList.add(0, 10); + Assert.assertEquals(linkedList.get(0), 10); + linkedList.add(5,60); + Assert.assertEquals(linkedList.get(5), 60); + Assert.assertEquals(linkedList.get(101), 99); + } + + @Test + public void testGet() { + for(int i =0;i<100;i++){ + Assert.assertEquals(linkedList.get(i), i); + } + } + + @Test + public void testRemove() { + Assert.assertEquals(linkedList.remove(0), 0); + Assert.assertEquals(linkedList.remove(0), 1); + Assert.assertEquals(linkedList.size(), 98); + linkedList.remove(97); + Assert.assertEquals(linkedList.get(96), 98); + } + + @Test + public void testSize() { + linkedList.add(0); + Assert.assertEquals(linkedList.size(), 101); + linkedList.add(0, 10); + Assert.assertEquals(linkedList.size(), 102); + linkedList.remove(0); + Assert.assertEquals(linkedList.size(), 101); + } + + @Test + public void testAddFirst() { + linkedList.addFirst(22); + Assert.assertEquals(linkedList.get(0), 22); + linkedList.addFirst(44); + Assert.assertEquals(linkedList.get(0), 44); + Assert.assertEquals(linkedList.size(), 102); + } + + @Test + public void testAddLast() { + linkedList.addLast(22); + Assert.assertEquals(linkedList.get(100), 22); + linkedList.addLast(44); + Assert.assertEquals(linkedList.get(101), 44); + } + + @Test + public void testRemoveFirst() { + Assert.assertEquals(linkedList.removeFirst(), 0); + Assert.assertEquals(linkedList.removeFirst(), 1); + Assert.assertEquals(linkedList.removeFirst(), 2); + } + + @Test + public void testRemoveLast() { + Assert.assertEquals(linkedList.removeLast(),99 ); + Assert.assertEquals(linkedList.removeLast(), 98); + } + + @Test + public void testIterator() { + Iterator iterator = linkedList.iterator(); + for(int i = 0;iterator.hasNext();i++){ + Assert.assertEquals(iterator.next(), i); + } + } + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/QueueTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/QueueTest.java new file mode 100644 index 0000000000..03ffdc0024 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/QueueTest.java @@ -0,0 +1,56 @@ +package week01.datastructuretest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.datastructure.Queue; + + +public class QueueTest { + + Queue queue = new Queue(); + + @Before + public void setUp() throws Exception { + for(int i=0;i<100;i++){ + queue.enQueue(i); + } + } + + @Test + public void testEnQueue() { + Assert.assertEquals(queue.size(), 100); + for(int i =0;i<100;i++){ + queue.enQueue(i); + } + Assert.assertEquals(queue.size(), 200); + } + + @Test + public void testDeQueue() { + for(int i =0;i<100;i++){ + Assert.assertEquals(queue.deQueue(), i); + } + + } + + @Test + public void testIsEmpty() { + Assert.assertEquals(queue.isEmpty(), false); + for(int i=0;i<100;i++){ + queue.deQueue(); + } + Assert.assertEquals(queue.isEmpty(), true); + } + + @Test + public void testSize() { + Assert.assertEquals(queue.size(), 100); + queue.enQueue(100); + Assert.assertEquals(queue.size(), 101); + queue.deQueue(); + Assert.assertEquals(queue.size(), 100); + } + +} diff --git a/group01/1814014897/zhouhui/src/week01/datastructuretest/StackTest.java b/group01/1814014897/zhouhui/src/week01/datastructuretest/StackTest.java new file mode 100644 index 0000000000..b20119e69b --- /dev/null +++ b/group01/1814014897/zhouhui/src/week01/datastructuretest/StackTest.java @@ -0,0 +1,71 @@ +package week01.datastructuretest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import week01.datastructure.Stack; + + +public class StackTest { + + Stack stack = new Stack(); + + @Before + public void setUp() throws Exception { + for(int i =0 ;i <100;i++){ + stack.push(i); + } + } + + @Test + public void testPush() { + Assert.assertEquals(stack.peek(), 99); + for(int i =0;i <200;i++){ + stack.push(i); + } + Assert.assertEquals(stack.peek(), 199); + Assert.assertEquals(stack.size(), 300); + } + + @Test + public void testPop() { + Assert.assertEquals(stack.pop(), 99); + Assert.assertEquals(stack.pop(), 98); + for(int i=0;i<98;i++){ + stack.pop(); + } + Assert.assertEquals(stack.size(), 0); + } + + @Test + public void testPeek() { + for(int i=0;i<100;i++){ + Assert.assertEquals(stack.peek(), 99); + Assert.assertEquals(stack.size(), 100); + } + stack.pop(); + Assert.assertEquals(stack.peek(), 98); + Assert.assertEquals(stack.peek(), 98); + } + + @Test + public void testIsEmpty() { + Assert.assertEquals(stack.isEmpty(), false); + for(int i =0 ;i <100;i++){ + stack.pop(); + } + Assert.assertEquals(stack.isEmpty(), true); + } + + @Test + public void testSize() { + stack.push(100); + Assert.assertEquals(stack.size(), 101); + stack.pop(); + Assert.assertEquals(stack.size(), 100); + stack.peek(); + Assert.assertEquals(stack.size(), 100); + } + +} diff --git a/group01/1814014897/zhouhui/src/week02/litestruts/Struts.java b/group01/1814014897/zhouhui/src/week02/litestruts/Struts.java index 92663a7dc4..439d1862d5 100644 --- a/group01/1814014897/zhouhui/src/week02/litestruts/Struts.java +++ b/group01/1814014897/zhouhui/src/week02/litestruts/Struts.java @@ -6,8 +6,9 @@ import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.SAXException; -import week01.BasicDataStructure.LinkedList; -import week01.BasicDataStructure.List; + +import week01.datastructure.LinkedList; +import week01.datastructure.List; /** * @author Hui Zhou diff --git a/group01/1814014897/zhouhui/src/week03/download/DownloadThread.java b/group01/1814014897/zhouhui/src/week03/download/DownloadThread.java new file mode 100644 index 0000000000..58c25cdabc --- /dev/null +++ b/group01/1814014897/zhouhui/src/week03/download/DownloadThread.java @@ -0,0 +1,38 @@ +package week03.download; + +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; + +import week03.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + CyclicBarrier barrier; + + public DownloadThread( Connection conn, int startPos, int endPos,CyclicBarrier barrier){ + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.barrier = barrier; + } + + @Override + public void run(){ + try { + byte[] piece = conn.read(startPos, endPos); + System.out.println("姝ょ嚎绋嬩笅杞芥婚暱搴:"+piece.length+",鑼冨洿:"+startPos+"~"+endPos); + RandomAccessFile m = new RandomAccessFile("download.jpg", "rw"); + m.seek(startPos); + m.write(piece); + m.close(); + barrier.await(); + } catch (IOException|InterruptedException|BrokenBarrierException e) { + e.printStackTrace(); + } + } +} diff --git a/group01/1814014897/zhouhui/src/week03/download/FileDownloader.java b/group01/1814014897/zhouhui/src/week03/download/FileDownloader.java new file mode 100644 index 0000000000..aa15899309 --- /dev/null +++ b/group01/1814014897/zhouhui/src/week03/download/FileDownloader.java @@ -0,0 +1,93 @@ +package week03.download; + +import java.util.concurrent.CyclicBarrier; + +import week03.download.api.Connection; +import week03.download.api.ConnectionManager; +import week03.download.api.DownloadListener; +import week03.download.impl.ConnectionManagerImpl; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + CyclicBarrier cb; + + int threadNum = 3; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + + cb = new CyclicBarrier(3,new Runnable() { + + @Override + public void run() { + listener.notifyFinished(); + } + }); + + try { + cm = new ConnectionManagerImpl(); + conn = cm.open(this.url); + int length = conn.getContentLength(); + conn.close(); + + for(int i=0;isize ) throw new IndexOutOfBoundsException("Index:"+index+",Size"+size); + } + + public Object get(int index){ + checkIndexPosition(index); + Node pos = head; + for(int i = 0;i < index;i++){ + pos = pos.next; + } + return pos.data; + } + + public Object remove(int index){ + checkIndexPosition(index); + Node element = head; + if(index == 0){ + head = head.next; + }else{ + Node pos = head; + for(int i = 0;i < index - 1;i++){ + pos = pos.next; + } + element = pos.next; + pos.next = pos.next.next; + } + size--; + return element.data; + } + + private void checkIndexPosition(int index) { + if(index < 0 || index >=size ) throw new IndexOutOfBoundsException("Index:"+index+",Size"+size); + } + + + public int size(){ + return size; + } + + public void addFirst(Object o){ + add(0,o); + } + + public void addLast(Object o){ + add(size,o); + } + + public Object removeFirst(){ + return remove(0); + } + + public Object removeLast(){ + return remove(size-1); + } + + public Iterator iterator(){ + return new LinkedListIterator(); + } + + class LinkedListIterator implements Iterator{ + + private Node node = head; + private int pos = 0; + @Override + public boolean hasNext() { + return pos < size; + } + + @Override + public Object next() { + pos++; + if(pos != 1){ + node = node.next; + } + return node.data; + } + } + + private static class Node{ + Object data; + Node next; + public Node(Object data){ + this.data = data; + next = null; + } + } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + if(size == 0) return; + + for(int i=1;i5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + if(size == 0) return; + + int removeNum = size/2; + for(int i=0;i size || i<0 || i>=size) return; + + for(int k=i;k<(length+i);k++){ + remove(i); + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + if(list == null) return new int[0]; + + int[] targetList = new int[list.size]; + for(int i=0;i min && (int)get(i) < max){ + remove(i--); + } + } + */ + + //閬嶅巻鍒版渶灏忓煎拰鏈澶у煎骞惰褰曚綅缃紝鏈鍚庤皟鐢╮emove(int i,int length)杩涜鑼冨洿鍐呯殑鍒犻櫎銆 + int minPos = 0; + int maxPos = 0; + boolean exec = true; + for(int i=0;i min) { + minPos = i; + exec = false; + } else if((int)get(i) >max){ + maxPos = i; + break; + } + } + remove(minPos, maxPos - minPos); + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + LinkedList newList = new LinkedList(); + for(int i=0;i Date: Sun, 12 Mar 2017 18:00:30 +0800 Subject: [PATCH 359/646] 20170305 Assignment- LinkedList and MultiThreadDownload --- .../coderising/download/DownloadThread.java | 46 ++ .../coderising/download/FileDownloader.java | 137 +++++ .../download/FileDownloaderTest.java | 59 ++ .../coderising/download/api/Connection.java | 23 + .../download/api/ConnectionException.java | 5 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 74 +++ .../download/impl/ConnectionManagerImpl.java | 14 + .../src/com/coding/basic2/Iterator.java | 7 + .../src/com/coding/basic2/LinkedList.java | 541 ++++++++++++++++++ .../src/com/coding/basic2/LinkedListTest.java | 368 ++++++++++++ .../283091182/src/com/coding/basic2/List.java | 9 + 13 files changed, 1298 insertions(+) create mode 100644 group11/283091182/src/com/coderising/download/DownloadThread.java create mode 100644 group11/283091182/src/com/coderising/download/FileDownloader.java create mode 100644 group11/283091182/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group11/283091182/src/com/coderising/download/api/Connection.java create mode 100644 group11/283091182/src/com/coderising/download/api/ConnectionException.java create mode 100644 group11/283091182/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group11/283091182/src/com/coderising/download/api/DownloadListener.java create mode 100644 group11/283091182/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group11/283091182/src/com/coderising/download/impl/ConnectionManagerImpl.java create mode 100644 group11/283091182/src/com/coding/basic2/Iterator.java create mode 100644 group11/283091182/src/com/coding/basic2/LinkedList.java create mode 100644 group11/283091182/src/com/coding/basic2/LinkedListTest.java create mode 100644 group11/283091182/src/com/coding/basic2/List.java diff --git a/group11/283091182/src/com/coderising/download/DownloadThread.java b/group11/283091182/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..f8533373a4 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,46 @@ +package com.coderising.download; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + String filePath = null; + private boolean finished = false; + + public boolean isFinished() { + return finished; + } + public DownloadThread( Connection conn, int startPos, int endPos,String filePath){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + this.filePath = filePath; + } + public void run(){ + File f = new File(this.filePath); + + try { + if(!f.exists()){ + f.createNewFile(); + } + RandomAccessFile raf = new RandomAccessFile(f, "rw"); + byte[] ba = conn.read(startPos, endPos); + System.out.println("["+this.getName()+"]ByteArray length="+ba.length+",endPos-startPos+1="+(endPos-startPos+1)); + raf.seek(startPos); + raf.write(ba, 0, endPos-startPos+1); + finished = true; + System.out.println("["+this.getName()+"]DownloadThread-startPos="+startPos+"-endPos="+endPos+":download completed"); + } catch (IOException e) { + e.printStackTrace(); + } + + } +} diff --git a/group11/283091182/src/com/coderising/download/FileDownloader.java b/group11/283091182/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..0deb9a3cc4 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,137 @@ +package com.coderising.download; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + private static int DOWNLOAD_SIZE_PER_THREAD = 1024*1000; + + private String destFilePath; + + + public FileDownloader(String _url) { + this.url = _url; + + } + + public FileDownloader(String _url,String destFilePath) { + this.url = _url; + this.destFilePath = destFilePath; + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + + int length = conn.getContentLength(); + System.out.println("GetLength ="+length); + + File dest = new File(destFilePath); + dest.createNewFile(); + //fill the file with byte array to ensure the size +// byte[] ba = new byte[length]; +// FileOutputStream fos = new FileOutputStream(dest); +// fos.write(ba); +// fos.flush(); +// fos.close(); + + ArrayList threadPool = new ArrayList(); + int numOfThread = length/DOWNLOAD_SIZE_PER_THREAD; + if(length%DOWNLOAD_SIZE_PER_THREAD!=0) + { + numOfThread++; + } + + for(int i=0;ilength-1) + { + endPos = length-1; + } + DownloadThread t = new DownloadThread(cm.open(url),startPos,endPos,destFilePath); + t.setName("downloadThread_"+i); + System.out.println("Initializing Thread:"+t.getName()); + threadPool.add(t); + t.start(); + } + //pooling + boolean flag; + do{ + Iterator it = threadPool.iterator(); + flag=true; + DownloadThread t; + while(it.hasNext()){ + t = it.next(); + System.out.println("Thread ="+t.getName()+" has completed?"+t.isFinished()); + flag = flag && t.isFinished(); + } + if(!flag){ + System.out.println("=====================AllCompleted="+flag); + Thread.sleep(10*1000); + continue; + } + }while(!flag); + + } catch (Exception e) { + throw new RuntimeException("Error occured during download,",e); + }finally{ + if(conn != null){ + conn.close(); + } + } + getListener().notifyFinished(); + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + + + public void setConnectionManager(ConnectionManager ucm){ + this.cm = ucm; + } + + public DownloadListener getListener(){ + return this.listener; + } + +} diff --git a/group11/283091182/src/com/coderising/download/FileDownloaderTest.java b/group11/283091182/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..583f3cb7d8 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,59 @@ +package com.coderising.download; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://download.theworld.cn/ver/TWInst_7.0.0.108.exe";//"http://src.onlinedown.net/Public/images/bigsoftimg/120000/q113222.jpg";// + String dest = "D:\\bt\\JavaDownload_TWInst_7.0.0.108.exe"; + FileDownloader downloader = new FileDownloader(url,dest); + + + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + + downloader.execute(); + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + + + } + +} diff --git a/group11/283091182/src/com/coderising/download/api/Connection.java b/group11/283091182/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..9710e270e1 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group11/283091182/src/com/coderising/download/api/ConnectionException.java b/group11/283091182/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..8dbfe95dda --- /dev/null +++ b/group11/283091182/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public class ConnectionException extends Exception { + +} diff --git a/group11/283091182/src/com/coderising/download/api/ConnectionManager.java b/group11/283091182/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..fb44ede457 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group11/283091182/src/com/coderising/download/api/DownloadListener.java b/group11/283091182/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..4cd0b3eab1 --- /dev/null +++ b/group11/283091182/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group11/283091182/src/com/coderising/download/impl/ConnectionImpl.java b/group11/283091182/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..8750ac6b8d --- /dev/null +++ b/group11/283091182/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,74 @@ +package com.coderising.download.impl; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.URL; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection{ + + private URL url; + + private int length; + + private InputStream is; + + public ConnectionImpl(String url){ + try { + this.url = new URL(url); + this.length = getConnection(this.url).getContentLength(); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Error opening connection.",e); + } + } + + private HttpURLConnection getConnection(URL url) throws MalformedURLException, IOException, ProtocolException { + HttpURLConnection conn = (HttpURLConnection)this.url.openConnection(); + conn.setRequestMethod("GET"); + conn.setConnectTimeout(30*1000); + return conn; + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + byte[] buffer = new byte[1024]; + int tempLen = 0; + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + HttpURLConnection conn = getConnection(url); + conn.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); + this.is = conn.getInputStream(); + + while((tempLen = this.is.read(buffer))!=-1){ + baos.write(buffer, 0, tempLen); + } + return baos.toByteArray(); + } + + @Override + public int getContentLength() { + return this.length; + } + + @Override + public void close() { + if(this.is!=null) + { + try { + this.is.close(); + this.url = null; + } catch (IOException e) { + // Safe to ignore + e.printStackTrace(); + } + + } + + } + +} diff --git a/group11/283091182/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group11/283091182/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..2d6768697e --- /dev/null +++ b/group11/283091182/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,14 @@ +package com.coderising.download.impl; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + return new ConnectionImpl(url); + } + +} diff --git a/group11/283091182/src/com/coding/basic2/Iterator.java b/group11/283091182/src/com/coding/basic2/Iterator.java new file mode 100644 index 0000000000..25895dc589 --- /dev/null +++ b/group11/283091182/src/com/coding/basic2/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic2; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group11/283091182/src/com/coding/basic2/LinkedList.java b/group11/283091182/src/com/coding/basic2/LinkedList.java new file mode 100644 index 0000000000..4dd531e41b --- /dev/null +++ b/group11/283091182/src/com/coding/basic2/LinkedList.java @@ -0,0 +1,541 @@ +package com.coding.basic2; + +import static org.junit.Assert.assertEquals; + +public class LinkedList implements List { + + private Node head; + private Node tail; + private int size=0; + + private void checkIndex(int index){ + if(index<0 || index>=this.size) + { + throw new IndexOutOfBoundsException("Error!Invalid index:"+index); + } + } + + private void checkSize(){ + if(size==0) + { + throw new RuntimeException("Empty LinkedList."); + } + } + + public void add(Object o){ + Node temp = new Node(o,null); + if(this.head==null){ + this.head = temp; + this.tail = head; + }else{ + this.tail.next = temp; + this.tail = temp; + } + this.size++; + } + + /* (non-Javadoc) + * @see com.coding.basic2.List#add(int, java.lang.Object) + */ + public void add(int index , Object o){ + checkIndex(index); + if(index==0) + { + Node newNode = new Node(o,head); + head = newNode; + }else{ + Node temp = head; + for(int i=1;i0){ + Node temp = head; + sb.append(temp.data); + while(temp.hasNext()){ + temp = temp.next; + sb.append(","); + sb.append(temp.data); + } + } + return sb.toString(); + } + + public Object remove(int index){ + checkIndex(index); + Node temp = head; + Node pre = head; + Object result; + if(index == 0) + { + result = head.data; + head = head.next; + }else{ + for(int i=0;i0) + { + pre=pre.next; + } + temp=temp.next; + } + result = temp.data; + pre.next=temp.next; + temp = null; + + + if(index == size-1) + { + tail = pre; + } + } + size--; + + return result; + } + + public int size(){ + return this.size; + } + + public void addFirst(Object o){ + Node temp = new Node(o,head); + head = temp; + size++; + + } + public void addLast(Object o){ + Node temp = new Node(o,null); + tail.next = temp; + tail = temp; + size++; + } + public Object removeFirst(){ + return remove(0); + } + public Object removeLast(){ + return remove(size-1); + } + public Iterator iterator(){ + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator + { + private Node current = head; + + @Override + public boolean hasNext() + { + return current!=null; + } + + @Override + public Object next() { + if(current==null) + { + throw new RuntimeException("Current element has not next."); + } + + Object result = current.data; + current = current.next; + return result; + } + + } + + + private static class Node{ + Object data; + Node next; + public boolean hasNext(){ + return (this.next!=null); + } + + public Node(Object data,Node next){ + this.data=data; + this.next=next; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + checkSize(); + int tempSize = size; + Node temp = new Node(removeFirst(),null); + tail = temp; + while(size>0){ + temp = new Node(removeFirst(),temp); + } + head = temp; + size = tempSize; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + checkSize(); + if(size>1) + { + int temp = size; + for(int i=0;isize-i) + { + throw new RuntimeException("No enough size to remove from index:"+i); + }else{ + for(int j=0;j101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + if(size==0||list.size==0){ + return new int[0]; + }else{ + int[] result = new int[list.size()]; +//--Method One +// for(int i=0;ival){ + break; + }else if(tempVal==val){ + remove(j); + break; + }else{ + continue; + } + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + Node temp = head; + while(temp!=null){ + while(temp.hasNext()&&temp.data.equals(temp.next.data)) + { + temp.next = temp.next.next; + size--; + } + temp = temp.next; + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + int headVal = (int)head.data; + int tailVal = (int)tail.data; + //if all the values in linkedList fall into the range, clean up; + if(min<=headVal && max>=tailVal) + { + System.out.println("min<=headVal && max>=tailVal"); + head = null; + tail = null; + size = 0; + }else{ + Node preRange = null; + Node sufRange = null; + Node temp = head; + int counter = 0; + while(temp!=null){ + if((int)temp.data=min) + { + preRange = temp; + System.out.println("Found preRange node, val="+temp.data+",next val="+temp.next.data); + } + if((int)temp.data>max){ + sufRange = temp; + System.out.println("Found sufRange node, val="+temp.data+",next val="+(temp.hasNext()?temp.next.data:null)); + break; + } + if((int)temp.data>=min && (int)temp.data<=max) + { + counter++; + } + System.out.println("Counter="+counter); + temp = temp.next; + } + if(min<=headVal){ + head = sufRange; + } + if(max>=tailVal){ + tail = preRange; + } + if(preRange!=null){ + preRange.next = sufRange; + } + size -= counter; + } + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + if(size==0 || list==null || list.size()==0) + { + return new LinkedList(); + }else{ + int pos1=0; + int pos2=0; + LinkedList result = new LinkedList(); + while(pos1val2) + { + if(pos27->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + int oriSize = size; + Node newHead = new Node(); + newHead.next = this.removeLastNode(); + Node preNode = newHead.next; + + while (size > 0) { + preNode.next = this.removeLastNode(); + preNode = preNode.next; + } + // 涓嶈冭檻绾跨▼瀹夊叏鐨勬儏鍐典笅锛屾仮澶峴ize + size = oriSize; + head = newHead; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + int reDirIndex = size / 2; // java浼氳嚜鍔 鍙 0 + size = size - reDirIndex; + System.err.println(reDirIndex); + Node jumpNode = getNode(reDirIndex); + head.next = jumpNode; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + Node fromNode = getNode(i - 1); + for (int j = 0; j < length; j++) { + fromNode.next = fromNode.next.next; + size--; + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ +// public static int[] getElements(LinkedList list) { + // 杩欎釜浼间箮 涓嶅簲璇ユ槸 闈欐佹柟娉 + public int[] getElements(LinkedList list) { + int[] returnIndex = new int[list.size]; + int validCounts = 0; +// Iterator curIter = list.iterator(); +// int curIndex = 0; +// while(curIter.hasNext()){ +// returnIndex[curIndex++] =(Integer) this.get((Integer) curIter.next()); +// } + + // 宸茬煡鏄唴澶栭兘鏄帺鍘绘帓搴忓ソ鐨勶紝鎵浠ユ槸闇瑕佷竴涓珮鏁堢殑绠楁硶 + Iterator innerIter = this.iterator(); + Iterator curIter = list.iterator(); + int curCount = 0; + int curIndex; + int preIndex = 0; + + while (curIter.hasNext()) { + curIndex = (Integer) curIter.next(); + if (curIndex < preIndex) { + System.err.println("Warning: Skip index no in sorted order..."); + continue; + } +// int skipCounts = curIndex-preIndex; + for (int i = preIndex; i < curIndex; i++) { + innerIter.next(); + } + validCounts++; + returnIndex[curCount++] = (Integer) innerIter.next(); + preIndex = curIndex + 1; + } + return Arrays.copyOf(returnIndex, validCounts); + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + public void subtract(LinkedList list) { + // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 + Node preNode = head; + Node curNode; + Iterator element2rmIter = list.iterator(); + while (element2rmIter.hasNext()) { + int curValue2rm = (Integer) element2rmIter.next(); + while (preNode.next != null) { + curNode = preNode.next; + if ((Integer) curNode.data == curValue2rm) { + // 鍒犻櫎 + preNode.next = curNode.next; + }else if((Integer) curNode.data > curValue2rm){ + break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 + }else { + // 鏇存柊 + preNode = curNode; + } + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node preNode = head; + Node curNode; + while (preNode.next != null) { + curNode = preNode.next; + if (curNode.data == preNode.data) { + preNode.next = curNode.next; + } else { + preNode = curNode; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + // 鍋囧畾 褰撳墠閾捐〃 鏄 浠庡皬鍒板ぇ 鎺掑垪鐨 + Node preNode = head; + Node curNode; + while (preNode.next != null) { + curNode = preNode.next; + if (min < (Integer) curNode.data && max > (Integer) curNode.data) { + preNode.next = curNode.next; + } else { + preNode = curNode; + } + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + + + LinkedList newList = new LinkedList(); + + // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 + Node preNode = head; + Node curNode; + Iterator element2rmIter = list.iterator(); + while (element2rmIter.hasNext()) { + int curValue2rm = (Integer) element2rmIter.next(); + while (preNode.next != null) { + curNode = preNode.next; + if ((Integer) curNode.data == curValue2rm) { + // 鍒犻櫎 + preNode = curNode; + newList.add(curNode.data); // 娣诲姞data + }else if((Integer) curNode.data > curValue2rm){ + break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 + }else { + // 鏇存柊 + preNode = curNode; + } + } + } + + + return newList; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("LinkdedList ["); + Node curNode = head; + while (curNode.next != null) { + curNode = curNode.next; + sb.append(curNode.data).append(", "); + } + sb.delete(sb.length() - 2, sb.length()).append("]"); + return sb.toString(); + } + + public void clear() { + head.next = null; + size = 0; + } + + public static void main(String[] args) { + // 鍏堝啓涓浜涙祴璇 + LinkedList ll = new LinkedList(); + System.err.println("Test Add"); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + System.err.println("Size: " + ll.size); + System.err.println(ll); + System.err.println("Test Add last"); + ll.addLast(10); + System.err.println(ll); + System.err.println("Test Add First"); + ll.addFirst(-1); + System.err.println(ll); + System.err.println("Test remove "); + ll.remove(0); + System.err.println(ll); +// ll.remove(11); +// System.err.println(ll); + ll.removeFirst(); + System.err.println(ll); + ll.removeLast(); + System.err.println(ll); + System.err.println("Test reverse()"); + ll.reverse(); + System.err.println(ll); + System.err.println("Test removeFirstHalf()"); + ll.removeFirstHalf(); + System.err.println(ll); +// System.err.println(9/2); + System.err.println("Test remove()"); + ll.remove(1, 2); + System.err.println(ll); +// System.err.println(ll.); + LinkedList newList = new LinkedList(); + newList.add(3); + newList.add(4); + newList.add(6); + newList.add(5); +// System.err.println(); + ll.clear(); + System.err.println("Re Init"); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + System.err.println(ll); + for (int curI : ll.getElements(newList)) { + System.err.println(curI); + } + ll.clear(); + for (int i = 0; i < 10; i++) { + ll.add(i); + ll.add(i); + ll.add(i); + } + System.err.println(ll); + ll.removeDuplicateValues(); + System.err.println(ll); + System.err.println("Test Remove removeRange(3, 6)"); + ll.removeRange(3, 6); + System.err.println(ll); + + LinkedList rmList = new LinkedList(); + rmList.add(3); + rmList.add(4); + rmList.add(7); + rmList.add(8); + ll.subtract(rmList); + System.err.println("Test subtract(3,4,7,8)"); + System.err.println(ll); + ll.clear(); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + rmList.add(11); + System.err.println(ll); + System.err.println(rmList); + System.err.println(ll.intersection(rmList)); +// System.err.println("Test substract"); +// ll.subtract(newList); +// System.err.println(ll); + + } + +} diff --git a/group24/com/github/CJ-chen/coding2017/basic/List.java b/group24/com/github/CJ-chen/coding2017/basic/List.java new file mode 100644 index 0000000000..d347e59c47 --- /dev/null +++ b/group24/com/github/CJ-chen/coding2017/basic/List.java @@ -0,0 +1,18 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/com/github/CJ-chen/coding2017/basic/Queue.java b/group24/com/github/CJ-chen/coding2017/basic/Queue.java new file mode 100644 index 0000000000..4cbc45e065 --- /dev/null +++ b/group24/com/github/CJ-chen/coding2017/basic/Queue.java @@ -0,0 +1,58 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public class Queue { + + private final LinkedList innerList; + + public Queue(){ + innerList = new LinkedList(); + } + + public void enQueue(Object o) { + innerList.addLast(o); + } + + public Object deQueue() { + return innerList.removeFirst(); + } + + public boolean isEmpty() { + return innerList.size()==0; + } + + public int size() { + return innerList.size(); + } + + public String toString(){ + StringBuilder sb = new StringBuilder(); + sb.append("ArrayList: ["); + for (int i = 0; i < innerList.size(); i++) { + sb.append(innerList.get(i)).append(", "); + } +// System.err.println(size); + sb.delete(sb.length()-2,sb.length()).append("]"); + return sb.toString(); + } + + public static void main(String[] args) { + Queue newQ = new Queue(); + for(int i=0;i<10;i++){ + newQ.enQueue(i); + } + System.err.println(newQ); + newQ.deQueue(); + System.err.println(newQ); + } + + +} diff --git a/group24/com/github/CJ-chen/coding2017/basic/Stack.java b/group24/com/github/CJ-chen/coding2017/basic/Stack.java new file mode 100644 index 0000000000..3ba85c6bcf --- /dev/null +++ b/group24/com/github/CJ-chen/coding2017/basic/Stack.java @@ -0,0 +1,63 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public class Stack { + + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + elementData.add(o); + } + + public Object pop() { + return elementData.remove(elementData.size()-1); + } + + public Object peek() { + return elementData.get(elementData.size()-1); + } + + public boolean isEmpty() { + return elementData.size()==0; + } + + public int size() { + return elementData.size(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("ArrayList: ["); + for (int i = 0; i < elementData.size(); i++) { + sb.append(elementData.get(i)).append(", "); + } +// System.err.println(size); + sb.delete(sb.length()-2,sb.length()).append("]"); + return sb.toString(); + } + public static void main(String[] args) { + Stack newS = new Stack(); + for(int i=0;i<10;i++){ + newS.push(i); + } + System.err.println("Test push()"); + System.err.println(newS); + newS.pop(); + System.err.println("Test pop()"); + System.err.println(newS); + System.err.println("Test peek()"); + System.err.println(newS.peek()); + System.err.println(newS); + + } + +} From e17acd969312808b44d62c0e0c370cf02e91cddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E8=80=81=E5=AE=9E?= <15736873360@163.com> Date: Sun, 12 Mar 2017 18:12:59 +0800 Subject: [PATCH 361/646] =?UTF-8?q?linkedlist=E4=B9=A0=E9=A2=98=E5=8F=8A?= =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group01/932573198/20170306/.classpath | 7 + group01/932573198/20170306/.gitignore | 1 + group01/932573198/20170306/.project | 17 + .../.settings/org.eclipse.jdt.core.prefs | 11 + group01/932573198/20170306/kittens.jpg | Bin 0 -> 16361 bytes .../src/com/coderising/array/LinkedList.java | 305 ++++++++++++++++++ .../com/coderising/array/LinkedListTest.java | 149 +++++++++ .../coderising/download/DownloadThread.java | 32 ++ .../coderising/download/FileDownloader.java | 85 +++++ .../download/FileDownloaderTest.java | 57 ++++ .../coderising/download/api/Connection.java | 23 ++ .../download/api/ConnectionException.java | 15 + .../download/api/ConnectionManager.java | 10 + .../download/api/DownloadListener.java | 5 + .../download/impl/ConnectionImpl.java | 42 +++ .../download/impl/ConnectionManagerImpl.java | 22 ++ 16 files changed, 781 insertions(+) create mode 100644 group01/932573198/20170306/.classpath create mode 100644 group01/932573198/20170306/.gitignore create mode 100644 group01/932573198/20170306/.project create mode 100644 group01/932573198/20170306/.settings/org.eclipse.jdt.core.prefs create mode 100644 group01/932573198/20170306/kittens.jpg create mode 100644 group01/932573198/20170306/src/com/coderising/array/LinkedList.java create mode 100644 group01/932573198/20170306/src/com/coderising/array/LinkedListTest.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/DownloadThread.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/FileDownloader.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/api/Connection.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/api/ConnectionException.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/api/DownloadListener.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group01/932573198/20170306/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group01/932573198/20170306/.classpath b/group01/932573198/20170306/.classpath new file mode 100644 index 0000000000..373dce4005 --- /dev/null +++ b/group01/932573198/20170306/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/group01/932573198/20170306/.gitignore b/group01/932573198/20170306/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group01/932573198/20170306/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group01/932573198/20170306/.project b/group01/932573198/20170306/.project new file mode 100644 index 0000000000..6280a65f25 --- /dev/null +++ b/group01/932573198/20170306/.project @@ -0,0 +1,17 @@ + + + 20170306 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group01/932573198/20170306/.settings/org.eclipse.jdt.core.prefs b/group01/932573198/20170306/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..3a21537071 --- /dev/null +++ b/group01/932573198/20170306/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/group01/932573198/20170306/kittens.jpg b/group01/932573198/20170306/kittens.jpg new file mode 100644 index 0000000000000000000000000000000000000000..88dede91b68bce2fef8b02d577821383d6d4ab51 GIT binary patch literal 16361 zcmbWebySqm7cTq`0}Lfd3P{Ny9g@-vAl=54Ns+VQw}*gG=$@$)`oV)ylSc6Ve_QB`76)mBhq@)Hr@;AZmlwSML76UZdR zBq~hsZw`irfD!NDH6ttA2q|{HS zY3b=185zkRF|#l;u+T9uGW_QvAk3){TnI599x($2DFws-cKg=>km7+DK^b5WGk`@3 z0+WLN^#F_*kT{_KHsJqiAS^I8<|*;;2?#L*>K+1EATSsU^ZXb9n9;$Q-vMk=9I_|; zvbf|r)(~b-3W2c1Ts){;btk3nuOk*g8?Sfx1XPcxX=tCavaxe;3JHrm7Znqif1#kL zq^zQ}j)YjEEG&VJNb@%l4^$!dVO-!Pure|hSx3+hVP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EwRYTpN_hN$BU0rm+B8 z`QraXNhiA&XotDxJUgSb$*r^LNY-p*VU@*H`aXqXCbHbuV(BR(9d1g$n{n)0`K-;O z(wPQDO3qnI7jQ<(tr7o9)PlVzW^gG_@4R_ulc8}q7ztN zE%~itg`q=u4$Een^EgO>BBoQ(3FJhH?+^k}&G5izvtOWY=D*0P)H4C!Cros@C|S+B zaqL>mFby8Z9l=yx2sHx7xnZ~;X({`Grrbg}Cduw*dI6C20`6Q|`e=ejRD6D?u?Bfd6Z6$p%wVo|CH8<>weTg7;H9wYD@)`Q>L4vd&TYZFo vUv=-><2qAu$?ZK@5wdZh`6U(zvO125StZLEjXsqyVUb+B_tA#@`~5!v{rivl literal 0 HcmV?d00001 diff --git a/group01/932573198/20170306/src/com/coderising/array/LinkedList.java b/group01/932573198/20170306/src/com/coderising/array/LinkedList.java new file mode 100644 index 0000000000..16053c22a9 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/array/LinkedList.java @@ -0,0 +1,305 @@ +package com.coderising.array; + +import java.util.NoSuchElementException; + +public class LinkedList { + + private int size = 0; + + private Node head; + + public Node getHead() { + return head; + } + + public LinkedList() { + this.head = new Node(); + } + + @Override + public String toString() { + return "[" + head + "]"; + } + + private void outOfBoundsForAdd(int index) { + if (index > size || index < 0) + throw new IndexOutOfBoundsException("鏁扮粍涓嬫爣瓒婄晫"); + } + + private void outOfBoundsForOther(int index) { + if (index >= size || index < 0) + throw new IndexOutOfBoundsException("鏁扮粍涓嬫爣瓒婄晫"); + } + + public void add(Object o) { + Node node = head; + while (node.next != null) { + node = node.next; + } + node.next = new Node(o); + size++; + } + + public void add(int index, Object o) { + outOfBoundsForAdd(index); + if (size == index) + add(o); + else { + Node prevNode = head; + for (int i = 0; i < index; i++) { + prevNode = prevNode.next; + } + Node nextNode = prevNode.next; + Node node = new Node(o); + prevNode.next = node; + node.next = nextNode; + size++; + } + } + + public Object get(int index) { + outOfBoundsForOther(index); + Node node = head; + for (int i = 0; i <= index; i++) { + node = node.next; + } + return node.data; + } + + public Object remove(int index) { + outOfBoundsForOther(index); + Node prevNode = head; + for (int i = 0; i < index; i++) { + prevNode = prevNode.next; + } + Node node = prevNode.next; + prevNode.next = node.next; + size--; + return node.data; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + Node newNode = new Node(o); + Node node = head.next; + head.next = newNode; + newNode.next = node; + size++; + } + + public void addLast(Object o) { + Node node = head; + while (node.next != null) { + node = node.next; + } + node.next = new Node(o); + size++; + } + + private void noSuchEle() { + if (head.next == null) + throw new NoSuchElementException("娌℃湁杩欎釜鍏冪礌"); + } + + public Object removeFirst() { + noSuchEle(); + Node node = head.next; + head.next = node.next; + size--; + return node.data; + } + + public Object removeLast() { + noSuchEle(); + Node node = head; + for (int i = 0; i < size - 1; i++) { + node = node.next; + } + Node reNode = node.next; + node.next = null; + size--; + return reNode.data; + } + + public static class Node { + Object data; + Node next; + + @Override + public String toString() { + return data + ", " + next; + } + + public Node() { + } + + public Node(Object data) { + this.data = data; + } + + } + + // ------------------------------------------------------------------------------------------ + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + Node node = head.next; + Object[] arr = new Object[size]; + int i = size - 1; + while (i >= 0) { + arr[i--] = node.data; + node = node.next; + } + node = head.next; + for (int j = 0; j < size; j++) { + node.data = arr[j]; + node = node.next; + } + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf() { + int n = size / 2; + Node node = head.next; + for (int i = 0; i < n; i++) { + node = node.next; + } + head.next = node; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + Node node = head; + for (int j = 0; j < i; j++) { + node = node.next; + } + Node newNode = node; + for (int j = 0; j < length; j++) { + newNode = newNode.next; + } + node.next = newNode.next; + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ + public int[] getElements(LinkedList list) { + int length = list.size(); + int[] arr = new int[length]; + int index = -1; + for (int i = 0; i < length; i++) { + index = (int) list.get(i); + arr[i] = (int) get(index); + } + return arr; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + public void subtract(LinkedList list) { + Node preNode = head; + Node node = head.next; + int data = 0; + for (int i = 0; i < list.size(); i++) { + data = (int) list.get(i); + while ((int) node.data < data) { + preNode = node; + node = node.next; + } + if ((int) node.data == data) { + preNode.next = node.next; + node = node.next; + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node preNode = head.next; + Node node = preNode.next; + while (true) { + if (preNode.data == node.data) + preNode.next = node.next; + else + preNode = node; + if (node.next == null) + break; + node = node.next; + } + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + Node preNode = head; + Node node = preNode.next; + for (int i = 0; i < size; i++) { + if ((int) node.data <= min) { + preNode = node; + node = node.next; + } else if ((int) node.data < max) { + node = node.next; + } else { + break; + } + } + preNode.next = node; + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + int size1 = size; + int size2 = list.size(); + int i = 0, j = 0; + LinkedList newList = new LinkedList(); + while (i < size1 && j < size2) { + if ((int) get(i) < (int) list.get(j)) + newList.add(get(i++)); + else + newList.add(list.get(j++)); + } + if (i == size1) { + for (; j < size2; j++) { + newList.add(list.get(j)); + } + } else { + for (; i < size1; i++) { + newList.add(get(i)); + } + } + return newList; + } +} diff --git a/group01/932573198/20170306/src/com/coderising/array/LinkedListTest.java b/group01/932573198/20170306/src/com/coderising/array/LinkedListTest.java new file mode 100644 index 0000000000..5d88532347 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/array/LinkedListTest.java @@ -0,0 +1,149 @@ +package com.coderising.array; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class LinkedListTest { + + LinkedList list1 = null; + LinkedList list2 = null; + + @Before + public void setUp() throws Exception { + list1 = new LinkedList(); + list2 = new LinkedList(); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testReverse() { + list1.add(0); + list1.add(1); + list1.add(2); + list1.add(3); + list1.reverse(); + list2.add(3); + list2.add(2); + list2.add(1); + list2.add(0); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testRemoveFirstHalf() { + list1.add(2); + list1.add(5); + list1.add(7); + list1.add(8); + list1.add(10); + list1.removeFirstHalf(); + list2.add(7); + list2.add(8); + list2.add(10); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testRemoveIntInt() { + list1.add(2); + list1.add(5); + list1.add(7); + list1.add(8); + list1.add(10); + list1.remove(0, 2); + list2.add(7); + list2.add(8); + list2.add(10); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testGetElements() { + list1.add(001); + list1.add(101); + list1.add(201); + list1.add(301); + list1.add(401); + list1.add(501); + list1.add(601); + list2.add(1); + list2.add(3); + list2.add(4); + list2.add(6); + int[] array = {101,301,401,601}; + int[] arr = list1.getElements(list2); + Assert.assertArrayEquals(arr, array); + } + + @Test + public void testSubtract() { + list1.add(1); + list1.add(2); + list1.add(3); + list1.add(4); + list1.add(5); + list1.add(6); + list1.add(7); + LinkedList list3 = new LinkedList(); + list3.add(1); + list3.add(4); + list3.add(7); + list1.subtract(list3); + list2.add(2); + list2.add(3); + list2.add(5); + list2.add(6); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testRemoveDuplicateValues() { + list1.add(1); + list1.add(1); + list1.add(3); + list1.add(5); + list1.add(7); + list1.add(7); + list1.add(7); + list1.removeDuplicateValues(); + list2.add(1); + list2.add(3); + list2.add(5); + list2.add(7); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testRemoveRange() { + list1.add(3); + list1.add(4); + list1.add(5); + list1.add(6); + list1.add(8); + list1.removeRange(3,8); + list2.add(3); + list2.add(8); + Assert.assertEquals(list2.toString(), list1.toString()); + } + + @Test + public void testIntersection() { + list1.add(5); + list1.add(7); + list2.add(6); + list2.add(8); + LinkedList newList = list1.intersection(list2); + LinkedList list3 = new LinkedList(); + list3.add(5); + list3.add(6); + list3.add(7); + list3.add(8); + Assert.assertEquals(list3.toString(), newList.toString()); + } + +} diff --git a/group01/932573198/20170306/src/com/coderising/download/DownloadThread.java b/group01/932573198/20170306/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..8101fec04d --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,32 @@ +package com.coderising.download; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread { + + Connection conn; + int startPos; + int endPos; + byte[] content; + + public DownloadThread(Connection conn, int startPos, int endPos) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + public void run() { + try { + content = conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public byte[] getContent() { + return content; + } +} diff --git a/group01/932573198/20170306/src/com/coderising/download/FileDownloader.java b/group01/932573198/20170306/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..01e98c3711 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,85 @@ +package com.coderising.download; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +/** + * 鍊熼壌954958168 + */ +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() throws ConnectionException, InterruptedException, IOException { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + + Connection conn = cm.open(this.url); + int length = conn.getContentLength(); + conn.close(); + List threads = new ArrayList<>(); + int i; + for (i = 0; i < 3; i++) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), (i + 1) * (length / 3) - 1); + threads.add(thread); + thread.start(); + } + if (i * (length / 3) < length) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), length - 1); + threads.add(thread); + thread.start(); + } + for (DownloadThread thread : threads) { + thread.join(); + } + FileOutputStream fos = new FileOutputStream(new File("temp.jpg")); + for (DownloadThread thread : threads) { + fos.write(thread.getContent()); + } + fos.close(); + this.listener.notifyFinished(); + + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} diff --git a/group01/932573198/20170306/src/com/coderising/download/FileDownloaderTest.java b/group01/932573198/20170306/src/com/coderising/download/FileDownloaderTest.java new file mode 100644 index 0000000000..5434dbfa10 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/FileDownloaderTest.java @@ -0,0 +1,57 @@ +package com.coderising.download; + +import java.io.IOException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + String url = "http://localhost:8080/test/kittens.jpg"; + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + }); + try { + downloader.execute(); + } catch (ConnectionException | InterruptedException | IOException e1) { + e1.printStackTrace(); + } + + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); + // 浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("涓嬭浇瀹屾垚锛"); + + } + +} diff --git a/group01/932573198/20170306/src/com/coderising/download/api/Connection.java b/group01/932573198/20170306/src/com/coderising/download/api/Connection.java new file mode 100644 index 0000000000..0957eaf7f4 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/api/Connection.java @@ -0,0 +1,23 @@ +package com.coderising.download.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/932573198/20170306/src/com/coderising/download/api/ConnectionException.java b/group01/932573198/20170306/src/com/coderising/download/api/ConnectionException.java new file mode 100644 index 0000000000..0a52074ed1 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/api/ConnectionException.java @@ -0,0 +1,15 @@ +package com.coderising.download.api; + +public class ConnectionException extends RuntimeException { + public ConnectionException(String message) { + super(message); + } + + public ConnectionException(String message, Throwable cause) { + super(message, cause); + } + + public ConnectionException(Throwable cause) { + super(cause); + } +} diff --git a/group01/932573198/20170306/src/com/coderising/download/api/ConnectionManager.java b/group01/932573198/20170306/src/com/coderising/download/api/ConnectionManager.java new file mode 100644 index 0000000000..ce045393b1 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.coderising.download.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/932573198/20170306/src/com/coderising/download/api/DownloadListener.java b/group01/932573198/20170306/src/com/coderising/download/api/DownloadListener.java new file mode 100644 index 0000000000..bf9807b307 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.coderising.download.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionImpl.java b/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionImpl.java new file mode 100644 index 0000000000..eb75b3c25f --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionImpl.java @@ -0,0 +1,42 @@ +package com.coderising.download.impl; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class ConnectionImpl implements Connection { + + private FileInputStream fis; + private File file; + + public ConnectionImpl(String source) throws FileNotFoundException { + file = new File(getClass().getClassLoader().getResource(source).getFile()); + fis = new FileInputStream(file); + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + fis.skip(startPos); + byte[] content = new byte[endPos - startPos + 1]; + fis.read(content, 0, content.length); + return content; + } + + @Override + public int getContentLength() { + return (int) file.length(); + } + + @Override + public void close() { + try { + fis.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..851f1146a0 --- /dev/null +++ b/group01/932573198/20170306/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -0,0 +1,22 @@ +package com.coderising.download.impl; + +import java.io.FileNotFoundException; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + ConnectionImpl conn = null; + try { + conn = new ConnectionImpl(url); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + return conn; + } + +} From 8902c520b0d254781510e368d33338b623ac52f9 Mon Sep 17 00:00:00 2001 From: Wilson Huang <3517197624@qq.com> Date: Sun, 12 Mar 2017 18:16:31 +0800 Subject: [PATCH 362/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/coding/datastructs/ArrayList.java | 98 ++++++++ .../src/com/coding/datastructs/Iterator.java | 7 + .../com/coding/datastructs/LinkedList.java | 229 ++++++++++++++++++ .../src/com/coding/datastructs/List.java | 9 + .../com/coding/datastructs/MyIterator.java | 35 +++ .../src/com/coding/datastructs/Queue.java | 30 +++ .../src/com/coding/datastructs/Stack.java | 33 +++ .../src/com/coding/test/ArrayListTest.java | 32 +++ .../src/com/coding/test/LinkedListTest.java | 28 +++ .../src/com/coding/test/QueueTest.java | 22 ++ .../src/com/coding/test/StackTest.java | 25 ++ 11 files changed, 548 insertions(+) create mode 100644 group23/1246614258/src/com/coding/datastructs/ArrayList.java create mode 100644 group23/1246614258/src/com/coding/datastructs/Iterator.java create mode 100644 group23/1246614258/src/com/coding/datastructs/LinkedList.java create mode 100644 group23/1246614258/src/com/coding/datastructs/List.java create mode 100644 group23/1246614258/src/com/coding/datastructs/MyIterator.java create mode 100644 group23/1246614258/src/com/coding/datastructs/Queue.java create mode 100644 group23/1246614258/src/com/coding/datastructs/Stack.java create mode 100644 group23/1246614258/src/com/coding/test/ArrayListTest.java create mode 100644 group23/1246614258/src/com/coding/test/LinkedListTest.java create mode 100644 group23/1246614258/src/com/coding/test/QueueTest.java create mode 100644 group23/1246614258/src/com/coding/test/StackTest.java diff --git a/group23/1246614258/src/com/coding/datastructs/ArrayList.java b/group23/1246614258/src/com/coding/datastructs/ArrayList.java new file mode 100644 index 0000000000..bf8da9cccc --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/ArrayList.java @@ -0,0 +1,98 @@ +package com.coding.datastructs; + +import java.util.ConcurrentModificationException; +import java.util.NoSuchElementException; + + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = null; + + public ArrayList(){ + size=0; + elementData=new Object[10]; + } + + public void add(Object o){ + size(); + elementData=grow(elementData,1); + elementData[size] = o; + } + public void add(int index, Object o){ + size(); + if (index >size || index < 0||index == size) + throw new IndexOutOfBoundsException( + "Index: "+index+", Size: "+size); + Object temp = elementData; + elementData=grow(elementData,1); // Increments modCount!! + System.arraycopy(temp, index, elementData, index + 1, + size - index); + elementData[index] = o; + } + + public Object get(int index){ + size(); + if (index > size || index < 0 ||index == size) + throw new IndexOutOfBoundsException( + "Index: "+index+", Size: "+size); + return elementData[index]; + } + + public Object remove(int index){ + size(); + if (index > size || index < 0 ||index == size) + throw new IndexOutOfBoundsException( + "Index: "+index+", Size: "+size); + Object tempData = elementData[index]; + System.arraycopy(elementData, index+1, elementData, index, + size - index); + return tempData; + } + + public int size(){ + for(int i=0;i= size) + throw new NoSuchElementException(); + Object[] elementData = ArrayList.this.elementData; + if (i >= elementData.length) + throw new ConcurrentModificationException(); + cursor = i + 1; + return elementData[lastRet = i]; + } + + +} + + + +} diff --git a/group23/1246614258/src/com/coding/datastructs/Iterator.java b/group23/1246614258/src/com/coding/datastructs/Iterator.java new file mode 100644 index 0000000000..56acec15a3 --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.datastructs; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group23/1246614258/src/com/coding/datastructs/LinkedList.java b/group23/1246614258/src/com/coding/datastructs/LinkedList.java new file mode 100644 index 0000000000..cd5de44121 --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/LinkedList.java @@ -0,0 +1,229 @@ +package com.coding.datastructs; + +public class LinkedList implements List{ + + private Node head; + private int size ; + + public LinkedList() { + size = 0; + head=new Node(); + } + + public void add(Object o) { + Node pnew = new Node(); + pnew.setData(o); + pnew.next = null; + if(null==head.getNext()){ + head.setNext(pnew); + return; + } + Node ptr = head.getNext(); + Node ptr1 = new Node(); + + while (ptr != null) { + ptr1 = ptr; + ptr = ptr.getNext(); + } + ptr1.next = pnew; + + } + + public void add(int index, Object o) { + size(); + if (index > size || index < 0) + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + + size); + Node ptr; + Node ptemp = new Node(); + ; + Node pnew;// 实例化新节点 + ptr = head.getNext(); + int i = 0; + if (ptr == null && size == 0) { + System.out.println("插入数据失败!"); + } + while (ptr != null) { + ptemp = ptr; + if (index == 0) { + pnew = new Node(); + pnew.setData(o); + pnew.setNext(ptr); + head.setNext(pnew); + break; + } + if (index == i && index > 0) { + ptemp = getNode(i-1); + pnew = new Node(); + pnew.setData(o); + pnew.setNext(ptr); + ptemp.setNext(pnew);// + System.out.println("插入数据" + o + "成功!"); + break; + } + ptr = ptr.getNext(); + i++; + } + if (ptr == null && size > 0) { + pnew = new Node(); + pnew.setData(o); + pnew.setNext(null); + ptemp.setNext(pnew);// + System.out.println("插入数据" + o + "成功!"); + } + + } + + public Object get(int index) { + size(); + if (index > size || index < 0 || index == size) + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + + size); + Node ptr = head.getNext(); + Object tempData = null; + int i = 0; + while (ptr != null) { + if (index == i) { + tempData = ptr.getData(); + } + ptr = ptr.getNext(); + i++; + } + + return tempData; + } + + public Node getNode(int index) { + size(); + if (index > size || index < 0 || index == size) + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + + size); + Node ptr = head.getNext(); + Node tempData = null; + int i = 0; + while (ptr != null) { + if (index == i) { + tempData = ptr; + } + ptr = ptr.getNext(); + i++; + } + + return tempData; + } + + public Object remove(int index) { + size(); + if(size()==0){ + throw new NullPointerException("list内部为空,不能删除数据"); + } + if (index > size || index < 0 || index == size) + throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + + size); + Node ptr = head.getNext(); + Node ptrNext = new Node(); + Object tempData = null; + int i = 0; + while (ptr != null) { + if (index == 0) { + ptrNext = ptr.getNext(); + head.setNext(ptrNext); + break; + } + if (index == i && index > 0) { + Node ptrprevious = getNode(i - 1); + tempData = ptr.getData(); + ptrprevious.setNext(ptr.getNext()); + break; + } + ptr = ptr.getNext(); + i++; + } + return tempData; + } + + public int size() { + int i = 0; + Node ptr = head.getNext(); + while (ptr != null) { + ptr = ptr.getNext(); + i++; + } + size = i; + return size; + } + + public void addFirst(Object o) { + add(0,o); + + } + + public void addLast(Object o) { + /*Node ptr = head.getNext(); + Node pnew = new Node(); + pnew.setData(o); + Node ptemp = new Node(); + if (ptr == null) { + head.setNext(pnew); + } else { + while (ptr != null) { + ptemp = ptr; + ptr = ptr.getNext(); + } + if (ptr == null) { + ptemp.setNext(pnew); + } + }*/ + add(size(),o); + + } + + public Object removeFirst() { + Node ptr = head.getNext(); + Object temp = null; + if (ptr == null) { + throw new NullPointerException("LinkedList里面无数据,不能进行删除操作"); + } else { + temp = ptr.getData(); + remove(0); + } + + return temp; + } + + public Object removeLast() { + size(); + Node ptr = head.getNext(); + Object temp = null; + if (ptr == null) { + throw new NullPointerException("LinkedList里面无数据,不能进行删除操作"); + } else { + temp = remove(size - 1); + } + + return temp; + } + + private static class Node { + Object data; + Node next; + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + } + +} diff --git a/group23/1246614258/src/com/coding/datastructs/List.java b/group23/1246614258/src/com/coding/datastructs/List.java new file mode 100644 index 0000000000..35ece31ca6 --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/List.java @@ -0,0 +1,9 @@ +package com.coding.datastructs; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group23/1246614258/src/com/coding/datastructs/MyIterator.java b/group23/1246614258/src/com/coding/datastructs/MyIterator.java new file mode 100644 index 0000000000..be827a7875 --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/MyIterator.java @@ -0,0 +1,35 @@ +package com.coding.datastructs; + +import java.util.Iterator; + +public class MyIterator { + public Iterator iterator(){ + return null; + } + private class Itera implements Iterator{ + int cursor; + int lastRet = -1; + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return false; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void remove() { + // TODO Auto-generated method stub + + } + + + + } + +} diff --git a/group23/1246614258/src/com/coding/datastructs/Queue.java b/group23/1246614258/src/com/coding/datastructs/Queue.java new file mode 100644 index 0000000000..4e36db418a --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/Queue.java @@ -0,0 +1,30 @@ +package com.coding.datastructs; + public class Queue{ + private LinkedList list = new LinkedList(); + + public void enQueue(Object o){ + list.add(o); + } + + public Object deQueue(){ + if (list.size()<=0) { + throw new NullPointerException("Queue里面无数据,不能进行删除操作"); + } + Object o = list.get(0); + list.removeFirst(); + return o; + } + + public boolean isEmpty(){ + int count = size(); + if(count<0){ + return true; + } + return false; + } + + public int size(){ + return list.size(); + } + } + diff --git a/group23/1246614258/src/com/coding/datastructs/Stack.java b/group23/1246614258/src/com/coding/datastructs/Stack.java new file mode 100644 index 0000000000..269f3c900e --- /dev/null +++ b/group23/1246614258/src/com/coding/datastructs/Stack.java @@ -0,0 +1,33 @@ +package com.coding.datastructs; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + if (elementData.size()<=0) { + throw new NullPointerException("Stack里面无数据,不能进行删除操作"); + } + Object data = elementData.get(elementData.size()-1); + elementData.remove(size()-1); + return data; + } + + public Object peek(){ + Object data = elementData.get(elementData.size()-1); + return data; + } + public boolean isEmpty(){ + if(elementData.size()>0){ + return false; + }else{ + return false; + } + } + public int size(){ + return elementData.size(); + } +} diff --git a/group23/1246614258/src/com/coding/test/ArrayListTest.java b/group23/1246614258/src/com/coding/test/ArrayListTest.java new file mode 100644 index 0000000000..76ba571c78 --- /dev/null +++ b/group23/1246614258/src/com/coding/test/ArrayListTest.java @@ -0,0 +1,32 @@ +package com.coding.test; +import com.coding.datastructs.ArrayList; +import com.coding.datastructs.Iterator; + + +public class ArrayListTest { + + /** + *

Description:

+ * @param args + * @author:Wilson huang + * @date 2017-3-12下午12:08:10 + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + ArrayList aa = new ArrayList(); + aa.add("aa"); + aa.add("bb"); + aa.add("cc"); + //aa.remove(3); + aa.add(2, "44"); + for(int i=0;iDescription:

+ * @param args + * @author:Wilson huang + * @date 2017-3-12下午1:45:58 + */ + + public static void main(String[] args) { + // TODO Auto-generated method stub + LinkedList list = new LinkedList(); + list.add("a"); + list.add("b"); + list.add("c"); + list.add("d"); + list.removeLast(); + for(int i=0;iDescription:

+ * @param args + * @author:Wilson huang + * @date 2017-3-12下午2:42:15 + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Queue q = new Queue(); + q.enQueue("a"); + q.enQueue("b"); + System.out.println(q.deQueue()); + + } + +} diff --git a/group23/1246614258/src/com/coding/test/StackTest.java b/group23/1246614258/src/com/coding/test/StackTest.java new file mode 100644 index 0000000000..41f2a15b5b --- /dev/null +++ b/group23/1246614258/src/com/coding/test/StackTest.java @@ -0,0 +1,25 @@ +package com.coding.test; +import com.coding.datastructs.Stack; + + +public class StackTest { + + /** + *

Description:

+ * @param args + * @author:Wilson huang + * @date 2017-3-12下午2:34:15 + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Stack a = new Stack(); + a.push("a"); + a.push("b"); + a.push("c"); + System.out.println(a.isEmpty()); + System.out.println(a.peek()); + System.out.println(a.pop()); + + } + +} From af38e398a7884ec24ca03b42f622294153ec4224 Mon Sep 17 00:00:00 2001 From: LF Date: Sun, 12 Mar 2017 18:28:59 +0800 Subject: [PATCH 363/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4=EF=BC=9Alist=EF=BC=8Cstack,queue?= =?UTF-8?q?=EF=BC=8C=E4=BA=8C=E5=8F=89=E6=A0=91=E7=9A=84=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E5=8F=8A=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ipk2015/coding2017/basic/ArrayList.java | 77 ++++++ .../coding2017/basic/BinaryTreeNode.java | 61 +++++ .../ipk2015/coding2017/basic/Iterator.java | 6 + .../ipk2015/coding2017/basic/LinkedList.java | 244 ++++++++++++++++++ .../github/ipk2015/coding2017/basic/List.java | 8 + .../ipk2015/coding2017/basic/ListUtils.java | 14 + .../ipk2015/coding2017/basic/Queue.java | 19 ++ .../ipk2015/coding2017/basic/Stack.java | 32 +++ .../coding2017/basic/test/ArrayListTest.java | 53 ++++ .../basic/test/BinaryTreeNodeTest.java | 29 +++ .../coding2017/basic/test/LinkedListTest.java | 92 +++++++ .../coding2017/basic/test/QueueTest.java | 49 ++++ .../coding2017/basic/test/StackTest.java | 57 ++++ 13 files changed, 741 insertions(+) create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/ArrayList.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/Iterator.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/LinkedList.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/List.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/ListUtils.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/Queue.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/Stack.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/test/ArrayListTest.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/test/BinaryTreeNodeTest.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/test/LinkedListTest.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/test/QueueTest.java create mode 100644 group24/121111914/src/com/github/ipk2015/coding2017/basic/test/StackTest.java diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/ArrayList.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..e9c2a390fb --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/ArrayList.java @@ -0,0 +1,77 @@ +package com.github.ipk2015.coding2017.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + add(size,o); + } + /* + * 鍒嗕袱绉嶆儏鍐碉紝index鐨勮寖鍥翠负0鍒皊ize,瓒呭嚭鍒欐姏鍑哄紓甯 + * */ + public void add(int index, Object o){ + ListUtils.checkIndexInRange(index,size); + if(size==elementData.length){ + elementData=Arrays.copyOf(elementData, size+1); + } + if(indexindex;i--){ + elementData[i]=elementData[i-1]; + } + } + elementData[index]=o; + size++; + } + + public Object get(int index){ + ListUtils.checkIndexInRange(index,size-1); + return elementData[index]; + } + + public Object remove(int index){ + ListUtils.checkIndexInRange(index,size-1); + Object object=elementData[index]; + for(int i=index;i0){ + if(null==compareNode.getLeft()){ + compareNode.setLeft(insertNode); + break; + } + compareNode=compareNode.getLeft(); + }else if(result<0){ + if(null==compareNode.getRight()){ + compareNode.setRight(insertNode); + break; + } + compareNode=compareNode.getRight(); + } + } + } + + return insertNode; + } + +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/Iterator.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..145acc5ef7 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Iterator.java @@ -0,0 +1,6 @@ +package com.github.ipk2015.coding2017.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/LinkedList.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..d10c40a563 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/LinkedList.java @@ -0,0 +1,244 @@ +package com.github.ipk2015.coding2017.basic; + +import java.util.NoSuchElementException; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + if(null==head){ + head=new Node(); + head.data=o; + }else{ + Node node=head; + while(null!=node.next){ + node=node.next; + } + Node addNode=new Node(); + addNode.data=o; + node.next=addNode; + } + } + public void add(int index , Object o){ + int size=size(); + ListUtils.checkIndexInRange(index, size); + if(index==size){ + add(o); + }else{ + if(size==0){ + head=new Node(); + head.data=o; + }else{ + Node node=head; + Node addNode=new Node(); + addNode.data=o; + for(int i=0;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList rsection( LinkedList list){ + return null; + } +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/List.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/List.java new file mode 100644 index 0000000000..4e2f4036c0 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/List.java @@ -0,0 +1,8 @@ +package com.github.ipk2015.coding2017.basic; +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/ListUtils.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/ListUtils.java new file mode 100644 index 0000000000..4d73d7eec6 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/ListUtils.java @@ -0,0 +1,14 @@ +package com.github.ipk2015.coding2017.basic; + +public class ListUtils { + public static boolean checkIndexInRange(int index,int range){ + if(index>=0 && index<=range){ + return true; + } + throw new IndexOutOfBoundsException(); + } + + public static void log(String msg){ + System.out.println(msg); + } +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/Queue.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Queue.java new file mode 100644 index 0000000000..6342314df6 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Queue.java @@ -0,0 +1,19 @@ +package com.github.ipk2015.coding2017.basic; + +public class Queue { + private LinkedList elementDatas=new LinkedList(); + public void enQueue(Object o){ + elementDatas.add(o); + } + public Object deQueue(){ + return elementDatas.removeFirst(); + } + + public boolean isEmpty(){ + return size()==0; + } + + public int size(){ + return elementDatas.size(); + } +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/Stack.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Stack.java new file mode 100644 index 0000000000..4dae60e12b --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/Stack.java @@ -0,0 +1,32 @@ +package com.github.ipk2015.coding2017.basic; + +import java.util.EmptyStackException; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + if(isEmpty()){ + throw new EmptyStackException(); + } + Object data=elementData.remove(size()-1); + return data; + } + + public Object peek(){ + if(isEmpty()){ + throw new EmptyStackException(); + } + return elementData.get(size()-1); + } + public boolean isEmpty(){ + return size()==0; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/ArrayListTest.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/ArrayListTest.java new file mode 100644 index 0000000000..72a9a84b66 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/ArrayListTest.java @@ -0,0 +1,53 @@ +package com.github.ipk2015.coding2017.basic.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ipk2015.coding2017.basic.ArrayList; + +public class ArrayListTest { + ArrayList list; + @Before + public void setUp() throws Exception { + list=new ArrayList(); + + } + @Test + public void testAddObject() { + list.add("hehe1"); + assertEquals("hehe1", list.get(0)); + } + + @Test + public void testAddIntObject() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.add(1, "arm"); + assertEquals("arm", list.get(1)); + } + + @Test + public void testGet() { + list.add("hehe1"); + assertEquals("hehe1", list.get(0)); + } + + @Test + public void testRemove() { + list.add("hehe1"); + assertEquals("hehe1", list.remove(0)); + } + + @Test + public void testSize() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + + assertEquals(3, list.size()); + } + +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/BinaryTreeNodeTest.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..4b2fe88ee0 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/BinaryTreeNodeTest.java @@ -0,0 +1,29 @@ +package com.github.ipk2015.coding2017.basic.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ipk2015.coding2017.basic.BinaryTreeNode; + +public class BinaryTreeNodeTest { + + @Before + public void setUp() throws Exception { + } + + @Test + public void testInsert() { + BinaryTreeNode node=new BinaryTreeNode(); + + node.setData(5); + node.insert(2); + node.insert(7); + node.insert(1); + node.insert(4); + node.insert(3); + assertEquals(3,node.getLeft().getRight().getLeft().getData()); + } + +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/LinkedListTest.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/LinkedListTest.java new file mode 100644 index 0000000000..57fed394d6 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/LinkedListTest.java @@ -0,0 +1,92 @@ +package com.github.ipk2015.coding2017.basic.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ipk2015.coding2017.basic.LinkedList; + +public class LinkedListTest { + LinkedList list; + @Before + public void setUp() throws Exception { + list=new LinkedList(); + } + + @Test + public void testAddObject() { + list.add("hehe1"); + list.add("hehe2"); + assertEquals("hehe2", list.get(1)); + } + + @Test + public void testAddIntObject() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.add(1,"arm"); + assertEquals("arm", list.get(1)); + } + + @Test + public void testGet() { + list.add("hehe1"); + list.add("hehe2"); + assertEquals("hehe2", list.get(1)); + } + + @Test + public void testRemoveInt() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.remove(1); + assertEquals(2, list.size()); + } + + @Test + public void testSize() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + assertEquals(3, list.size()); + } + + @Test + public void testAddFirst() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.addFirst("arm"); + assertEquals("arm", list.get(0)); + } + + @Test + public void testAddLast() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.addLast("arm"); + assertEquals("arm", list.get(list.size()-1)); + } + + @Test + public void testRemoveFirst() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.removeFirst(); + assertEquals("hehe2", list.get(0)); + } + @Test + public void testRemoveLast() { + list.add("hehe1"); + list.add("hehe2"); + list.add("hehe3"); + list.removeLast(); + assertEquals("hehe2", list.get(list.size()-1)); + } + +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/QueueTest.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/QueueTest.java new file mode 100644 index 0000000000..53c63d8564 --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/QueueTest.java @@ -0,0 +1,49 @@ +package com.github.ipk2015.coding2017.basic.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ipk2015.coding2017.basic.Queue; + +public class QueueTest { + Queue queue; + @Before + public void setUp() throws Exception { + queue=new Queue(); + } + + @Test + public void testEnQueue() { + queue.enQueue("hehe1"); + queue.enQueue("hehe2"); + assertEquals(2, queue.size()); + } + + @Test + public void testDeQueue() { + queue.enQueue("hehe1"); + queue.enQueue("hehe2"); + queue.deQueue(); + assertEquals(1, queue.size()); + } + + @Test + public void testIsEmpty() { + queue.enQueue("hehe1"); + queue.enQueue("hehe2"); + queue.deQueue(); + queue.deQueue(); + assertEquals(true, queue.isEmpty()); + } + + @Test + public void testSize() { + queue.enQueue("hehe1"); + queue.enQueue("hehe2"); + queue.deQueue(); + assertEquals(1, queue.size()); + } + +} diff --git a/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/StackTest.java b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/StackTest.java new file mode 100644 index 0000000000..7cc10b77df --- /dev/null +++ b/group24/121111914/src/com/github/ipk2015/coding2017/basic/test/StackTest.java @@ -0,0 +1,57 @@ +package com.github.ipk2015.coding2017.basic.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ipk2015.coding2017.basic.Stack; + +public class StackTest { + Stack stack; + @Before + public void setUp() throws Exception { + stack=new Stack(); + } + + @Test + public void testPush() { + stack.push("hehe1"); + stack.push("hehe2"); + assertEquals(2,stack.size()); + } + + @Test + public void testPop() { + stack.push("hehe1"); + stack.push("hehe2"); + stack.push("hehe3"); + assertEquals(true,stack.pop()=="hehe3" && stack.size()==2); + } + + @Test + public void testPeek() { + stack.push("hehe1"); + stack.push("hehe2"); + stack.push("hehe3"); + assertEquals(true,stack.peek()=="hehe3" && stack.size()==3); + } + + @Test + public void testIsEmpty() { + stack.push("hehe1"); + stack.push("hehe2"); + stack.pop(); + stack.pop(); + assertEquals(true,stack.isEmpty()); + } + + @Test + public void testSize() { + stack.push("hehe1"); + stack.push("hehe2"); + stack.pop(); + assertEquals(1,stack.size()); + } + +} From 37f8716081573058e588e7306c87eda7904369ff Mon Sep 17 00:00:00 2001 From: ZhaoHongxin Date: Sun, 12 Mar 2017 18:42:45 +0800 Subject: [PATCH 364/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 27 +- .../coderising/download/FileDownloader.java | 114 +++++--- .../download/FileDownloaderTest.java | 4 +- .../download/impl/ConnectionImpl.java | 46 ++- .../download/impl/ConnectionManagerImpl.java | 9 +- .../download/test/ConnectionImplTest.java | 36 +++ .../src/com/coding/basic/ArrayListTest.java | 62 ++--- .../src/com/coding/basic/LinkedList.java | 261 +++++++++++++----- .../src/com/coding/basic/LinkedListTest.java | 115 +++++--- .../test01/src/com/coding/basic/List.java | 20 +- 10 files changed, 488 insertions(+), 206 deletions(-) create mode 100644 group05/1094051862/test01/src/com/coderising/download/test/ConnectionImplTest.java diff --git a/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java b/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java index 1456314140..7afe21cf1a 100644 --- a/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java +++ b/group05/1094051862/test01/src/com/coderising/download/DownloadThread.java @@ -1,20 +1,35 @@ package com.coderising.download; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.Random; + import com.coderising.download.api.Connection; -public class DownloadThread extends Thread{ +public class DownloadThread extends Thread { Connection conn; int startPos; int endPos; + RandomAccessFile raf; + + public DownloadThread(Connection conn, int startPos, int endPos, + RandomAccessFile raf) { - public DownloadThread( Connection conn, int startPos, int endPos){ - - this.conn = conn; + this.conn = conn; this.startPos = startPos; this.endPos = endPos; + this.raf = raf; } - public void run(){ - + + public void run() { + try { + raf.write(conn.read(startPos, endPos)); + } catch (IOException e) { + e.printStackTrace(); + } } } diff --git a/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java b/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java index f5d7999eb4..664a1cca78 100644 --- a/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java +++ b/group05/1094051862/test01/src/com/coderising/download/FileDownloader.java @@ -1,73 +1,115 @@ package com.coderising.download; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; import com.coderising.download.api.DownloadListener; - public class FileDownloader { - + String url; - + DownloadListener listener; - + ConnectionManager cm; - public FileDownloader(String _url) { this.url = _url; - } - - public void execute(){ + + public void execute() { // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 - // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 - // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 // 鍏蜂綋鐨勫疄鐜版濊矾锛 - // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 - // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; + RandomAccessFile targetFile = null; try { + Connection conn = cm.open(this.url); + int length = conn.getContentLength(); - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); - - } catch (ConnectionException e) { + File saveDir = new File("d://KanddeDownLoadProgram"); + if (!saveDir.exists()) { + saveDir.mkdir(); + } + String filePath = saveDir + File.separator + Math.random() * 1000+ ".jpg"; + targetFile = new RandomAccessFile(filePath, "rw"); + targetFile.setLength(length); + int avgSize = length/3 + 1; + DownloadThread[] threads = new DownloadThread[3]; + for (int i = 0; i < 3; i++) { + int startPos = avgSize * i; + RandomAccessFile tempFile = new RandomAccessFile(filePath, "rw") ; + if (i==0) { + tempFile.seek(startPos); + threads[i] = new DownloadThread(cm.open(this.url), startPos, startPos + avgSize, tempFile); + } else if (i==2) { + tempFile.seek(startPos+1); + threads[i] = new DownloadThread(cm.open(this.url), startPos+1, length, tempFile); + } else { + tempFile.seek(startPos+1); + threads[i] = new DownloadThread(cm.open(this.url), startPos+1, startPos + avgSize, tempFile); + } + threads[i].start(); + } + while(threads[0].isAlive() || threads[1].isAlive() || threads[2].isAlive()) { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + listener.notifyFinished(); + } catch (ConnectionException | IOException e) { + // TODO Auto-generated catch block e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); + } finally { + try { + if (targetFile != null){ + targetFile.close(); + } + } catch (IOException e) { + e.printStackTrace(); } } - - - - + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + /* + * Connection conn = null; try { Connection conn = cm.open(this.url); + * int length = conn.getContentLength(); + * conn = cm.open(this.url); + * + * int length = conn.getContentLength(); + * + * new DownloadThread(conn,0,length-1).start(); + * + * } catch (ConnectionException e) { e.printStackTrace(); } + */ + } - + public void setListener(DownloadListener listener) { this.listener = listener; } - - - public void setConnectionManager(ConnectionManager ucm){ + public void setConnectionManager(ConnectionManager ucm) { this.cm = ucm; } - - public DownloadListener getListener(){ + + public DownloadListener getListener() { return this.listener; } - + } diff --git a/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java b/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java index 8171ee5763..43dfd48177 100644 --- a/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java +++ b/group05/1094051862/test01/src/com/coderising/download/FileDownloaderTest.java @@ -21,7 +21,7 @@ public void tearDown() throws Exception { @Test public void testDownload() { - String url = "http://localhost:8080/test.jpg"; + String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489232358866&di=40841ce1f3a689ef40585947e5b2ba33&imgtype=0&src=http%3A%2F%2Fmvimg2.meitudata.com%2F57e90e7733ca63586.jpg"; FileDownloader downloader = new FileDownloader(url); @@ -45,7 +45,7 @@ public void notifyFinished() { try { System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); //浼戠湢5绉 - Thread.sleep(5000); + Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java index 32f03efdc7..0f88a141bc 100644 --- a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java +++ b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionImpl.java @@ -1,27 +1,59 @@ package com.coderising.download.impl; +import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Arrays; import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; -public class ConnectionImpl implements Connection{ +public class ConnectionImpl implements Connection { + + private HttpURLConnection conn; + + public ConnectionImpl(){} + public ConnectionImpl(String url) throws ConnectionException { + try { + URL u = new URL(url); + conn = (HttpURLConnection) u.openConnection(); + } catch (IOException e) { + throw new ConnectionException(); + } + } @Override public byte[] read(int startPos, int endPos) throws IOException { + conn.setRequestProperty("Range", "bytes="+startPos+"-"+endPos); + int code = conn.getResponseCode(); + ByteArrayOutputStream bos = null; + if (code == 200 || code == 206) { + InputStream is = conn.getInputStream(); + byte[] buffer = new byte[1024]; + bos = new ByteArrayOutputStream(); + int len = 0; + while ((len = is.read(buffer)) != -1) { + bos.write(buffer, 0, len); + } + bos.close(); + return bos.toByteArray(); + } else { + System.out.println("涓嬭浇澶辫触"); + return null; + } - return null; } @Override public int getContentLength() { - - return 0; + return conn.getContentLength(); } - @Override public void close() { - - + conn = null; } } diff --git a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java index 046f7c49a4..13f26fcd2c 100644 --- a/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java +++ b/group05/1094051862/test01/src/com/coderising/download/impl/ConnectionManagerImpl.java @@ -1,5 +1,11 @@ package com.coderising.download.impl; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + import com.coderising.download.api.Connection; import com.coderising.download.api.ConnectionException; import com.coderising.download.api.ConnectionManager; @@ -8,8 +14,7 @@ public class ConnectionManagerImpl implements ConnectionManager { @Override public Connection open(String url) throws ConnectionException { - - return null; + return new ConnectionImpl(url); } } diff --git a/group05/1094051862/test01/src/com/coderising/download/test/ConnectionImplTest.java b/group05/1094051862/test01/src/com/coderising/download/test/ConnectionImplTest.java new file mode 100644 index 0000000000..617147cb63 --- /dev/null +++ b/group05/1094051862/test01/src/com/coderising/download/test/ConnectionImplTest.java @@ -0,0 +1,36 @@ +package com.coderising.download.test; + +import static org.junit.Assert.*; + +import java.io.IOException; + +import junit.framework.Assert; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.impl.ConnectionImpl; +import com.coderising.download.impl.ConnectionManagerImpl; + +public class ConnectionImplTest extends ConnectionImpl { + + private Connection conn; + @Before + public void setUp() throws Exception { + ConnectionManagerImpl cm = new ConnectionManagerImpl(); + conn = cm.open("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489219389096&di=32a40c21fdc1f75c499f3f6eecaa41a3&imgtype=0&src=http%3A%2F%2Fimgstore.cdn.sogou.com%2Fapp%2Fa%2F100540002%2F759676.jpg"); + } + + @After + public void tearDown() throws Exception { + } + @Test + public void testRead() throws Exception { + Assert.assertEquals(108229, conn.getContentLength()); + byte[] bs = conn.read(0, 108229); + } + +} diff --git a/group05/1094051862/test01/src/com/coding/basic/ArrayListTest.java b/group05/1094051862/test01/src/com/coding/basic/ArrayListTest.java index 8a5875427e..c733e4e7a9 100644 --- a/group05/1094051862/test01/src/com/coding/basic/ArrayListTest.java +++ b/group05/1094051862/test01/src/com/coding/basic/ArrayListTest.java @@ -1,31 +1,31 @@ -package com.coding.basic; - -import org.junit.Assert; -import org.junit.Test; - -public class ArrayListTest { - - @Test - public void test() { - List list = new ArrayList(); - for(int i = 0; i < 10; i++) { - list.add(i); - } - Assert.assertEquals(10, list.size()); - list.add(11); - list.add(3,99); - Assert.assertEquals(99, list.get(3)); - Assert.assertEquals(12, list.size()); - Assert.assertEquals(99, list.remove(3)); - Assert.assertEquals(11, list.size()); - Iterator iterator = list.iterator(); - for (int i = 0; i< list.size(); i++) { - System.out.println(list.get(i)); - } - System.out.println("======"); - while (iterator.hasNext()) { - System.out.println(iterator.next()); - } - } - -} +package com.coding.basic; + +import org.junit.Assert; +import org.junit.Test; + +public class ArrayListTest { + + @Test + public void test() { + List list = new ArrayList(); + for(int i = 0; i < 10; i++) { + list.add(i); + } + Assert.assertEquals(10, list.size()); + list.add(11); + list.add(3,99); + Assert.assertEquals(99, list.get(3)); + Assert.assertEquals(12, list.size()); + Assert.assertEquals(99, list.remove(3)); + Assert.assertEquals(11, list.size()); + Iterator iterator = list.iterator(); + for (int i = 0; i< list.size(); i++) { + System.out.println(list.get(i)); + } + System.out.println("======"); + while (iterator.hasNext()) { + System.out.println(iterator.next()); + } + } + +} diff --git a/group05/1094051862/test01/src/com/coding/basic/LinkedList.java b/group05/1094051862/test01/src/com/coding/basic/LinkedList.java index aca68838c7..e05587dd02 100644 --- a/group05/1094051862/test01/src/com/coding/basic/LinkedList.java +++ b/group05/1094051862/test01/src/com/coding/basic/LinkedList.java @@ -1,15 +1,17 @@ package com.coding.basic; +import java.util.Arrays; + public class LinkedList implements List { - + private Node head; private Node last; private int size = 0; - - public void add(Object o){ + + public void add(Object o) { if (head == null) { head = new Node(o, null); - size ++; + size++; return; } Node n = new Node(o, null); @@ -19,9 +21,10 @@ public void add(Object o){ } last.next = n; last = n; - size ++; + size++; } - public void add(int index , Object o){ + + public void add(int index, Object o) { if (index < 0 || index > size) { System.out.println("linkedList.add: index < 0 || index > size"); return; @@ -39,21 +42,27 @@ public void add(int index , Object o){ pre = pre.next; } Node post = pre.next; - Node n = new Node(o,post); + Node n = new Node(o, post); pre.next = n; - size ++; + size++; } - public Object get(int index){ + + public Object get(int index) { + return this.getNode(index).data; + } + + public Node getNode(int index) { if (index == 0) { - return head.data; + return this.head; } Node n = head; for (int i = 1; i <= index; i++) { n = n.next; } - return n.data; + return n; } - public Object remove(int index){ + + public Object remove(int index) { if (index < 0 || index >= size) { System.out.println("remove :index < 0 || index >= size"); return null; @@ -72,36 +81,39 @@ public Object remove(int index){ Node post = n.next; n.next = null; pre.next = post; - size --; + size--; return n.data; } - - public int size(){ + + public int size() { return size; } - - public void addFirst(Object o){ - Node n = new Node(o,head); + + public void addFirst(Object o) { + Node n = new Node(o, head); head = n; - size ++; + size++; return; } - public void addLast(Object o){ - Node n = new Node(o,null); + + public void addLast(Object o) { + Node n = new Node(o, null); last.next = n; last = n; - size ++; + size++; return; } - public Object removeFirst(){ + + public Object removeFirst() { Object o = head.data; Node n = head.next; head.next = null; head = n; - size --; + size--; return o; } - public Object removeLast(){ + + public Object removeLast() { Node preLast = head; for (int i = 1; i < size; i++) { preLast = preLast.next; @@ -109,13 +121,15 @@ public Object removeLast(){ preLast.next = null; Object o = last.data; last = preLast; - size --; + size--; return o; } - public Iterator iterator(){ + + public Iterator iterator() { return new Iterator() { int cusor = 0; Node current = head; + @Override public Object next() { if (!hasNext()) { @@ -124,102 +138,197 @@ public Object next() { } Object o = current.data; current = current.next; - cusor ++; + cusor++; return o; } - + @Override public boolean hasNext() { return cusor < size; } }; } - - + private static class Node { - + Object data; Node next; - - public Node (Object data, Node next) { + + public Node(Object data, Node next) { this.data = data; this.next = next; } } - + /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ - public void reverse(){ - + public void reverse() { + if (this.size() < 2) { + return; + } + for (int i = this.size() - 1; i > 0; i--) { + this.getNode(i).next = this.getNode(i - 1); + } + Node temp = this.last; + this.last = this.head; + this.head = temp; } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 */ - public void removeFirstHalf(){ - + public void removeFirstHalf() { + + int delSize = this.size() >> 1; + + Node temp = this.getNode(delSize);// getNode(index) + // 鏂规硶渚濊禆鍓嶉潰鍏冪礌鐨刵ext鎸囬拡锛屾墍浠ユ璇彞鍦╢or寰幆鍓嶉潰 + + for (int i = delSize - 1; i >= 0; i--) { + this.getNode(i).next = null; + this.size--; + } + + this.head = temp;// 鐢变簬getNode(index) 鏂规硶濡傛灉index浼犲叆0 + // 锛岃繑鍥瀐ead锛屾墍浠ユ璇彞瑕佹柟娉昮or寰幆鍚庨潰 } - + /** * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * * @param i * @param length */ - public void remove(int i, int length){ - + public void remove(int i, int length) { + if (i < 0 || length < 0 || this.size() < i + length) { + return; + } + if (i == 0 && this.size() == length) { + this.head = null; + this.size = 0; + this.last = null; + return; + } + Node iNode = this.getNode(i - 1); + Node pre = this.getNode(i + length - 1); + Node post = this.getNode(i + length); + pre.next = null; + iNode.next = post; + this.size = this.size() - length; } + /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * * @param list */ - public static int[] getElements(LinkedList list){ - return null; + public int[] getElements(LinkedList list) { + Iterator select = list.iterator(); + Iterator original = this.iterator(); + int[] result = new int[this.size()]; + int cosur = 0; + while (select.hasNext()) { + int s = (int) select.next(); + String selStr = String.valueOf(s); + while (original.hasNext()) { + int o = (int) original.next(); + String oriStr = String.valueOf(o); + if (oriStr.contains(selStr)) { + result[0] = o; + cosur++; + break; + } + } + } + return Arrays.copyOf(result, cosur - 1); } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * * @param list */ - - public void subtract(LinkedList list){ - + + public void subtract(LinkedList list) { + Iterator select = list.iterator(); + Iterator original = this.iterator(); + int[] result = new int[this.size()]; + int cosur = 0; + while (select.hasNext()) { + int sel = (int) select.next(); + + while (original.hasNext()) { + int ori = (int) original.next(); + cosur++; + if (ori == sel) { + remove(cosur); + } + } + } } - + /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 */ - public void removeDuplicateValues(){ - + public void removeDuplicateValues() { + if (this.size() == 0) { + return; + } + for (int i = this.size(); i > 0; i--) { + if ((int) get(i) == (int) get(i - 1)) { + this.remove(i); + } + } } - + /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * * @param min * @param max */ - public void removeRange(int min, int max){ - + public void removeRange(int min, int max) { + int minIndex = 0; + int maxIndex = 0; + for (int i = this.size(); i > 0; i--) { + if (max > (int) get(i)) { + maxIndex = i; + } + } + for (int i = 0; i < maxIndex; i++) { + if (min < (int) get(i)) { + minIndex = i; + } + } + remove(minIndex, maxIndex - minIndex); } - + /** * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * * @param list */ - public LinkedList intersection( LinkedList list){ - return null; + public LinkedList intersection(LinkedList list) { + LinkedList result = new LinkedList(); + Iterator select = list.iterator(); + Iterator original = this.iterator(); + + int sel = (int) select.next(); + int ori = (int) original.next(); + while (original.hasNext() && select.hasNext()) { + if (ori == sel) { + result.add(ori); + } else if (ori < sel) { + ori = (int) original.next(); + } else { + sel = (int) select.next(); + } + } + return result; } } diff --git a/group05/1094051862/test01/src/com/coding/basic/LinkedListTest.java b/group05/1094051862/test01/src/com/coding/basic/LinkedListTest.java index ca269f7d9f..db55063435 100644 --- a/group05/1094051862/test01/src/com/coding/basic/LinkedListTest.java +++ b/group05/1094051862/test01/src/com/coding/basic/LinkedListTest.java @@ -1,36 +1,79 @@ -package com.coding.basic; - -import junit.framework.Assert; - -import org.junit.Test; - -public class LinkedListTest extends LinkedList { - - @Test - public void test() { - List list = new LinkedList(); - list.add(0); - list.add(1); - list.add(2); - list.add(3); - list.add(4); - list.add(5); - list.add(3, 33); - list.add(0, 100); - list.add(8,800); - Assert.assertEquals(9, list.size()); - Assert.assertEquals(100, list.get(0)); - Assert.assertEquals(0, list.get(1)); - Assert.assertEquals(1, list.get(2)); - Assert.assertEquals(2, list.get(3)); - Assert.assertEquals(33, list.get(4)); - Assert.assertEquals(3, list.get(5)); - Assert.assertEquals(4, list.get(6)); - Assert.assertEquals(800, list.get(8)); - Iterator iterator = list.iterator(); - while (iterator.hasNext()) { - System.out.println(iterator.next()); - } - } - -} +package com.coding.basic; + +import junit.framework.Assert; + +import org.junit.Test; + +public class LinkedListTest extends LinkedList { + + @Test + public void test() { + List list = new LinkedList(); + list.add(0); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(3, 33); + list.add(0, 100); + list.add(8,800); + Assert.assertEquals(9, list.size()); + Assert.assertEquals(100, list.get(0)); + Assert.assertEquals(0, list.get(1)); + Assert.assertEquals(1, list.get(2)); + Assert.assertEquals(2, list.get(3)); + Assert.assertEquals(33, list.get(4)); + Assert.assertEquals(3, list.get(5)); + Assert.assertEquals(4, list.get(6)); + Assert.assertEquals(800, list.get(8)); + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + System.out.println(iterator.next()); + } + } + @Test + public void testReverse() { + LinkedList list = new LinkedList(); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + list.add(7); + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + System.out.print(iterator.next()); + } + System.out.println(); + list.reverse(); + Iterator iterator2 = list.iterator(); + while (iterator2.hasNext()) { + System.out.print(iterator2.next()); + } + System.out.println(); + list.removeFirstHalf(); + Iterator iterator3 = list.iterator(); + while (iterator3.hasNext()) { + System.out.print(iterator3.next()); + } + System.out.println(); + + } + @Test + public void testRemove() { + LinkedList list = new LinkedList(); + int i = 0; + while( i < 20) { + list.add(i); + i ++; + } + list.remove(3, 10); + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + System.out.print(iterator.next()); + } + } + +} diff --git a/group05/1094051862/test01/src/com/coding/basic/List.java b/group05/1094051862/test01/src/com/coding/basic/List.java index ef939ae2cc..0a09990083 100644 --- a/group05/1094051862/test01/src/com/coding/basic/List.java +++ b/group05/1094051862/test01/src/com/coding/basic/List.java @@ -1,10 +1,10 @@ -package com.coding.basic; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); - public Iterator iterator(); -} +package com.coding.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); + public Iterator iterator(); +} From 2570f730c6cfb1965bfdf853dd8c8425705944e1 Mon Sep 17 00:00:00 2001 From: stillOnTheWay <1335499238@qq.com> Date: Sun, 12 Mar 2017 18:51:22 +0800 Subject: [PATCH 365/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../week01/src/basic/ArrayList.java | 123 +++++++++++ .../week01/src/basic/BinaryTreeNode.java | 81 +++++++ .../1335499238/week01/src/basic/Iterator.java | 9 + .../week01/src/basic/LinkedList.java | 206 ++++++++++++++++++ group22/1335499238/week01/src/basic/List.java | 15 ++ .../1335499238/week01/src/basic/Queue.java | 21 ++ .../1335499238/week01/src/basic/Stack.java | 29 +++ .../week01/src/test/ArrayListTest.java | 40 ++++ .../week01/src/test/BinaryTreeNodeTest.java | 26 +++ .../week01/src/test/LinkedListTest.java | 52 +++++ .../1335499238/week01/src/test/QueueTest.java | 30 +++ .../1335499238/week01/src/test/StackTest.java | 32 +++ 12 files changed, 664 insertions(+) create mode 100644 group22/1335499238/week01/src/basic/ArrayList.java create mode 100644 group22/1335499238/week01/src/basic/BinaryTreeNode.java create mode 100644 group22/1335499238/week01/src/basic/Iterator.java create mode 100644 group22/1335499238/week01/src/basic/LinkedList.java create mode 100644 group22/1335499238/week01/src/basic/List.java create mode 100644 group22/1335499238/week01/src/basic/Queue.java create mode 100644 group22/1335499238/week01/src/basic/Stack.java create mode 100644 group22/1335499238/week01/src/test/ArrayListTest.java create mode 100644 group22/1335499238/week01/src/test/BinaryTreeNodeTest.java create mode 100644 group22/1335499238/week01/src/test/LinkedListTest.java create mode 100644 group22/1335499238/week01/src/test/QueueTest.java create mode 100644 group22/1335499238/week01/src/test/StackTest.java diff --git a/group22/1335499238/week01/src/basic/ArrayList.java b/group22/1335499238/week01/src/basic/ArrayList.java new file mode 100644 index 0000000000..64b3045312 --- /dev/null +++ b/group22/1335499238/week01/src/basic/ArrayList.java @@ -0,0 +1,123 @@ +package basic; + +import java.util.Arrays; + +public class ArrayList implements List{ + + private int size; + + private Object[] elementData = {}; + + public ArrayList(){ + this(16); + } + + public ArrayList(int capacity){ + if(capacity > 0){ + elementData = new Object[capacity]; + }else if(capacity == 0){ + + }else{ + new IllegalArgumentException("initsize:"+capacity); + } + } + + @Override + public void add(Object o) { + ensureCapacity(elementData.length + 1); + elementData[size++] = o; + } + + @Override + public void add(int index, Object o) { + checkIndex(index); + ensureCapacity(size + 1); + System.arraycopy(elementData, index, elementData, index+1, size - index); + elementData[index] = o; + size++; + } + + @Override + public Object get(int index) { + checkIndex(index); + return elementData[index]; + } + + @Override + public Object remove(int index) { + checkIndex(index); + Object removeparam = elementData[index]; + int numMoved = size - index - 1; + if(numMoved > 0){ + System.arraycopy(elementData, index+1, elementData, index, numMoved); + } + elementData[--size] = null; //缃┖鏈熬鍏冪礌 + return removeparam; + } + + @Override + public int size() { + return size; + } + + /** + * 妫鏌ユ槸鍚﹁秺鐣 + * @param index + */ + public void checkIndex(int index){ + if(index > size || index < 0){ + throw new IndexOutOfBoundsException("current:"+index+" size:"+size); + } + } + + /** + * 鍒ゆ柇褰撳墠瀹归噺鏄惁瓒冲 + * @param minCapacity + */ + private void ensureCapacity(int minCapacity){ + if(minCapacity > elementData.length){ + grow(minCapacity); + } + } + + /** + * 鎵╁ + * @param minCapacity + */ + private void grow(int minCapacity){ + Object [] target = new Object [minCapacity+10]; + System.arraycopy(elementData, 0, target, 0, elementData.length); + elementData = target; + } + + public Iterator iterator() { + return new ArrayListIterator(); + } + + private class ArrayListIterator implements Iterator{ + + private int current = 0; + + @Override + public boolean hasNext() { + return current < size; + } + + @Override + public Object next() { + int i = current; + if(current >= size){ + throw new IndexOutOfBoundsException("current:"+current+" size:"+size); + } + current++; + return elementData[i]; + } + + } + + @Override + public String toString() { + return Arrays.toString(Arrays.copyOf(elementData, size)); + } + +} diff --git a/group22/1335499238/week01/src/basic/BinaryTreeNode.java b/group22/1335499238/week01/src/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..92ca37ef18 --- /dev/null +++ b/group22/1335499238/week01/src/basic/BinaryTreeNode.java @@ -0,0 +1,81 @@ +package basic; + +public class BinaryTreeNode >{ + + + private T data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public BinaryTreeNode(T o){ + this.data = o; + this.left = null; + this.right = null; + } + + public Object getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(T o){ + BinaryTreeNode current = this; + BinaryTreeNode addTreeNode = new BinaryTreeNode<>(o); + while(true){ + //濡傛灉浼犲叆鐨勫兼瘮浣嗗墠鑺傜偣鐨勫煎皬 + if(o.compareTo(current.data) < 0){ + if(current.left != null){ + current = current.left; + }else { + current.left = addTreeNode; + break; + } + }else{ + if(current.right != null){ + current = current.right; + }else{ + current.right =addTreeNode; + break; + } + } + } + return addTreeNode; + } + + public LinkedList prevOrder(BinaryTreeNode binaryTreeNode){ + LinkedList linkedList = new LinkedList(); + preOrder(binaryTreeNode, linkedList); + return linkedList; + } + + private void preOrder(BinaryTreeNode binaryTreeNode,LinkedList linkedList){ + if(binaryTreeNode.left != null){ + preOrder(binaryTreeNode.left, linkedList); + + } + linkedList.add(binaryTreeNode.data); + if(binaryTreeNode.right != null){ + preOrder(binaryTreeNode.right, linkedList); + } + } + +} diff --git a/group22/1335499238/week01/src/basic/Iterator.java b/group22/1335499238/week01/src/basic/Iterator.java new file mode 100644 index 0000000000..576b1a4af4 --- /dev/null +++ b/group22/1335499238/week01/src/basic/Iterator.java @@ -0,0 +1,9 @@ +package basic; + +public interface Iterator { + + public boolean hasNext(); + + public Object next(); + +} diff --git a/group22/1335499238/week01/src/basic/LinkedList.java b/group22/1335499238/week01/src/basic/LinkedList.java new file mode 100644 index 0000000000..9af1471bfb --- /dev/null +++ b/group22/1335499238/week01/src/basic/LinkedList.java @@ -0,0 +1,206 @@ +package basic; + + +public class LinkedList implements List{ + + private Node head; + + private int size; + + @Override + public void add(Object o) { + addLast(o); + } + + @Override + public void add(int index, Object o) { + checkIndex(index); + Node current = findByIndex(index); + Node newNode = new Node(o, current); + if(index == 0){ + head = newNode; + }else{ + Node perv = findByIndex(index-1); + perv.next = newNode; + } + size++; + } + + @Override + public Object get(int index) { + checkIndex(index); + return findByIndex(index).data; + } + + @Override + public Object remove(int index) { + Node remove = null; + checkIndex(index); + Node next = findByIndex(index+1); + if(index == 0){ + remove = head; + if(next == null){ + head = null; + }else { + head = next; + } + }else{ + Node perv = findByIndex(index-1); + remove = perv.next; + perv.next = next; + } + size--; + return remove.data; + } + + @Override + public int size() { + return size; + } + + public void addFirst(Object o){ + head = new Node(o, head); + size++; + } + + public void addLast(Object o){ + Node nextNode = new Node(o, null); + if(head == null){ + head = nextNode; + }else{ + Node lastNode = findByIndex(size-1); + lastNode.next = nextNode; + } + size++; + } + + public Object removeFirst(){ + return remove(0); + } + + public Object removeLast(){ + return remove(size-1); + } + + public Iterator iterator(){ + return new LinkedListIterator(); + } + + private class LinkedListIterator implements Iterator{ + + int current = 0; + + @Override + public boolean hasNext() { + return current < size; + } + + @Override + public Object next() { + Node findByIndex = findByIndex(current); + if(current >= size){ + throw new IndexOutOfBoundsException("current:"+current+" size:"+size); + } + current++; + return findByIndex.data; + } + + } + + private static class Node{ + Object data; + Node next; + + Node(Object data, Node next){ + this.data = data; + this.next = next; + } + } + + private Node findByIndex(int index){ + Node lastNode = head; + for (int i = 0; i < index; i++) { + lastNode = lastNode.next; + } + return lastNode; + } + + private void checkIndex(int index){ + if(index > size || index < 0){ + throw new IndexOutOfBoundsException("current:"+index+" size:"+size); + } + } + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + * + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + * @param list + */ + + public void subtract(LinkedList list){ + + } + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } + +} diff --git a/group22/1335499238/week01/src/basic/List.java b/group22/1335499238/week01/src/basic/List.java new file mode 100644 index 0000000000..82612a4487 --- /dev/null +++ b/group22/1335499238/week01/src/basic/List.java @@ -0,0 +1,15 @@ +package basic; + +public interface List { + + public void add(Object o); + + public void add(int index, Object o); + + public Object get(int index); + + public Object remove(int index); + + public int size(); + +} diff --git a/group22/1335499238/week01/src/basic/Queue.java b/group22/1335499238/week01/src/basic/Queue.java new file mode 100644 index 0000000000..81eb073387 --- /dev/null +++ b/group22/1335499238/week01/src/basic/Queue.java @@ -0,0 +1,21 @@ +package basic; + +public class Queue { + + private LinkedList linkList = new LinkedList(); + + public void enQueue(Object o){ + linkList.add(o); + } + + public Object deQueue(){ + return linkList.removeFirst(); + } + + public boolean isEmpty(){ + return linkList.size() == 0; + } + public int size(){ + return linkList.size(); + } +} diff --git a/group22/1335499238/week01/src/basic/Stack.java b/group22/1335499238/week01/src/basic/Stack.java new file mode 100644 index 0000000000..38baac269a --- /dev/null +++ b/group22/1335499238/week01/src/basic/Stack.java @@ -0,0 +1,29 @@ +package basic; + +public class Stack { + + private ArrayList elementData = new ArrayList(); + + private int size = 0; + + public void push(Object o){ + elementData.add(o); + size++; + } + + public Object pop(){ + return elementData.remove(size-1); + } + + public Object peek(){ + return elementData.get(size-1); + } + + public boolean isEmpty(){ + return size == 0; + } + + public int size(){ + return size; + } +} diff --git a/group22/1335499238/week01/src/test/ArrayListTest.java b/group22/1335499238/week01/src/test/ArrayListTest.java new file mode 100644 index 0000000000..bf54c307dc --- /dev/null +++ b/group22/1335499238/week01/src/test/ArrayListTest.java @@ -0,0 +1,40 @@ +package test; + + +import org.junit.Assert; +import org.junit.Test; + +import basic.ArrayList; +import basic.Iterator; + +public class ArrayListTest { + + @Test + public void test01(){ + ArrayList arrayList = new ArrayList(); + arrayList.add("612"); + arrayList.add("1"); + arrayList.add("2"); + arrayList.add("5"); + arrayList.add("6"); + Assert.assertEquals("[612, 1, 2, 5, 6]", arrayList.toString()); + + Object remove = arrayList.remove(2); + Assert.assertEquals("2", remove); + + arrayList.add(2, "13"); + Assert.assertEquals("[612, 1, 13, 5, 6]", arrayList.toString()); + + Object object = arrayList.get(2); + Assert.assertEquals("13", object); + + Assert.assertEquals(5, arrayList.size()); + + Iterator iterator = arrayList.iterator(); + while (iterator.hasNext()) { + System.out.print(iterator.next()+" "); + + } + } + +} diff --git a/group22/1335499238/week01/src/test/BinaryTreeNodeTest.java b/group22/1335499238/week01/src/test/BinaryTreeNodeTest.java new file mode 100644 index 0000000000..18f3b7897b --- /dev/null +++ b/group22/1335499238/week01/src/test/BinaryTreeNodeTest.java @@ -0,0 +1,26 @@ +package test; + +import org.junit.Test; + +import basic.BinaryTreeNode; +import basic.Iterator; +import basic.LinkedList; + +public class BinaryTreeNodeTest { + + @Test + public void test01(){ + BinaryTreeNode binaryTreeNode = new BinaryTreeNode(20); + binaryTreeNode.insert(5); + binaryTreeNode.insert(40); + binaryTreeNode.insert(30); + binaryTreeNode.insert(10); + binaryTreeNode.insert(15); + LinkedList prevOrder = binaryTreeNode.prevOrder(binaryTreeNode); + Iterator iterator = prevOrder.iterator(); + while(iterator.hasNext()){ + System.out.print(iterator.next()+" "); + } + } + +} diff --git a/group22/1335499238/week01/src/test/LinkedListTest.java b/group22/1335499238/week01/src/test/LinkedListTest.java new file mode 100644 index 0000000000..8a7fa7f444 --- /dev/null +++ b/group22/1335499238/week01/src/test/LinkedListTest.java @@ -0,0 +1,52 @@ +package test; + +import org.junit.Assert; +import org.junit.Test; + +import basic.Iterator; +import basic.LinkedList; + +public class LinkedListTest { + + @Test + public void test01(){ + LinkedList linkedList = new LinkedList(); + linkedList.add(122); + linkedList.add("qwe"); + linkedList.add(133); + iterator(linkedList); + + linkedList.add(1, "asd"); + iterator(linkedList); + + linkedList.addFirst("1"); + iterator(linkedList); + + linkedList.addLast("zxc"); + iterator(linkedList); + + Object remove = linkedList.remove(2); + Assert.assertEquals("asd", remove); + + Object removeFirst = linkedList.removeFirst(); + Assert.assertEquals("1", removeFirst); + + Object removeLast = linkedList.removeLast(); + Assert.assertEquals("zxc", removeLast); + + int size = linkedList.size(); + Assert.assertEquals(3, size); + + + + } + + public static void iterator(LinkedList linkedList){ + Iterator iterator = linkedList.iterator(); + while(iterator.hasNext()){ + System.out.print(iterator.next()+" "); + } + System.out.println(); + } + +} diff --git a/group22/1335499238/week01/src/test/QueueTest.java b/group22/1335499238/week01/src/test/QueueTest.java new file mode 100644 index 0000000000..61d4eb91c9 --- /dev/null +++ b/group22/1335499238/week01/src/test/QueueTest.java @@ -0,0 +1,30 @@ +package test; + +import org.junit.Assert; +import org.junit.Test; + +import basic.Queue; + +public class QueueTest { + + @Test + public void test01(){ + + Queue queue = new Queue(); + boolean empty1 = queue.isEmpty(); + Assert.assertEquals(true, empty1); + queue.enQueue("111"); + queue.enQueue("222"); + queue.enQueue("333"); + Object deQueue = queue.deQueue(); + Assert.assertEquals("111", deQueue); + + boolean empty2 = queue.isEmpty(); + Assert.assertEquals(false, empty2); + + int size = queue.size(); + Assert.assertEquals(2, size); + } + + +} diff --git a/group22/1335499238/week01/src/test/StackTest.java b/group22/1335499238/week01/src/test/StackTest.java new file mode 100644 index 0000000000..95c440b8af --- /dev/null +++ b/group22/1335499238/week01/src/test/StackTest.java @@ -0,0 +1,32 @@ +package test; + +import org.junit.Assert; +import org.junit.Test; + +import basic.Stack; + +public class StackTest { + + @Test + public void test1(){ + Stack stack = new Stack(); + + Assert.assertEquals(true, stack.isEmpty()); + + stack.push(123); + stack.push("qwe"); + stack.push(456); + + Assert.assertEquals(false, stack.isEmpty()); + + int size = stack.size(); + Assert.assertEquals(3, size); + + Object peek = stack.peek(); + Assert.assertEquals(456, peek); + + Object pop = stack.pop(); + Assert.assertEquals(456, pop); + } + +} From 9df1dd327d35716eacaaad14295e95fc6afea015 Mon Sep 17 00:00:00 2001 From: CJ-chen <120509419@qq.com> Date: Sun, 12 Mar 2017 18:51:43 +0800 Subject: [PATCH 366/646] add Btree --- .../coding2017/basic/BinaryTreeNode.java | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java b/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java index 3adcc7040b..ff40538e64 100644 --- a/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java +++ b/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java @@ -40,6 +40,48 @@ public void setRight(BinaryTreeNode right) { } public BinaryTreeNode insert(Object o) { - return null; + // 搴旇鍙渶瑕佸疄鐜拌繖涓氨鍙互浜 + int curValue = (Integer) this.getData(); + int insertValue = (Integer) o; + + BinaryTreeNode newNode = new BinaryTreeNode(); + newNode.setData(o); + + if (curValue > insertValue) { + if (this.getLeft() != null) { + return this.getLeft().insert(o); + } else { + this.setLeft(newNode); + return this; + } + } else{ + if (this.getRight() != null) { + return this.getRight().insert(o); + } else { + this.setRight(newNode); + return this; + } + } + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(this.getData()).append("\n"); + sb.append(this.getLeft()).append("<--").append(this.getData()).append("\n"); + sb.append(this.getData()).append("-->").append(this.getRight()).append("\n"); + return sb.toString(); } + + public static void main(String[] args) { + BinaryTreeNode btn = new BinaryTreeNode(); + btn.setData(5); +// btn.insert(5); + btn.insert(7); + btn.insert(8); + btn.insert(9); + btn.insert(4); + + System.err.println(btn); + } + } From a2050195a62221fa1fb2bbe0d5662db5c937844d Mon Sep 17 00:00:00 2001 From: skomefen <1072760797@qq.com> Date: Sun, 12 Mar 2017 18:57:25 +0800 Subject: [PATCH 367/646] day3-11.1.01 --- .../src/com/skomefen/list/ArrayList.java | 83 ++++++ .../com/skomefen/list/ArrayListIterator.java | 25 ++ .../src/com/skomefen/list/BinaryTreeNode.java | 32 +++ .../src/com/skomefen/list/Iterator.java | 7 + .../src/com/skomefen/list/LinkedList.java | 252 ++++++++++++++++++ .../com/skomefen/list/LinkedListiterator.java | 25 ++ .../day3-11/src/com/skomefen/list/List.java | 9 + .../day3-11/src/com/skomefen/list/Queue.java | 26 ++ .../day3-11/src/com/skomefen/list/Stack.java | 28 ++ .../day3-11/src/com/skomefen/test/test.java | 109 ++++++++ 10 files changed, 596 insertions(+) create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayList.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayListIterator.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/BinaryTreeNode.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/Iterator.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/LinkedList.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/LinkedListiterator.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/List.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/Queue.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/list/Stack.java create mode 100644 group23/1072760797-skomefen/day3-11/src/com/skomefen/test/test.java diff --git a/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayList.java b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayList.java new file mode 100644 index 0000000000..2567132d2a --- /dev/null +++ b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayList.java @@ -0,0 +1,83 @@ +package com.skomefen.list; + +public class ArrayList implements List { + + + private int size = 0; + + private Object[] elementData = new Object[100]; + + private Iterator iterator ; + + public void add(Object o){ + + if(sizesize||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + + if(sizesize||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + + return elementData[index]; + + } + + public Object remove(int index){ + if(index>size||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + Object revalue = elementData[index]; + Object[] dest = new Object[elementData.length]; + System.arraycopy(elementData, 0, dest, 0, index); + System.arraycopy(elementData, index+1, dest, index, elementData.length-1-index); + elementData = dest; + size--; + return revalue; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + iterator = new ArrayListIterator(this); + return iterator; + } + +} diff --git a/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayListIterator.java b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayListIterator.java new file mode 100644 index 0000000000..345d620c0e --- /dev/null +++ b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/ArrayListIterator.java @@ -0,0 +1,25 @@ +package com.skomefen.list; + +public class ArrayListIterator implements Iterator { + private ArrayList array = null; + private int index = 0; + public ArrayListIterator(ArrayList array) { + this.array = array; + } + public boolean hasNext() { + if(array==null){ + return false; + } + if(indexsize||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + insertoflist(index, o); + + + } + public Object get(int index){ + if(index>=size||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + if(head==null){ + return null; + } + if(index==point){ + return node.data; + } + this.point=0; + node = head; + while(index>=this.point){ + + if(index==point){ + return node.data; + } + point++; + node = node.next; + } + return null; + } + public Object remove(int index){ + if(index>=size||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + size--; + if(index==(this.point+1)){ + Object o =node.next.data; + node.next = node.next.next; + return o; + } + this.point = 0; + if(index==0){ + head = head.next; + Object o =head.data; + node = head; + return o; + } + + Object o = null; + while(index<=(this.point+1)){ + if(index==(this.point+1)){ + o =node.next.data; + node.next = node.next.next; + + } + point++; + node = node.next; + } + return o; + } + + public int size(){ + + return size; + } + + public void addFirst(Object o){ + add(0,o); + } + public void addLast(Object o){ + add(size,o); + } + public Object removeFirst(){ + if(head==null){ + return null; + } + remove(0); + return null; + } + public Object removeLast(){ + if(head==null){ + return null; + } + remove(size-1); + return null; + } + public Iterator iterator(){ + iterator = new LinkedListiterator(this); + return iterator; + } + + + private static class Node{ + private Object data; + private Node next; + + + } + + private void insertoflist(int index,Object o){ + + if(index>size||index<0){ + throw new IndexOutOfBoundsException("index:"+index+"size:"+size); + } + + if(head==null){ + head = new Node(); + head.data=o; + head.next=new Node(); + size++; + node = head; + this.point = 0; + return; + } + if(index==(this.point+1)){ + pointlast(index, o); + return; + } + //head涓嶇瓑浜庣┖锛屽厛浠巋ead椤哄簭寰涓嬫壘 + this.point = 0; + if(index == this.point){ + Node next = head; + head = new Node(); + head.next = next; + head.data = o; + node = head;//褰撳墠鑺傜偣涓篽ead + this.point = index; + size++; + return; + } + do{ + if(index==(this.point+1)){ + pointlast(index, o); + return; + } + node = node.next; + this.point++; + }while(index>(this.point+1)); + + } + + private void pointlast(int index, Object o) { + if(index==(this.point+1)){ + if(index==size){//index鎻掑叆List缁撳熬 + this.point = this.point+1; + node = node.next; + node.data=o; + node.next = new Node(); + size++; + return; + } + this.point = this.point+1; + Node next = node.next;//浠庝笂涓涓猲ode鑾峰彇涓嬩竴涓猲ode + node.next = new Node();//涓婁竴涓妭鐐规寚鍚戞柊寤鸿妭鐐 + node = node.next;//鑾峰彇鏂板缓鑺傜偣 + node.data=o;//鏂板缓鑺傜偣鑾峰彇鍊 + node.next = next;//鏂板缓鑺傜偣鎸囧悜涓嬩竴涓妭鐐 + size++; + return; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/LinkedListiterator.java b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/LinkedListiterator.java new file mode 100644 index 0000000000..c04de32a93 --- /dev/null +++ b/group23/1072760797-skomefen/day3-11/src/com/skomefen/list/LinkedListiterator.java @@ -0,0 +1,25 @@ +package com.skomefen.list; + +public class LinkedListiterator implements Iterator { + + private LinkedList link = null; + private int index = 0; + public LinkedListiterator(LinkedList link) { + this.link = link; + } + public boolean hasNext() { + if(link==null){ + return false; + } + if(index Date: Sun, 12 Mar 2017 19:03:50 +0800 Subject: [PATCH 368/646] =?UTF-8?q?'=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E6=A5=AD'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group23/609041842/src/code/ArrayList.java | 49 ++++++++++++ group23/609041842/src/code/LinkedList.java | 87 ++++++++++++++++++++++ group23/609041842/src/code/Queue.java | 17 +++++ group23/609041842/src/code/Stack.java | 30 ++++++++ 4 files changed, 183 insertions(+) create mode 100644 group23/609041842/src/code/ArrayList.java create mode 100644 group23/609041842/src/code/LinkedList.java create mode 100644 group23/609041842/src/code/Queue.java create mode 100644 group23/609041842/src/code/Stack.java diff --git a/group23/609041842/src/code/ArrayList.java b/group23/609041842/src/code/ArrayList.java new file mode 100644 index 0000000000..e24f37e35a --- /dev/null +++ b/group23/609041842/src/code/ArrayList.java @@ -0,0 +1,49 @@ +package code; + +import java.util.Arrays; + +public class ArrayList { + + private Object[] obj = new Object[0]; + + public void add(Object o) { + Object[] tar = new Object[obj.length + 1]; + System.arraycopy(obj, 0, tar, 0, obj.length); + tar[tar.length - 1] = o; + obj = tar; + System.out.println(Arrays.toString(obj)); + } + + public void add(int index, Object o) { + Object[] tar = new Object[obj.length + 1]; + System.arraycopy(obj, 0, tar, 0, index); + tar[index] = o; + System.arraycopy(obj, index, tar, index + 1, obj.length - index); + obj = tar; + } + + public Object get(int index) { + return obj[index]; + } + + public int size(){ + return obj.length; + } + + public Object remove(int index){ + Object[] tar = new Object[obj.length-1]; + System.arraycopy(obj, 0, tar, 0, index); + System.arraycopy(obj, index+1, tar, index, obj.length-index-1); + Object o = obj[index]; + obj = tar; + return o;//返回被删元素 + } + public static void main(String[] args) { + ArrayList al = new ArrayList(); + al.add("hello"); + al.add("java"); + al.add(2, "addm"); + System.out.println(al.remove(1)); + } + +} diff --git a/group23/609041842/src/code/LinkedList.java b/group23/609041842/src/code/LinkedList.java new file mode 100644 index 0000000000..6f2ac5158f --- /dev/null +++ b/group23/609041842/src/code/LinkedList.java @@ -0,0 +1,87 @@ +package code; + +public class LinkedList { + private static Node head; + private Node last; + public int size; + + public void add(Object o) { + Node l = last; + Node newNode = new Node(l, o, null); + last = newNode; + if (head == null) { + head = newNode; + size = 1; + } else { + l.next = newNode; + size++; + } + } + + public void add(int index, Object o) { + Node n = node(index); + System.out.println(n.data); + Node pred = n.prev; + Node newNode = new Node(pred, o, n); + if (pred == null) { + head = newNode; + } else { + pred.next = newNode; + } + size++; + } + + + public Node get(int index){ + return node(index); + } + public Node node(int index) { + Node n = head; + for (int i = 0; i < index; i++) { + n = n.next; + } + return n; + } + + public Node remove(int index){ + Node del = node(index); + Node after = del.next; + Node before = del.prev; + before.next = after; + after.prev = before; + size--; + return del; + } + private static class Node { + Node next; + Object data; + Node prev; + + private Node(Node prev, Object data, Node next) { + this.data = data; + this.next = next; + this.prev = prev; + } + } + + public static void main(String[] arg) { + LinkedList ll = new LinkedList(); + ll.add("hello"); + ll.add("java"); + ll.add("jvm"); + ll.add("jvmd"); + // System.out.println(ll.get(2)); +// ll.add(1, "ds"); + System.out.println(ll.get(0).data); + System.out.println(ll.get(1).data); + System.out.println(ll.get(2).data); + System.out.println(ll.get(3).data); + System.out.println(ll.size); + System.out.println(ll.remove(1).data); + System.out.println(ll.get(0).data); + System.out.println(ll.get(1).data); + System.out.println(ll.get(2).data); + System.out.println(ll.size); + } + +} diff --git a/group23/609041842/src/code/Queue.java b/group23/609041842/src/code/Queue.java new file mode 100644 index 0000000000..4f18db0129 --- /dev/null +++ b/group23/609041842/src/code/Queue.java @@ -0,0 +1,17 @@ +package code; + +public class Queue { + + private LinkedList lk = new LinkedList(); + public void enQueue(Object o){ + lk.add(o); + } + public void deQueue(){ + lk.remove(lk.size-1); + } + public boolean isEmpty(){ + if(lk.size == 0) + return true; + return false; + } +} diff --git a/group23/609041842/src/code/Stack.java b/group23/609041842/src/code/Stack.java new file mode 100644 index 0000000000..315b07f5a8 --- /dev/null +++ b/group23/609041842/src/code/Stack.java @@ -0,0 +1,30 @@ +package code; + +public class Stack { + + private ArrayList array = new ArrayList(); + + public void push(Object o){ + array.add(o); + } + public Object pop(){ + return array.remove(array.size()-1); + } + + public boolean isEmpty(){ + if(array.size()<=0) + return true; + return false; + } + + public int size(){ + return array.size(); + } + public static void main(String[] args) { + Stack sc = new Stack(); + sc.push("hello world"); + sc.push("java"); + sc.push("jvm"); + } + +} From 807b73ea6ed6bd45803103ae3a781bb07981d5c3 Mon Sep 17 00:00:00 2001 From: Jiandan1357 Date: Sun, 12 Mar 2017 19:18:37 +0800 Subject: [PATCH 369/646] DataStructure --- group23/601689050/ArrayList.java | 58 +++++++++++++ group23/601689050/BinaryTreeNode.java | 50 +++++++++++ group23/601689050/Iterator.java | 7 ++ group23/601689050/LinkedList.java | 117 ++++++++++++++++++++++++++ group23/601689050/List.java | 10 +++ group23/601689050/Queue.java | 45 ++++++++++ group23/601689050/Stack.java | 39 +++++++++ 7 files changed, 326 insertions(+) create mode 100644 group23/601689050/ArrayList.java create mode 100644 group23/601689050/BinaryTreeNode.java create mode 100644 group23/601689050/Iterator.java create mode 100644 group23/601689050/LinkedList.java create mode 100644 group23/601689050/List.java create mode 100644 group23/601689050/Queue.java create mode 100644 group23/601689050/Stack.java diff --git a/group23/601689050/ArrayList.java b/group23/601689050/ArrayList.java new file mode 100644 index 0000000000..5a4169dc9b --- /dev/null +++ b/group23/601689050/ArrayList.java @@ -0,0 +1,58 @@ +package com.bjsxd.test; + +public class ArrayList implements List { + private Object[] elementData = new Object[100]; + private int size = 0; + Object[] temp = null; + + public void add(Object o) { + if (size < elementData.length) { + size++; + Object[] target = new Object[elementData.length + size]; + System.arraycopy(elementData, 0, target, 0, elementData.length); + elementData[size] = o; + } + } + + public void add(int index, Object o) { + if (index < 0 || o == null) { + throw new IllegalArgumentException("锟斤拷佣锟斤拷锟斤拷锟斤拷"); + } else if (index <= elementData.length) { + add(o); + } else if (index > elementData.length) { + throw new IllegalArgumentException("锟斤拷佣锟斤拷锟皆斤拷锟"); + } + + if (size <= elementData.length) { + this.size++; + } + Object[] target = new Object[this.size]; + System.arraycopy(elementData, 0, target, 0, index); + target[index] = o; + System.arraycopy(elementData, index, target, index + 1, elementData.length - index); + } + + public Object get(int index) { + if (index < 0 || index >= elementData.length) { + return false; + } else { + return elementData[index]; + } + } + + public Object remove(int index) { + if (index < 0 || index >= elementData.length) { + throw new IllegalArgumentException("删锟斤拷锟斤拷锟襟不达拷锟斤拷"); + } else { + for (int i = index; i < elementData.length; i++) { + elementData[i] = elementData[i + 1]; + } + return elementData[index]; + } + } + + public int size() { + return this.size; + } + +} diff --git a/group23/601689050/BinaryTreeNode.java b/group23/601689050/BinaryTreeNode.java new file mode 100644 index 0000000000..3687306f5e --- /dev/null +++ b/group23/601689050/BinaryTreeNode.java @@ -0,0 +1,50 @@ +package com.bjsxd.test; + +public class BinaryTreeNode { + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + private BinaryTreeNode root; + + public BinaryTreeNode(BinaryTreeNode root){ + this.root = root; + + } + + public BinaryTreeNode(BinaryTreeNode left,BinaryTreeNode right,Object data){ + this.left = left; + this.right = right; + this.data = data; + } + + public void buildTree(){ + + } + + public BinaryTreeNode(Object data){ + this(null,null,data); + } + public Object getData(){ + return data; + } + public void setData(Object data){ + this.data = data; + } + public BinaryTreeNode getLeft(){ + return left; + } + public void setLeft(BinaryTreeNode left){ + this.left = left; + + } + public BinaryTreeNode getRight(){ + return right; + } + public void setRight(BinaryTreeNode right){ + this.right = right; + } + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group23/601689050/Iterator.java b/group23/601689050/Iterator.java new file mode 100644 index 0000000000..06ef6311b2 --- /dev/null +++ b/group23/601689050/Iterator.java @@ -0,0 +1,7 @@ +package com.coding.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group23/601689050/LinkedList.java b/group23/601689050/LinkedList.java new file mode 100644 index 0000000000..ee173bec67 --- /dev/null +++ b/group23/601689050/LinkedList.java @@ -0,0 +1,117 @@ +package com.bjsxd.test; + +public class LinkedList implements List{ + private static class Node{ + Object data; + Node next; + } + private Node head; + private Node last; + public void add (Object o){ + if (head == null){ + head = new Node(); + head.data = o; + head.next = null; + }else{ + Node MyNode = new Node(); + MyNode = head; + while (MyNode.next != null){ + MyNode = MyNode.next; + } + Node AddNode = new Node(); + MyNode.next = AddNode; + AddNode.data = o; + } + } + public void add(int index,Object o){ + if(index<0 || o ==null){ + throw new IllegalArgumentException("添加对象位置出错且不能为空"); + }else if (index == 0 && head == null){ + head = new Node(); + head.data = o; + head.next = null; + }else if (index > 0 && head == null){ + throw new IllegalArgumentException("添加对象位置出错"); + }else{ + Node SrcNode = new Node(); + Node AddNode = new Node(); + Node SrcNode2 = new Node(); + SrcNode = head; + for(int i=0;i<=index;i++){ + SrcNode = SrcNode.next; + } + AddNode.next = SrcNode; + AddNode.data = o; + for (int i=0;i size){ + throw new IllegalArgumentException("删除对象位置出错"); + }else{ + for (int i=0;i front){ + return rear - front; + }else + return Q.length-1; + } + +} diff --git a/group23/601689050/Stack.java b/group23/601689050/Stack.java new file mode 100644 index 0000000000..106d2ecc7d --- /dev/null +++ b/group23/601689050/Stack.java @@ -0,0 +1,39 @@ +package com.bjsxd.test; + +public class Stack { + private int top = -1; + private Object[] elements; + private int size = 0; + public Stack(){ + elements = new Object[100]; + } + public void push (Object o){ + elements[this.size] = o; + this.size++; + } + public Object pop(){ + if (this.size != 0){ + Object temp = elements[size-1]; + elements[size-1]=0; + size--; + return temp; + }else{ + System.out.println("栈空"); + return 0; + } + } + public Object peek(){ + if(!this.isEmpty()){ + Object temp = elements[this.size-1]; + elements[this.size-1] = 0; + this.size--; + return temp; + }else{ + System.out.println("栈空"); + return 0; + } + } + public boolean isEmpty(){ + return this.size == 0; + } +} From b8119e10303ca2283b5b554d3a5729d8f2dc822c Mon Sep 17 00:00:00 2001 From: 592146505 <592146505@qq.com> Date: Sun, 12 Mar 2017 19:26:34 +0800 Subject: [PATCH 370/646] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E4=B8=8B=E8=BD=BD=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 45 ++++++++-- .../coderising/download/FileDownloader.java | 42 +++++---- .../download/FileDownloaderTest.java | 4 +- .../coderising/download/api/Connection.java | 10 ++- .../download/api/ConnectionException.java | 10 +-- .../download/api/ConnectionManager.java | 13 ++- .../download/impl/ConnectionImpl.java | 90 +++++++++++++++++-- .../download/impl/ConnectionManagerImpl.java | 59 ++++++++++-- .../org/wsc/coding/basic/list/ArrayList.java | 2 - 9 files changed, 228 insertions(+), 47 deletions(-) diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java index 1a39d7d741..d6b8a4abf0 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/DownloadThread.java @@ -1,9 +1,14 @@ package org.wsc.coderising.download; +import java.io.IOException; +import java.io.RandomAccessFile; + import org.wsc.coderising.download.api.Connection; +import org.wsc.coderising.download.api.ConnectionException; +import org.wsc.coderising.download.api.DownloadListener; /** - * 涓嬭浇杩涚▼ + * 涓嬭浇绾跨▼ * * @author Administrator * @date 2017骞3鏈6鏃ヤ笅鍗7:03:41 @@ -12,19 +17,45 @@ */ public class DownloadThread extends Thread{ + private RandomAccessFile accessFile; /** 杩炴帴 */ - Connection conn; + private Connection conn; /** 寮濮嬪 */ - int startPos; + private int startPos; /** 缁撴潫澶 */ - int endPos; - - public DownloadThread( Connection conn, int startPos, int endPos){ + private int endPos; + /** 鍥炶皟鍑芥暟 */ + private DownloadListener listener; + + public DownloadThread( Connection conn, int startPos, int endPos,DownloadListener listener){ this.conn = conn; this.startPos = startPos; this.endPos = endPos; + this.listener = listener; } - public void run(){ + public void run(){ + try { + byte[] bt = conn.read(startPos, endPos); + accessFile = new RandomAccessFile("./"+conn.getFileName(), "rw"); + accessFile.seek(startPos); + accessFile.write(bt); + } catch (IOException e) { + e.printStackTrace(); + } catch (ConnectionException e) { + e.printStackTrace(); + }finally { + if(accessFile != null){ + try { + accessFile.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (conn != null) + conn.close(); + if(listener!=null) + listener.notifyFinished(); + } } } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java index 99c6097409..f9c3afd9e2 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloader.java @@ -1,5 +1,7 @@ package org.wsc.coderising.download; +import java.util.concurrent.atomic.AtomicInteger; + import org.wsc.coderising.download.api.Connection; import org.wsc.coderising.download.api.ConnectionException; import org.wsc.coderising.download.api.ConnectionManager; @@ -14,13 +16,15 @@ * */ public class FileDownloader { + private final static int THREAD_NUM = 10; - String url; + private String url; - DownloadListener listener; + private DownloadListener listener; - ConnectionManager cm; + private ConnectionManager cm; + private AtomicInteger atomicInteger = new AtomicInteger(); public FileDownloader(String _url) { this.url = _url; @@ -41,26 +45,30 @@ public void execute(){ // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; try { - - conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn,0,length-1).start(); + int length = cm.getContentLength(url); + int perThred_length = length/THREAD_NUM; + int redundant = length%THREAD_NUM; + for (int i = 0; i < THREAD_NUM; i++) { + int startPos = i*perThred_length; + int endPos = (i+1)*perThred_length-1; + if(i == THREAD_NUM -1)//鏈鍚庝竴涓嚎绋 + endPos+=redundant; + Connection conn = cm.open(this.url); + atomicInteger.getAndIncrement(); + new DownloadThread(conn,startPos,endPos,new DownloadListener() { + @Override + public void notifyFinished() { + if(atomicInteger.decrementAndGet()==0) + listener.notifyFinished(); + } + }).start(); + } } catch (ConnectionException e) { e.printStackTrace(); - }finally{ - if(conn != null){ - conn.close(); - } } - - - } public void setListener(DownloadListener listener) { diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java index 3815c9698b..cca38600df 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/FileDownloaderTest.java @@ -21,7 +21,7 @@ public void tearDown() throws Exception { @Test public void testDownload() { // 璧勬簮浣嶇疆 - String url = "http://localhost:8080/test.jpg"; + String url = "http://pic6.huitu.com/res/20130116/84481_20130116142820494200_1.jpg"; // 鍒涘缓璧勬簮涓嬭浇鍣ㄥ疄渚 FileDownloader downloader = new FileDownloader(url); // 鍒涘缓杩炴帴绠$悊瀹炰緥 @@ -47,7 +47,7 @@ public void notifyFinished() { e.printStackTrace(); } } - System.out.println("涓嬭浇瀹屾垚锛"); + System.out.println("涓嬭浇瀹屾垚锛佽鍒锋柊椤圭洰鏍圭洰褰"); } } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java index 5c7c3bf6b5..12318aa441 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/Connection.java @@ -19,8 +19,10 @@ public interface Connection { * @param endPos * 缁撴潫浣嶇疆 * @return + * @throws IOException + * @throws ConnectionException */ - public byte[] read(int startPos, int endPos) throws IOException; + public byte[] read(int startPos, int endPos) throws IOException, ConnectionException; /** * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 @@ -28,6 +30,12 @@ public interface Connection { * @return */ public int getContentLength(); + + /** + * 鑾峰彇鏂囦欢鍚嶇О + * @return + */ + public String getFileName(); /** * 鍏抽棴杩炴帴 diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java index a3c794ef97..da1ff9c2d5 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionException.java @@ -13,24 +13,24 @@ public class ConnectionException extends Exception { private static final long serialVersionUID = -249834831447340792L; - private ConnectionException() { + public ConnectionException() { super(); } - private ConnectionException(String message, Throwable cause, boolean enableSuppression, + public ConnectionException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } - private ConnectionException(String message, Throwable cause) { + public ConnectionException(String message, Throwable cause) { super(message, cause); } - private ConnectionException(String message) { + public ConnectionException(String message) { super(message); } - private ConnectionException(Throwable cause) { + public ConnectionException(Throwable cause) { super(cause); } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java index 8d9eea4cc2..16ad03ca28 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/api/ConnectionManager.java @@ -2,7 +2,7 @@ /** * - * 绠$悊杩炴帴鎺ュ彛 + * 杩炴帴姹犳帴鍙 * * @author Administrator * @date 2017骞3鏈6鏃ヤ笅鍗7:02:30 @@ -15,6 +15,15 @@ public interface ConnectionManager { * * @param url * @return + * @throws ConnectionException */ - public Connection open(String url) throws ConnectionException; + Connection open(String url) throws ConnectionException; + + /** + * 鑾峰彇闀垮害 + * @param urlStr + * @return + * @throws ConnectionException + */ + int getContentLength(String urlStr) throws ConnectionException; } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java index 6b52b77f5d..befa4cf0e8 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionImpl.java @@ -1,8 +1,13 @@ package org.wsc.coderising.download.impl; +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; import org.wsc.coderising.download.api.Connection; +import org.wsc.coderising.download.api.ConnectionException; /** * @@ -14,22 +19,97 @@ * */ public class ConnectionImpl implements Connection { + + /** 榛樿缂撳啿澶у皬 */ + private final static int DEFAULT_SIZE = 1024; - @Override - public byte[] read(int startPos, int endPos) throws IOException { + private HttpURLConnection conn; + + private InputStream is; + + private ByteArrayOutputStream bos; - return null; + @SuppressWarnings("static-access") + @Override + public byte[] read(int startPos, int endPos) throws IOException, ConnectionException { + // 璁剧疆璇诲彇鑼冨洿 + conn.setRequestProperty("Range", "bytes=" + startPos + "-" + endPos); + conn.setFollowRedirects(true);//鑷姩鎵ц閲嶅畾鍚 + conn.setConnectTimeout(30000);//绛夊緟鍝嶅簲鏃堕棿 + checkStatus(); + byte[] buf = new byte[Math.min(getContentLength(), DEFAULT_SIZE)]; + is = new BufferedInputStream(conn.getInputStream()); + bos = new ByteArrayOutputStream(); + int lenth;//瀹為檯璇诲彇闀垮害 + //璇诲彇 + while ((lenth = is.read(buf))!= -1) + bos.write(buf, 0, lenth); + return bos.toByteArray(); } @Override public int getContentLength() { - - return 0; + return conn.getContentLength(); } @Override public void close() { + if (bos != null) + try { + bos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + if (is != null) + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + if(conn != null) + conn.disconnect(); + } + + @Override + public String getFileName() { + String fileName = null; + String field = conn.getHeaderField("Content-Disposition"); + if(field == null ){ + String urlStr = conn.getURL().toString(); + fileName = urlStr.substring(urlStr.lastIndexOf("/")+1); + }else{ + fileName=field.substring(field.indexOf("filename")+10, field.length()-1); + } + System.out.println(fileName); + return fileName; + } + + /** + * 妫鏌ヨ繛鎺ョ姸鎬 + * @throws ConnectionException + */ + private void checkStatus() throws ConnectionException { + try { + int responseCode = conn.getResponseCode(); + if (responseCode != HttpURLConnection.HTTP_OK && responseCode != HttpURLConnection.HTTP_PARTIAL) { + throw new ConnectionException("server response code: " + responseCode); + } + } catch (IOException e) { + throw new ConnectionException(e); + } + } + public HttpURLConnection getConn() { + return conn; } + public void setConn(HttpURLConnection conn) { + this.conn = conn; + } + + public ConnectionImpl(HttpURLConnection conn) { + super(); + this.conn = conn; + } + } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java index cf516fa0e7..35be908776 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coderising/download/impl/ConnectionManagerImpl.java @@ -1,23 +1,70 @@ package org.wsc.coderising.download.impl; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + import org.wsc.coderising.download.api.Connection; import org.wsc.coderising.download.api.ConnectionException; import org.wsc.coderising.download.api.ConnectionManager; /** - * 杩炴帴绠$悊绫 - * + * 杩炴帴姹犵被 + * * @author Administrator * @date 2017骞3鏈6鏃ヤ笅鍗7:11:50 * @version v1.0 * */ public class ConnectionManagerImpl implements ConnectionManager { - + @Override - public Connection open(String url) throws ConnectionException { - - return null; + public Connection open(String _url) throws ConnectionException { + HttpURLConnection connection = getConnection(_url); + return new ConnectionImpl(connection); + } + + @Override + public int getContentLength(String _url) throws ConnectionException { + HttpURLConnection connection = getConnection(_url); + int length = 0; + try { + checkStatus(connection); + length = connection.getContentLength(); + } catch (IOException e) { + new ConnectionException(e); + }finally { + connection.disconnect(); + } + return length; + } + + private HttpURLConnection getConnection(String _url) throws ConnectionException{ + URL url = null; + HttpURLConnection connection = null; + try { + url = new URL(_url); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + return connection; + } catch (IOException e) { + new ConnectionException(e); + } + return null; + } + + /** + * 妫鏌ヨ繛鎺ョ姸鎬 + * @param connection + * @throws IOException + * @throws ConnectionException + */ + private void checkStatus(HttpURLConnection connection) throws IOException, ConnectionException { + int responseCode = connection.getResponseCode(); + System.out.println("server response code: " + responseCode); + if (responseCode != HttpURLConnection.HTTP_OK && responseCode != HttpURLConnection.HTTP_PARTIAL) { + throw new ConnectionException("server response code: " + responseCode); + } } } diff --git a/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java index 761b3aac59..f12160e752 100644 --- a/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java +++ b/group20/592146505/592146505Learning/src/org/wsc/coding/basic/list/ArrayList.java @@ -4,8 +4,6 @@ import java.util.ConcurrentModificationException; import java.util.NoSuchElementException; -import javafx.stage.StageStyle; - /** * ArrayList绫 * From 1cbbe6e2e3b424acbb4226e9df8b487a0ced6f8f Mon Sep 17 00:00:00 2001 From: "kaitao.li" Date: Sun, 12 Mar 2017 19:33:49 +0800 Subject: [PATCH 371/646] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../week3/download/DownloadThread.java | 27 +++++- .../week3/download/FileDownloader.java | 52 +++++++--- .../download/api/ConnectionException.java | 4 + .../week3/download/impl/ConnectionImpl.java | 20 +++- .../download/impl/ConnectionManagerImpl.java | 14 ++- .../java/com/coding2017/util/URLUtil.java | 22 +++++ .../week3/download/FileDownloaderTest.java | 95 +++++++++---------- 7 files changed, 164 insertions(+), 70 deletions(-) create mode 100644 group01/280646174/basic/src/test/java/com/coding2017/util/URLUtil.java diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java index e1118c862d..c66f902171 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/DownloadThread.java @@ -1,21 +1,44 @@ package com.coding2017.week3.download; import com.coding2017.week3.download.api.Connection; +import com.coding2017.week3.download.api.DownloadListener; + +import java.io.IOException; +import java.io.RandomAccessFile; public class DownloadThread extends Thread { + private static final String READ_WRITE_MODE = "rw"; + private Connection conn; private int startPos; private int endPos; + private String fileName; + private DownloadListener listener; - public DownloadThread(Connection conn, int startPos, int endPos) { + public DownloadThread(Connection conn, int startPos, int endPos, String fileName, DownloadListener listener) { this.conn = conn; this.startPos = startPos; this.endPos = endPos; + this.fileName = fileName; + this.listener = listener; } @Override public void run() { - + try { + System.out.println("寮濮嬩笅杞: " + startPos + "鍒" + endPos); + byte[] read = conn.read(startPos, endPos); + RandomAccessFile randomAccessFile = new RandomAccessFile(fileName, READ_WRITE_MODE); + randomAccessFile.seek(startPos); + randomAccessFile.write(read); + listener.notifyFinished(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (conn != null) { + conn.close(); + } + } } } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java index 5e8c6bec52..3aca2e3765 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/FileDownloader.java @@ -1,5 +1,10 @@ package com.coding2017.week3.download; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + import com.coding2017.week3.download.api.Connection; import com.coding2017.week3.download.api.ConnectionException; import com.coding2017.week3.download.api.ConnectionManager; @@ -9,13 +14,18 @@ public class FileDownloader { private String url; + private String outFilePath; + private DownloadListener listener; private ConnectionManager cm; - public FileDownloader(String _url) { - this.url = _url; + private int threadCount; + public FileDownloader(String _url, String outFilePath, int threadCount) { + this.url = _url; + this.outFilePath = outFilePath; + this.threadCount = threadCount; } public void execute() { @@ -31,24 +41,40 @@ public void execute() { // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 - Connection conn = null; try { + int contentLength = getUrlContentLength(url); + FileOutputStream fileOutputStream = new FileOutputStream(outFilePath); + fileOutputStream.write(new byte[contentLength]); + fileOutputStream.flush(); + fileOutputStream.close(); + + for (int i = 0; i < threadCount; i++) { + downloadPart(i, contentLength); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + private void downloadPart(int part, int length) { + Connection conn; + try { conn = cm.open(this.url); - - int length = conn.getContentLength(); - - new DownloadThread(conn, 0, length - 1).start(); - + int startPos = part * length / threadCount; + int endPos = Math.min(length - 1, (part + 1) * length / threadCount); + System.out.println("鏂囦欢鎬婚暱搴: " + length); + new DownloadThread(conn, startPos, endPos, outFilePath, listener).start(); } catch (ConnectionException e) { e.printStackTrace(); - } finally { - if (conn != null) { - conn.close(); - } } + } + private int getUrlContentLength(String url) throws IOException { + URL connUrl = new URL(url); + HttpURLConnection urlConnection = (HttpURLConnection) connUrl.openConnection(); + int length = urlConnection.getContentLength(); + urlConnection.disconnect(); + return length; } public void setListener(DownloadListener listener) { diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java index 24605a473c..ab7567f2e6 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/api/ConnectionException.java @@ -2,4 +2,8 @@ public class ConnectionException extends Exception { + public ConnectionException(Exception e) { + super(e); + } + } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java index 43687a11ea..afdcd41f99 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionImpl.java @@ -3,24 +3,34 @@ import com.coding2017.week3.download.api.Connection; import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URLConnection; public class ConnectionImpl implements Connection { + private HttpURLConnection urlConnection; + + public ConnectionImpl(HttpURLConnection urlConnection) { + this.urlConnection = urlConnection; + } + @Override public byte[] read(int startPos, int endPos) throws IOException { - - return null; + byte[] content = new byte[endPos + 1 - startPos]; + urlConnection.setRequestProperty("Range", "bytes=" + startPos + "-" + (endPos + 1)); + urlConnection.getInputStream().read(content); + return content; } @Override public int getContentLength() { - - return 0; + return urlConnection.getContentLength(); } @Override public void close() { - + urlConnection.disconnect(); + urlConnection = null; } } diff --git a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java index 38dead89ff..d7a349e478 100644 --- a/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java +++ b/group01/280646174/basic/src/main/java/com/coding2017/week3/download/impl/ConnectionManagerImpl.java @@ -4,10 +4,22 @@ import com.coding2017.week3.download.api.ConnectionException; import com.coding2017.week3.download.api.ConnectionManager; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + public class ConnectionManagerImpl implements ConnectionManager { @Override public Connection open(String url) throws ConnectionException { - return null; + try { + URL connUrl = new URL(url); + URLConnection urlConnection = connUrl.openConnection(); + return new ConnectionImpl((HttpURLConnection) urlConnection); + } catch (Exception e) { + throw new ConnectionException(e); + } } } diff --git a/group01/280646174/basic/src/test/java/com/coding2017/util/URLUtil.java b/group01/280646174/basic/src/test/java/com/coding2017/util/URLUtil.java new file mode 100644 index 0000000000..9929bf42ae --- /dev/null +++ b/group01/280646174/basic/src/test/java/com/coding2017/util/URLUtil.java @@ -0,0 +1,22 @@ +package com.coding2017.util; + +import com.google.common.base.Strings; + +/** + * Created by kaitao.li on 2017/3/12. + */ +public class URLUtil { + + public static String getFileNameFromURL(String url) { + if (Strings.isNullOrEmpty(url)) { + return ""; + } + + int index = url.lastIndexOf('/'); + if (index == -1) { + return ""; + } + + return url.substring(index + 1); + } +} diff --git a/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java b/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java index aa55278a60..78c6179de9 100644 --- a/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java +++ b/group01/280646174/basic/src/test/java/com/coding2017/week3/download/FileDownloaderTest.java @@ -1,58 +1,55 @@ package com.coding2017.week3.download; -import com.coding2017.week3.download.api.ConnectionManager; -import com.coding2017.week3.download.api.DownloadListener; -import com.coding2017.week3.download.impl.ConnectionManagerImpl; +import java.util.concurrent.CountDownLatch; + import org.junit.After; import org.junit.Before; import org.junit.Test; +import com.coding2017.util.URLUtil; +import com.coding2017.week3.download.api.ConnectionManager; +import com.coding2017.week3.download.api.DownloadListener; +import com.coding2017.week3.download.impl.ConnectionManagerImpl; + public class FileDownloaderTest { - boolean downloadFinished = false; - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testDownload() { - - String url = "http://localhost:8080/test.jpg"; - - FileDownloader downloader = new FileDownloader(url); - - - ConnectionManager cm = new ConnectionManagerImpl(); - downloader.setConnectionManager(cm); - - downloader.setListener(new DownloadListener() { - @Override - public void notifyFinished() { - downloadFinished = true; - } - - }); - - - downloader.execute(); - - // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 - while (!downloadFinished) { - try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 - Thread.sleep(5000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - System.out.println("涓嬭浇瀹屾垚锛"); - - - - } + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + int threadCount = 1; + String url = "http://d.hiphotos.baidu.com/zhidao/wh%3D600%2C800/sign=44efbe491e30e924cff194377c38423e/dcc451da81cb39dbf51ac417d1160924aa18309c.jpg"; + String downloadPath = "/tmp/"; + CountDownLatch countDownLatch = new CountDownLatch(threadCount); + String outFilePath = downloadPath + URLUtil.getFileNameFromURL(url); + + FileDownloader downloader = new FileDownloader(url, outFilePath, threadCount); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + countDownLatch.countDown(); + } + + }); + + downloader.execute(); + + try { + countDownLatch.await(); + System.out.println("涓嬭浇瀹屾垚锛"); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } From 104bd9b3dc35590ec0bb7110ccd926e113f3944d Mon Sep 17 00:00:00 2001 From: likeleaf <893022254@qq.com> Date: Sun, 12 Mar 2017 19:39:57 +0800 Subject: [PATCH 372/646] first commit --- group24/893022254/task1-list/.gitignore | 5 + .../src/com/oneflyingleaf/util/ArrayList.java | 106 +++++ .../oneflyingleaf/util/BinaryTreeNode.java | 57 +++ .../src/com/oneflyingleaf/util/Iterator.java | 7 + .../com/oneflyingleaf/util/LinkedList.java | 380 ++++++++++++++++++ .../src/com/oneflyingleaf/util/List.java | 9 + .../src/com/oneflyingleaf/util/Queue.java | 26 ++ .../src/com/oneflyingleaf/util/Stack.java | 23 ++ .../src/com/oneflyingleaf/util/TestClass.java | 115 ++++++ 9 files changed, 728 insertions(+) create mode 100644 group24/893022254/task1-list/.gitignore create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/ArrayList.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/BinaryTreeNode.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/Iterator.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/LinkedList.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/List.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/Queue.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/Stack.java create mode 100644 group24/893022254/task1-list/src/com/oneflyingleaf/util/TestClass.java diff --git a/group24/893022254/task1-list/.gitignore b/group24/893022254/task1-list/.gitignore new file mode 100644 index 0000000000..166a44c4db --- /dev/null +++ b/group24/893022254/task1-list/.gitignore @@ -0,0 +1,5 @@ +/.settings/ +/bin/ +.classpath +.project + diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/ArrayList.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/ArrayList.java new file mode 100644 index 0000000000..b584ffb99b --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/ArrayList.java @@ -0,0 +1,106 @@ +package com.oneflyingleaf.util; + +import java.util.Arrays; + +public class ArrayList implements List { + + //闈炵嚎绋嬪畨鍏 + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + + checkLength(1); + + elementData[ size ++] = o; + } + + + public void add(int index, Object o){ + checkBound(index); + + if(index != size){ + checkLength(1); + } + + int temp = index; + + //index == size 涓嶇Щ鍔紝鐩存帴鏀 + while(index < size){ + elementData[ ++ index ] = elementData[index]; + } + + size ++ ; + elementData[temp] = o; + } + + public Object get(int index){ + checkBound(index); + + return elementData [index]; + } + + public Object remove(int index){ + checkBound(index); + + Object ret = elementData[index]; + while(index < size){ + elementData[index] = elementData[ ++ index]; + } + + -- size ; + + return ret; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return new ArrayListIterator(); + } + + /** + * 鍒ゆ柇鎵╁ + * @param length + */ + private void checkLength(int length){ + if( (size + length) > elementData.length){ + //榛樿鎵╁ぇ涓鍊 + Arrays.copyOf(elementData, elementData.length << 1); + } + } + + /** + * 鏍¢獙鏄惁瓒呭嚭 + * @param index + */ + private void checkBound(int index){ + if(index < 0 || index > size){ + throw new IndexOutOfBoundsException("size : " + size +" , index : " + index); + } + } + + + private class ArrayListIterator implements Iterator{ + + private int count = -1; + + private ArrayListIterator(){ + } + + @Override + public boolean hasNext() { + return (count+1) < size?true:false; + } + + @Override + public Object next() { + count ++ ; + return elementData[count]; + } + + } +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/BinaryTreeNode.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/BinaryTreeNode.java new file mode 100644 index 0000000000..4b1a92b1fb --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/BinaryTreeNode.java @@ -0,0 +1,57 @@ +package com.oneflyingleaf.util; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + if(! (o instanceof Comparable)){ + throw new RuntimeException("鏈疄鐜癈omparable鎺ュ彛"); + } + Comparable temp = (Comparable)o; + + if(temp.compareTo(data) > 0){ + if(right == null){ + right= new BinaryTreeNode(); + right.data = o; + }else{ + right.insert(o); + } + } + + if(temp.compareTo(data) <= 0){ + if(left == null){ + + left = new BinaryTreeNode(); + left.data = o; + }else{ + left.insert(o); + } + } + + + return this; + } + +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/Iterator.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Iterator.java new file mode 100644 index 0000000000..984a561ab9 --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Iterator.java @@ -0,0 +1,7 @@ +package com.oneflyingleaf.util; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/LinkedList.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/LinkedList.java new file mode 100644 index 0000000000..06c5643f53 --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/LinkedList.java @@ -0,0 +1,380 @@ +package com.oneflyingleaf.util; + + + +public class LinkedList implements List { + + private Node head; + + //铏氭嫙tail鑺傜偣,鏂逛究add鏈鍚庤妭鐐癸紝鍑忓皯鎴,tail涓洪摼琛ㄧ殑鏈鍚庝竴涓厓绱 + private Node tail; + + private int size ; + + public void add(Object o){ + size ++ ; + + if(head == null){ + head = new Node(); + + head.data = o; + + tail = head; + + return ; + } + + Node node = tail; + tail = new Node(); + + node.next = tail; + tail.data = o; + + } + public void add(int index , Object o){ + checkBound(index,true); + if(index == 0){ + addFirst(o); + return ; + } + + if(index == (size - 1)){ + add(o); + return ; + } + + size ++; + Node node = head; + while(index-- > 0){ + node = node.next; + } + + Node temp = new Node(); + temp.data = o; + temp.next = node.next; + + node.next = temp; + + } + public Object get(int index){ + checkBound(index,false); + + Node node = head; + + while(index > 0){ + index -- ; + node = node.next; + } + + return node.data; + } + + public Object remove(int index){ + checkBound(index,false); + + if(index == 0){ + removeFirst(); + } + if(index == (size-1)){ + removeLast(); + } + + size --; + + Node node = head; + while(--index > 0){ + node = node.next; + } + Object o = node.next.data; + node.next = node.next.next; + + return o; + } + + public int size(){ + return size ; + } + + public void addFirst(Object o){ + size ++ ; + + Node node = new Node(); + node.data = o; + node.next = head; + head = node; + } + public void addLast(Object o){ + add(o); + } + + + public Object removeFirst(){ + checkBound(0,true); + + if(size == 0){ + //澶勭悊tail鑺傜偣锛岄槻姝㈠崰鐢ㄥ紩鐢ㄨ祫婧愬洖鏀朵笉浜 + tail.data = null; + } + size -- ; + + Object o = head.data; + + head = head.next; + + return o; + } + + public Object removeLast(){ + if(size == 0){ + //鐩存帴绉婚櫎棣栬妭鐐癸紝鍒欐棤闇澶勭悊灏捐妭鐐 + removeFirst(); + } + size -- ; + + Object o = tail.data; + + tail = null; + + Node temp = head ; + while(temp != null){ + temp = temp.next; + } + + tail = temp; + return o; + + } + public Iterator iterator(){ + return new LinkedListIterator(); + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Node node = head.next; + Node pre = head; + + Node next; + while(node.next != null){ + next = node.next; + + node.next = pre; + + pre = node; + node = next; + } + //澶勭悊灏惧厓绱 + node.next = pre; + + next = tail; + tail = head; + head = next; + + tail.next = null; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + int size = this.size / 2; + + for(int i = 0;i < size ; i++){ + removeFirst(); + } + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + for(int j = i;length > 0; length -- ,j++ ){ + remove(j); + } + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public Object[] getElements(LinkedList list){ + Object [] ret = new Object[list.size]; + + for(int i = 0 ;i < list.size;i++){ + ret[i] = get((int) list.get(i)); + } + return ret; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * @param list + */ + + public void subtract(LinkedList list){ + int size = this.size > list.size()?this.size : list.size(); + + int temp = 0; + for(int i = 0;i < size ;i++){ + if(temp == size || i == list.size){ + return ; + } + + + if((int)list.get(i) > (int)get(temp)){ + temp ++; + }else if((int)list.get(i) < (int)get(temp)){ + continue; + }else{ + remove(temp); + } + + } + + + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + if(size == 0){ + return ; + } + + Object o = get(0); + + for(int i = 0;i < (size - 1) ;i++){ + if(o.equals(get(i + 1))){ + remove(i + 1); + i--; + } + o = get(i); + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + if(size == 0 || max < (int)get(0) || min > (int)get(size - 1)){ + return ; + } + int minIndex = getIndex(min,0,size); + int maxIndex = getIndex(max,0,size); + + remove(minIndex,maxIndex - minIndex ); + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + LinkedList ret = new LinkedList(); + + int temp = 0; + for(int i = 0;i < size ;i++){ + if(temp == size || i == list.size){ + return ret ; + } + + + if((int)list.get(i) > (int)get(temp)){ + temp ++; + }else if((int)list.get(i) < (int)get(temp)){ + continue; + }else{ + ret.add(list.get(i)); + } + + } + return ret ; + } + + + private class LinkedListIterator implements Iterator{ + Node node = null; + @Override + public boolean hasNext() { + if(node == null){ + return head != null; + } + return node.next != null; + } + + @Override + public Object next() { + if(node == null){ + node = head; + }else{ + node = node.next; + } + return node.data; + } + + } + + /** + * 鏁扮粍瓒婄晫鎻愮ず + * @param index 鏁扮粍涓嬫爣 + * @param contailLast + */ + private void checkBound(int index , boolean containLast){ + if(containLast && index == (size + 1) ){ + return ; + } + + if(index < 0 || index >= size){ + throw new IndexOutOfBoundsException("idnex:" + index +", size:" + size); + } + } + + /** + * 鑾峰彇涓嶅ぇ浜巚al鐨勪笅鏍 + * @return + */ + private int getIndex(int val,int min ,int max){ + int mid = (0 + size)/2 ; + if(max <= min){ + return min; + } + if(val > (int)get(mid)){ + mid = (mid + 1 + max) /2 ; + return getIndex(val,mid,max); + }else if(val < (int)get(mid)){ + mid = (mid + min -1) /2; + return getIndex(val,min,mid); + }else{ + return mid; + } + + + + + } +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/List.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/List.java new file mode 100644 index 0000000000..a9fc12cfd4 --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/List.java @@ -0,0 +1,9 @@ +package com.oneflyingleaf.util; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/Queue.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Queue.java new file mode 100644 index 0000000000..0f26cfadcf --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Queue.java @@ -0,0 +1,26 @@ +package com.oneflyingleaf.util; + +public class Queue { + + private LinkedList list; + + + public void enQueue(Object o){ + if(list == null){ + list = new LinkedList(); + } + list.add(o); + } + + public Object deQueue(){ + return list.removeFirst(); + } + + public boolean isEmpty(){ + return list == null || list.size() == 0; + } + + public int size(){ + return list.size(); + } +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/Stack.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Stack.java new file mode 100644 index 0000000000..b90e8c44f9 --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/Stack.java @@ -0,0 +1,23 @@ +package com.oneflyingleaf.util; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size() - 1); + } + + public Object peek(){ + return elementData.get(elementData.size() - 1); + } + public boolean isEmpty(){ + return elementData.size() > 0; + } + public int size(){ + return elementData.size(); + } +} diff --git a/group24/893022254/task1-list/src/com/oneflyingleaf/util/TestClass.java b/group24/893022254/task1-list/src/com/oneflyingleaf/util/TestClass.java new file mode 100644 index 0000000000..d9056f25ba --- /dev/null +++ b/group24/893022254/task1-list/src/com/oneflyingleaf/util/TestClass.java @@ -0,0 +1,115 @@ +package com.oneflyingleaf.util; + +import org.junit.Assert; +import org.junit.Test; + +public class TestClass { + + @Test + public void testArrayList(){ + ArrayList list = new ArrayList(); + + list.add("1A"); + list.add("2B"); + list.add("3B"); + + list.add(3, "4D"); + + list.remove(3); + Assert.assertEquals(3, list.size()); + list.remove(0); + Assert.assertEquals(2, list.size()); + Iterator iterator = list.iterator(); + + String []str = {"2B","3B"}; + int i = 0; + + while(iterator.hasNext()){ + Assert.assertEquals(str[i++], (String)iterator.next()); + } + + } + + @Test + public void testLinkedList(){ + LinkedList list = new LinkedList(); + String []str = {"1A","2B","3C","4D","5E","6F"}; + + for(String s : str){ + list.add(s); + } + + for(int i = 0; i Date: Sun, 12 Mar 2017 19:44:14 +0800 Subject: [PATCH 373/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../johnChnia/coding2017/basic/ArrayList.java | 167 +++++++++++++ .../coding2017/basic/LinkedList.java | 231 ++++++++++++++++++ .../com/johnChnia/coding2017/basic/Queue.java | 83 +++++++ .../com/johnChnia/coding2017/basic/Stack.java | 79 ++++++ .../coding2017/basic/test/ArrayListTest.java | 61 +++++ .../coding2017/basic/test/LinkedListTest.java | 92 +++++++ .../coding2017/basic/test/QueueTest.java | 56 +++++ .../coding2017/basic/test/StackTest.java | 69 ++++++ 8 files changed, 838 insertions(+) create mode 100644 group24/315863321/src/main/java/com/johnChnia/coding2017/basic/ArrayList.java create mode 100644 group24/315863321/src/main/java/com/johnChnia/coding2017/basic/LinkedList.java create mode 100644 group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Queue.java create mode 100644 group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Stack.java create mode 100644 group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/ArrayListTest.java create mode 100644 group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/LinkedListTest.java create mode 100644 group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/QueueTest.java create mode 100644 group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/StackTest.java diff --git a/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/ArrayList.java b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..4881c6518c --- /dev/null +++ b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/ArrayList.java @@ -0,0 +1,167 @@ +package com.johnChnia.coding2017.basic; + +import java.util.Arrays; + +/** + * Created by john on 2017/3/8. + * @// TODO: 2017/3/15 鏀寔娉涘瀷 + */ + +public class ArrayList { + private int[] elementData; + private int size = 0; + + /** + * Constructs an list with the specified initial capacity. + * + * @param initialCapacity + * @throws IllegalArgumentException if the specified initial capacity + * is negative or zero + */ + public ArrayList(int initialCapacity) { + if (initialCapacity > 0) { + elementData = new int[initialCapacity]; + } else { + throw new IllegalArgumentException("Illegal Capacity: " + + initialCapacity); + } + } + + /** + * Returns the element at the specified position in this list. + * + * @param index index of the element to return + * @return the element at the specified position in this list + * @throws IndexOutOfBoundsException {@inheritDoc} + */ + public int get(int index) { + rangeCheck(index); + rangeCheckForAdd(index); + return elementData[index]; + } + + + /** + * Appends the specified element to the end of this list. + * + * @param element element to be appended to this list + */ + public void add(int element) { + ensureCapacityInternal(size + 1); + elementData[size++] = element; + } + + + /** + * Inserts the specified element at the specified position in this + * list. Shifts the element currently at that position (if any) and + * any subsequent elements to the right (adds one to their indices). + * + * @param element element to be inserted + * @param index index at which the specified element is to be inserted + * @throws IndexOutOfBoundsException {@inheritDoc} + */ + public void add(int element, int index) { + rangeCheckForAdd(index); + ensureCapacityInternal(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, + size - index); + elementData[index] = element; + size++; + } + + /** + * Removes the element at the specified position in this list. + * Shifts any subsequent elements to the left (subtracts one from their + * indices). + * + * @param index the index of the element to be removed + * @return the element that was removed from the list + * @throws IndexOutOfBoundsException {@inheritDoc} + */ + public int remove(int index) { + rangeCheckForAdd(index); + int oldValue = elementData[index]; + int numMoved = size() - index - 1; + if (numMoved > 0) { + System.arraycopy(elementData, index + 1, elementData, index, + numMoved); + } + elementData[--size] = 0; // let jc to clear + return oldValue; + } + + /** + * Returns true if this list contains no elements. + * + * @return true if this list contains no elements + */ + public boolean empty() { + return size == 0; + } + + /** + * Returns the number of elements in this list. + * + * @return the number of elements in this list + */ + public int size() { + return size; + } + + + /** + * Increases the capacity to ensure that it can hold at least the + * number of elements specified by the double length of list. + */ + private void grow() { + elementData = Arrays.copyOf(elementData, 2 * elementData.length); + } + + public String toString() { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append("["); + for (int index = 0; index < size(); index++) { + stringBuilder.append(elementData[index]); + stringBuilder.append(", "); + } + stringBuilder.append("]"); + return stringBuilder.toString(); + } + + private void ensureCapacityInternal(int minCapacity) { + if (minCapacity - elementData.length > 0) + grow(); + } + + /** + * A version of rangeCheck used by add and addAll. + */ + private void rangeCheckForAdd(int index) { + if (index > elementData.length - 1 || index < 0) { + throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); + } + } + + /** + * Constructs an IndexOutOfBoundsException detail message. + * Of the many possible refactorings of the error handling code, + * this "outlining" performs best with both server and client VMs. + */ + private String outOfBoundsMsg(int index) { + return "Index: " + index + ", Size: " + elementData.length; + } + + /** + * Checks if the given index is in range. If not, throws an appropriate + * runtime exception. This method does *not* check if the index is + * negative: It is always used immediately prior to an array access, + * which throws an ArrayIndexOutOfBoundsException if index is negative. + */ + private void rangeCheck(int index) { + if (index >= size) { + throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); + } + } + +} diff --git a/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/LinkedList.java b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..f2825659b9 --- /dev/null +++ b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/LinkedList.java @@ -0,0 +1,231 @@ +package com.johnChnia.coding2017.basic; + +import java.util.NoSuchElementException; + +/** + * Created by john on 2017/3/9. + * + * @// TODO: 2017/3/15 鏀寔娉涘瀷 + */ + +public class LinkedList { + + private Node first = null; + private int size = 0; + + /** + * Constructs an empty list. + */ + public LinkedList() { + + } + + private static class Node { + int element; + Node next; + Node prev; + } + + /** + * Appends the specified element to the end of this list. + * + * @param element element to be appended to this list + */ + public void add(int element) { + Node newNode = new Node(); + if (first == null) { + addWhenListIsEmpty(newNode, element); + return; + } + Node last = first; + while (last.next != null) + last = last.next; + last.next = newNode; + newNode.prev = last; + newNode.next = null; + newNode.element = element; + size++; + } + + private void addWhenListIsEmpty(Node newNode, int element) { + first = newNode; + first.element = element; + first.next = null; + first.prev = null; + size++; + } + + /** + * Inserts the specified element at the beginning of this list. + * + * @param element the element to add + */ + public void addFirst(int element) { + Node newNode = new Node(); + if (first == null) { + addWhenListIsEmpty(newNode, element); + return; + } + newNode.next = first; + newNode.prev = null; + newNode.element = element; + + first.prev = newNode; + first = newNode; + size++; + } + + + /** + * Inserts the specified element at the specified position in this list. + * Shifts the element currently at that position (if any) and any + * subsequent elements to the right (adds one to their indices). + * + * @param index index at which the specified element is to be inserted. + * @param element element to be inserted. + * @throws RuntimeException if list size less than 2. + */ + public void add(int index, int element) { + if (size() < 2) + throw new RuntimeException("list size should greater than or equal to 2"); + isElementIndex(index); + if (index == 0) { + addFirst(element); + return; + } else { + Node temp = new Node(); + Node temp2 = first; + for (int i = 0; i < index; i++) { + temp2 = temp2.next; + } + temp2.prev.next = temp; + temp.prev = temp2.prev; + + temp.next = temp2; + temp2.prev = temp; + temp.element = element; + } + size++; + + } + + + /** + * remove last element in the list. + * + * @throws RuntimeException if the list is empty. + */ + public void remove() { + if (size == 0) + throw new RuntimeException("linkList size should greater than or equal to 1"); + Node next = first.next; + if (next == null) { + first = null; + } else { + Node last = first; + while (last.next != null) + last = last.next; + last.prev.next = null; + last = null; // help GC + } + size--; + } + + + /** + * Removes and returns the first element from this list. + * + * @return the first element from this list + */ + public int removeFirst() { + Node f = first; + if (f == null) + throw new NoSuchElementException(); + int element = f.element; + Node next = first.next; + first.element = 0; + first.next = null; // help GC + + first = next; + if (next != null) { + next.prev = null; + } + size--; + return element; + } + + /** + * Returns the element at the specified position in this list. + * + * @param index index of the element to return + * @return the element at the specified position in this list + */ + public int get(int index) { + checkElementIndex(index); + Node node = first; + if (index == 0) { + return first.element; + } + for (int i = 0; i < index; i++) { + node = node.next; + } + return node.element; + } + + /** + * Returns the first element in this list. + * + * @return the first element in this list + * @throws NoSuchElementException if this list is empty + */ + public int getFirst() { + final Node f = first; + if (f == null) + throw new NoSuchElementException(); + return f.element; + } + + /** + * Returns the number of elements in this list. + * + * @return the number of elements in this list + */ + public int size() { + return size; + } + + private void checkElementIndex(int index) { + if (!isElementIndex(index)) { + throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); + } + } + + + /** + * Tells if the argument is the index of an existing element. + */ + private boolean isElementIndex(int index) { + return index >= 0 && index < size; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(first.element); + Node temp = first; + while (temp.next != null) { + temp = temp.next; + sb.append("鈫"); + sb.append(temp.element); + } + return sb.toString(); + } + + /** + * Constructs an IndexOutOfBoundsException detail message. + * Of the many possible refactorings of the error handling code, + * this "outlining" performs best with both server and client VMs. + */ + private String outOfBoundsMsg(int index) { + return "Index: " + index + ", Size: " + size; + } +} diff --git a/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Queue.java b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Queue.java new file mode 100644 index 0000000000..4fd2558ea3 --- /dev/null +++ b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Queue.java @@ -0,0 +1,83 @@ +package com.johnChnia.coding2017.basic; + +import java.util.NoSuchElementException; + +/** + * Created by john on 2017/3/10. + * @// TODO: 2017/3/15 鏀寔娉涘瀷 + */ +public class Queue { + + private ArrayList arrayList; + + /** + * Constructs an queue using 10 capacity of ArrayList. + */ + public Queue() { + arrayList = new ArrayList(10); + } + + + /** + * Inserts the specified element into this queue.returning + * {@code true} upon success. + * if no space is currently available. + * + * @param element the element to add + * @return {@code true} + */ + public boolean add(int element) { + arrayList.add(element); + return true; + } + + /** + * Retrieves and removes the head of this queue,throws an exception + * if this queue is empty. + * + * @return the head of this queue + * @throws NoSuchElementException if this queue is empty + */ + public int remove() { + if (arrayList.empty()) + throw new NoSuchElementException(emptyMsg()); + return arrayList.remove(0); + + } + + + /** + * Retrieves, but does not remove, the head of this queue, + * or returns {@code null} if this queue is empty. + * + * @return the head of this queue, or {@code 0} if this queue is empty + */ + public int peek() { + if (arrayList.empty()) + return 0; + return arrayList.get(0); + } + + + public String toString() { + return arrayList.toString(); + } + + /** + * Returns the number of elements in this queue. + * + * @return the number of elements in this queue. + */ + public int size() { + return arrayList.size(); + } + + /** + * Constructs an NoSuchElementException detail message. + * Of the many possible refactorings of the error handling code, + * this "outlining" performs best with both server and client VMs. + */ + private String emptyMsg() { + return "Size: " + size(); + } +} diff --git a/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Stack.java b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Stack.java new file mode 100644 index 0000000000..e11be853f9 --- /dev/null +++ b/group24/315863321/src/main/java/com/johnChnia/coding2017/basic/Stack.java @@ -0,0 +1,79 @@ +package com.johnChnia.coding2017.basic; + +import java.util.EmptyStackException; + +/** + * Created by john on 2017/3/10. + * @// TODO: 2017/3/15 鏀寔娉涘瀷 + */ +public class Stack { + private LinkedList linkList; + + /** + * Creates an empty Stack. + */ + public Stack() { + linkList = new LinkedList(); + } + + + /** + * Pushes an item onto the top of this stack. + * + * @param element the element to be pushed onto this stack. + */ + public void push(int element) { + linkList.addFirst(element); + } + + /** + * Removes the object at the top of this stack and returns that + * object as the value of this function. + * + * @return The object at the top of this stack. + * @throws EmptyStackException if this stack is empty. + */ + public int pop() { + if (empty()) { + throw new EmptyStackException(); + } + return linkList.removeFirst(); + } + + /** + * Looks at the object at the top of this stack without removing it + * from the stack. + * + * @return the object at the top of this stack. + * @throws EmptyStackException if this stack is empty. + */ + public int peek() { + if (empty()) { + throw new EmptyStackException(); + } + return linkList.getFirst(); + } + + /** + * Tests if this stack is empty. + * + * @return true if and only if this stack contains + * no elements; false otherwise. + */ + public boolean empty() { + return linkList.size() == 0; + } + + public String toString() { + return linkList.toString(); + } + + /** + * Returns the number of elements in this stack. + * + * @return the number of elements in this stack + */ + public int size() { + return linkList.size(); + } +} diff --git a/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/ArrayListTest.java b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/ArrayListTest.java new file mode 100644 index 0000000000..13c81724ad --- /dev/null +++ b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/ArrayListTest.java @@ -0,0 +1,61 @@ +package com.johnChnia.coding2017.basic.test; + +import com.johnChnia.coding2017.basic.ArrayList; +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.junit.MatcherAssert.assertThat; + +/** + * Created by john on 2017/3/8. + */ + +public class ArrayListTest { + private ArrayList arrayList1; + private ArrayList arrayList2; + private ArrayList arrayList3; + private ArrayList arrayList4; + + @Before + public void setUp() throws Exception { + arrayList1 = new ArrayList(3); + arrayList2 = new ArrayList(3); + arrayList3 = new ArrayList(3); + arrayList4 = new ArrayList(3); + } + + @Test + public void testAddAndGet() { + arrayList1.add(99); + assertThat(arrayList1.get(0), equalTo(99)); + } + + @Test + public void testGrow() { + for (int i = 0; i < 6; i++) { + arrayList2.add(10); + } + assertThat(arrayList2.size(), equalTo(6)); + } + + @Test + public void testAddElementByIndex() { + for (int i = 0; i < 3; i++) { + arrayList3.add(10); + } + arrayList3.add(1000, 1); + assertThat(arrayList3.get(1), equalTo(1000)); + } + + @Test + public void testRemoveElementByIndex() { + for (int i = 0; i < 6; i++) { + arrayList4.add(i); + } + int removed = arrayList4.remove(4); + System.out.println(arrayList4); + assertThat(removed, equalTo(4)); + assertThat(arrayList4.size(), equalTo(5)); + } +} diff --git a/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/LinkedListTest.java b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/LinkedListTest.java new file mode 100644 index 0000000000..bd8ad5ac4c --- /dev/null +++ b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/LinkedListTest.java @@ -0,0 +1,92 @@ +package com.johnChnia.coding2017.basic.test; + +import com.johnChnia.coding2017.basic.LinkedList; +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.junit.MatcherAssert.assertThat; + +/** + * Created by john on 2017/3/9. + */ +public class LinkedListTest { + + private LinkedList linkList1; + private LinkedList linkList2; + private LinkedList linkList3; + private LinkedList linkList4; + private LinkedList linkList5; + private LinkedList linkList6; + + @Before + public void setUp() throws Exception { + linkList1 = new LinkedList(); + linkList2 = new LinkedList(); + linkList3 = new LinkedList(); + linkList4 = new LinkedList(); + linkList5 = new LinkedList(); + linkList6 = new LinkedList(); + } + + @Test + public void testAddAndGet() { + for (int i = 0; i < 4; i++) { + linkList1.add(i); + } + assertThat(linkList1.get(0), equalTo(0)); + assertThat(linkList1.get(1), equalTo(1)); + assertThat(linkList1.get(2), equalTo(2)); + } + + @Test + public void testSize() { + for (int i = 0; i < 4; i++) { + linkList3.add(i); + } + assertThat(linkList3.size(), equalTo(4)); + } + + @Test + public void testAddFirst() { + for (int i = 0; i < 4; i++) { + linkList2.addFirst(i); + } + assertThat(linkList2.get(0), equalTo(3)); + assertThat(linkList2.get(1), equalTo(2)); + } + + @Test + public void testRemove() { + for (int i = 0; i < 2; i++) { + linkList4.addFirst(i); + } + linkList4.remove(); + linkList4.remove(); + assertThat(linkList4.size(), equalTo(0)); + } + + + @Test + public void testAddByIndex() { + for (int i = 0; i < 2; i++) { + linkList5.add(i); + } + linkList5.add(0, 100); + linkList5.add(1, 1000); + System.out.println(linkList5); + assertThat(linkList5.get(1), equalTo(1000)); + } + + @Test + public void testRemoveFirst() { + for (int i = 0; i < 4; i++) { + linkList6.addFirst(i); + } + linkList6.removeFirst(); + linkList6.removeFirst(); + linkList6.removeFirst(); + assertThat(linkList6.get(0), equalTo(0)); + } + +} \ No newline at end of file diff --git a/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/QueueTest.java b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/QueueTest.java new file mode 100644 index 0000000000..54cd7f9385 --- /dev/null +++ b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/QueueTest.java @@ -0,0 +1,56 @@ +package com.johnChnia.coding2017.basic.test; + +import com.johnChnia.coding2017.basic.Queue; +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.junit.MatcherAssert.assertThat; + +/** + * Created by john on 2017/3/11. + */ +public class QueueTest { + Queue queue1; + Queue queue2; + Queue queue3; + + @Before + public void setUp() throws Exception { + queue1 = new Queue(); + queue2 = new Queue(); + queue3 = new Queue(); + + } + + @Test + public void testAdd() throws Exception { + for (int i = 0; i < 3; i++) { + queue1.add(i); + } + System.out.println(queue1); + assertThat(queue1.peek(), equalTo(0)); + + } + + @Test + public void testRemove() throws Exception { + for (int i = 0; i < 3; i++) { + queue2.add(i); + } + assertThat(queue2.remove(), equalTo(0)); + assertThat(queue2.remove(), equalTo(1)); + assertThat(queue2.remove(), equalTo(2)); + assertThat(queue2.size(), equalTo(0)); + } + + @Test + public void testPeek() throws Exception { + for (int i = 0; i < 3; i++) { + queue3.add(i); + } + assertThat(queue3.peek(), equalTo(0)); + assertThat(queue3.size(), equalTo(3)); + } + +} \ No newline at end of file diff --git a/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/StackTest.java b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/StackTest.java new file mode 100644 index 0000000000..7fb4a35757 --- /dev/null +++ b/group24/315863321/src/test/java/com/johnChnia/coding2017/basic/test/StackTest.java @@ -0,0 +1,69 @@ +package com.johnChnia.coding2017.basic.test; + +import com.johnChnia.coding2017.basic.Stack; +import org.junit.Before; +import org.junit.Test; + +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.junit.MatcherAssert.assertThat; + +/** + * Created by john on 2017/3/10. + */ +public class StackTest { + Stack stack1; + Stack stack2; + Stack stack3; + Stack stack4; + + @Before + public void setUp() throws Exception { + stack1 = new Stack(); + stack2 = new Stack(); + stack3 = new Stack(); + stack4 = new Stack(); + } + + @Test + public void testPush() throws Exception { + for (int i = 0; i < 6; i++) { + stack1.push(i); + } + assertThat(stack1.peek(), equalTo(5)); + + } + + @Test + public void testPop() throws Exception { + for (int i = 0; i < 6; i++) { + stack2.push(i); + } + assertThat(stack2.pop(), equalTo(5)); + assertThat(stack2.size(), equalTo(5)); + + } + + @Test + public void testPeek() throws Exception { + for (int i = 0; i < 6; i++) { + stack3.push(i); + } + assertThat(stack3.peek(), equalTo(5)); + assertThat(stack3.size(), equalTo(6)); + + } + + @Test() + public void testEmpty() throws Exception { + for (int i = 0; i < 2; i++) { + stack4.push(i); + } + assertFalse(stack4.empty()); + stack4.pop(); + stack4.pop(); + assertTrue(stack4.empty()); + } + +} \ No newline at end of file From 6ed492e271bd201f279fe7c4a93bdc1890366792 Mon Sep 17 00:00:00 2001 From: aias_for_win10 Date: Sun, 12 Mar 2017 19:32:45 +0800 Subject: [PATCH 374/646] push homework --- group01/496740686/.gitignore | 1 + group01/496740686/build.gradle | 7 +- .../java/com/camile/_3/DownloadThread.java | 32 +++++++ .../java/com/camile/_3/FileDownloader.java | 88 ++++++++++++++++++ .../java/com/camile/_3/api/Connection.java | 23 +++++ .../camile/_3/api/ConnectionException.java | 15 +++ .../com/camile/_3/api/ConnectionManager.java | 10 ++ .../com/camile/_3/api/DownloadListener.java | 5 + .../com/camile/_3/impl/ConnectionImpl.java | 44 +++++++++ .../camile/_3/impl/ConnectionManagerImpl.java | 29 ++++++ group01/496740686/src/main/resources/test.jpg | Bin 0 -> 6195 bytes .../com/camile/_3/FileDownloaderTest.java | 54 +++++++++++ 12 files changed, 305 insertions(+), 3 deletions(-) create mode 100644 group01/496740686/.gitignore create mode 100644 group01/496740686/src/main/java/com/camile/_3/DownloadThread.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/FileDownloader.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/api/Connection.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/api/ConnectionException.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/api/ConnectionManager.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/api/DownloadListener.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/impl/ConnectionImpl.java create mode 100644 group01/496740686/src/main/java/com/camile/_3/impl/ConnectionManagerImpl.java create mode 100644 group01/496740686/src/main/resources/test.jpg create mode 100644 group01/496740686/src/test/java/com/camile/_3/FileDownloaderTest.java diff --git a/group01/496740686/.gitignore b/group01/496740686/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group01/496740686/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/group01/496740686/build.gradle b/group01/496740686/build.gradle index 864adec57e..a290a2017e 100644 --- a/group01/496740686/build.gradle +++ b/group01/496740686/build.gradle @@ -1,14 +1,15 @@ - +apply plugin: 'idea' apply plugin: 'java' apply plugin: 'maven' +apply plugin: 'eclipse' group = 'com' version = '0.0.1-SNAPSHOT' description = """camile""" -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 diff --git a/group01/496740686/src/main/java/com/camile/_3/DownloadThread.java b/group01/496740686/src/main/java/com/camile/_3/DownloadThread.java new file mode 100644 index 0000000000..71bce1776c --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/DownloadThread.java @@ -0,0 +1,32 @@ +package com.camile._3; + +import java.io.IOException; + +import com.camile._3.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + byte[] content; + + public DownloadThread(Connection conn, int startPos, int endPos) { + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + + public void run() { + try { + content = conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public byte[] getContent() { + return this.content; + } +} diff --git a/group01/496740686/src/main/java/com/camile/_3/FileDownloader.java b/group01/496740686/src/main/java/com/camile/_3/FileDownloader.java new file mode 100644 index 0000000000..dcb6ebafb6 --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/FileDownloader.java @@ -0,0 +1,88 @@ +package com.camile._3; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.camile._3.api.ConnectionManager; +import com.camile._3.api.DownloadListener; +import com.camile._3.api.Connection; + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute() { + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, + // endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 + // 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + Connection conn = (Connection) cm.open(this.url); + int length = ((Connection) conn).getContentLength(); + conn.close(); + List threads = new ArrayList<>(); + int i; + for (i = 0; i < 3; i++) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), (i + 1) * (length / 3) - 1); + threads.add(thread); + thread.start(); + } + if (i * (length / 3) < length) { + DownloadThread thread = new DownloadThread(cm.open(this.url), i * (length / 3), length - 1); + threads.add(thread); + thread.start(); + } + + try { + for (DownloadThread thread : threads) { + thread.join(); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + + try (FileOutputStream fos = new FileOutputStream(new File("download.jpg"))) { + for (DownloadThread thread : threads) { + fos.write(thread.getContent()); + } + } catch (IOException e) { + e.printStackTrace(); + } + + this.listener.notifyFinished(); + } + + public void setListener(DownloadListener listener) { + this.listener = listener; + } + + public void setConnectionManager(ConnectionManager ucm) { + this.cm = ucm; + } + + public DownloadListener getListener() { + return this.listener; + } + +} \ No newline at end of file diff --git a/group01/496740686/src/main/java/com/camile/_3/api/Connection.java b/group01/496740686/src/main/java/com/camile/_3/api/Connection.java new file mode 100644 index 0000000000..7568effcd7 --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/api/Connection.java @@ -0,0 +1,23 @@ +package com.camile._3.api; + +import java.io.IOException; + +public interface Connection { + /** + * 缁欏畾寮濮嬪拰缁撴潫浣嶇疆锛 璇诲彇鏁版嵁锛 杩斿洖鍊兼槸瀛楄妭鏁扮粍 + * @param startPos 寮濮嬩綅缃紝 浠0寮濮 + * @param endPos 缁撴潫浣嶇疆 + * @return + */ + public byte[] read(int startPos,int endPos) throws IOException; + /** + * 寰楀埌鏁版嵁鍐呭鐨勯暱搴 + * @return + */ + public int getContentLength(); + + /** + * 鍏抽棴杩炴帴 + */ + public void close(); +} diff --git a/group01/496740686/src/main/java/com/camile/_3/api/ConnectionException.java b/group01/496740686/src/main/java/com/camile/_3/api/ConnectionException.java new file mode 100644 index 0000000000..90d6b8fa7a --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/api/ConnectionException.java @@ -0,0 +1,15 @@ +package com.camile._3.api; + +public class ConnectionException extends RuntimeException { + public ConnectionException(String message) { + super(message); + } + + public ConnectionException(String message, Throwable cause) { + super(message, cause); + } + + public ConnectionException(Throwable cause) { + super(cause); + } +} diff --git a/group01/496740686/src/main/java/com/camile/_3/api/ConnectionManager.java b/group01/496740686/src/main/java/com/camile/_3/api/ConnectionManager.java new file mode 100644 index 0000000000..9d98284bca --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/api/ConnectionManager.java @@ -0,0 +1,10 @@ +package com.camile._3.api; + +public interface ConnectionManager { + /** + * 缁欏畾涓涓猽rl , 鎵撳紑涓涓繛鎺 + * @param url + * @return + */ + public Connection open(String url) throws ConnectionException; +} diff --git a/group01/496740686/src/main/java/com/camile/_3/api/DownloadListener.java b/group01/496740686/src/main/java/com/camile/_3/api/DownloadListener.java new file mode 100644 index 0000000000..51e1a2cfd3 --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/api/DownloadListener.java @@ -0,0 +1,5 @@ +package com.camile._3.api; + +public interface DownloadListener { + public void notifyFinished(); +} diff --git a/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionImpl.java b/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionImpl.java new file mode 100644 index 0000000000..7a7c71e169 --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionImpl.java @@ -0,0 +1,44 @@ +package com.camile._3.impl; + +import java.io.IOException; + +import com.camile._3.api.Connection; +import com.camile._3.api.ConnectionException; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +public class ConnectionImpl implements Connection { + + private FileInputStream fis; + private File file; + + public ConnectionImpl(String source) throws FileNotFoundException { + file = new File(getClass().getClassLoader().getResource(source).getFile()); + fis = new FileInputStream(file); + } + + @Override + public byte[] read(int startPos, int endPos) throws IOException { + fis.skip(startPos); + byte[] content = new byte[endPos - startPos + 1]; + fis.read(content, 0, content.length); + return content; + } + + @Override + public int getContentLength() { + return (int)file.length(); + } + + @Override + public void close() { + try { + fis.close(); + } catch (IOException e) { + throw new ConnectionException("Fail for connection closed"); + } + } +} diff --git a/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionManagerImpl.java b/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionManagerImpl.java new file mode 100644 index 0000000000..f652f1de23 --- /dev/null +++ b/group01/496740686/src/main/java/com/camile/_3/impl/ConnectionManagerImpl.java @@ -0,0 +1,29 @@ +package com.camile._3.impl; + +import java.io.FileNotFoundException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.camile._3.api.Connection; +import com.camile._3.api.ConnectionException; +import com.camile._3.api.ConnectionManager; + +public class ConnectionManagerImpl implements ConnectionManager { + + @Override + public Connection open(String url) throws ConnectionException { + try { + return new ConnectionImpl(parse(url)); + } catch (FileNotFoundException e) { + throw new ConnectionException("鍒涘缓杩炴帴澶辫触"); + } + } + + private String parse(String url) { + String pattern = "(http|https)://[a-zA-Z0-9]+:[0-9]+/([a-zA-Z0-9.]+)"; + Matcher compile = Pattern.compile(pattern).matcher(url); + if(!compile.matches()) throw new ConnectionException("璇rl涓嶅悎娉"); + return compile.group(2); + } + +} diff --git a/group01/496740686/src/main/resources/test.jpg b/group01/496740686/src/main/resources/test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bfac11c1f36679971a735a52335bb55c7b675677 GIT binary patch literal 6195 zcmbVwcT`i`x9&y|kRu`;1c_1v1Vlsx6o{zwqa2kkQUpbM?^A#M5GA_5dnh` z2py@Bjv&1R2rUUEfv|IT&hL(U$9R9e_jX1y#vXfRt@+LQ&2P@R>0|U6;H06hfiA$r z1OQCX2cS;?Hvv|bqpU|+SXqy*pU37!({5_2T8L=$O}UQc~Zh zrDtSjWq-=cFDNYfTwL<4va0$!y5>i1b4zPmd&ketu7Sa!;gQj?-{Z4$^9zeh_~n&V zB8j}cv%5#3?lW*P0nGn_1^xa9*#Cix8^U#jg@u`gje(2lNFelO=4Ls1R*98I`!1Wk zH?R1mNOry($+;Cx$0U^RZSgE{rTygVyKWI+2D+5a7|=l@^G{s-9q;u;5zGc!TK zW9A0nz<7KRo<;|dWICWJTk;3)r3NBsdQ@s*9$fOpaRibK1{(ZRg;CW&?BJ+$;9BX= zHy{>8pabWU;iEf;2$F6@wY`6_OT#JjxB7$2q{}I~n_}hx%}0K!k7Mil%n64pJ><^7 zeCt>RkAAzFq$SlDaOt4j<{Ze|J}0>^y;W`SQD3l4jMImr<@g%80j@VmkFf_vV7CYA zMXZ0V?euCH865<9x-SZ!rFO2(%*^cJ77tfvI+g~ThW|;g0KbFS-4&79|%kVxEOCI)ERgotJu)oA8Ire;yk~9Hh~DP4ASsis*lHIoaM4CkRut1tn-8u_Wa` z{xjrBgxqIKRSFHFVp|v?pzv!KyChrcynA(A=vj%@cG0(wr}g(}h{b}oC$>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IcFJOcc^kDcm%iEq@%e!Xr zyPDF*XtLxbc$(YmAC-FvY|>L-$}@`AVar$Q;rKTYC;f5fiv(TMj0F8lXvXy4{{>IZ B+@Syf literal 0 HcmV?d00001 diff --git a/group01/496740686/src/test/java/com/camile/_3/FileDownloaderTest.java b/group01/496740686/src/test/java/com/camile/_3/FileDownloaderTest.java new file mode 100644 index 0000000000..e2715a8a91 --- /dev/null +++ b/group01/496740686/src/test/java/com/camile/_3/FileDownloaderTest.java @@ -0,0 +1,54 @@ +package com.camile._3; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.camile._3.impl.ConnectionImpl; +import com.camile._3.api.ConnectionManager; +import com.camile._3.api.DownloadListener; +import com.camile._3.impl.ConnectionManagerImpl; + +public class FileDownloaderTest { + boolean downloadFinished = false; + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testDownload() { + + String url = "http://localhost:8080/test.jpg"; + FileDownloader downloader = new FileDownloader(url); + ConnectionManager cm = new ConnectionManagerImpl(); + downloader.setConnectionManager(cm); + downloader.setListener(new DownloadListener() { + @Override + public void notifyFinished() { + downloadFinished = true; + } + + }); + + downloader.execute(); + // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 + while (!downloadFinished) { + try { + System.out.println("sleep five seconds..."); + //浼戠湢5绉 + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + System.out.println("download was finished锛"); + + + + } + +} From 834d80e9117f470dbb950953a552a80c876b1cbe Mon Sep 17 00:00:00 2001 From: chishiwu <1107225491@qq.com> Date: Sun, 12 Mar 2017 19:46:32 +0800 Subject: [PATCH 375/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鍙疄鐜癆rrayList鍜孲tack鍜屽崥瀹紝鍏朵粬鏆傛椂鏈畬鎴愩 --- group24/1107225491/1107225491/.classpath | 6 - group24/1107225491/1107225491/.project | 17 --- .../.settings/org.eclipse.jdt.core.prefs | 11 -- group24/1107225491/1107225491/test.txt | 1 - .../chishiwu/coding2017/basic/ArrayList.java | 90 +++++++++++++ .../chishiwu/coding2017/basic/Iterator.java | 7 + .../chishiwu/coding2017/basic/LinkedList.java | 124 ++++++++++++++++++ .../chishiwu/coding2017/basic/List.java | 9 ++ .../chishiwu/coding2017/basic/Queue.java | 19 +++ .../chishiwu/coding2017/basic/Stack.java | 49 +++++++ ...2\345\256\242\345\234\260\345\235\200.txt" | 1 + 11 files changed, 299 insertions(+), 35 deletions(-) delete mode 100644 group24/1107225491/1107225491/.classpath delete mode 100644 group24/1107225491/1107225491/.project delete mode 100644 group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs delete mode 100644 group24/1107225491/1107225491/test.txt create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/ArrayList.java create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Iterator.java create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/LinkedList.java create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/List.java create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Queue.java create mode 100644 group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Stack.java create mode 100644 "group24/1107225491/\345\215\232\345\256\242\345\234\260\345\235\200.txt" diff --git a/group24/1107225491/1107225491/.classpath b/group24/1107225491/1107225491/.classpath deleted file mode 100644 index 07ca123c63..0000000000 --- a/group24/1107225491/1107225491/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/group24/1107225491/1107225491/.project b/group24/1107225491/1107225491/.project deleted file mode 100644 index 2d1d33be8a..0000000000 --- a/group24/1107225491/1107225491/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - 1107225491 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs b/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 54e493c07c..0000000000 --- a/group24/1107225491/1107225491/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/group24/1107225491/1107225491/test.txt b/group24/1107225491/1107225491/test.txt deleted file mode 100644 index 2086f8809c..0000000000 --- a/group24/1107225491/1107225491/test.txt +++ /dev/null @@ -1 +0,0 @@ -奋斗奋斗 \ No newline at end of file diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/ArrayList.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..193fbbb536 --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/ArrayList.java @@ -0,0 +1,90 @@ +package com.github.chishiwu.coding2017.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + Object[] elementData = new Object[100]; + + // 鍔ㄦ佹坊鍔犲厓绱 + public void add(Object o) { + ensureCapacity(size + 1); + elementData[size] = o; + size++; + + } + + public void add(int index, Object o) { + Check(index); + ensureCapacity(size + 1); + System.arraycopy(elementData, index, elementData, index + 1, size + - index); + elementData[index] = o; + size++; + } + + // 鍔ㄦ佹墿瀹 + private void ensureCapacity(int minCapacity) { + // TODO Auto-generated method stub + int oldCapacity = elementData.length; + if (minCapacity > oldCapacity) { + int newCapacity = (oldCapacity * 3) / 2 + 1; + if (newCapacity < minCapacity) { + newCapacity = minCapacity; + } + elementData = Arrays.copyOf(elementData, newCapacity); + } + } + + public void Check(int index) { + if (index >= size || index < 0) { + throw new IndexOutOfBoundsException("index" + index + "瓒婄晫"); + } + } + + public Object get(int index) { + Check(index); + return elementData[index]; + } + + public Object remove(int index) { + Check(index); + // 澶囦唤 + Object oldValue = elementData[index]; + int num = size - index - 1; + if (num > 0) + System.arraycopy(elementData, index + 1, elementData, index + 1, + num); + elementData[--size] = null; + return oldValue; + + } + + public int size() { + return size; + } + + public Iterator iterator() { + return new ArrayListIterator(); + } + + private class ArrayListIterator implements Iterator { + + private int currentIndex = 0; + + public boolean hasNext() { + if (currentIndex >= size) + return false; + else + return true; + } + + public Object next() { + Object o = elementData[currentIndex]; + currentIndex++; + return o; + } + } + +} diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Iterator.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..9096a3c111 --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.github.chishiwu.coding2017.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/LinkedList.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..9e1a5f8646 --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/LinkedList.java @@ -0,0 +1,124 @@ +package com.github.chishiwu.coding2017.basic; + + + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 閹跺﹨顕氶柧鎹愩冮柅鍡欑枂 + * 娓氬顪嗛柧鎹愩冩稉锟3->7->10 , 闁棛鐤嗛崥搴″綁娑擄拷 10->7->3 + */ + public void reverse(){ + + } + + /** + * 閸掔娀娅庢稉锟介嚋閸楁洟鎽肩悰銊ф畱閸撳秴宕愰柈銊ュ瀻 + * 娓氬顪嗛敍姝璱st = 2->5->7->8 , 閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟7->8 + * 婵″倹鐏塴ist = 2->5->7->8->10 ,閸掔娀娅庢禒銉ユ倵閻ㄥ嫬锟芥稉锟,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 娴犲海顑噄娑擃亜鍘撶槐鐘茬磻婵绱 閸掔娀娅巐ength 娑擃亜鍘撶槐锟介敍锟藉▔銊﹀壈i娴狅拷瀵拷顬 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 閸嬪洤鐣捐ぐ鎾冲闁炬崘銆冮崪瀹璱st閸у洤瀵橀崥顐㈠嚒閸楀洤绨幒鎺戝灙閻ㄥ嫭鏆i弫锟 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戦崣鏍у毉闁絼绨簂ist閹碉拷瀵氱规氨娈戦崗鍐 + * 娓氬顪嗚ぐ鎾冲闁炬崘銆 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 鏉╂柨娲栭惃鍕波閺嬫粌绨茬拠銉︽Ц[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 娴犲骸缍嬮崜宥夋懠鐞涖劋鑵戞稉顓炲灩闂勩倕婀猯ist娑擃厼鍤悳鎵畱閸忓啰绀 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 瀹歌尙鐓¤ぐ鎾冲闁炬崘銆冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 閸掔娀娅庣悰銊よ厬閹碉拷婀侀崐鑲╂祲閸氬瞼娈戞径姘稇閸忓啰绀岄敍鍫滃▏瀵版鎼锋担婊冩倵閻ㄥ嫮鍤庨幀褑銆冩稉顓熷閺堝鍘撶槐鐘垫畱閸婄厧娼庢稉宥囨祲閸氬矉绱 + */ + public void removeDuplicateValues(){ + + } + + /** + * 瀹歌尙鐓¢柧鎹愩冩稉顓犳畱閸忓啰绀屾禒銉ワ拷闁帒顤冮張澶婄碍閹烘帒鍨敍灞借嫙娴犮儱宕熼柧鎹愩冩担婊冪摠閸屻劎绮ㄩ弸鍕╋拷 + * 鐠囨洖鍟撴稉锟界彯閺佸牏娈戠粻妤佺《閿涘苯鍨归梽銈堛冩稉顓熷閺堝锟芥径褌绨琺in娑撴柨鐨禍宸慳x閻ㄥ嫬鍘撶槐鐙呯礄閼汇儴銆冩稉顓炵摠閸︺劏绻栭弽椋庢畱閸忓啰绀岄敍锟 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 閸嬪洩顔曡ぐ鎾冲闁炬崘銆冮崪灞藉棘閺佺櫦ist閹稿洤鐣鹃惃鍕懠鐞涖劌娼庢禒銉ュ帗缁辩姳绶烽崐濂革拷婢х偞婀佹惔蹇斿笓閸掓绱欓崥灞肩鐞涖劋鑵戦惃鍕帗缁辩姴锟介崥鍕瑝閻╃ǹ鎮撻敍锟 + * 閻滄媽顪呭Ч鍌滄晸閹存劖鏌婇柧鎹愩僀閿涘苯鍙鹃崗鍐娑撳搫缍嬮崜宥夋懠鐞涖劌鎷發ist娑擃厼鍘撶槐鐘垫畱娴溿倝娉﹂敍灞肩瑬鐞涒撴稉顓犳畱閸忓啰绀岄張澶夌贩閸婂ジ锟芥晶鐐存箒鎼村繑甯撻崚锟 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/List.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/List.java new file mode 100644 index 0000000000..682d54dbfe --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/List.java @@ -0,0 +1,9 @@ +package com.github.chishiwu.coding2017.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Queue.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Queue.java new file mode 100644 index 0000000000..0bef3f55fb --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Queue.java @@ -0,0 +1,19 @@ +package com.github.chishiwu.coding2017.basic; + +public class Queue { + + public void enQueue(Object o){ + } + + public Object deQueue(){ + return null; + } + + public boolean isEmpty(){ + return false; + } + + public int size(){ + return -1; + } +} diff --git a/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Stack.java b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Stack.java new file mode 100644 index 0000000000..de1856f991 --- /dev/null +++ b/group24/1107225491/1107225491Learning/src/com/github/chishiwu/coding2017/basic/Stack.java @@ -0,0 +1,49 @@ +package com.github.chishiwu.coding2017.basic; + +public class Stack { + private Node mStackNode; + private int size; + + public void push(Object o) { + Node node = new Node(); + node.data = o; + if (null == mStackNode) { + mStackNode = node; + } else { + mStackNode.next = node; + mStackNode = node; + } + size++; + } + + public Object pop() { + if (size == 0) { + throw new RuntimeException("the stack is empty"); + } + Object obj = mStackNode.data; + mStackNode = mStackNode.pre; + size--; + return obj; + } + + public Object peek() { + if (size == 0) { + throw new RuntimeException("the stack is empty"); + } + return mStackNode.data; + } + + public boolean isEmpty() { + return size == 0; + } + + public int size() { + return size; + } + + private static class Node { + Object data; + Node next; + Node pre; + } +} diff --git "a/group24/1107225491/\345\215\232\345\256\242\345\234\260\345\235\200.txt" "b/group24/1107225491/\345\215\232\345\256\242\345\234\260\345\235\200.txt" new file mode 100644 index 0000000000..eb815ca931 --- /dev/null +++ "b/group24/1107225491/\345\215\232\345\256\242\345\234\260\345\235\200.txt" @@ -0,0 +1 @@ +http://www.cnblogs.com/chishiwu/p/6514526.html \ No newline at end of file From 087b58bdd364aa0d2cb9fc2afd1412688deb92fe Mon Sep 17 00:00:00 2001 From: "mwu@xtremeprog.com" Date: Sun, 12 Mar 2017 19:48:46 +0800 Subject: [PATCH 376/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/basic/collections/ArrayList.java | 3 +- .../src/basic/collections/LinkedList.java | 77 +++++++++++++++++-- 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/group26/2070509107/src/basic/collections/ArrayList.java b/group26/2070509107/src/basic/collections/ArrayList.java index 233b8f1795..8ba213409e 100644 --- a/group26/2070509107/src/basic/collections/ArrayList.java +++ b/group26/2070509107/src/basic/collections/ArrayList.java @@ -4,7 +4,8 @@ * * @author Mahone Wu * @data:2017-03-10 - * @description:ArrayList鐨勮嚜鎴戝疄鐜 @version锛1.0.0 + * @description:ArrayList鐨勮嚜鎴戝疄鐜,鏆傛椂娌℃湁鑷姩鎵╁睍 + * @version锛1.0.0 */ public class ArrayList implements List { diff --git a/group26/2070509107/src/basic/collections/LinkedList.java b/group26/2070509107/src/basic/collections/LinkedList.java index 248617d05a..e9eb46d34f 100644 --- a/group26/2070509107/src/basic/collections/LinkedList.java +++ b/group26/2070509107/src/basic/collections/LinkedList.java @@ -1,5 +1,6 @@ package collections; + /** * * @author Mahone Wu @@ -9,18 +10,40 @@ */ public class LinkedList implements List { + //瀹氫箟澶磋妭鐐 private Node head; + + //鏈鍚庝竴涓妭鐐 + private Node last; + + //閾捐〃澶у皬 + private int size; + /** + * 娣诲姞鍏冪礌 + */ public void add(Object o) { - while (head.next == null) { - - } + addLast(o); } + /** + * 鎸囧畾浣嶇疆娣诲姞鍏冪礌 + */ public void add(int index, Object o) { - + if(!(index >= 0 && index <= size)){ + //瓒呭嚭绱㈠紩鑼冨洿 + } + Node currentNode =null; + + } + + + + /** + * 鑾峰彇鎸囧畾鍏冪礌 + */ public Object get(int index) { return null; } @@ -30,15 +53,35 @@ public Object remove(int index) { } public int size() { - return -1; + return size; } public void addFirst(Object o) { - + Node fistNode = head; + Node newNode = new Node(null, o, head); + head = newNode; + if(null == fistNode){ + last = newNode; + }else{//灏嗕箣鍓嶇殑澶磋妭鐐圭殑鍓嶄竴涓寚鍚戠幇鍦ㄧ殑澶磋妭鐐 + fistNode.prev = newNode; + } + size++; } + /** + * 鍚戝熬娣诲姞鍏冪礌 + * @param o + */ public void addLast(Object o) { - + Node lastNode = last; + Node newNode = new Node(lastNode, o, null); + last = newNode;//灏嗘柊澧炵殑鑺傜偣璁剧疆涓烘渶鍚庝竴涓妭鐐 + if(null == lastNode){//濡傛灉涔嬪墠鏈鍚庝竴涓妭鐐逛负绌猴紝鍒欎唬琛ㄨ繖鏄涓娆″鍔犺妭鐐,杩涜澶磋妭鐐硅缃 + head = newNode; + }else{ + lastNode.next = newNode; + } + size++; } public Object removeFirst() { @@ -53,12 +96,30 @@ public Iterator iterator() { return null; } + //鍙傜収LinkedList婧愮爜瀹炵幇 private static class Node { Object data; + Node prev; Node next; - + + Node(Node prev,Object object,Node next){ + this.prev = prev; + this.data = object; + this.next = next; + } } + /** + * 鏌ユ壘鎸囧畾浣嶇疆鐨凬ode鑺傜偣 + * @param index + * @return + */ + Node findNode(int index){ + Node currentNode = head; + + + } + /** * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 */ From e3d162e049efae76c8391e2aee4e5c810e22be3b Mon Sep 17 00:00:00 2001 From: millionkn Date: Sun, 12 Mar 2017 20:54:04 +0900 Subject: [PATCH 377/646] =?UTF-8?q?=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group13/453070251/lessones01/LinkedList.class | Bin 2722 -> 3077 bytes group13/453070251/lessones01/LinkedList.java | 12 ++- .../lessones01/LinkedListWithFloat.class | Bin 2222 -> 0 bytes group13/453070251/lessones01/Node.class | Bin 1350 -> 1387 bytes group13/453070251/lessones01/Node.java | 4 +- group13/453070251/lessones02/ArrayUtil.class | Bin 2844 -> 2840 bytes group13/453070251/lessones02/ArrayUtil.java | 2 +- .../lessones03/LinkedListNoPrior.class | Bin 0 -> 2444 bytes .../lessones03/LinkedListNoPrior.java | 74 ++++++++++++++++++ .../others/LinkedListWithFloat.class | Bin 0 -> 2329 bytes .../LinkedListWithFloat.java | 11 ++- group13/453070251/others/PrimeGetter.class | Bin 1247 -> 1235 bytes group13/453070251/others/PrimeGetter.java | 1 - group13/453070251/others/Range.class | Bin 0 -> 1541 bytes group13/453070251/others/Range.java | 43 ++++++++++ 15 files changed, 140 insertions(+), 7 deletions(-) delete mode 100644 group13/453070251/lessones01/LinkedListWithFloat.class create mode 100644 group13/453070251/lessones03/LinkedListNoPrior.class create mode 100644 group13/453070251/lessones03/LinkedListNoPrior.java create mode 100644 group13/453070251/others/LinkedListWithFloat.class rename group13/453070251/{lessones01 => others}/LinkedListWithFloat.java (89%) create mode 100644 group13/453070251/others/Range.class create mode 100644 group13/453070251/others/Range.java diff --git a/group13/453070251/lessones01/LinkedList.class b/group13/453070251/lessones01/LinkedList.class index e6782af7601f919e26f0bd33a787ae1c0d11fcfc..bc2967d2b802c4a36f3aa25ab2710a8b6e83af19 100644 GIT binary patch delta 1565 zcmZuxO;cM{7=BJda&O|93KY`B6fA<0CRifS4+{mfwL*cW5|Gb+1ae8CX(}nCUskFX zb;gZOR$Vw_-PDB(bQs3b8FgG($Av$@br-sKTwqb3_vVg4r*miCbKY~F_qp%KbMGg$ ztHG6@{`%@003CSGz)3$85++W``ic+3NXl-+z^EUuV$8(2i3vHHG%;mjTDGT6objUx z2?J;SsKPlP4^v`h#LNmNEyfZv=OZK|yYph^V-m6;hZn?T#l0vdC+3nLuVGQx^9C+| z{_%CC&KAS2?g7tyE^S>^XpRgnqzb9lY$}&&P0TDrUV!{1;uR>KhL8n{=qmarjTZuV^K&1cC4e?rw%c<<; z;&*CS&mS*hUeG*S#5AQi3=D3eH^;}(Cz0vRn0&CnUNJd_+K%-Ml2R#l(Vv4=q;J6_Cc3d-& z5eIdUs6+oUH#p2bVGgb%^ndc$HgYP#CSUUg8_MLZB#%3&PLfk(HtIKTc(9CWW3$>F z)DfbhY#E!&6zjN38J_4mYCq#QOMk1_q6Vjm|q;BdIM zV30#?a>`{6irwZ&n@!Pju_u{f!j5x8`5kx%U&+tHhJRtUv>yoS+bgiJZVJ(tIw! zq9ij|r8qyp0zTr&U1TZAi})Hj{K&u2&sfAS$m0Qj5z@LEm|JKlmA!itb)k@6iH4oT zI+<7>`&82Chg?O)Ls9nz!b7q9XmoeCtfPKn=m*qt6S@zx?n^wicH6D){r&4bG?ni| zF#&9#@y>S410`y7*-|eJ=L)>X_;>Q-8dY$Ev$<)f8Gx|`Eos(l!sB`frGnfzd7dCe MX<`HXMul+bAHvb)e*gdg delta 1253 zcmZ9L&2Lm?6vlsd+RnW*dF7+hI)(Dl3I#7?XZiusQU*jVSfL69EG-pg=(MyQXQV9! zVbP7O*qF@9g$r1^Dha_v6Bn+GiT(lXO!yOsiw2C(xihiE&AIP+-{*PG=e?hL)Ux{f zKR^8f^mEVW<0Kv<0iW3SOoFqF+UZlD&yt+ue85=11-rT!a4Fz(JB|ljPSVMU&qR`~ zOeS=B#mtnMFAQ_l%r!IlgdhbwT{kn`VU(g>&X}1s_lB7{GxI(RkAJx9c@x!rv0Qa6 zR#@#OD67oqmOi%Z#_%xGo0=;&t9@iu!M`^_BSogv2u^f*35%wyyn zi!3=l;)vs*#A(+l6fR4WoET?xJH}@6Y~hBmD>U;BZ}Na` zd`AlpX=RO+G}X~a`CdF7DK|?M={2%bxLs^#x8BuZ<(SsXE`4MA#={*?XR*0q%SM6y zYK#US#dg8?n7xE54aEwS(@sI-RExMMoyv^FQSCMP*Aq@&>_S)UWl>xxio z*!$Ae21U9*2H|njZPjpX)J>cc=d{Lninkc4Ys6mROT$~&m^U=Eo{`3$#NKeDFK3nE zXvAy4OV;7N3aLeo;N?WR&)~J`pHnI474Cwje<`9h65ATod56T)#z(wA5`V86ub^Fm zaq%vTH$fYdn(`Ixz?6`aD(tEfzb4hZ5Cx{W&VuX;Gu&sEZ<*tJ=Czj#+RG9@>&O0$ t3V-Sce#T9nvmE8Ijo=j>wX)mS+1b|S+QS|7#0Hd7trNrQl>Jnv{{>=tl@tH~ diff --git a/group13/453070251/lessones01/LinkedList.java b/group13/453070251/lessones01/LinkedList.java index 3732f43f8b..5c85dba646 100644 --- a/group13/453070251/lessones01/LinkedList.java +++ b/group13/453070251/lessones01/LinkedList.java @@ -1,4 +1,5 @@ package lessones01; +import lessones01.Node; public class LinkedList{ public static void main(String[] args){ LinkedList arr = new LinkedList(); @@ -24,7 +25,7 @@ public static void main(String[] args){ } protected Node first; protected Node lastest; - private int size; + protected int size; public LinkedList(){ lastest = first = new Node(null); size = 0; @@ -114,4 +115,13 @@ protected void _add(T arg_value,int arg_num){ } } + protected Integer index(T o){ + Node n = _getNode(0); + if(o == null){ + for(int i=0;(n = n.right)!=null;i++){if(n.value == null){return i;}} + }else{ + for(int i=0;(n = n.right)!=null;i++){if(o.equals(n.value)){return i;}} + } + return null; + } } \ No newline at end of file diff --git a/group13/453070251/lessones01/LinkedListWithFloat.class b/group13/453070251/lessones01/LinkedListWithFloat.class deleted file mode 100644 index bf24ae88418c7b410a65b87dd988b4e75ca8da04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2222 zcmZ`)O-~zF6g|U?nXxl~F|h-&Lm+KhV!M1MG!4W_$X6kTe3&GqX#)cun<2)IY!j)K z`U|@3s#VoR5-D3!B_Op@l~pTs(M8wYb=P0eMb!3O&tMxug?JzL-FMHq=iWE|^`9Sp z0&o&V9Ulas;EaI@nJ4`?ivDQShMTgzB`z5m=KZ*hJ2KqW@sR?5u28b7bET}Upfg>tE0t2wt_+V1 ziD`o887E(~svBjVNA{ji&d*Pz=w!G-Hr5p=(+ae8%PG=*;9h#odSne1tYUsBQ!P8i z{KSbnJil0j>qt9Adv0TW*)Gpp%LM|oPC7-Wno^(+h@Y{Tw>@eH2c}Q#MJI4urfRJ` zn6(~y0ebdv+aakfTG_0yY9e)gdCgv_PD~4$KEQ0;)neIRFFmq#ED$2+6th=Eq_mx@ zDrm3oZ#nr@8b&AQ&%7Bj)y$TOKCrWCr&8S^6UdY{$}9F2N7C+YoZoe-t2MAeQBFZ` zQ$_aiGI0WNiau=OW8Bm6iHT2f-^3!86a@E*ufsC2j1^uO;s2Oi8m7$4cCJ*m`$lOy zX(9_!Qcj!5VaY@ut8&LNv4%bqM`d^mZ<{!Uq{%ks@IY)sAcs*TshNp_Sk}>}AiOVs z1szRxxB1jsb;A2pM~c&&%V(9U%}!HG8&p5+O7E10Zm_?q>@wS0XJ@Ev9iB=*G-U9~ zt)Q!B+kJ^0@K8b&*t)xDGCsmR=0^qYkijp1-Ln|*J%1YBWEv`xG?5UWIfcjh4wwh zpb_futU;shD^9Wvx}v3RbhsOn*)*Lsa+5Gy=-fi+Ij92$INrx0jv5U3(2iEb zDB3aZh7mvt2XGlCGH7Gtw__C@c!VInKqtOL2w$NKk8u#s5ymS-@Ec?Ofo}YT9{i2N zN(-Vy;e&GvfN{#N5G@qnMpr!k0ta6r99Lf=(%=&!7qFNbi)oTcCrhazfh6y;i1?jF z^l@H`@_r25z7(CI$(heklfVAWIm?S7Ts?n4`6Yfdym( zE4mE=44e#tNP4BQ=+&+VYG=cuSs18U1WB_DgDliyO(4w(bO0~NVu)^Ltqni{WZ#Ja zwTeTv%K?2X&!7O+ZVRMAp(3nxjDbT-n{z8Le1I%%t;vU3^kqRRm7yxNfiyEvB{w)^ Vv~_k&7GxD+Wd*9>nyket0|03!SULaz delta 411 zcmZutOKJi^6s$MXj-k~dFvE^qZR(>W(l diff --git a/group13/453070251/lessones01/Node.java b/group13/453070251/lessones01/Node.java index 68e4845bff..01268cfc25 100644 --- a/group13/453070251/lessones01/Node.java +++ b/group13/453070251/lessones01/Node.java @@ -22,11 +22,11 @@ public Node remove(){ _connect(left,right); return this; } - private void _connect(Node arg_left,Node arg_right){ + private static void _connect(Node arg_left,Node arg_right){ if(arg_left != null){arg_left.right = arg_right;} if(arg_right != null){arg_right.left = arg_left;} } - private void _connect(Node arg_left,Node node,Node arg_right){ + private static void _connect(Node arg_left,Node node,Node arg_right){ _connect(arg_left,node); _connect(node,arg_right); } diff --git a/group13/453070251/lessones02/ArrayUtil.class b/group13/453070251/lessones02/ArrayUtil.class index 37610d4b9712be415818e3e9cc28b95006b622bd..9a7ca7bab04f38bbf4d0af6425d2e07b24076c85 100644 GIT binary patch delta 20 bcmbOuHbZQ~Lq>L~{F02+qT0;i--){ diff --git a/group13/453070251/lessones03/LinkedListNoPrior.class b/group13/453070251/lessones03/LinkedListNoPrior.class new file mode 100644 index 0000000000000000000000000000000000000000..2c2e51d41966b95bf7ec088aec31b423a1396f8c GIT binary patch literal 2444 zcmZ`)O;b~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vX~*h;TDtQQwCzdcPt|H+(%C=LUbv!zl4sNxb~C;ON*LI=)AgF{&&4bZI=If zeV&hSnvW7(oVkxM-B<-o6SU{3QO{AQW8@jyo-vgR;xIwHzcuDxkx`8x22IizNowO= z!s>l=$ILD&W-gS_^)+Xef?)V(-KYAJo8`Z^QFNo0?~il3PjGjVNKWy1PjK?juybdb ob+UrUgzp7vi3X}n2dzTW2xXqKGP_z;R1RHD73(M~65@{j50n}f4gdfE literal 0 HcmV?d00001 diff --git a/group13/453070251/lessones03/LinkedListNoPrior.java b/group13/453070251/lessones03/LinkedListNoPrior.java new file mode 100644 index 0000000000..e26f1cd08e --- /dev/null +++ b/group13/453070251/lessones03/LinkedListNoPrior.java @@ -0,0 +1,74 @@ +package lessones03; +import lessones01.Node; +import lessones01.LinkedList; +import others.Range; +//只要不用prior就和单项链表一样了吧。。。 +//虽然要求是单向列表,不过所有代码不用管是单向还是双向(不是由LinkedList决定,而是Node)都能用 +public class LinkedListNoPrior extends LinkedList{ + protected void _reverse(){ + if(size() == 1){return;} + T temp = _remove(size()-1).value; + _reverse(); + _add(temp,0); + } + protected void _removeFirstHalf(){ + (first = _getNode((int)(size()>>1))).setLeft(null);//单向节点也可以有setLeft方法 + size-=size/2; + } + protected void _remove(int arg_i,int arg_length){ + Range thisRange = new Range(0,size()); + Range targetRange = thisRange.and(new Range(arg_i,arg_i+arg_length)); + if(size == arg_length){ + (lastest = first).value = null; + first.setRight(null); + }else if(targetRange.min() == 0){ + first = _getNode(targetRange.max()); + first.setLeft(null); + }else if(targetRange.max() == size){ + lastest = _getNode(targetRange.min()-1); + lastest.setRight(null); + }else{ + _getNode(targetRange.min()-1).setRight(_getNode(targetRange.max())); + } + size -= arg_length; + //for(int i = targetRange.min();i arg_list){ + //题目告诉的是已经排好序的LinkedList + //没猜错的话应该就是让想办法优化了。。。 + //然而这个工作已经在LinkedListWithFloat中完成了(笑) + //然而。。这里不能继承LinkedListWithFloat。。 + //ps:arg_list可以是LinkedListWithFloat,所以不用做什么优化 + int list_size = arg_list.size(); + T[] arr = (T[])(new Object[size()]); + int list_i = 0; + int i = arg_list.get(0/*list_i*/); + Node node = _getNode(i); + while((node!=null)&&list_i arg_list){ + for(int i=0;iE;=cFpy>rj~IPdw_e}4E0 zz!`j^VZ;vwqdG3gn(*NwF3Ik)hA}^`;Hr*mI>tqHUB?X_6SBRj<6~KqA|}Oe%8xFL z`goicaZAK)vCfD{$#GU(?ufYS!#&)W-JI+mXn3f=x0KDBrKx<{QqY{tTE${MXBAJL z8WhzC?J0XXXO`9rw1@ZGM`ve85_Hm?AnU6NlnDjus%huw-uE!MVs4m&Su?jhm?{x=go9lvZ_gHdSS&{ER9SEn%2i^oZWoETFq}*8XhSKxQB7OP%Par zvr9x>vUBNi>08oTDk*5JoM-Ii3>D`_XV1TjlBgDNdXTk0v(ibs$O3N_?0jK2O@AuC zURbooZD~kb)$N{L%9JrrNKX}XwdrulQ-1ZbD zYPfIW-Jp_Xy~8Ztfuj8x2TY>Ng<%pjdY6P_M9G>gKz81OLnt*%qM@7Dxr;AI9sk&J zo_flsqdc?w-0Se+eSAPmAD|TBp#_TPM<{dKs7uC!o-L@~!yD&X{}$R7^mx$c>ePx( zJnAc_c+k(od;67!*Hv&8qik6Z{G_UZ1R8LS+7z1b00Cssj12_w zIa=@qTJa@9c#be$F~(c8;WxD74|L!!MDRDFN*y|h!pr9jfES^TJ0KX_MoTRA8m(^- zih153T+Js4l^#8mN14GfBKC4WfaCm@L&WbKqL=GRgx`nL7ouN7=PtAvV`XYOl1@aU znMh~m1vK>~RL@y8q<)2#=(q62BHK8$DY9)d`VGQ+GH{Iy)hdG zn;UnCarx%BaSLwTA*n4gIq(a-1DgY{5&apBFvyMz1s{@*N@)C-fSJWrF2KrJ4B4fBzJ9HGPL-w@LOHrk>*4ai^TJ%3xiUWb5Sd kJ`m`61xT7zoyh+H-6zl-fgTX((SbnDvo%bH$Vkus2iOzC@Bjb+ literal 0 HcmV?d00001 diff --git a/group13/453070251/lessones01/LinkedListWithFloat.java b/group13/453070251/others/LinkedListWithFloat.java similarity index 89% rename from group13/453070251/lessones01/LinkedListWithFloat.java rename to group13/453070251/others/LinkedListWithFloat.java index efc1b55fe2..50c1077510 100644 --- a/group13/453070251/lessones01/LinkedListWithFloat.java +++ b/group13/453070251/others/LinkedListWithFloat.java @@ -1,5 +1,7 @@ -package lessones01; -public class LinkedListWithFloat extends LinkedList{ +package others; +import lessones01.Node; +import lessones03.LinkedListNoPrior; +public class LinkedListWithFloat extends LinkedListNoPrior{ public static void main(String[] args){ LinkedListWithFloat arr = new LinkedListWithFloat(); arr.add("0"); @@ -70,6 +72,11 @@ protected Node _remove(int arg_num){ } return temp; } + protected void _removeFirstHalf(){ + super._removeFirstHalf(); + floatNode = first; + floatNum = 0; + } private Node findFloatLeft(int arg_num){ for(;floatNum>arg_num;){ floatNode = floatNode.left; diff --git a/group13/453070251/others/PrimeGetter.class b/group13/453070251/others/PrimeGetter.class index 1a18484ecbb09a79874bbf23cae01124b21df8d1..313b0618532d28eb2e1a4d86154a473e303c1fd3 100644 GIT binary patch delta 163 zcmcc5d6{!U1c!`Ieo01ZQSrnSWe!6ad-5N4DTwgqS&Tf4j7*c4GkLMHGKe#yi8we#Bco<|Ecp0=9_!(>%1Q_fXgc#fygcN*SL>bZ;#27Mxs)~SO z6%0}gH4M@WZ45FD?LhUt3<{GOS-Lot7?>E8fqGRYPhoN3W@cbykY`{3iYWj9pK~76 delta 180 zcmcc2d7pDa1doDGPHJ&+eqL&^f#JjiWgb%$zR1M+FSzB9RftSp#Q1}edGc%~FIF}N zaR&Cuub2*baxt(oa04L^g9HOFgDe9dgBF7TgAIcqgB^n~gBybggFk~PLkfc!LmE&| zCW9nH5m2mxL7Jh4L586XsG}XIzL!C9@>k|APGtrr1{EM*b#e!b12+o;BZE8x15iu> E00RpqP5=M^ diff --git a/group13/453070251/others/PrimeGetter.java b/group13/453070251/others/PrimeGetter.java index 58b9d8e1af..64d647ecf9 100644 --- a/group13/453070251/others/PrimeGetter.java +++ b/group13/453070251/others/PrimeGetter.java @@ -1,5 +1,4 @@ package others; -import lessones01.LinkedListWithFloat; public class PrimeGetter{ private static LinkedListWithFloat primes = new LinkedListWithFloat(); public static int get(int arg_num){ diff --git a/group13/453070251/others/Range.class b/group13/453070251/others/Range.class new file mode 100644 index 0000000000000000000000000000000000000000..8f4bbb5c8ae40e9d0790e2d63967319be821ac29 GIT binary patch literal 1541 zcmZ`&+fEZv6kVs&c4(>P+7{$4x89(NsDu(?(u9PhMI(&~z71sp<OrJChR>98RR?#+9r@L;oUl@1Elv8&C&;X_Y6U#;)iwUf*n zHp|W?=!>@cR!F(39}KIqqcGa~oK3VMn0TfTZ;f#wS^^y(>o4uur2`HkE_E%e6qlFV zw#tcLZF+mPy>FN5oMCXY+NhQ6wX(E5s0*2w1qh)VGa+;$6hfCA)0m;W5T4_OxFh0@ zD1@3@AW1z6-M1U$@F?`(x^9<>b1vx(vx`-QNb~GmeTj8Ua6f}wXb=CW1{{dC!n7%@ z$qw*Ne)@YEk>%Imw=a1Gl}ug0lT2U0pymBWw?ZG!D11D9@WPJ(OoU0+%bP>d&nQ;v z0*=s95}o`G&(|9Wzjk)IDN$PNOPdtqZc4Z*C58bvCCRUc;6agmM{QUa)I+_ZvCqvP zB;~{Q`JUElo%{&%qs)&rR-B1e;+AtLvDQoJ&DSy$OohuPWE bY57HRwPwj0CwEe_8&J{$XJKdgAW4b;#&!pH literal 0 HcmV?d00001 diff --git a/group13/453070251/others/Range.java b/group13/453070251/others/Range.java new file mode 100644 index 0000000000..6427ba2fac --- /dev/null +++ b/group13/453070251/others/Range.java @@ -0,0 +1,43 @@ +package others; +public class Range>{ + private T min; + private T max; + public Range(T arg1,T arg2){ + min = arg1; + max = arg2; + check(); + } + public T min(){ + return min; + } + public T max(){ + return max; + } + public void setMax(T arg_value){ + max = arg_value; + check(); + } + public void setMin(T arg_value){ + min = arg_value; + check(); + } + public boolean include(T arg_value){ + return min.compareTo(arg_value)<=0&&max.compareTo(arg_value)>0; + } + public boolean include(Range arg_another){ + return min.compareTo(arg_another.min())<=0&&max.compareTo(arg_another.max())>=0; + } + public Range and(Range another){ + T m_min = min.compareTo(another.min())<0 ? another.min() : min; + T m_max = max.compareTo(another.max())>0 ? another.max() : max; + if(m_max.compareTo(m_min)<0){m_min = m_max = null;} + return new Range(m_min,m_max); + } + private void check(){ + if(min.compareTo(max)>0){ + T temp = max; + max = min; + min = temp; + } + } +} \ No newline at end of file From 229affb261b1fa8ccf32bc20f256ecab8822a3d3 Mon Sep 17 00:00:00 2001 From: xiaozhupig Date: Sun, 12 Mar 2017 19:56:01 +0800 Subject: [PATCH 378/646] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group06/799237637/thirdhomework/.project | 17 +++ .../src/thirdhomework/LinkedList.java | 122 ++++++++++++++++++ ...7\347\253\240\345\234\260\345\235\200.txt" | 1 + 3 files changed, 140 insertions(+) create mode 100644 group06/799237637/thirdhomework/.project create mode 100644 group06/799237637/thirdhomework/src/thirdhomework/LinkedList.java create mode 100644 "group06/799237637/\347\254\254\344\270\211\345\221\250\346\226\207\347\253\240\345\234\260\345\235\200.txt" diff --git a/group06/799237637/thirdhomework/.project b/group06/799237637/thirdhomework/.project new file mode 100644 index 0000000000..1912d991d3 --- /dev/null +++ b/group06/799237637/thirdhomework/.project @@ -0,0 +1,17 @@ + + + thirdhomework + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/group06/799237637/thirdhomework/src/thirdhomework/LinkedList.java b/group06/799237637/thirdhomework/src/thirdhomework/LinkedList.java new file mode 100644 index 0000000000..c7fab0a562 --- /dev/null +++ b/group06/799237637/thirdhomework/src/thirdhomework/LinkedList.java @@ -0,0 +1,122 @@ +package thirdhomework; + +import java.util.List; + +public class LinkedList implements List { + + private Node head; + + public void add(Object o){ + + } + public void add(int index , Object o){ + + } + public Object get(int index){ + return null; + } + public Object remove(int index){ + return null; + } + + public int size(){ + return -1; + } + + public void addFirst(Object o){ + + } + public void addLast(Object o){ + + } + public Object removeFirst(){ + return null; + } + public Object removeLast(){ + return null; + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + /** + * 把该链表逆置 + * 例如链表为 3->7->10 , 逆置后变为 10->7->3 + */ + public void reverse(){ + + } + + /** + * 删除一个单链表的前半部分 + * 例如:list = 2->5->7->8 , 删除以后的值为 7->8 + * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10 + */ + public void removeFirstHalf(){ + + } + + /** + * 从第i个元素开始, 删除length 个元素 , 注意i从0开始 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 假定当前链表和list均包含已升序排列的整数 + * 从当前链表中取出那些list所指定的元素 + * 例如当前链表 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 返回的结果应该是[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 从当前链表中中删除在list中出现的元素 + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同) + */ + public void removeDuplicateValues(){ + + } + + /** + * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。 + * 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素) + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同) + * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git "a/group06/799237637/\347\254\254\344\270\211\345\221\250\346\226\207\347\253\240\345\234\260\345\235\200.txt" "b/group06/799237637/\347\254\254\344\270\211\345\221\250\346\226\207\347\253\240\345\234\260\345\235\200.txt" new file mode 100644 index 0000000000..25f182e828 --- /dev/null +++ "b/group06/799237637/\347\254\254\344\270\211\345\221\250\346\226\207\347\253\240\345\234\260\345\235\200.txt" @@ -0,0 +1 @@ +http://blog.csdn.net/codingxiaozhupig/article/details/61623683 \ No newline at end of file From fe56c0db53ce2cbd9bc7e605c4a265ce1f77da22 Mon Sep 17 00:00:00 2001 From: DonaldY <448641125@qq.com> Date: Sun, 12 Mar 2017 20:04:59 +0800 Subject: [PATCH 379/646] format error --- group24/626451284Learning/pom.xml | 12 - .../wdn/coding2017/basic/ArrayList.java | 88 ---- .../wdn/coding2017/basic/BinaryTreeNode.java | 35 -- .../github/wdn/coding2017/basic/Iterator.java | 10 - .../wdn/coding2017/basic/LinkedList.java | 233 ---------- .../com/github/wdn/coding2017/basic/List.java | 9 - .../github/wdn/coding2017/basic/Queue.java | 24 - .../github/wdn/coding2017/basic/Stack.java | 27 -- .../CJ-chen/coding2017/basic/ArrayList.java | 123 ----- .../coding2017/basic/BinaryTreeNode.java | 87 ---- .../CJ-chen/coding2017/basic/Iterator.java | 16 - .../CJ-chen/coding2017/basic/LinkedList.java | 423 ------------------ .../github/CJ-chen/coding2017/basic/List.java | 18 - .../CJ-chen/coding2017/basic/Queue.java | 58 --- .../CJ-chen/coding2017/basic/Stack.java | 63 --- 15 files changed, 1226 deletions(-) delete mode 100644 group24/626451284Learning/pom.xml delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java delete mode 100644 group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/ArrayList.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/Iterator.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/LinkedList.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/List.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/Queue.java delete mode 100644 group24/com/github/CJ-chen/coding2017/basic/Stack.java diff --git a/group24/626451284Learning/pom.xml b/group24/626451284Learning/pom.xml deleted file mode 100644 index 534ff39232..0000000000 --- a/group24/626451284Learning/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.github.wdn - coding2017 - 1.0-SNAPSHOT - - - \ No newline at end of file diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java deleted file mode 100644 index 3b3ea048f3..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.github.wdn.coding2017.basic; - -import java.util.Arrays; - -public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData; - public ArrayList(){ - elementData = new Object[10]; - } - public ArrayList(int size){ - elementData = new Object[size]; - } - public void add(Object o){ - if(size>=elementData.length){ - elementData = Arrays.copyOf(elementData,elementData.length*2); - } - elementData[size]=o; - size++; - } - public void add(int index, Object o){ - Object[] newElementData; - if(size()+1>=elementData.length){ - newElementData=new Object[elementData.length*2]; - - }else{ - newElementData=new Object[elementData.length]; - } - for (int i = 0; i < elementData.length; i++) { - if(index==1){ - newElementData[i]=o; - }else if(i>index) { - newElementData[i]=elementData[i-1]; - }else{ - newElementData[i]=elementData[i]; - } - } - elementData = newElementData; - size++; - } - - public Object get(int index){ - if(index>=size){ - throw new IndexOutOfBoundsException(); - } - return elementData[index]; - } - - public Object remove(int index) { - if(index>=size){ - throw new IndexOutOfBoundsException(); - } - Object returnO = elementData[index]; - for (int i = index; i < size; i++) { - if(i==size-1){ - elementData[i]=null; - }else { - elementData[i] = elementData[i + 1]; - } - } - size--; - return returnO; - } - - public int size(){ - return size; - } - - public Iterator iterator(){ - return null; - } - - public static void main(String[] args) { - ArrayList list = new ArrayList(2); - list.add("1"); - list.add("2"); - list.remove(1); - list.add("3"); - for (int i = 0; i < list.size(); i++) { - System.out.println(list.get(i)); - } - int[] i = {}; - System.out.println(i[0]); - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java deleted file mode 100644 index b8b613d6f0..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.wdn.coding2017.basic; - -/** - * TODO 浠g爜鍦ㄥ叕鍙哥數鑴戦噷銆傘傘傚悗缁彁浜 - */ -public class BinaryTreeNode { - - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public Object getData() { - return data; - } - public void setData(Object data) { - this.data = data; - } - public BinaryTreeNode getLeft() { - return left; - } - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - public BinaryTreeNode getRight() { - return right; - } - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o){ - return null; - } - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java deleted file mode 100644 index 044ddf0993..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.wdn.coding2017.basic; - -/** - * TODO 涓昏鑰冭檻閬嶅巻涓畨鍏ㄥ垹闄ゅ厓绱犵殑瀹炵幇 - */ -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java deleted file mode 100644 index 6040cb5a47..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java +++ /dev/null @@ -1,233 +0,0 @@ -package com.github.wdn.coding2017.basic; - -/** - * TODO 鍙槸绠鍗曞疄鐜 缂哄皯瀵硅竟鐣岀殑澶勭悊 - * 鍙傝僇DK婧愮爜鏀逛负鏇翠紭闆呯殑瀹炵幇 - */ - -public class LinkedList implements List { - - private Node head; - private Node tail; - private int size; - - public LinkedList(){ - this.head=null; - this.tail=null; - } - public void add(Object o){ - Node newNode = new Node(o); - if (head == null) { - head = newNode; - tail = newNode; - }else{ - tail.setNext(newNode); - newNode.setPre(tail); - tail = newNode; - } - size++; - } - public void add(int index , Object o){ - checkIndex(index); - Node indexNode = getNode(index); - Node newNode = new Node(o); - Node pre = indexNode.getPre(); - if(pre!=null){ - pre.setNext(newNode); - }else{ - head = newNode; - } - newNode.setPre(pre); - newNode.setNext(indexNode); - indexNode.setPre(newNode); - } - private void checkIndex(int index){ - if(index >= size || index <0){ - throw new IndexOutOfBoundsException(); - } - } - private Node getNode(int index){ - checkIndex(index); - // TODO杩欓噷鍙互浼樺寲锛屽厛鍒ゆ柇index鍦ㄥ墠鍗婇儴杩樻槸鍚庡崐閮ㄥ垎 鐒跺悗纭畾浠庡ご閮ㄦ垨鑰呭熬閮ㄦ煡鎵 - Node result=null; - if(index==0){ - return head; - } - if(index==size-1){ - return tail; - } - for (int i = 0; i < index; i++) { - result = head.getNext(); - } - return result; - } - public Object get(int index){ - return getNode(index).getData(); - } - public Object remove(int index){ - checkIndex(index); - Node indexNode = getNode(index); - Node pre = indexNode.getPre(); - Node next = indexNode.getNext(); - if(pre!=null){ - pre.setNext(next); - }else{ - head = next; - } - if(next!=null){ - next.setPre(pre); - }else{ - tail = pre; - } - return indexNode.getData(); - } - - public int size(){ - return size; - } - - public void addFirst(Object o){ - Node newNode = new Node(o); - head.setPre(newNode); - newNode.setNext(head); - head = newNode; - } - public void addLast(Object o){ - Node newNode = new Node(o); - tail.setNext(newNode); - newNode.setPre(tail); - tail = newNode; - } - public Object removeFirst(){ - Node next = head.getNext(); - Node oldHead = head; - head = next; - head.setPre(null); - return oldHead; - } - public Object removeLast(){ - Node oldTail = tail; - Node pre = tail.getPre(); - tail = pre; - tail.setNext(null); - return oldTail; - } - public Iterator iterator(){ - - return null; - } - - /** - * JDK 涓娇鐢ㄦ瀯閫犳柟娉曠殑鏂瑰紡璁剧疆next鍜宲re鍑忓皯涓嶅繀瑕佺殑getset鏂规硶鏇翠紭闆 - */ - private static class Node{ - - Object data; - Node next; - Node pre; - public Node(){ - - } - public Node(Object data){ - this.data = data; - } - public Object getData() { - return data; - } - - public void setData(Object data) { - this.data = data; - } - - public Node getNext() { - return next; - } - - public void setNext(Node next) { - this.next = next; - } - - public Node getPre() { - return pre; - } - - public void setPre(Node pre) { - this.pre = pre; - } - } - - /** - * 鎶婅閾捐〃閫嗙疆 - * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse(){ - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 - * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 - * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - - */ - public void removeFirstHalf(){ - - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * @param i - * @param length - */ - public void remove(int i, int length){ - - } - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 - * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 - * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 - * listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * @param list - */ - public static int[] getElements(LinkedList list){ - return null; - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 - - * @param list - */ - - public void subtract(LinkedList list){ - - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues(){ - - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 - * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * @param min - * @param max - */ - public void removeRange(int min, int max){ - - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * @param list - */ - public LinkedList intersection( LinkedList list){ - return null; - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java deleted file mode 100644 index d6c9e95cb0..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.github.wdn.coding2017.basic; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java deleted file mode 100644 index 59992f0cbd..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.github.wdn.coding2017.basic; - -/** - * 闃熷垪浣跨敤閾捐〃瀹炵幇姣旇緝绠鍗曠悊璁轰笂鏄棤鐣岄槦鍒 - * 濡傛灉浣跨敤鏁扮粍闇瑕佸鐞嗗緢澶氶棶棰樻瘮濡傞暱搴﹂檺鍒讹紝鍏冪礌鐨勫鍒 - */ -public class Queue { - private LinkedList queue = new LinkedList(); - public void enQueue(Object o){ - queue.add(o); - } - - public Object deQueue(){ - return queue.remove(0); - } - - public boolean isEmpty(){ - return queue.size()==0; - } - - public int size(){ - return queue.size(); - } -} diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java deleted file mode 100644 index f0a0fe56e9..0000000000 --- a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.github.wdn.coding2017.basic; - -/** - * 浣跨敤list瀹炵幇姣旇緝绠鍗 - * 鍙互鑰冭檻浣跨敤鍏跺畠缁撴瀯 - */ -public class Stack { - private ArrayList elementData = new ArrayList(); - - public void push(Object o){ - elementData.add(o); - } - - public Object pop(){ - return elementData.remove(elementData.size()-1); - } - - public Object peek(){ - return elementData.get(elementData.size()-1); - } - public boolean isEmpty(){ - return elementData.size()==0; - } - public int size(){ - return elementData.size(); - } -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/ArrayList.java b/group24/com/github/CJ-chen/coding2017/basic/ArrayList.java deleted file mode 100644 index cbb7084045..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/ArrayList.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -import java.util.Arrays; - -/** - * - * @author CJ - */ -public class ArrayList implements List { - - private int size = 0; - - private Object[] elementData = new Object[100]; - - private final int defaultGrowSize = 100; // 姣忔澧為暱 100 涓厓绱 - -// private int curIterIndex = 0; // 鐢ㄤ簬璁板綍 Iterator鐨勭储寮 - - private void CheckAndGrowUp() { - if (size+1 > elementData.length) { - elementData = Arrays.copyOf(elementData, elementData.length + defaultGrowSize); - } - } - - // 娣诲姞涓涓柟娉曪紝妫娴嬬湅锛屾坊鍔犲厓绱犵殑璇濓紝鏄惁闇瑕佸闀匡紝涓撻棬鐢ㄤ簬鏁扮粍闀垮害鎵╁睍鐨 - public void add(Object o) { - CheckAndGrowUp(); - elementData[size] = o; - size++; - } - - @Override - public void add(int index, Object o) { - // 鍏堟帰娴嬫槸鍚︽坊鍔犳暟缁勫ぇ灏 - CheckAndGrowUp(); - // 淇濈暀鍚庡崐閮ㄥ垎锛岀劧鍚 鍏ㄩ儴鏇挎崲鍗冲彲 - - Object[] tmpObjectArr = Arrays.copyOfRange(elementData, index, elementData.length); - elementData[index] = o; - for (int i = index+1; i < size+1; i++) { - elementData[i] = tmpObjectArr[i-index-1]; - } - size++; - - } - - public Object get(int index) { - // 搴旇鏄 涓嶉渶瑕佽窇鍑 涓嬫爣瓒婄晫寮傚父鐨勶紝鍥犱负鏁扮粍瓒婄晫浼氳嚜鍔ㄦ姏鍑 - return elementData[index]; - } - - public Object remove(int index) { - for (int i = index; i < size; i++) { - elementData[i] = elementData[i + 1]; - } - elementData[size] = null; // 鍚庣画鍚庨潰鏄 鏁板硷紵閭d箞灏变笉鑳戒负null浜嗭紝鑰屾槸闆讹紵 - size--; - return null; - } - - @Override - public int size() { - return size; - } - - // 瑕嗙洊toString鏂规硶锛屾柟渚挎祴璇 - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("ArrayList: ["); - for (int i = 0; i < size; i++) { - sb.append(elementData[i]).append(", "); - } -// System.err.println(size); - sb.delete(sb.length()-2,sb.length()).append("]"); - return sb.toString(); - } - - public Iterator iterator() { - - return new Iterator() { - int curIterIndex = 0; - @Override - public boolean hasNext() { - // TODO Auto-generated method stub - return curIterIndex < size; - } - - @Override - public Object next() { - // TODO Auto-generated method stub - return elementData[curIterIndex++]; - } - - }; - } - - public static void main(String[] args) { - ArrayList curArrList = new ArrayList(); - for (int i = 0; i <= 101; i++) { - curArrList.add(i); - } - System.err.println("Test add Arr"); - System.err.println(curArrList); - System.err.println("Test add in specific index"); - curArrList.add(10, 1010); - System.err.println(curArrList); - System.err.println("Test remove"); - curArrList.remove(10); - System.err.println(curArrList); - System.err.println("Test Iterator"); - Iterator curIter = curArrList.iterator(); - while(curIter.hasNext()){ - System.err.println(curIter.next()); - } - } - -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java b/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java deleted file mode 100644 index ff40538e64..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -/** - * - * @author CJ - */ -public class BinaryTreeNode { - - private Object data; - private BinaryTreeNode left; - private BinaryTreeNode right; - - public Object getData() { - return data; - } - - public void setData(Object data) { - this.data = data; - } - - public BinaryTreeNode getLeft() { - return left; - } - - public void setLeft(BinaryTreeNode left) { - this.left = left; - } - - public BinaryTreeNode getRight() { - return right; - } - - public void setRight(BinaryTreeNode right) { - this.right = right; - } - - public BinaryTreeNode insert(Object o) { - // 搴旇鍙渶瑕佸疄鐜拌繖涓氨鍙互浜 - int curValue = (Integer) this.getData(); - int insertValue = (Integer) o; - - BinaryTreeNode newNode = new BinaryTreeNode(); - newNode.setData(o); - - if (curValue > insertValue) { - if (this.getLeft() != null) { - return this.getLeft().insert(o); - } else { - this.setLeft(newNode); - return this; - } - } else{ - if (this.getRight() != null) { - return this.getRight().insert(o); - } else { - this.setRight(newNode); - return this; - } - } - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(this.getData()).append("\n"); - sb.append(this.getLeft()).append("<--").append(this.getData()).append("\n"); - sb.append(this.getData()).append("-->").append(this.getRight()).append("\n"); - return sb.toString(); - } - - public static void main(String[] args) { - BinaryTreeNode btn = new BinaryTreeNode(); - btn.setData(5); -// btn.insert(5); - btn.insert(7); - btn.insert(8); - btn.insert(9); - btn.insert(4); - - System.err.println(btn); - } - -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/Iterator.java b/group24/com/github/CJ-chen/coding2017/basic/Iterator.java deleted file mode 100644 index 29ab5ecaf0..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/Iterator.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -/** - * - * @author CJ - */ -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} \ No newline at end of file diff --git a/group24/com/github/CJ-chen/coding2017/basic/LinkedList.java b/group24/com/github/CJ-chen/coding2017/basic/LinkedList.java deleted file mode 100644 index 0364c16480..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/LinkedList.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -import java.util.Arrays; - -/** - * - * @author CJ - */ -public class LinkedList implements List { - - private Node head; - - private int size; -// private int curIterIndex; - - public LinkedList() { - head = new Node(); - size = 0; -// curIterIndex = 0; - } - - public void add(Object o) { - addLast(o); - } - - private Node getNode(int index) { - if (index == -1) { - return head; - } else { - Node returnNode = head.next; - for (int i = 0; i < index; i++) { - returnNode = returnNode.next; - } - return returnNode; - } - } - - public void add(int index, Object o) { - Node preNode = getNode(index - 1); - Node addNode = new Node(); - addNode.data = o; - addNode.next = preNode.next; - preNode.next = addNode; - size++; - } - - public Object get(int index) { - return getNode(index).data; - } - - public Object remove(int index) { - Node preNode = getNode(index - 1); - Node delNode = preNode.next; - preNode.next = delNode.next; - // 杩斿洖琚垹闄ょ殑Node... 鍙兘鏄负浜嗘祴璇曞惂 - size--; - return delNode; - } - - public int size() { - return size; - } - - public void addFirst(Object o) { - Node fNode = new Node(); - fNode.data = o; - fNode.next = head.next; - head.next = fNode; - size++; - } - - public void addLast(Object o) { -// System.err.println("Curr add: "+ o); - Node lastNode = getNode(size - 1); -// System.err.println(lastNode); - Node lNode = new Node(); - lNode.data = o; - lastNode.next = lNode; - size++; - } - - public Object removeFirst() { - return removeFirstNode().data; - } - - private Node removeFirstNode() { - Node firstNode = head.next; - head.next = firstNode.next; - size--; - return firstNode; - } - - public Object removeLast() { - return removeLastNode().data; - } - - private Node removeLastNode() { - Node last2Node = getNode(size - 2); - Node lastNode = last2Node.next; - last2Node.next = null; - size--; - return lastNode; - } - - public Iterator iterator() { - return new Iterator() { -// int curIterIndex = 0; - Node curNode = head; - - @Override - public boolean hasNext() { - return curNode.next != null; - } - - @Override - public Object next() { - curNode = curNode.next; - return curNode.data; - } - }; - } - - private static class Node { - - Object data; - Node next; - } - - /** - * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 - */ - public void reverse() { - - int oriSize = size; - Node newHead = new Node(); - newHead.next = this.removeLastNode(); - Node preNode = newHead.next; - - while (size > 0) { - preNode.next = this.removeLastNode(); - preNode = preNode.next; - } - // 涓嶈冭檻绾跨▼瀹夊叏鐨勬儏鍐典笅锛屾仮澶峴ize - size = oriSize; - head = newHead; - } - - /** - * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 - * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 - */ - public void removeFirstHalf() { - int reDirIndex = size / 2; // java浼氳嚜鍔 鍙 0 - size = size - reDirIndex; - System.err.println(reDirIndex); - Node jumpNode = getNode(reDirIndex); - head.next = jumpNode; - } - - /** - * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 - * - * @param i - * @param length - */ - public void remove(int i, int length) { - Node fromNode = getNode(i - 1); - for (int j = 0; j < length; j++) { - fromNode.next = fromNode.next.next; - size--; - } - } - - /** - * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = - * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 - * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] - * - * @param list - */ -// public static int[] getElements(LinkedList list) { - // 杩欎釜浼间箮 涓嶅簲璇ユ槸 闈欐佹柟娉 - public int[] getElements(LinkedList list) { - int[] returnIndex = new int[list.size]; - int validCounts = 0; -// Iterator curIter = list.iterator(); -// int curIndex = 0; -// while(curIter.hasNext()){ -// returnIndex[curIndex++] =(Integer) this.get((Integer) curIter.next()); -// } - - // 宸茬煡鏄唴澶栭兘鏄帺鍘绘帓搴忓ソ鐨勶紝鎵浠ユ槸闇瑕佷竴涓珮鏁堢殑绠楁硶 - Iterator innerIter = this.iterator(); - Iterator curIter = list.iterator(); - int curCount = 0; - int curIndex; - int preIndex = 0; - - while (curIter.hasNext()) { - curIndex = (Integer) curIter.next(); - if (curIndex < preIndex) { - System.err.println("Warning: Skip index no in sorted order..."); - continue; - } -// int skipCounts = curIndex-preIndex; - for (int i = preIndex; i < curIndex; i++) { - innerIter.next(); - } - validCounts++; - returnIndex[curCount++] = (Integer) innerIter.next(); - preIndex = curIndex + 1; - } - return Arrays.copyOf(returnIndex, validCounts); - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 - * - * @param list - */ - public void subtract(LinkedList list) { - // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 - Node preNode = head; - Node curNode; - Iterator element2rmIter = list.iterator(); - while (element2rmIter.hasNext()) { - int curValue2rm = (Integer) element2rmIter.next(); - while (preNode.next != null) { - curNode = preNode.next; - if ((Integer) curNode.data == curValue2rm) { - // 鍒犻櫎 - preNode.next = curNode.next; - }else if((Integer) curNode.data > curValue2rm){ - break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 - }else { - // 鏇存柊 - preNode = curNode; - } - } - } - } - - /** - * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 - */ - public void removeDuplicateValues() { - Node preNode = head; - Node curNode; - while (preNode.next != null) { - curNode = preNode.next; - if (curNode.data == preNode.data) { - preNode.next = curNode.next; - } else { - preNode = curNode; - } - } - } - - /** - * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 - * - * @param min - * @param max - */ - public void removeRange(int min, int max) { - // 鍋囧畾 褰撳墠閾捐〃 鏄 浠庡皬鍒板ぇ 鎺掑垪鐨 - Node preNode = head; - Node curNode; - while (preNode.next != null) { - curNode = preNode.next; - if (min < (Integer) curNode.data && max > (Integer) curNode.data) { - preNode.next = curNode.next; - } else { - preNode = curNode; - } - } - } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * - * @param list - */ - public LinkedList intersection(LinkedList list) { - - - LinkedList newList = new LinkedList(); - - // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 - Node preNode = head; - Node curNode; - Iterator element2rmIter = list.iterator(); - while (element2rmIter.hasNext()) { - int curValue2rm = (Integer) element2rmIter.next(); - while (preNode.next != null) { - curNode = preNode.next; - if ((Integer) curNode.data == curValue2rm) { - // 鍒犻櫎 - preNode = curNode; - newList.add(curNode.data); // 娣诲姞data - }else if((Integer) curNode.data > curValue2rm){ - break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 - }else { - // 鏇存柊 - preNode = curNode; - } - } - } - - - return newList; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("LinkdedList ["); - Node curNode = head; - while (curNode.next != null) { - curNode = curNode.next; - sb.append(curNode.data).append(", "); - } - sb.delete(sb.length() - 2, sb.length()).append("]"); - return sb.toString(); - } - - public void clear() { - head.next = null; - size = 0; - } - - public static void main(String[] args) { - // 鍏堝啓涓浜涙祴璇 - LinkedList ll = new LinkedList(); - System.err.println("Test Add"); - for (int i = 0; i < 10; i++) { - ll.add(i); - } - System.err.println("Size: " + ll.size); - System.err.println(ll); - System.err.println("Test Add last"); - ll.addLast(10); - System.err.println(ll); - System.err.println("Test Add First"); - ll.addFirst(-1); - System.err.println(ll); - System.err.println("Test remove "); - ll.remove(0); - System.err.println(ll); -// ll.remove(11); -// System.err.println(ll); - ll.removeFirst(); - System.err.println(ll); - ll.removeLast(); - System.err.println(ll); - System.err.println("Test reverse()"); - ll.reverse(); - System.err.println(ll); - System.err.println("Test removeFirstHalf()"); - ll.removeFirstHalf(); - System.err.println(ll); -// System.err.println(9/2); - System.err.println("Test remove()"); - ll.remove(1, 2); - System.err.println(ll); -// System.err.println(ll.); - LinkedList newList = new LinkedList(); - newList.add(3); - newList.add(4); - newList.add(6); - newList.add(5); -// System.err.println(); - ll.clear(); - System.err.println("Re Init"); - for (int i = 0; i < 10; i++) { - ll.add(i); - } - System.err.println(ll); - for (int curI : ll.getElements(newList)) { - System.err.println(curI); - } - ll.clear(); - for (int i = 0; i < 10; i++) { - ll.add(i); - ll.add(i); - ll.add(i); - } - System.err.println(ll); - ll.removeDuplicateValues(); - System.err.println(ll); - System.err.println("Test Remove removeRange(3, 6)"); - ll.removeRange(3, 6); - System.err.println(ll); - - LinkedList rmList = new LinkedList(); - rmList.add(3); - rmList.add(4); - rmList.add(7); - rmList.add(8); - ll.subtract(rmList); - System.err.println("Test subtract(3,4,7,8)"); - System.err.println(ll); - ll.clear(); - for (int i = 0; i < 10; i++) { - ll.add(i); - } - rmList.add(11); - System.err.println(ll); - System.err.println(rmList); - System.err.println(ll.intersection(rmList)); -// System.err.println("Test substract"); -// ll.subtract(newList); -// System.err.println(ll); - - } - -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/List.java b/group24/com/github/CJ-chen/coding2017/basic/List.java deleted file mode 100644 index d347e59c47..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/List.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -/** - * - * @author CJ - */ -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/Queue.java b/group24/com/github/CJ-chen/coding2017/basic/Queue.java deleted file mode 100644 index 4cbc45e065..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/Queue.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -/** - * - * @author CJ - */ -public class Queue { - - private final LinkedList innerList; - - public Queue(){ - innerList = new LinkedList(); - } - - public void enQueue(Object o) { - innerList.addLast(o); - } - - public Object deQueue() { - return innerList.removeFirst(); - } - - public boolean isEmpty() { - return innerList.size()==0; - } - - public int size() { - return innerList.size(); - } - - public String toString(){ - StringBuilder sb = new StringBuilder(); - sb.append("ArrayList: ["); - for (int i = 0; i < innerList.size(); i++) { - sb.append(innerList.get(i)).append(", "); - } -// System.err.println(size); - sb.delete(sb.length()-2,sb.length()).append("]"); - return sb.toString(); - } - - public static void main(String[] args) { - Queue newQ = new Queue(); - for(int i=0;i<10;i++){ - newQ.enQueue(i); - } - System.err.println(newQ); - newQ.deQueue(); - System.err.println(newQ); - } - - -} diff --git a/group24/com/github/CJ-chen/coding2017/basic/Stack.java b/group24/com/github/CJ-chen/coding2017/basic/Stack.java deleted file mode 100644 index 3ba85c6bcf..0000000000 --- a/group24/com/github/CJ-chen/coding2017/basic/Stack.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package javaclass; - -/** - * - * @author CJ - */ -public class Stack { - - private ArrayList elementData = new ArrayList(); - - public void push(Object o) { - elementData.add(o); - } - - public Object pop() { - return elementData.remove(elementData.size()-1); - } - - public Object peek() { - return elementData.get(elementData.size()-1); - } - - public boolean isEmpty() { - return elementData.size()==0; - } - - public int size() { - return elementData.size(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("ArrayList: ["); - for (int i = 0; i < elementData.size(); i++) { - sb.append(elementData.get(i)).append(", "); - } -// System.err.println(size); - sb.delete(sb.length()-2,sb.length()).append("]"); - return sb.toString(); - } - public static void main(String[] args) { - Stack newS = new Stack(); - for(int i=0;i<10;i++){ - newS.push(i); - } - System.err.println("Test push()"); - System.err.println(newS); - newS.pop(); - System.err.println("Test pop()"); - System.err.println(newS); - System.err.println("Test peek()"); - System.err.println(newS.peek()); - System.err.println(newS); - - } - -} From 5e5842b1b479ed6928ca946e252fe7ae647ccc4a Mon Sep 17 00:00:00 2001 From: DonaldY <448641125@qq.com> Date: Sun, 12 Mar 2017 20:06:40 +0800 Subject: [PATCH 380/646] correct fomat --- .../CJ-chen/coding2017/basic/ArrayList.java | 123 +++++ .../coding2017/basic/BinaryTreeNode.java | 87 ++++ .../CJ-chen/coding2017/basic/Iterator.java | 16 + .../CJ-chen/coding2017/basic/LinkedList.java | 423 ++++++++++++++++++ .../github/CJ-chen/coding2017/basic/List.java | 18 + .../CJ-chen/coding2017/basic/Queue.java | 58 +++ .../CJ-chen/coding2017/basic/Stack.java | 63 +++ group24/626451284/pom.xml | 12 + .../wdn/coding2017/basic/ArrayList.java | 88 ++++ .../wdn/coding2017/basic/BinaryTreeNode.java | 35 ++ .../github/wdn/coding2017/basic/Iterator.java | 10 + .../wdn/coding2017/basic/LinkedList.java | 233 ++++++++++ .../com/github/wdn/coding2017/basic/List.java | 9 + .../github/wdn/coding2017/basic/Queue.java | 24 + .../github/wdn/coding2017/basic/Stack.java | 27 ++ 15 files changed, 1226 insertions(+) create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/ArrayList.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/Iterator.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/LinkedList.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/List.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/Queue.java create mode 100644 group24/120509419/com/github/CJ-chen/coding2017/basic/Stack.java create mode 100644 group24/626451284/pom.xml create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Iterator.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/List.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Queue.java create mode 100644 group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Stack.java diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/ArrayList.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..cbb7084045 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/ArrayList.java @@ -0,0 +1,123 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +import java.util.Arrays; + +/** + * + * @author CJ + */ +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + private final int defaultGrowSize = 100; // 姣忔澧為暱 100 涓厓绱 + +// private int curIterIndex = 0; // 鐢ㄤ簬璁板綍 Iterator鐨勭储寮 + + private void CheckAndGrowUp() { + if (size+1 > elementData.length) { + elementData = Arrays.copyOf(elementData, elementData.length + defaultGrowSize); + } + } + + // 娣诲姞涓涓柟娉曪紝妫娴嬬湅锛屾坊鍔犲厓绱犵殑璇濓紝鏄惁闇瑕佸闀匡紝涓撻棬鐢ㄤ簬鏁扮粍闀垮害鎵╁睍鐨 + public void add(Object o) { + CheckAndGrowUp(); + elementData[size] = o; + size++; + } + + @Override + public void add(int index, Object o) { + // 鍏堟帰娴嬫槸鍚︽坊鍔犳暟缁勫ぇ灏 + CheckAndGrowUp(); + // 淇濈暀鍚庡崐閮ㄥ垎锛岀劧鍚 鍏ㄩ儴鏇挎崲鍗冲彲 + + Object[] tmpObjectArr = Arrays.copyOfRange(elementData, index, elementData.length); + elementData[index] = o; + for (int i = index+1; i < size+1; i++) { + elementData[i] = tmpObjectArr[i-index-1]; + } + size++; + + } + + public Object get(int index) { + // 搴旇鏄 涓嶉渶瑕佽窇鍑 涓嬫爣瓒婄晫寮傚父鐨勶紝鍥犱负鏁扮粍瓒婄晫浼氳嚜鍔ㄦ姏鍑 + return elementData[index]; + } + + public Object remove(int index) { + for (int i = index; i < size; i++) { + elementData[i] = elementData[i + 1]; + } + elementData[size] = null; // 鍚庣画鍚庨潰鏄 鏁板硷紵閭d箞灏变笉鑳戒负null浜嗭紝鑰屾槸闆讹紵 + size--; + return null; + } + + @Override + public int size() { + return size; + } + + // 瑕嗙洊toString鏂规硶锛屾柟渚挎祴璇 + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("ArrayList: ["); + for (int i = 0; i < size; i++) { + sb.append(elementData[i]).append(", "); + } +// System.err.println(size); + sb.delete(sb.length()-2,sb.length()).append("]"); + return sb.toString(); + } + + public Iterator iterator() { + + return new Iterator() { + int curIterIndex = 0; + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return curIterIndex < size; + } + + @Override + public Object next() { + // TODO Auto-generated method stub + return elementData[curIterIndex++]; + } + + }; + } + + public static void main(String[] args) { + ArrayList curArrList = new ArrayList(); + for (int i = 0; i <= 101; i++) { + curArrList.add(i); + } + System.err.println("Test add Arr"); + System.err.println(curArrList); + System.err.println("Test add in specific index"); + curArrList.add(10, 1010); + System.err.println(curArrList); + System.err.println("Test remove"); + curArrList.remove(10); + System.err.println(curArrList); + System.err.println("Test Iterator"); + Iterator curIter = curArrList.iterator(); + while(curIter.hasNext()){ + System.err.println(curIter.next()); + } + } + +} diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..ff40538e64 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java @@ -0,0 +1,87 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public BinaryTreeNode getLeft() { + return left; + } + + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + + public BinaryTreeNode getRight() { + return right; + } + + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o) { + // 搴旇鍙渶瑕佸疄鐜拌繖涓氨鍙互浜 + int curValue = (Integer) this.getData(); + int insertValue = (Integer) o; + + BinaryTreeNode newNode = new BinaryTreeNode(); + newNode.setData(o); + + if (curValue > insertValue) { + if (this.getLeft() != null) { + return this.getLeft().insert(o); + } else { + this.setLeft(newNode); + return this; + } + } else{ + if (this.getRight() != null) { + return this.getRight().insert(o); + } else { + this.setRight(newNode); + return this; + } + } + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(this.getData()).append("\n"); + sb.append(this.getLeft()).append("<--").append(this.getData()).append("\n"); + sb.append(this.getData()).append("-->").append(this.getRight()).append("\n"); + return sb.toString(); + } + + public static void main(String[] args) { + BinaryTreeNode btn = new BinaryTreeNode(); + btn.setData(5); +// btn.insert(5); + btn.insert(7); + btn.insert(8); + btn.insert(9); + btn.insert(4); + + System.err.println(btn); + } + +} diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/Iterator.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..29ab5ecaf0 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/Iterator.java @@ -0,0 +1,16 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} \ No newline at end of file diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/LinkedList.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..0364c16480 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/LinkedList.java @@ -0,0 +1,423 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +import java.util.Arrays; + +/** + * + * @author CJ + */ +public class LinkedList implements List { + + private Node head; + + private int size; +// private int curIterIndex; + + public LinkedList() { + head = new Node(); + size = 0; +// curIterIndex = 0; + } + + public void add(Object o) { + addLast(o); + } + + private Node getNode(int index) { + if (index == -1) { + return head; + } else { + Node returnNode = head.next; + for (int i = 0; i < index; i++) { + returnNode = returnNode.next; + } + return returnNode; + } + } + + public void add(int index, Object o) { + Node preNode = getNode(index - 1); + Node addNode = new Node(); + addNode.data = o; + addNode.next = preNode.next; + preNode.next = addNode; + size++; + } + + public Object get(int index) { + return getNode(index).data; + } + + public Object remove(int index) { + Node preNode = getNode(index - 1); + Node delNode = preNode.next; + preNode.next = delNode.next; + // 杩斿洖琚垹闄ょ殑Node... 鍙兘鏄负浜嗘祴璇曞惂 + size--; + return delNode; + } + + public int size() { + return size; + } + + public void addFirst(Object o) { + Node fNode = new Node(); + fNode.data = o; + fNode.next = head.next; + head.next = fNode; + size++; + } + + public void addLast(Object o) { +// System.err.println("Curr add: "+ o); + Node lastNode = getNode(size - 1); +// System.err.println(lastNode); + Node lNode = new Node(); + lNode.data = o; + lastNode.next = lNode; + size++; + } + + public Object removeFirst() { + return removeFirstNode().data; + } + + private Node removeFirstNode() { + Node firstNode = head.next; + head.next = firstNode.next; + size--; + return firstNode; + } + + public Object removeLast() { + return removeLastNode().data; + } + + private Node removeLastNode() { + Node last2Node = getNode(size - 2); + Node lastNode = last2Node.next; + last2Node.next = null; + size--; + return lastNode; + } + + public Iterator iterator() { + return new Iterator() { +// int curIterIndex = 0; + Node curNode = head; + + @Override + public boolean hasNext() { + return curNode.next != null; + } + + @Override + public Object next() { + curNode = curNode.next; + return curNode.data; + } + }; + } + + private static class Node { + + Object data; + Node next; + } + + /** + * 鎶婅閾捐〃閫嗙疆 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse() { + + int oriSize = size; + Node newHead = new Node(); + newHead.next = this.removeLastNode(); + Node preNode = newHead.next; + + while (size > 0) { + preNode.next = this.removeLastNode(); + preNode = preNode.next; + } + // 涓嶈冭檻绾跨▼瀹夊叏鐨勬儏鍐典笅锛屾仮澶峴ize + size = oriSize; + head = newHead; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 濡傛灉list = 2->5->7->8->10 + * ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + */ + public void removeFirstHalf() { + int reDirIndex = size / 2; // java浼氳嚜鍔 鍙 0 + size = size - reDirIndex; + System.err.println(reDirIndex); + Node jumpNode = getNode(reDirIndex); + head.next = jumpNode; + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * + * @param i + * @param length + */ + public void remove(int i, int length) { + Node fromNode = getNode(i - 1); + for (int j = 0; j < length; j++) { + fromNode.next = fromNode.next.next; + size--; + } + } + + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 渚嬪褰撳墠閾捐〃 = + * 11->101->201->301->401->501->601->701 listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * + * @param list + */ +// public static int[] getElements(LinkedList list) { + // 杩欎釜浼间箮 涓嶅簲璇ユ槸 闈欐佹柟娉 + public int[] getElements(LinkedList list) { + int[] returnIndex = new int[list.size]; + int validCounts = 0; +// Iterator curIter = list.iterator(); +// int curIndex = 0; +// while(curIter.hasNext()){ +// returnIndex[curIndex++] =(Integer) this.get((Integer) curIter.next()); +// } + + // 宸茬煡鏄唴澶栭兘鏄帺鍘绘帓搴忓ソ鐨勶紝鎵浠ユ槸闇瑕佷竴涓珮鏁堢殑绠楁硶 + Iterator innerIter = this.iterator(); + Iterator curIter = list.iterator(); + int curCount = 0; + int curIndex; + int preIndex = 0; + + while (curIter.hasNext()) { + curIndex = (Integer) curIter.next(); + if (curIndex < preIndex) { + System.err.println("Warning: Skip index no in sorted order..."); + continue; + } +// int skipCounts = curIndex-preIndex; + for (int i = preIndex; i < curIndex; i++) { + innerIter.next(); + } + validCounts++; + returnIndex[curCount++] = (Integer) innerIter.next(); + preIndex = curIndex + 1; + } + return Arrays.copyOf(returnIndex, validCounts); + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + * + * @param list + */ + public void subtract(LinkedList list) { + // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 + Node preNode = head; + Node curNode; + Iterator element2rmIter = list.iterator(); + while (element2rmIter.hasNext()) { + int curValue2rm = (Integer) element2rmIter.next(); + while (preNode.next != null) { + curNode = preNode.next; + if ((Integer) curNode.data == curValue2rm) { + // 鍒犻櫎 + preNode.next = curNode.next; + }else if((Integer) curNode.data > curValue2rm){ + break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 + }else { + // 鏇存柊 + preNode = curNode; + } + } + } + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues() { + Node preNode = head; + Node curNode; + while (preNode.next != null) { + curNode = preNode.next; + if (curNode.data == preNode.data) { + preNode.next = curNode.next; + } else { + preNode = curNode; + } + } + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * + * @param min + * @param max + */ + public void removeRange(int min, int max) { + // 鍋囧畾 褰撳墠閾捐〃 鏄 浠庡皬鍒板ぇ 鎺掑垪鐨 + Node preNode = head; + Node curNode; + while (preNode.next != null) { + curNode = preNode.next; + if (min < (Integer) curNode.data && max > (Integer) curNode.data) { + preNode.next = curNode.next; + } else { + preNode = curNode; + } + } + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + + + LinkedList newList = new LinkedList(); + + // 鍋囧畾 褰撳墠 閾捐〃 鍜 寰呭垹闄 閾捐〃 閮芥槸椤哄簭鎺掑簭鐨 + Node preNode = head; + Node curNode; + Iterator element2rmIter = list.iterator(); + while (element2rmIter.hasNext()) { + int curValue2rm = (Integer) element2rmIter.next(); + while (preNode.next != null) { + curNode = preNode.next; + if ((Integer) curNode.data == curValue2rm) { + // 鍒犻櫎 + preNode = curNode; + newList.add(curNode.data); // 娣诲姞data + }else if((Integer) curNode.data > curValue2rm){ + break; // 璺冲嚭鍐呭眰寰幆锛屼粠鑰岃幏鍙栦笅涓涓緟鍒犻櫎鏁版嵁 + }else { + // 鏇存柊 + preNode = curNode; + } + } + } + + + return newList; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("LinkdedList ["); + Node curNode = head; + while (curNode.next != null) { + curNode = curNode.next; + sb.append(curNode.data).append(", "); + } + sb.delete(sb.length() - 2, sb.length()).append("]"); + return sb.toString(); + } + + public void clear() { + head.next = null; + size = 0; + } + + public static void main(String[] args) { + // 鍏堝啓涓浜涙祴璇 + LinkedList ll = new LinkedList(); + System.err.println("Test Add"); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + System.err.println("Size: " + ll.size); + System.err.println(ll); + System.err.println("Test Add last"); + ll.addLast(10); + System.err.println(ll); + System.err.println("Test Add First"); + ll.addFirst(-1); + System.err.println(ll); + System.err.println("Test remove "); + ll.remove(0); + System.err.println(ll); +// ll.remove(11); +// System.err.println(ll); + ll.removeFirst(); + System.err.println(ll); + ll.removeLast(); + System.err.println(ll); + System.err.println("Test reverse()"); + ll.reverse(); + System.err.println(ll); + System.err.println("Test removeFirstHalf()"); + ll.removeFirstHalf(); + System.err.println(ll); +// System.err.println(9/2); + System.err.println("Test remove()"); + ll.remove(1, 2); + System.err.println(ll); +// System.err.println(ll.); + LinkedList newList = new LinkedList(); + newList.add(3); + newList.add(4); + newList.add(6); + newList.add(5); +// System.err.println(); + ll.clear(); + System.err.println("Re Init"); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + System.err.println(ll); + for (int curI : ll.getElements(newList)) { + System.err.println(curI); + } + ll.clear(); + for (int i = 0; i < 10; i++) { + ll.add(i); + ll.add(i); + ll.add(i); + } + System.err.println(ll); + ll.removeDuplicateValues(); + System.err.println(ll); + System.err.println("Test Remove removeRange(3, 6)"); + ll.removeRange(3, 6); + System.err.println(ll); + + LinkedList rmList = new LinkedList(); + rmList.add(3); + rmList.add(4); + rmList.add(7); + rmList.add(8); + ll.subtract(rmList); + System.err.println("Test subtract(3,4,7,8)"); + System.err.println(ll); + ll.clear(); + for (int i = 0; i < 10; i++) { + ll.add(i); + } + rmList.add(11); + System.err.println(ll); + System.err.println(rmList); + System.err.println(ll.intersection(rmList)); +// System.err.println("Test substract"); +// ll.subtract(newList); +// System.err.println(ll); + + } + +} diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/List.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/List.java new file mode 100644 index 0000000000..d347e59c47 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/List.java @@ -0,0 +1,18 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/Queue.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/Queue.java new file mode 100644 index 0000000000..4cbc45e065 --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/Queue.java @@ -0,0 +1,58 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public class Queue { + + private final LinkedList innerList; + + public Queue(){ + innerList = new LinkedList(); + } + + public void enQueue(Object o) { + innerList.addLast(o); + } + + public Object deQueue() { + return innerList.removeFirst(); + } + + public boolean isEmpty() { + return innerList.size()==0; + } + + public int size() { + return innerList.size(); + } + + public String toString(){ + StringBuilder sb = new StringBuilder(); + sb.append("ArrayList: ["); + for (int i = 0; i < innerList.size(); i++) { + sb.append(innerList.get(i)).append(", "); + } +// System.err.println(size); + sb.delete(sb.length()-2,sb.length()).append("]"); + return sb.toString(); + } + + public static void main(String[] args) { + Queue newQ = new Queue(); + for(int i=0;i<10;i++){ + newQ.enQueue(i); + } + System.err.println(newQ); + newQ.deQueue(); + System.err.println(newQ); + } + + +} diff --git a/group24/120509419/com/github/CJ-chen/coding2017/basic/Stack.java b/group24/120509419/com/github/CJ-chen/coding2017/basic/Stack.java new file mode 100644 index 0000000000..3ba85c6bcf --- /dev/null +++ b/group24/120509419/com/github/CJ-chen/coding2017/basic/Stack.java @@ -0,0 +1,63 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaclass; + +/** + * + * @author CJ + */ +public class Stack { + + private ArrayList elementData = new ArrayList(); + + public void push(Object o) { + elementData.add(o); + } + + public Object pop() { + return elementData.remove(elementData.size()-1); + } + + public Object peek() { + return elementData.get(elementData.size()-1); + } + + public boolean isEmpty() { + return elementData.size()==0; + } + + public int size() { + return elementData.size(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("ArrayList: ["); + for (int i = 0; i < elementData.size(); i++) { + sb.append(elementData.get(i)).append(", "); + } +// System.err.println(size); + sb.delete(sb.length()-2,sb.length()).append("]"); + return sb.toString(); + } + public static void main(String[] args) { + Stack newS = new Stack(); + for(int i=0;i<10;i++){ + newS.push(i); + } + System.err.println("Test push()"); + System.err.println(newS); + newS.pop(); + System.err.println("Test pop()"); + System.err.println(newS); + System.err.println("Test peek()"); + System.err.println(newS.peek()); + System.err.println(newS); + + } + +} diff --git a/group24/626451284/pom.xml b/group24/626451284/pom.xml new file mode 100644 index 0000000000..534ff39232 --- /dev/null +++ b/group24/626451284/pom.xml @@ -0,0 +1,12 @@ + + + 4.0.0 + + com.github.wdn + coding2017 + 1.0-SNAPSHOT + + + \ No newline at end of file diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..3b3ea048f3 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java @@ -0,0 +1,88 @@ +package com.github.wdn.coding2017.basic; + +import java.util.Arrays; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData; + public ArrayList(){ + elementData = new Object[10]; + } + public ArrayList(int size){ + elementData = new Object[size]; + } + public void add(Object o){ + if(size>=elementData.length){ + elementData = Arrays.copyOf(elementData,elementData.length*2); + } + elementData[size]=o; + size++; + } + public void add(int index, Object o){ + Object[] newElementData; + if(size()+1>=elementData.length){ + newElementData=new Object[elementData.length*2]; + + }else{ + newElementData=new Object[elementData.length]; + } + for (int i = 0; i < elementData.length; i++) { + if(index==1){ + newElementData[i]=o; + }else if(i>index) { + newElementData[i]=elementData[i-1]; + }else{ + newElementData[i]=elementData[i]; + } + } + elementData = newElementData; + size++; + } + + public Object get(int index){ + if(index>=size){ + throw new IndexOutOfBoundsException(); + } + return elementData[index]; + } + + public Object remove(int index) { + if(index>=size){ + throw new IndexOutOfBoundsException(); + } + Object returnO = elementData[index]; + for (int i = index; i < size; i++) { + if(i==size-1){ + elementData[i]=null; + }else { + elementData[i] = elementData[i + 1]; + } + } + size--; + return returnO; + } + + public int size(){ + return size; + } + + public Iterator iterator(){ + return null; + } + + public static void main(String[] args) { + ArrayList list = new ArrayList(2); + list.add("1"); + list.add("2"); + list.remove(1); + list.add("3"); + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i)); + } + int[] i = {}; + System.out.println(i[0]); + } + +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..b8b613d6f0 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java @@ -0,0 +1,35 @@ +package com.github.wdn.coding2017.basic; + +/** + * TODO 浠g爜鍦ㄥ叕鍙哥數鑴戦噷銆傘傘傚悗缁彁浜 + */ +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + return null; + } + +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Iterator.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..044ddf0993 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Iterator.java @@ -0,0 +1,10 @@ +package com.github.wdn.coding2017.basic; + +/** + * TODO 涓昏鑰冭檻閬嶅巻涓畨鍏ㄥ垹闄ゅ厓绱犵殑瀹炵幇 + */ +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..6040cb5a47 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java @@ -0,0 +1,233 @@ +package com.github.wdn.coding2017.basic; + +/** + * TODO 鍙槸绠鍗曞疄鐜 缂哄皯瀵硅竟鐣岀殑澶勭悊 + * 鍙傝僇DK婧愮爜鏀逛负鏇翠紭闆呯殑瀹炵幇 + */ + +public class LinkedList implements List { + + private Node head; + private Node tail; + private int size; + + public LinkedList(){ + this.head=null; + this.tail=null; + } + public void add(Object o){ + Node newNode = new Node(o); + if (head == null) { + head = newNode; + tail = newNode; + }else{ + tail.setNext(newNode); + newNode.setPre(tail); + tail = newNode; + } + size++; + } + public void add(int index , Object o){ + checkIndex(index); + Node indexNode = getNode(index); + Node newNode = new Node(o); + Node pre = indexNode.getPre(); + if(pre!=null){ + pre.setNext(newNode); + }else{ + head = newNode; + } + newNode.setPre(pre); + newNode.setNext(indexNode); + indexNode.setPre(newNode); + } + private void checkIndex(int index){ + if(index >= size || index <0){ + throw new IndexOutOfBoundsException(); + } + } + private Node getNode(int index){ + checkIndex(index); + // TODO杩欓噷鍙互浼樺寲锛屽厛鍒ゆ柇index鍦ㄥ墠鍗婇儴杩樻槸鍚庡崐閮ㄥ垎 鐒跺悗纭畾浠庡ご閮ㄦ垨鑰呭熬閮ㄦ煡鎵 + Node result=null; + if(index==0){ + return head; + } + if(index==size-1){ + return tail; + } + for (int i = 0; i < index; i++) { + result = head.getNext(); + } + return result; + } + public Object get(int index){ + return getNode(index).getData(); + } + public Object remove(int index){ + checkIndex(index); + Node indexNode = getNode(index); + Node pre = indexNode.getPre(); + Node next = indexNode.getNext(); + if(pre!=null){ + pre.setNext(next); + }else{ + head = next; + } + if(next!=null){ + next.setPre(pre); + }else{ + tail = pre; + } + return indexNode.getData(); + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + Node newNode = new Node(o); + head.setPre(newNode); + newNode.setNext(head); + head = newNode; + } + public void addLast(Object o){ + Node newNode = new Node(o); + tail.setNext(newNode); + newNode.setPre(tail); + tail = newNode; + } + public Object removeFirst(){ + Node next = head.getNext(); + Node oldHead = head; + head = next; + head.setPre(null); + return oldHead; + } + public Object removeLast(){ + Node oldTail = tail; + Node pre = tail.getPre(); + tail = pre; + tail.setNext(null); + return oldTail; + } + public Iterator iterator(){ + + return null; + } + + /** + * JDK 涓娇鐢ㄦ瀯閫犳柟娉曠殑鏂瑰紡璁剧疆next鍜宲re鍑忓皯涓嶅繀瑕佺殑getset鏂规硶鏇翠紭闆 + */ + private static class Node{ + + Object data; + Node next; + Node pre; + public Node(){ + + } + public Node(Object data){ + this.data = data; + } + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public Node getNext() { + return next; + } + + public void setNext(Node next) { + this.next = next; + } + + public Node getPre() { + return pre; + } + + public void setPre(Node pre) { + this.pre = pre; + } + } + + /** + * 鎶婅閾捐〃閫嗙疆 + * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(LinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(LinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public LinkedList intersection( LinkedList list){ + return null; + } +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/List.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/List.java new file mode 100644 index 0000000000..d6c9e95cb0 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/List.java @@ -0,0 +1,9 @@ +package com.github.wdn.coding2017.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Queue.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Queue.java new file mode 100644 index 0000000000..59992f0cbd --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Queue.java @@ -0,0 +1,24 @@ +package com.github.wdn.coding2017.basic; + +/** + * 闃熷垪浣跨敤閾捐〃瀹炵幇姣旇緝绠鍗曠悊璁轰笂鏄棤鐣岄槦鍒 + * 濡傛灉浣跨敤鏁扮粍闇瑕佸鐞嗗緢澶氶棶棰樻瘮濡傞暱搴﹂檺鍒讹紝鍏冪礌鐨勫鍒 + */ +public class Queue { + private LinkedList queue = new LinkedList(); + public void enQueue(Object o){ + queue.add(o); + } + + public Object deQueue(){ + return queue.remove(0); + } + + public boolean isEmpty(){ + return queue.size()==0; + } + + public int size(){ + return queue.size(); + } +} diff --git a/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Stack.java b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Stack.java new file mode 100644 index 0000000000..f0a0fe56e9 --- /dev/null +++ b/group24/626451284/src/main/java/com/github/wdn/coding2017/basic/Stack.java @@ -0,0 +1,27 @@ +package com.github.wdn.coding2017.basic; + +/** + * 浣跨敤list瀹炵幇姣旇緝绠鍗 + * 鍙互鑰冭檻浣跨敤鍏跺畠缁撴瀯 + */ +public class Stack { + private ArrayList elementData = new ArrayList(); + + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return elementData.size()==0; + } + public int size(){ + return elementData.size(); + } +} From 43aece6c0f38ed06904695de001272eb3e90aeb6 Mon Sep 17 00:00:00 2001 From: xiaozi Date: Sun, 12 Mar 2017 20:08:46 +0800 Subject: [PATCH 381/646] This is the first week's work. --- group24/1054283210/.classpath | 1 + .../xiaozi123/coding2017/basic/ArrayList.java | 103 +++++++++++ .../coding2017/basic/BinaryTreeNode.java | 72 ++++++++ .../xiaozi123/coding2017/basic/Iterator.java | 7 + .../coding2017/basic/LinkedList.java | 163 ++++++++++++++++++ .../xiaozi123/coding2017/basic/List.java | 9 + .../xiaozi123/coding2017/basic/Queue.java | 46 +++++ .../xiaozi123/coding2017/basic/Stack.java | 51 ++++++ ...7\347\253\240\345\234\260\345\235\200.txt" | 1 + 9 files changed, 453 insertions(+) create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/ArrayList.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/BinaryTreeNode.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Iterator.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/LinkedList.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/List.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Queue.java create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Stack.java create mode 100644 "group24/1054283210/src/com/github/xiaozi123/coding2017/basic/\346\226\207\347\253\240\345\234\260\345\235\200.txt" diff --git a/group24/1054283210/.classpath b/group24/1054283210/.classpath index d171cd4c12..2d7497573f 100644 --- a/group24/1054283210/.classpath +++ b/group24/1054283210/.classpath @@ -2,5 +2,6 @@ + diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/ArrayList.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/ArrayList.java new file mode 100644 index 0000000000..891c355406 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/ArrayList.java @@ -0,0 +1,103 @@ +package com.github.xiaozi123.coding2017.basic; + +import java.util.Arrays; + +import org.omg.CORBA.PUBLIC_MEMBER; + +public class ArrayList implements List { + + private int size = 0; + + private Object[] elementData = new Object[100]; + + public void add(Object o){ + if(size>=elementData.length){//如果没有内存 获取两倍内存 + elementData=Arrays.copyOf(elementData,size+1); + } + elementData[size]=o; + size++; + } + public void add(int index, Object o){ + if(index<0||index>=elementData.length){ + throw new ArrayIndexOutOfBoundsException("OutOfBound"); + } + + if(size>=elementData.length){//如果没有内存 获取两倍内存 + elementData=Arrays.copyOf(elementData, size+1); + } + System.arraycopy(elementData, index, elementData, index+1, elementData.length-index-1); + elementData[index]=o; + size++; + } + + public Object get(int index){ + if(index<0||index>=elementData.length){ + throw new ArrayIndexOutOfBoundsException("OutOfBound"); + } + return elementData[index]; + } + + public Object remove(int index){ + if(index<0||index>=elementData.length){ + throw new ArrayIndexOutOfBoundsException("OutOfBound"); + } + Object temp=elementData[index]; + System.arraycopy(elementData, index+1, elementData, index, elementData.length-index-1); + size--; + return temp; + } + + /* + * (non-Javadoc)获取目前长度 + * @see com.github.xiaozi123.coding2017.basic.List#size() + */ + public int size(){ + if(size>=elementData.length){//如果没有内存 获取两倍内存 + elementData=Arrays.copyOf(elementData,size+1); + } + return size; + } + + // next() hasnext()方法 + public Iterator iterator(){ + return new Iterator(){ + private int index = 0; + public Object next(){ + return elementData[index++]; + } + public boolean hasNext(){ + return index >= size; + } + }; + } + + public static void main(String[] args) { + ArrayList arrayList=new ArrayList(); + + arrayList.add(0); + arrayList.add(1); + arrayList.add(2); + System.out.println("数据个数为3:"+(arrayList.size==3)); + + System.out.print("数据应该为0,1,2: "); + for (int i = 0; i < arrayList.size(); i++) { + System.out.print(arrayList.get(i)+" "); + } + System.out.println(); + + arrayList.add(1,1); + System.out.print("数据应该为:0,1,1,2: "); + for (int i = 0; i < arrayList.size(); i++) { + System.out.print(arrayList.get(i)+" "); + } + System.out.println(); + + System.out.print("数据应该为0: "); + System.out.println(arrayList.remove(0)); + + + } + + +} + diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/BinaryTreeNode.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/BinaryTreeNode.java new file mode 100644 index 0000000000..a86b1b15bd --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/BinaryTreeNode.java @@ -0,0 +1,72 @@ +package com.github.xiaozi123.coding2017.basic; + +public class BinaryTreeNode { + + private Object data; + private BinaryTreeNode left; + private BinaryTreeNode right; + + public Object getData() { + return data; + } + public void setData(Object data) { + this.data = data; + } + public BinaryTreeNode getLeft() { + return left; + } + public void setLeft(BinaryTreeNode left) { + this.left = left; + } + public BinaryTreeNode getRight() { + return right; + } + public void setRight(BinaryTreeNode right) { + this.right = right; + } + + public BinaryTreeNode insert(Object o){ + if (data==null) { + this.setData(0); + } + if ((Integer)o<=(Integer)data) { + if (left==null) { + left=new BinaryTreeNode(); + left.setData(o); + return left; + } + return left.insert(o); + }else{ + if (right==null) { + right=new BinaryTreeNode(); + right.setData(o); + return right; + } + return right.insert(o); + + } + } + @Override + public String toString() { + // TODO Auto-generated method stub + return data+" "+left+" "+right; + } + + public static void main(String[] args) { + BinaryTreeNode binaryTreeNode=new BinaryTreeNode(); + for (int i = 0; i < 5; i++) { + binaryTreeNode.insert(i); + } + System.out.println(binaryTreeNode); + } + +// 0 +// 0 1 +// null null null 2 +// null 3 +// null 4 +// null null + + + +} diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Iterator.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Iterator.java new file mode 100644 index 0000000000..35c6b39017 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Iterator.java @@ -0,0 +1,7 @@ +package com.github.xiaozi123.coding2017.basic; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/LinkedList.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/LinkedList.java new file mode 100644 index 0000000000..66ab1e0300 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/LinkedList.java @@ -0,0 +1,163 @@ +package com.github.xiaozi123.coding2017.basic; + +import java.util.NoSuchElementException; + +import jdk.nashorn.internal.ir.IndexNode; + +public class LinkedList implements List { + + private Node head; + private int size; + + private Node node(Object o) { + Node now=new Node(); + now.data=o; + now.next=null; + size++; + return now; + } + + public void add(Object o){ + if (head==null) { + head=node(o); + } + else { + addLast(o); + } + + } + public void add(int index , Object o){ + if (index<0||index>size) { + throw new IndexOutOfBoundsException("OutOfBound"); + }else if (index==0) { + addFirst(o); + }else if (index==size+1) { + addLast(o); + }else{ + Node beforeNode=head; + for (int i = 0; i < index-1; i++) { + beforeNode=beforeNode.next; + } + Node addNode=node(o); + addNode.next=beforeNode.next; + beforeNode.next=addNode; + } + } + + + public Object get(int index){ + if (index<0||index>size) { + throw new IndexOutOfBoundsException("OutOfBound"); + } else { + Node indexNode=head; + for (int i = 0; i < index; i++) { + indexNode=indexNode.next; + } + return indexNode.data; + } + + } + public Object remove(int index){ + if (index<0||index>size) { + throw new IndexOutOfBoundsException("OutOfBound"); + }else if(index==0){ + return removeFirst(); + }else if(index==size){ + return removeLast(); + + }else{ + Node beforeNode=head; + for (int i = 0; i < index-1; i++) { + beforeNode=beforeNode.next; + } + + Node indexNode=head; + for (int i = 0; i < index; i++) { + indexNode=indexNode.next; + } + beforeNode.next=indexNode.next; + indexNode.next=null; + size--; + return indexNode.data; + } + } + + public int size(){ + return size; + } + + public void addFirst(Object o){ + Node headNode=node(o); + headNode.data=o; + headNode.next=head.next; + head=headNode; + + } + + public void addLast(Object o){ + Node tailNode=head; + while(tailNode.next!=null){ + tailNode=tailNode.next; + } + Node lastNode=node(o); + tailNode.next=lastNode; + } + public Object removeFirst(){ + if (head==null) { + throw new NoSuchElementException(); + } + Object temp= head.data; + head=head.next; + size--; + return temp; + } + public Object removeLast(){ + if (head==null) { + throw new NoSuchElementException(); + } + Node newNode=head; + while(newNode.next.next!=null){ + newNode=newNode.next; + } + Node lastNode=newNode.next; + newNode.next=null; + size--; + return lastNode.data; + + } + public Iterator iterator(){ + return null; + } + + + private static class Node{ + Object data; + Node next; + + } + + public static void main(String[] args) { + LinkedList linkedList=new LinkedList(); + + linkedList.add(1); + linkedList.add(2); + linkedList.add(3); + + System.out.println("数字个数为3:"+linkedList.size()); + + System.out.println("获取的数字为1:"+linkedList.get(0)); + System.out.println("获取的数字为2:"+linkedList.get(1)); + System.out.println("获取的数字为3:"+linkedList.get(2)); + // add get remove size + + System.out.println("*************"); + + System.out.println(linkedList.remove(0));//1 + System.out.println("获取的数字为2:"+linkedList.get(0)); + System.out.println("获取的数字为3:"+linkedList.get(1)); + System.out.println("数字个数为2:"+linkedList.size()); + + } + +} + diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/List.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/List.java new file mode 100644 index 0000000000..950ce93269 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/List.java @@ -0,0 +1,9 @@ +package com.github.xiaozi123.coding2017.basic; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Queue.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Queue.java new file mode 100644 index 0000000000..75b122a253 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Queue.java @@ -0,0 +1,46 @@ +package com.github.xiaozi123.coding2017.basic; + +public class Queue { + private LinkedList elementData=new LinkedList(); + + public void enQueue(Object o){ + elementData.add(o); + } + + public Object deQueue(){ + return elementData.removeFirst(); + } + + public boolean isEmpty(){ + return elementData.size()==0; + } + + public int size(){ + return elementData.size(); + } + + public static void main(String[] args) { + Queue queue=new Queue(); + if (queue.isEmpty()) { + System.out.println("队列现在是空。"); + } + + int n=3; + for (int i = 0; i < n; i++) { + queue.enQueue(i); + } + System.out.println("队列现在有"+queue.size()+"个数"); + System.out.print("队首应该是:0---"); + System.out.println(queue.deQueue()); + System.out.print("队伍第二个数应该是:1---"); + System.out.println(queue.deQueue()); + System.out.print("队伍第二个数应该是:2---"); + System.out.println(queue.deQueue()); + + + + + } + + +} diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Stack.java b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Stack.java new file mode 100644 index 0000000000..d9994f5648 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/Stack.java @@ -0,0 +1,51 @@ +package com.github.xiaozi123.coding2017.basic; + +public class Stack { + private ArrayList elementData = new ArrayList(); + + /* + * 入栈 + */ + public void push(Object o){ + elementData.add(o); + } + + public Object pop(){ + return elementData.remove(elementData.size()-1); + } + + public Object peek(){ + return elementData.get(elementData.size()-1); + } + public boolean isEmpty(){ + return elementData.size()==0; + } + public int size(){ + return elementData.size(); + } + + public static void main(String[] args) { + Stack stack=new Stack(); + if (stack.isEmpty()) { + System.out.println("stack为空。"); + } + int n=3; + for (int i = 0; i < n; i++) { + stack.push(i); + } + System.out.println("stack现在尺寸应该为3:"+(stack.size()==3)); + System.out.println("stack里面数据应该为:2,1,0."); + for (int i = 0; i < n; i++) { + System.out.println(stack.pop()); + } +// for (int i = 0; i < n; i++) { +// stack.peek(); +// } +// + + + + } + + +} diff --git "a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/\346\226\207\347\253\240\345\234\260\345\235\200.txt" "b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/\346\226\207\347\253\240\345\234\260\345\235\200.txt" new file mode 100644 index 0000000000..3977d579a8 --- /dev/null +++ "b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/\346\226\207\347\253\240\345\234\260\345\235\200.txt" @@ -0,0 +1 @@ +http://www.jianshu.com/p/6688791d16c0 \ No newline at end of file From e90e40ae6493031a9384f0abf670c3c98752b5de Mon Sep 17 00:00:00 2001 From: xmt <542194147@qq.com> Date: Sun, 12 Mar 2017 20:16:02 +0800 Subject: [PATCH 382/646] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E5=91=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 26 ++++++ .../coderising/download/FileDownloader.java | 79 ++++++++++++++++++ .../download/FileDownloaderTest.java | 59 +++++++++++++ .../coderising/download/api/Connection.java | 23 +++++ .../download/api/ConnectionException.java | 5 ++ .../download/api/ConnectionManager.java | 10 +++ .../download/api/DownloadListener.java | 5 ++ .../download/impl/ConnectionImpl.java | 46 ++++++++++ .../download/impl/ConnectionManagerImpl.java | 23 +++++ .../src/com/coding/basic/MyLinkedList.java | 83 +++++++++++++++++++ 10 files changed, 359 insertions(+) create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/DownloadThread.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/FileDownloader.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/FileDownloaderTest.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/api/Connection.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/api/ConnectionException.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/api/ConnectionManager.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/api/DownloadListener.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/impl/ConnectionImpl.java create mode 100644 group11/542194147/myDataStructure/src/com/coderising/download/impl/ConnectionManagerImpl.java diff --git a/group11/542194147/myDataStructure/src/com/coderising/download/DownloadThread.java b/group11/542194147/myDataStructure/src/com/coderising/download/DownloadThread.java new file mode 100644 index 0000000000..b12ad98379 --- /dev/null +++ b/group11/542194147/myDataStructure/src/com/coderising/download/DownloadThread.java @@ -0,0 +1,26 @@ +package com.coderising.download; + +import java.io.IOException; + +import com.coderising.download.api.Connection; + +public class DownloadThread extends Thread{ + + Connection conn; + int startPos; + int endPos; + + public DownloadThread( Connection conn, int startPos, int endPos){ + + this.conn = conn; + this.startPos = startPos; + this.endPos = endPos; + } + public void run(){ + try { + conn.read(startPos, endPos); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/group11/542194147/myDataStructure/src/com/coderising/download/FileDownloader.java b/group11/542194147/myDataStructure/src/com/coderising/download/FileDownloader.java new file mode 100644 index 0000000000..75ade93046 --- /dev/null +++ b/group11/542194147/myDataStructure/src/com/coderising/download/FileDownloader.java @@ -0,0 +1,79 @@ +package com.coderising.download; + +import java.io.RandomAccessFile; + +import com.coderising.download.api.Connection; +import com.coderising.download.api.ConnectionException; +import com.coderising.download.api.ConnectionManager; +import com.coderising.download.api.DownloadListener; + + +public class FileDownloader { + + String url; + + DownloadListener listener; + + ConnectionManager cm; + + int downloadThreadNum=3; + + public FileDownloader(String _url) { + this.url = _url; + + } + + public void execute(){ + // 鍦ㄨ繖閲屽疄鐜颁綘鐨勪唬鐮侊紝 娉ㄦ剰锛 闇瑕佺敤澶氱嚎绋嬪疄鐜颁笅杞 + // 杩欎釜绫讳緷璧栦簬鍏朵粬鍑犱釜鎺ュ彛, 浣犻渶瑕佸啓杩欏嚑涓帴鍙g殑瀹炵幇浠g爜 + // (1) ConnectionManager , 鍙互鎵撳紑涓涓繛鎺ワ紝閫氳繃Connection鍙互璇诲彇鍏朵腑鐨勪竴娈碉紙鐢╯tartPos, endPos鏉ユ寚瀹氾級 + // (2) DownloadListener, 鐢变簬鏄绾跨▼涓嬭浇锛 璋冪敤杩欎釜绫荤殑瀹㈡埛绔笉鐭ラ亾浠涔堟椂鍊欑粨鏉燂紝鎵浠ヤ綘闇瑕佸疄鐜板綋鎵鏈 + // 绾跨▼閮芥墽琛屽畬浠ュ悗锛 璋冪敤listener鐨刵otifiedFinished鏂规硶锛 杩欐牱瀹㈡埛绔氨鑳芥敹鍒伴氱煡銆 + // 鍏蜂綋鐨勫疄鐜版濊矾锛 + // 1. 闇瑕佽皟鐢–onnectionManager鐨刼pen鏂规硶鎵撳紑杩炴帴锛 鐒跺悗閫氳繃Connection.getContentLength鏂规硶鑾峰緱鏂囦欢鐨勯暱搴 + // 2. 鑷冲皯鍚姩3涓嚎绋嬩笅杞斤紝 娉ㄦ剰姣忎釜绾跨▼闇瑕佸厛璋冪敤ConnectionManager鐨刼pen鏂规硶 + // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 + // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 + // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 + + // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 + Connection conn = null; + try { + + conn = cm.open(this.url); + int length = conn.getContentLength(); + int downloadBlock=length/3; + int appendBlock=length%3; + RandomAccessFile rdaFile=new RandomAccessFile("downloadFile","wr"); + for(int i=0;i7->10 , 閫嗙疆鍚庡彉涓 10->7->3 + */ + public void reverse(){ + Node p=head; Node q=null; Node front=null; + while(p!=null){ + q=p.next; + p.next=front; + front=p; + p=q; + } + head=front; + } + + /** + * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 + * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 + * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 + + */ + public void removeFirstHalf(){ + + } + + /** + * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 + * @param i + * @param length + */ + public void remove(int i, int length){ + + } + /** + * 鍋囧畾褰撳墠閾捐〃鍜宭ist鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 + * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺list鎵鎸囧畾鐨勫厓绱 + * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 + * listB = 1->3->4->6 + * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] + * @param list + */ + public static int[] getElements(MyLinkedList list){ + return null; + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪list涓嚭鐜扮殑鍏冪礌 + + * @param list + */ + + public void subtract(MyLinkedList list){ + + } + + /** + * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 + */ + public void removeDuplicateValues(){ + + } + + /** + * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 + * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 + * @param min + * @param max + */ + public void removeRange(int min, int max){ + + } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * @param list + */ + public MyLinkedList intersection( MyLinkedList list){ + return null; + } } From e509a2720914d30298bca197d02e1930f8af7739 Mon Sep 17 00:00:00 2001 From: Lizhy Date: Sun, 12 Mar 2017 20:26:52 +0800 Subject: [PATCH 383/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group26/lizhy2017/first/ArrayList.java | 113 +++++++++++ group26/lizhy2017/first/Iterator.java | 7 + group26/lizhy2017/first/LinkedList.java | 238 ++++++++++++++++++++++++ group26/lizhy2017/first/List.java | 9 + 4 files changed, 367 insertions(+) create mode 100644 group26/lizhy2017/first/ArrayList.java create mode 100644 group26/lizhy2017/first/Iterator.java create mode 100644 group26/lizhy2017/first/LinkedList.java create mode 100644 group26/lizhy2017/first/List.java diff --git a/group26/lizhy2017/first/ArrayList.java b/group26/lizhy2017/first/ArrayList.java new file mode 100644 index 0000000000..2b9b0282cf --- /dev/null +++ b/group26/lizhy2017/first/ArrayList.java @@ -0,0 +1,113 @@ +package first; + +import java.util.Arrays; + +import javax.swing.text.html.HTMLDocument; + +public class ArrayList implements List { + private int mSize = 0; + private Object[] EMPTY_ElementData = new Object[0]; + private Object[] mElementData; + + public ArrayList() { + this(10); + } + + public ArrayList(int size) { + if (size > 0) { + mElementData = new Object[size]; + mSize = size; + } else { + if (mSize != 0) { + throw new IllegalArgumentException("Illegal Capacity: " + mSize); + } + mElementData = EMPTY_ElementData; + } + } + + public void add(Object o) { + checkIncrement(mSize); + mElementData[mSize++] = o; + } + + public void add(int index, Object o) { + checkRange(index); + if (mSize == 0) { + mSize = Math.max(10, mSize); + } + checkIncrement(mSize); + + System.arraycopy(mElementData, index, mElementData, index + 1, mSize - index); + mElementData[index] = o; + } + + private void checkRange(int index) { + if (index > mSize || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); + } + } + + public Object get(int index) { + checkRange(index); + return mElementData[index]; + } + + public Object remove(int index) { + checkRange(index); + Object oldObject = mElementData[index]; + int temp = mSize - index - 1; + if (temp > 0) { + System.arraycopy(mElementData, index + 1, mElementData, index, temp); + } + mElementData[--mSize] = null;//JAVA GC + return oldObject; + } + + public int size() { + return mSize; + } + + public Iterator iterator() { + return new MyIterator(); + } + + private void checkIncrement(int capacity) { + ++capacity; + if (capacity - mElementData.length > 0) { + grow(capacity); + } + } + + /** + * 鎵╁锛岃鍒欎负锛歰ldCapacity + (oldCapacity >> 1) + * + * @param capacity 鎵╁ + */ + private void grow(int capacity) { + int oldCapacity = mElementData.length; + int newCapacity = oldCapacity + (oldCapacity >> 1); + if (newCapacity < capacity) { + newCapacity = capacity; + } + if (newCapacity > 2147483639) { + newCapacity = 2147483639; + } + mElementData = Arrays.copyOf(mElementData, newCapacity); + } + + private class MyIterator implements Iterator { + int nextCursor = 0;//涓嬩釜鍏冪礌绱㈠紩 + + @Override + public boolean hasNext() { + return (nextCursor != mSize); + } + + @Override + public Object next() { + int i = nextCursor; + nextCursor++; + return mElementData[i]; + } + } +} diff --git a/group26/lizhy2017/first/Iterator.java b/group26/lizhy2017/first/Iterator.java new file mode 100644 index 0000000000..39ab704b22 --- /dev/null +++ b/group26/lizhy2017/first/Iterator.java @@ -0,0 +1,7 @@ +package first; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group26/lizhy2017/first/LinkedList.java b/group26/lizhy2017/first/LinkedList.java new file mode 100644 index 0000000000..d1f15a45e7 --- /dev/null +++ b/group26/lizhy2017/first/LinkedList.java @@ -0,0 +1,238 @@ +package first; + +/** + * LinkedList鍜孉rrayList + * 鍏卞悓鐐癸細鏈夊簭銆佸彲椤哄簭璁块棶銆佸彲闅忔満璁块棶銆佸姩鎬佹墿瀹 + * 鎶借薄鎴怢ist鎺ュ彛 + */ +public class LinkedList implements List { + private int mSize; + private Node mHeadNode;//澶磋妭鐐 + private Node mFootNode;//澶磋妭鐐 + + /** + * 姣忔add Object 鐩稿綋浜庡湪灏鹃儴鏂板姞涓涓妭鐐 + * 姣忔閮介渶瑕乶ew Node鍑烘潵锛岀劧鍚庡皢Node鍔犲湪灏鹃儴 + */ + public void add(Object o) { + if (null == mHeadNode) { + addFirst(o); + } else { + //椤虹潃閾捐〃鎵惧埌鏈鍚庝竴涓姞涓婃垜浠add 鐨凮bject锛屽苟涓旇褰曚笂涓涓妭鐐 + addLast(o); + } + } + + public void add(int index, Object o) { + checkRange(index); + if (null == mHeadNode) { + addFirst(o); + } else if (index == (mSize - 1)) { + addLast(o); + } else { + Node preNode = getNode(index - 1);//鍓嶄竴涓綅缃殑Node + Node newNode = new Node(o); + newNode.next = preNode.next;//鏂拌妭鐐 淇濆瓨涔嬪墠鐨 next + preNode.next = newNode; + mSize++; + } + } + + /** + * 鎶奿ndex鑺傜偣涓殑data鍙栧嚭鏉 + * + * @param index + * @return + */ + public Object get(int index) { + checkRange(index); + return getNode(index); + } + + public Object remove(int index) { + checkRange(index); + if (index == 0) return removeFirst(); + else { + Node preNode = getNode(index - 1); + preNode.next = preNode.next.next;//绉婚櫎浜唅ndex鑺傜偣瀵硅薄 + mSize--; + return preNode.next.data; + } + } + + public int size() { + return mSize; + } + + /** + * 閾捐〃鐨勫ご鍔犲叆涓涓厓绱狅紝head鎸囬拡闇瑕佸墠绉 + * + * @param o + */ + public void addFirst(Object o) { + Node nextNode = mHeadNode; + mHeadNode = new Node(o); + if (nextNode != null) { + mHeadNode.next = nextNode; + } else { + mFootNode = mHeadNode; + } + mSize++; + } + + public void addLast(Object o) { + Node nextNode = new Node(o); + if (mFootNode != null) { + mFootNode.next = nextNode; + } else { + mHeadNode = nextNode; + } + mFootNode = nextNode; + mSize++; + } + + public Object removeFirst() { + if (mSize > 0) { + Node node = mHeadNode; + mHeadNode = mHeadNode.next; + mSize--; + return node.data; + }else { + System.out.println("閾捐〃涓虹┖锛"); + return null; + } + } + + public Object removeLast() { + if(mSize>0){ + Node preNode = getNode(mSize-2);//鎵惧埌last鑺傜偣鐨勪笂涓涓妭鐐 + Object node = preNode.next.data; + preNode.next = null; + mFootNode = preNode; + mSize--; + return node; + }else{ + System.out.println("閾捐〃涓虹┖锛"); + return null; + } + + } + +// public Iterator iterator() { +// return null; +// } +// +// /** +// * 鎶婅閾捐〃閫嗙疆 +// * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 +// */ +// public void reverse() { +// +// } +// +// /** +// * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 +// * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 +// * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 +// */ +// public void removeFirstHalf() { +// +// } +// +// /** +// * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 +// * +// * @param i +// * @param length +// */ +// public void remove(int i, int length) { +// +// } +// +// /** +// * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 +// * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 +// * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 +// * listB = 1->3->4->6 +// * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] +// * +// * @param list +// */ +// public int[] getElements(LinkedList list) { +// return null; +// } +// +// /** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 +// * +// * @param list +// */ +// +// public void subtract(LinkedList list) { +// +// } +// +// /** +// * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 +// */ +// public void removeDuplicateValues() { +// +// } +// +// /** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 +// * +// * @param min +// * @param max +// */ +// public void removeRange(int min, int max) { +// +// } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } + + private void checkRange(int index) { + if (index > mSize || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); + } + } + + private Node getNode(int index) { + if (index == 0) return mHeadNode; + if (index == mSize - 1) return mFootNode; + + Node nextNode = mFootNode; + for (int i = 0; i <= index; i++) { + if (i == index) { + break; + } + nextNode = nextNode.next; + } + return nextNode; + } + + /** + * 瀹炵幇鑺傜偣鐨勫唴閮ㄧ被銆 + * ps:闈欐佸唴閮ㄧ被鍙互閬垮厤 闈為潤鎬佸唴閮ㄧ被灏嗕細鍚勮嚜鍏宠仈姣忎竴涓狶inkedList瀹炰緥 + * 锛堥潤鎬佸唴閮ㄧ被鏄痗lass绾у埆涓涓瀵瑰簲鐨勶紝闈為潤鎬佸唴閮ㄧ被鏄疄渚嬬骇鍒搴旂殑 + */ + private static class Node { + Object data; + Node next; + + public Node(Object data) { + this.data = data; + } + } +} diff --git a/group26/lizhy2017/first/List.java b/group26/lizhy2017/first/List.java new file mode 100644 index 0000000000..108bbe9a12 --- /dev/null +++ b/group26/lizhy2017/first/List.java @@ -0,0 +1,9 @@ +package first; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} From bf21fc1deaf2a2035fedbc1407183939c8d3e444 Mon Sep 17 00:00:00 2001 From: Lizhy Date: Sun, 12 Mar 2017 20:27:03 +0800 Subject: [PATCH 384/646] =?UTF-8?q?Revert=20"=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e509a2720914d30298bca197d02e1930f8af7739. --- group26/lizhy2017/first/ArrayList.java | 113 ----------- group26/lizhy2017/first/Iterator.java | 7 - group26/lizhy2017/first/LinkedList.java | 238 ------------------------ group26/lizhy2017/first/List.java | 9 - 4 files changed, 367 deletions(-) delete mode 100644 group26/lizhy2017/first/ArrayList.java delete mode 100644 group26/lizhy2017/first/Iterator.java delete mode 100644 group26/lizhy2017/first/LinkedList.java delete mode 100644 group26/lizhy2017/first/List.java diff --git a/group26/lizhy2017/first/ArrayList.java b/group26/lizhy2017/first/ArrayList.java deleted file mode 100644 index 2b9b0282cf..0000000000 --- a/group26/lizhy2017/first/ArrayList.java +++ /dev/null @@ -1,113 +0,0 @@ -package first; - -import java.util.Arrays; - -import javax.swing.text.html.HTMLDocument; - -public class ArrayList implements List { - private int mSize = 0; - private Object[] EMPTY_ElementData = new Object[0]; - private Object[] mElementData; - - public ArrayList() { - this(10); - } - - public ArrayList(int size) { - if (size > 0) { - mElementData = new Object[size]; - mSize = size; - } else { - if (mSize != 0) { - throw new IllegalArgumentException("Illegal Capacity: " + mSize); - } - mElementData = EMPTY_ElementData; - } - } - - public void add(Object o) { - checkIncrement(mSize); - mElementData[mSize++] = o; - } - - public void add(int index, Object o) { - checkRange(index); - if (mSize == 0) { - mSize = Math.max(10, mSize); - } - checkIncrement(mSize); - - System.arraycopy(mElementData, index, mElementData, index + 1, mSize - index); - mElementData[index] = o; - } - - private void checkRange(int index) { - if (index > mSize || index < 0) { - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); - } - } - - public Object get(int index) { - checkRange(index); - return mElementData[index]; - } - - public Object remove(int index) { - checkRange(index); - Object oldObject = mElementData[index]; - int temp = mSize - index - 1; - if (temp > 0) { - System.arraycopy(mElementData, index + 1, mElementData, index, temp); - } - mElementData[--mSize] = null;//JAVA GC - return oldObject; - } - - public int size() { - return mSize; - } - - public Iterator iterator() { - return new MyIterator(); - } - - private void checkIncrement(int capacity) { - ++capacity; - if (capacity - mElementData.length > 0) { - grow(capacity); - } - } - - /** - * 鎵╁锛岃鍒欎负锛歰ldCapacity + (oldCapacity >> 1) - * - * @param capacity 鎵╁ - */ - private void grow(int capacity) { - int oldCapacity = mElementData.length; - int newCapacity = oldCapacity + (oldCapacity >> 1); - if (newCapacity < capacity) { - newCapacity = capacity; - } - if (newCapacity > 2147483639) { - newCapacity = 2147483639; - } - mElementData = Arrays.copyOf(mElementData, newCapacity); - } - - private class MyIterator implements Iterator { - int nextCursor = 0;//涓嬩釜鍏冪礌绱㈠紩 - - @Override - public boolean hasNext() { - return (nextCursor != mSize); - } - - @Override - public Object next() { - int i = nextCursor; - nextCursor++; - return mElementData[i]; - } - } -} diff --git a/group26/lizhy2017/first/Iterator.java b/group26/lizhy2017/first/Iterator.java deleted file mode 100644 index 39ab704b22..0000000000 --- a/group26/lizhy2017/first/Iterator.java +++ /dev/null @@ -1,7 +0,0 @@ -package first; - -public interface Iterator { - public boolean hasNext(); - public Object next(); - -} diff --git a/group26/lizhy2017/first/LinkedList.java b/group26/lizhy2017/first/LinkedList.java deleted file mode 100644 index d1f15a45e7..0000000000 --- a/group26/lizhy2017/first/LinkedList.java +++ /dev/null @@ -1,238 +0,0 @@ -package first; - -/** - * LinkedList鍜孉rrayList - * 鍏卞悓鐐癸細鏈夊簭銆佸彲椤哄簭璁块棶銆佸彲闅忔満璁块棶銆佸姩鎬佹墿瀹 - * 鎶借薄鎴怢ist鎺ュ彛 - */ -public class LinkedList implements List { - private int mSize; - private Node mHeadNode;//澶磋妭鐐 - private Node mFootNode;//澶磋妭鐐 - - /** - * 姣忔add Object 鐩稿綋浜庡湪灏鹃儴鏂板姞涓涓妭鐐 - * 姣忔閮介渶瑕乶ew Node鍑烘潵锛岀劧鍚庡皢Node鍔犲湪灏鹃儴 - */ - public void add(Object o) { - if (null == mHeadNode) { - addFirst(o); - } else { - //椤虹潃閾捐〃鎵惧埌鏈鍚庝竴涓姞涓婃垜浠add 鐨凮bject锛屽苟涓旇褰曚笂涓涓妭鐐 - addLast(o); - } - } - - public void add(int index, Object o) { - checkRange(index); - if (null == mHeadNode) { - addFirst(o); - } else if (index == (mSize - 1)) { - addLast(o); - } else { - Node preNode = getNode(index - 1);//鍓嶄竴涓綅缃殑Node - Node newNode = new Node(o); - newNode.next = preNode.next;//鏂拌妭鐐 淇濆瓨涔嬪墠鐨 next - preNode.next = newNode; - mSize++; - } - } - - /** - * 鎶奿ndex鑺傜偣涓殑data鍙栧嚭鏉 - * - * @param index - * @return - */ - public Object get(int index) { - checkRange(index); - return getNode(index); - } - - public Object remove(int index) { - checkRange(index); - if (index == 0) return removeFirst(); - else { - Node preNode = getNode(index - 1); - preNode.next = preNode.next.next;//绉婚櫎浜唅ndex鑺傜偣瀵硅薄 - mSize--; - return preNode.next.data; - } - } - - public int size() { - return mSize; - } - - /** - * 閾捐〃鐨勫ご鍔犲叆涓涓厓绱狅紝head鎸囬拡闇瑕佸墠绉 - * - * @param o - */ - public void addFirst(Object o) { - Node nextNode = mHeadNode; - mHeadNode = new Node(o); - if (nextNode != null) { - mHeadNode.next = nextNode; - } else { - mFootNode = mHeadNode; - } - mSize++; - } - - public void addLast(Object o) { - Node nextNode = new Node(o); - if (mFootNode != null) { - mFootNode.next = nextNode; - } else { - mHeadNode = nextNode; - } - mFootNode = nextNode; - mSize++; - } - - public Object removeFirst() { - if (mSize > 0) { - Node node = mHeadNode; - mHeadNode = mHeadNode.next; - mSize--; - return node.data; - }else { - System.out.println("閾捐〃涓虹┖锛"); - return null; - } - } - - public Object removeLast() { - if(mSize>0){ - Node preNode = getNode(mSize-2);//鎵惧埌last鑺傜偣鐨勪笂涓涓妭鐐 - Object node = preNode.next.data; - preNode.next = null; - mFootNode = preNode; - mSize--; - return node; - }else{ - System.out.println("閾捐〃涓虹┖锛"); - return null; - } - - } - -// public Iterator iterator() { -// return null; -// } -// -// /** -// * 鎶婅閾捐〃閫嗙疆 -// * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 -// */ -// public void reverse() { -// -// } -// -// /** -// * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 -// * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 -// * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 -// */ -// public void removeFirstHalf() { -// -// } -// -// /** -// * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 -// * -// * @param i -// * @param length -// */ -// public void remove(int i, int length) { -// -// } -// -// /** -// * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 -// * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 -// * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 -// * listB = 1->3->4->6 -// * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] -// * -// * @param list -// */ -// public int[] getElements(LinkedList list) { -// return null; -// } -// -// /** -// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 -// * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 -// * -// * @param list -// */ -// -// public void subtract(LinkedList list) { -// -// } -// -// /** -// * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 -// * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 -// */ -// public void removeDuplicateValues() { -// -// } -// -// /** -// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 -// * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 -// * -// * @param min -// * @param max -// */ -// public void removeRange(int min, int max) { -// -// } - - /** - * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 - * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 - * - * @param list - */ - public LinkedList intersection(LinkedList list) { - return null; - } - - private void checkRange(int index) { - if (index > mSize || index < 0) { - throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); - } - } - - private Node getNode(int index) { - if (index == 0) return mHeadNode; - if (index == mSize - 1) return mFootNode; - - Node nextNode = mFootNode; - for (int i = 0; i <= index; i++) { - if (i == index) { - break; - } - nextNode = nextNode.next; - } - return nextNode; - } - - /** - * 瀹炵幇鑺傜偣鐨勫唴閮ㄧ被銆 - * ps:闈欐佸唴閮ㄧ被鍙互閬垮厤 闈為潤鎬佸唴閮ㄧ被灏嗕細鍚勮嚜鍏宠仈姣忎竴涓狶inkedList瀹炰緥 - * 锛堥潤鎬佸唴閮ㄧ被鏄痗lass绾у埆涓涓瀵瑰簲鐨勶紝闈為潤鎬佸唴閮ㄧ被鏄疄渚嬬骇鍒搴旂殑 - */ - private static class Node { - Object data; - Node next; - - public Node(Object data) { - this.data = data; - } - } -} diff --git a/group26/lizhy2017/first/List.java b/group26/lizhy2017/first/List.java deleted file mode 100644 index 108bbe9a12..0000000000 --- a/group26/lizhy2017/first/List.java +++ /dev/null @@ -1,9 +0,0 @@ -package first; - -public interface List { - public void add(Object o); - public void add(int index, Object o); - public Object get(int index); - public Object remove(int index); - public int size(); -} From e39e0a90b2a98f27ef542150e4f01a1617eabbbe Mon Sep 17 00:00:00 2001 From: Lizhy Date: Sun, 12 Mar 2017 20:28:51 +0800 Subject: [PATCH 385/646] FirstWork MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鍙畬鎴愪簡ArrayList銆丩inkedList --- .../lizhy2017/homework/first/ArrayList.java | 113 +++++++++ .../lizhy2017/homework/first/Iterator.java | 7 + .../lizhy2017/homework/first/LinkedList.java | 238 ++++++++++++++++++ group26/lizhy2017/homework/first/List.java | 9 + 4 files changed, 367 insertions(+) create mode 100644 group26/lizhy2017/homework/first/ArrayList.java create mode 100644 group26/lizhy2017/homework/first/Iterator.java create mode 100644 group26/lizhy2017/homework/first/LinkedList.java create mode 100644 group26/lizhy2017/homework/first/List.java diff --git a/group26/lizhy2017/homework/first/ArrayList.java b/group26/lizhy2017/homework/first/ArrayList.java new file mode 100644 index 0000000000..2b9b0282cf --- /dev/null +++ b/group26/lizhy2017/homework/first/ArrayList.java @@ -0,0 +1,113 @@ +package first; + +import java.util.Arrays; + +import javax.swing.text.html.HTMLDocument; + +public class ArrayList implements List { + private int mSize = 0; + private Object[] EMPTY_ElementData = new Object[0]; + private Object[] mElementData; + + public ArrayList() { + this(10); + } + + public ArrayList(int size) { + if (size > 0) { + mElementData = new Object[size]; + mSize = size; + } else { + if (mSize != 0) { + throw new IllegalArgumentException("Illegal Capacity: " + mSize); + } + mElementData = EMPTY_ElementData; + } + } + + public void add(Object o) { + checkIncrement(mSize); + mElementData[mSize++] = o; + } + + public void add(int index, Object o) { + checkRange(index); + if (mSize == 0) { + mSize = Math.max(10, mSize); + } + checkIncrement(mSize); + + System.arraycopy(mElementData, index, mElementData, index + 1, mSize - index); + mElementData[index] = o; + } + + private void checkRange(int index) { + if (index > mSize || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); + } + } + + public Object get(int index) { + checkRange(index); + return mElementData[index]; + } + + public Object remove(int index) { + checkRange(index); + Object oldObject = mElementData[index]; + int temp = mSize - index - 1; + if (temp > 0) { + System.arraycopy(mElementData, index + 1, mElementData, index, temp); + } + mElementData[--mSize] = null;//JAVA GC + return oldObject; + } + + public int size() { + return mSize; + } + + public Iterator iterator() { + return new MyIterator(); + } + + private void checkIncrement(int capacity) { + ++capacity; + if (capacity - mElementData.length > 0) { + grow(capacity); + } + } + + /** + * 鎵╁锛岃鍒欎负锛歰ldCapacity + (oldCapacity >> 1) + * + * @param capacity 鎵╁ + */ + private void grow(int capacity) { + int oldCapacity = mElementData.length; + int newCapacity = oldCapacity + (oldCapacity >> 1); + if (newCapacity < capacity) { + newCapacity = capacity; + } + if (newCapacity > 2147483639) { + newCapacity = 2147483639; + } + mElementData = Arrays.copyOf(mElementData, newCapacity); + } + + private class MyIterator implements Iterator { + int nextCursor = 0;//涓嬩釜鍏冪礌绱㈠紩 + + @Override + public boolean hasNext() { + return (nextCursor != mSize); + } + + @Override + public Object next() { + int i = nextCursor; + nextCursor++; + return mElementData[i]; + } + } +} diff --git a/group26/lizhy2017/homework/first/Iterator.java b/group26/lizhy2017/homework/first/Iterator.java new file mode 100644 index 0000000000..39ab704b22 --- /dev/null +++ b/group26/lizhy2017/homework/first/Iterator.java @@ -0,0 +1,7 @@ +package first; + +public interface Iterator { + public boolean hasNext(); + public Object next(); + +} diff --git a/group26/lizhy2017/homework/first/LinkedList.java b/group26/lizhy2017/homework/first/LinkedList.java new file mode 100644 index 0000000000..d1f15a45e7 --- /dev/null +++ b/group26/lizhy2017/homework/first/LinkedList.java @@ -0,0 +1,238 @@ +package first; + +/** + * LinkedList鍜孉rrayList + * 鍏卞悓鐐癸細鏈夊簭銆佸彲椤哄簭璁块棶銆佸彲闅忔満璁块棶銆佸姩鎬佹墿瀹 + * 鎶借薄鎴怢ist鎺ュ彛 + */ +public class LinkedList implements List { + private int mSize; + private Node mHeadNode;//澶磋妭鐐 + private Node mFootNode;//澶磋妭鐐 + + /** + * 姣忔add Object 鐩稿綋浜庡湪灏鹃儴鏂板姞涓涓妭鐐 + * 姣忔閮介渶瑕乶ew Node鍑烘潵锛岀劧鍚庡皢Node鍔犲湪灏鹃儴 + */ + public void add(Object o) { + if (null == mHeadNode) { + addFirst(o); + } else { + //椤虹潃閾捐〃鎵惧埌鏈鍚庝竴涓姞涓婃垜浠add 鐨凮bject锛屽苟涓旇褰曚笂涓涓妭鐐 + addLast(o); + } + } + + public void add(int index, Object o) { + checkRange(index); + if (null == mHeadNode) { + addFirst(o); + } else if (index == (mSize - 1)) { + addLast(o); + } else { + Node preNode = getNode(index - 1);//鍓嶄竴涓綅缃殑Node + Node newNode = new Node(o); + newNode.next = preNode.next;//鏂拌妭鐐 淇濆瓨涔嬪墠鐨 next + preNode.next = newNode; + mSize++; + } + } + + /** + * 鎶奿ndex鑺傜偣涓殑data鍙栧嚭鏉 + * + * @param index + * @return + */ + public Object get(int index) { + checkRange(index); + return getNode(index); + } + + public Object remove(int index) { + checkRange(index); + if (index == 0) return removeFirst(); + else { + Node preNode = getNode(index - 1); + preNode.next = preNode.next.next;//绉婚櫎浜唅ndex鑺傜偣瀵硅薄 + mSize--; + return preNode.next.data; + } + } + + public int size() { + return mSize; + } + + /** + * 閾捐〃鐨勫ご鍔犲叆涓涓厓绱狅紝head鎸囬拡闇瑕佸墠绉 + * + * @param o + */ + public void addFirst(Object o) { + Node nextNode = mHeadNode; + mHeadNode = new Node(o); + if (nextNode != null) { + mHeadNode.next = nextNode; + } else { + mFootNode = mHeadNode; + } + mSize++; + } + + public void addLast(Object o) { + Node nextNode = new Node(o); + if (mFootNode != null) { + mFootNode.next = nextNode; + } else { + mHeadNode = nextNode; + } + mFootNode = nextNode; + mSize++; + } + + public Object removeFirst() { + if (mSize > 0) { + Node node = mHeadNode; + mHeadNode = mHeadNode.next; + mSize--; + return node.data; + }else { + System.out.println("閾捐〃涓虹┖锛"); + return null; + } + } + + public Object removeLast() { + if(mSize>0){ + Node preNode = getNode(mSize-2);//鎵惧埌last鑺傜偣鐨勪笂涓涓妭鐐 + Object node = preNode.next.data; + preNode.next = null; + mFootNode = preNode; + mSize--; + return node; + }else{ + System.out.println("閾捐〃涓虹┖锛"); + return null; + } + + } + +// public Iterator iterator() { +// return null; +// } +// +// /** +// * 鎶婅閾捐〃閫嗙疆 +// * 渚嬪閾捐〃涓 3->7->10 , 閫嗙疆鍚庡彉涓 10->7->3 +// */ +// public void reverse() { +// +// } +// +// /** +// * 鍒犻櫎涓涓崟閾捐〃鐨勫墠鍗婇儴鍒 +// * 渚嬪锛歭ist = 2->5->7->8 , 鍒犻櫎浠ュ悗鐨勫间负 7->8 +// * 濡傛灉list = 2->5->7->8->10 ,鍒犻櫎浠ュ悗鐨勫间负7,8,10 +// */ +// public void removeFirstHalf() { +// +// } +// +// /** +// * 浠庣i涓厓绱犲紑濮嬶紝 鍒犻櫎length 涓厓绱 锛 娉ㄦ剰i浠0寮濮 +// * +// * @param i +// * @param length +// */ +// public void remove(int i, int length) { +// +// } +// +// /** +// * 鍋囧畾褰撳墠閾捐〃鍜宭istB鍧囧寘鍚凡鍗囧簭鎺掑垪鐨勬暣鏁 +// * 浠庡綋鍓嶉摼琛ㄤ腑鍙栧嚭閭d簺listB鎵鎸囧畾鐨勫厓绱 +// * 渚嬪褰撳墠閾捐〃 = 11->101->201->301->401->501->601->701 +// * listB = 1->3->4->6 +// * 杩斿洖鐨勭粨鏋滃簲璇ユ槸[101,301,401,601] +// * +// * @param list +// */ +// public int[] getElements(LinkedList list) { +// return null; +// } +// +// /** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 浠庡綋鍓嶉摼琛ㄤ腑涓垹闄ゅ湪listB涓嚭鐜扮殑鍏冪礌 +// * +// * @param list +// */ +// +// public void subtract(LinkedList list) { +// +// } +// +// /** +// * 宸茬煡褰撳墠閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 鍒犻櫎琛ㄤ腑鎵鏈夊肩浉鍚岀殑澶氫綑鍏冪礌锛堜娇寰楁搷浣滃悗鐨勭嚎鎬ц〃涓墍鏈夊厓绱犵殑鍊煎潎涓嶇浉鍚岋級 +// */ +// public void removeDuplicateValues() { +// +// } +// +// /** +// * 宸茬煡閾捐〃涓殑鍏冪礌浠ュ奸掑鏈夊簭鎺掑垪锛屽苟浠ュ崟閾捐〃浣滃瓨鍌ㄧ粨鏋勩 +// * 璇曞啓涓楂樻晥鐨勭畻娉曪紝鍒犻櫎琛ㄤ腑鎵鏈夊煎ぇ浜巑in涓斿皬浜巑ax鐨勫厓绱狅紙鑻ヨ〃涓瓨鍦ㄨ繖鏍风殑鍏冪礌锛 +// * +// * @param min +// * @param max +// */ +// public void removeRange(int min, int max) { +// +// } + + /** + * 鍋囪褰撳墠閾捐〃鍜屽弬鏁發ist鎸囧畾鐨勯摼琛ㄥ潎浠ュ厓绱犱緷鍊奸掑鏈夊簭鎺掑垪锛堝悓涓琛ㄤ腑鐨勫厓绱犲煎悇涓嶇浉鍚岋級 + * 鐜拌姹傜敓鎴愭柊閾捐〃C锛屽叾鍏冪礌涓哄綋鍓嶉摼琛ㄥ拰list涓厓绱犵殑浜ら泦锛屼笖琛–涓殑鍏冪礌鏈変緷鍊奸掑鏈夊簭鎺掑垪 + * + * @param list + */ + public LinkedList intersection(LinkedList list) { + return null; + } + + private void checkRange(int index) { + if (index > mSize || index < 0) { + throw new IndexOutOfBoundsException("Index:" + index + ",Size:" + mSize); + } + } + + private Node getNode(int index) { + if (index == 0) return mHeadNode; + if (index == mSize - 1) return mFootNode; + + Node nextNode = mFootNode; + for (int i = 0; i <= index; i++) { + if (i == index) { + break; + } + nextNode = nextNode.next; + } + return nextNode; + } + + /** + * 瀹炵幇鑺傜偣鐨勫唴閮ㄧ被銆 + * ps:闈欐佸唴閮ㄧ被鍙互閬垮厤 闈為潤鎬佸唴閮ㄧ被灏嗕細鍚勮嚜鍏宠仈姣忎竴涓狶inkedList瀹炰緥 + * 锛堥潤鎬佸唴閮ㄧ被鏄痗lass绾у埆涓涓瀵瑰簲鐨勶紝闈為潤鎬佸唴閮ㄧ被鏄疄渚嬬骇鍒搴旂殑 + */ + private static class Node { + Object data; + Node next; + + public Node(Object data) { + this.data = data; + } + } +} diff --git a/group26/lizhy2017/homework/first/List.java b/group26/lizhy2017/homework/first/List.java new file mode 100644 index 0000000000..108bbe9a12 --- /dev/null +++ b/group26/lizhy2017/homework/first/List.java @@ -0,0 +1,9 @@ +package first; + +public interface List { + public void add(Object o); + public void add(int index, Object o); + public Object get(int index); + public Object remove(int index); + public int size(); +} From fb83d84bd28001d5ce3233f460615220affb2b18 Mon Sep 17 00:00:00 2001 From: chhsalex Date: Sun, 12 Mar 2017 20:31:45 +0800 Subject: [PATCH 386/646] add comments to linkedlist funtions --- .../code/com/coding/basic/LinkedList.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java index 91e0ce3714..26dbd753de 100644 --- a/group08/619057560/3-12/code/com/coding/basic/LinkedList.java +++ b/group08/619057560/3-12/code/com/coding/basic/LinkedList.java @@ -200,7 +200,13 @@ public void reverse(){ Node pNode1 = head, pNode2 = head.next, tmpNode; + // 1. 鏂紑head鍜屽悗闈㈣妭鐐圭殑杩炴帴 head.next = null; + + // 2. 姣忎竴姝ョ殑鍒濆鐘跺喌鑻ヤ负 + // <--pNode1 pNode2-->pNode3... 鍏朵腑pNode2涓嶅彲涓簄ull, pNode3鍙负null + // 鍒欓渶灏嗗叾杞负 + // <--pNode1<--pNode2 pNode3... while (pNode2 != null) { tmpNode = pNode2.next; pNode2.next = pNode1; @@ -208,6 +214,7 @@ public void reverse(){ pNode2 = tmpNode; } + // 3. 灏嗘渶鍚庝竴涓潪绌鸿妭鐐硅涓篽ead head = pNode1; } @@ -232,6 +239,7 @@ public void removeFirstHalf(){ public void remove(int i, int length){ ensureBounds(i); Node pNode1 = head, pNode2; + // 1. 鎵惧埌绗琲涓妭鐐筽Node2锛岃嫢i涓嶄负0锛屾壘鍒扮i-1涓妭鐐筽Node1, 鍚﹀垯灏唄ead璁句负null鎻愮ず鍏堕渶瑕佺Щ鍔ㄥ埌鏂扮殑鑺傜偣 if (i == 0) { pNode2 = head; head = null; @@ -241,10 +249,12 @@ public void remove(int i, int length){ } pNode2 = pNode1.next; } + // 2. pNode2浠庡綋鍓嶄綅缃紑濮嬶紝璺宠穬length涓厓绱 while (length-- > 0 && pNode2 != null) { pNode2 = pNode2.next; } + // 3. 鑻ラ渶瑕佺Щ鍔╤ead鑺傜偣锛屽垯鎶婂綋鍓峱Node璁句负head锛涘惁鍒欏垹鎺塸Node1鍜宲Node2涔嬮棿鐨勬墍鏈夎妭鐐 if (head == null) { head = pNode2; } else { @@ -279,13 +289,13 @@ public int[] getElements(LinkedList list){ * @param list */ - - public void subtract(LinkedList origList){ - if (origList == null) { + // 灏唋ist閫掑鎺掑簭锛屼粠褰撳墠閾捐〃涓壘鍒颁笌list鐨勪氦闆嗗苟鍒犻櫎 + public void subtract(LinkedList list){ + if (list == null) { return; } - LinkedList list = binaryTreeSort(origList); + list = binaryTreeSort(list); Iterator listItr = list.iterator(); Iterator mainItr = iterator(); @@ -326,14 +336,17 @@ public void removeDuplicateValues(){ public void removeRange(int min, int max){ Node pNode = head, pNodeMark = null; + // 1. 浠巋ead寮濮嬮亶鍘嗭紝鎵惧埌绗竴涓ぇ浜巑in鐨勮妭鐐癸紝璁板綍涔嬪墠鐨勮妭鐐 while (pNode != null && (Integer)pNode.data <= min) { pNodeMark = pNode; pNode = pNode.next; } + // 2. 缁х画閬嶅巻锛屾壘鍒扮涓涓笉灏忎簬max鐨勮妭鐐 while (pNode != null && (Integer)pNode.data < max) { pNode = pNode.next; } + // 3. 鍒犻櫎绗2姝ラ亶鍘嗙殑鎵鏈夎妭鐐 if (pNodeMark == null) { head = pNode; } else { @@ -356,6 +369,7 @@ public LinkedList intersection( LinkedList list){ Iterator listItr = list.iterator(); Iterator mainItr = iterator(); + // 鎵惧埌鎵鏈変氦闆嗗厓绱狅紝骞跺皢鍏舵坊鍔犲埌鏂板埌閾捐〃 intersectionIteration(new intersectionIterationCallback(){ @Override @@ -368,6 +382,7 @@ public void onElementFound(Object element) { return newList; } + // 灏嗙敤浜屽弶鏍戞帓搴忕敓鎴愭柊鐨勯掑閾捐〃锛岀敓鎴愮殑閾捐〃涓嶄細鍖呭惈鍊肩浉鍚岀殑澶氫綑鍏冪礌 public LinkedList binaryTreeSort(LinkedList list) { if (list == null) { return null; @@ -385,6 +400,7 @@ public LinkedList binaryTreeSort(LinkedList list) { return sortedList; } + // 鐢ㄩ掑綊鐨勬柟寮忓皢浜屽弶鏍戜腑鐨勫厓绱犲姞鍏ラ摼琛ㄤ腑锛屼娇閾捐〃涓洪掑鎺掑垪 private void addNodeToLinkedList(LinkedList list, BinaryTreeNode node) { if (node == null || node.getData() == null) { return; @@ -394,10 +410,14 @@ private void addNodeToLinkedList(LinkedList list, BinaryTreeNode node) { addNodeToLinkedList(list, node.getLeft()); } + // 瀵绘壘浜ら泦鏃剁殑杩斿洖鎺ュ彛锛屽叾涓寘鍚簡鎵惧埌鍏冪礌鏃剁殑杩斿洖鍑芥暟 private interface intersectionIterationCallback { void onElementFound(Object element); } + // 鎸夐掑椤哄簭瀵绘壘褰撳墠閾捐〃涓墍鏈夊湪list閾捐〃涓嚭鐜扮殑鍏冪礌锛堟暟鍊肩浉鍚屽嵆瑙嗕綔瀹屽叏绛夊悓锛夛紝鎵惧埌鍗冲懠鍙竴娆¤繑鍥炲嚱鏁 + // 闇瑕佹彁渚涘疄渚嬪寲鐨勮繑鍥炴帴鍙o紝list閾捐〃鐨勮凯浠e櫒鍜屽綋鍓嶅垪琛ㄧ殑杩唬鍣 + // 瑕佹眰锛歭ist閾捐〃鍜屽綋鍓嶉摼琛ㄥ繀椤婚掑鎺掑垪 private void intersectionIteration(intersectionIterationCallback callback, Iterator listItr, Iterator mainItr) { if (!listItr.hasNext() || !mainItr.hasNext()) { return; @@ -419,8 +439,10 @@ private void intersectionIteration(intersectionIterationCallback callback, Itera } else { callback.onElementFound(mainValue); mainValue = (Integer)mainItr.next(); + // substract鏂圭▼涓紝褰撳墠閾捐〃鐨勫煎彲鑳戒細鐩稿悓锛屾墍浠ユ鏃朵笉灏唋ist绉诲悜涓嬩竴涓妭鐐 } } + // while寰幆閫鍑哄墠鏈鍚庡緱鍒扮殑listValue鎴杕ainValue骞舵湭鍙備笌姣旇緝 if (listValue.intValue() == mainValue.intValue()) { callback.onElementFound(mainValue); } From 6c28d0bd450d2394c8ea927fee2c4ee555c0eb52 Mon Sep 17 00:00:00 2001 From: chishiwu <1107225491@qq.com> Date: Sun, 12 Mar 2017 20:37:30 +0800 Subject: [PATCH 387/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鍒犻櫎鏃犲叧鐨勫唴瀹 --- group24/1107225491/1107225491Learning/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 group24/1107225491/1107225491Learning/test.txt diff --git a/group24/1107225491/1107225491Learning/test.txt b/group24/1107225491/1107225491Learning/test.txt new file mode 100644 index 0000000000..2086f8809c --- /dev/null +++ b/group24/1107225491/1107225491Learning/test.txt @@ -0,0 +1 @@ +奋斗奋斗 \ No newline at end of file From b3f189cda9b166b2b3265010e7485476466891ce Mon Sep 17 00:00:00 2001 From: teapoter Date: Sun, 12 Mar 2017 20:37:39 +0800 Subject: [PATCH 388/646] init --- group27/282287610/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/group27/282287610/.gitignore b/group27/282287610/.gitignore index 3eaf5674b8..b85f256d8f 100644 --- a/group27/282287610/.gitignore +++ b/group27/282287610/.gitignore @@ -1,3 +1,4 @@ /bin/ +/.setting/ /.classpath /.project From 2014cb62b7c80fed3246f2d97acd536bd6d75549 Mon Sep 17 00:00:00 2001 From: thomas_young Date: Sun, 12 Mar 2017 20:39:04 +0800 Subject: [PATCH 389/646] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=A0=85=E6=A0=8F?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=AE=8C=E6=88=90=E7=9C=9F?= =?UTF-8?q?=E6=AD=A3=E7=9A=84=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coderising/download/DownloadThread.java | 18 ++++++-- .../coderising/download/FileDownloader.java | 42 ++++++++----------- .../download/FileDownloaderTest.java | 14 +++---- 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java index 0f6d837a82..c05f264c0b 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/DownloadThread.java @@ -4,6 +4,8 @@ import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; public class DownloadThread extends Thread{ @@ -11,24 +13,32 @@ public class DownloadThread extends Thread{ int startPos; int endPos; String fileName; + CyclicBarrier barrier; - public DownloadThread(String name, Connection conn, int startPos, int endPos, String fileName){ + public DownloadThread(String name, Connection conn, int startPos, int endPos, String fileName, CyclicBarrier barrier){ super(name); this.conn = conn; this.startPos = startPos; this.endPos = endPos; this.fileName = fileName; + this.barrier = barrier; } public void run(){ try (RandomAccessFile raf = new RandomAccessFile(new File(fileName), "rwd")) { - int length = endPos - startPos+1; raf.seek(startPos); byte[] buf = conn.read(startPos, endPos); - String desc = Thread.currentThread().getName()+"startPos:"+startPos+",length:"+length + "buf size:"+buf.length; - System.out.println(desc); +// String desc = Thread.currentThread().getName()+"startPos:"+startPos+",length:"+length + "buf size:"+buf.length; +// System.out.println(desc); raf.write(buf, 0, buf.length); + if (null != barrier) { + barrier.await(); + } } catch (IOException e) { e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (BrokenBarrierException e) { + e.printStackTrace(); } finally { conn.close(); } diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java index 5d7f793d0f..94fa72e741 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloader.java @@ -9,6 +9,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; +import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -19,7 +20,7 @@ public class FileDownloader { private String fileName; private DownloadListener listener; private ConnectionManager cm; - private int threadNum = 30; + private int threadNum = 5; private int length = 0; private Connection conn; @@ -42,14 +43,13 @@ public void execute(){ // 鐒跺悗璋冪敤read鏂规硶锛 read鏂规硶涓湁璇诲彇鏂囦欢鐨勫紑濮嬩綅缃拰缁撴潫浣嶇疆鐨勫弬鏁帮紝 杩斿洖鍊兼槸byte[]鏁扮粍 // 3. 鎶奲yte鏁扮粍鍐欏叆鍒版枃浠朵腑 // 4. 鎵鏈夌殑绾跨▼閮戒笅杞藉畬鎴愪互鍚庯紝 闇瑕佽皟鐢╨istener鐨刵otifiedFinished鏂规硶 - - // 涓嬮潰鐨勪唬鐮佹槸绀轰緥浠g爜锛 涔熷氨鏄鍙湁涓涓嚎绋嬶紝 浣犻渶瑕佹敼閫犳垚澶氱嚎绋嬬殑銆 try (RandomAccessFile raf = new RandomAccessFile(new File(fileName), "rwd")) { conn = cm.open(this.url); length = conn.getContentLength(); raf.setLength(length); threadPoolDownload(); +// oneThreadDownload(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { @@ -61,14 +61,15 @@ public void execute(){ } public void oneThreadDownload() { - Connection conn = null; + final CyclicBarrier barrier = new CyclicBarrier(1 ,new Runnable() { + @Override + public void run() { + getListener().notifyFinished(); + } + }); try { - Thread thread = new DownloadThread("oneThread", conn,0,length, fileName); + Thread thread = new DownloadThread("oneThread", conn,0,length, fileName, barrier); thread.start(); - thread.join(); - listener.notifyFinished(); - } catch (InterruptedException e) { - e.printStackTrace(); } finally { if (conn != null) { conn.close(); @@ -77,7 +78,13 @@ public void oneThreadDownload() { } public void threadPoolDownload() throws ConnectionException { - ExecutorService threadPool = Executors.newFixedThreadPool(3); + final CyclicBarrier barrier = new CyclicBarrier(threadNum ,new Runnable() { + @Override + public void run() { + getListener().notifyFinished(); // 鏍呮爮 + } + }); + ExecutorService threadPool = Executors.newCachedThreadPool(); int len = conn.getContentLength(); for(int i = 0; i< threadNum; i++) { @@ -88,21 +95,9 @@ public void threadPoolDownload() throws ConnectionException { { end =len; } - Thread thread = new DownloadThread("thread"+i, conn, start, end, fileName); + Thread thread = new DownloadThread("thread"+i, conn, start, end, fileName, barrier); threadPool.execute(thread); } - threadPool.shutdown(); - while(true){ - if(threadPool.isTerminated()){ - break; - } - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - listener.notifyFinished(); if (conn != null) { conn.close(); } @@ -111,7 +106,6 @@ public void threadPoolDownload() throws ConnectionException { public void setListener(DownloadListener listener) { this.listener = listener; } - public void setConnectionManager(ConnectionManager ucm){ this.cm = ucm; diff --git a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java index 6f23aea27a..501326dae0 100644 --- a/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java +++ b/group02/812350401/src/com/github/miniyk2012/coding2017/coderising/download/FileDownloaderTest.java @@ -10,6 +10,7 @@ public class FileDownloaderTest { boolean downloadFinished = false; + private double time = 0; @Before public void setUp() throws Exception { } @@ -25,7 +26,6 @@ public void testDownload() { // String url = "https://www.baidu.com/img/bd_logo.png"; FileDownloader downloader = new FileDownloader(url, "test.png"); - ConnectionManager cm = new ConnectionManagerImpl(); downloader.setConnectionManager(cm); @@ -34,24 +34,22 @@ public void testDownload() { public void notifyFinished() { downloadFinished = true; } - }); - downloader.execute(); // 绛夊緟澶氱嚎绋嬩笅杞界▼搴忔墽琛屽畬姣 while (!downloadFinished) { try { - System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢浜旂"); - //浼戠湢5绉 - Thread.sleep(5000); + System.out.println("杩樻病鏈変笅杞藉畬鎴愶紝浼戠湢0.01绉"); + time += 0.01; + //浼戠湢0.01绉 + Thread.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } } - System.out.println("涓嬭浇瀹屾垚锛"); + System.out.println("涓嬭浇瀹屾垚锛佽楁椂"+time+"绉"); } - } From 87eab63a90471f48a41c142649a578f603a45c07 Mon Sep 17 00:00:00 2001 From: xiaozi Date: Sun, 12 Mar 2017 20:44:08 +0800 Subject: [PATCH 390/646] add --- .../src/com/github/xiaozi123/coding2017/basic/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore @@ -0,0 +1 @@ +/bin/ From 3cc4c758b251120daf89975304997fa6816ff7df Mon Sep 17 00:00:00 2001 From: chishiwu <1107225491@qq.com> Date: Sun, 12 Mar 2017 20:52:58 +0800 Subject: [PATCH 391/646] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=EF=BC=88=E9=83=A8=E5=88=86=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 灏濊瘯鎻愪氦 --- group24/1107225491/1107225491Learning/test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 group24/1107225491/1107225491Learning/test.txt diff --git a/group24/1107225491/1107225491Learning/test.txt b/group24/1107225491/1107225491Learning/test.txt deleted file mode 100644 index 2086f8809c..0000000000 --- a/group24/1107225491/1107225491Learning/test.txt +++ /dev/null @@ -1 +0,0 @@ -奋斗奋斗 \ No newline at end of file From 2d87167e4a56def4f78f0556cabc2ebe1b9c8d2a Mon Sep 17 00:00:00 2001 From: xiaozi Date: Sun, 12 Mar 2017 20:54:01 +0800 Subject: [PATCH 392/646] This is my first week's work. --- .../xiaozi123/coding2017/basic/.gitignore | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore index ae3c172604..2c93a035dc 100644 --- a/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore +++ b/group24/1054283210/src/com/github/xiaozi123/coding2017/basic/.gitignore @@ -1 +1,27 @@ -/bin/ +*.class +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +#ide config +.metadata +.recommenders +.idea/ +*.iml +rebel.* +.rebel.* + +# Idea +*.iml +*.ipr +*.iws +.idea + +target From 2dab30da85361ffc8b1f5076d00e34828748b355 Mon Sep 17 00:00:00 2001 From: C-BoBo <183127807@qq.com> Date: Sun, 12 Mar 2017 21:25:35 +0800 Subject: [PATCH 393/646] Download Download --- .../HomeWork0312/.idea/workspace.xml | 185 ++++++++++++------ .../download/DownloadThread.class | Bin 555 -> 2237 bytes .../download/FileDownloader$1.class | Bin 0 -> 724 bytes .../download/FileDownloader.class | Bin 1653 -> 2127 bytes .../download/FileDownloaderTest.class | Bin 1871 -> 1848 bytes .../download/api/ConnectionException.class | Bin 311 -> 371 bytes .../download/api/ConnectionManager.class | Bin 252 -> 254 bytes .../download/impl/ConnectionImpl.class | Bin 640 -> 1881 bytes .../download/impl/ConnectionManagerImpl.class | Bin 565 -> 1845 bytes .../src/download/DownloadThread.java | 49 +++-- .../src/download/FileDownloader.java | 38 +++- .../src/download/FileDownloaderTest.java | 2 +- .../src/download/api/ConnectionException.java | 3 + .../src/download/api/ConnectionManager.java | 3 +- .../src/download/impl/ConnectionImpl.java | 44 ++++- .../download/impl/ConnectionManagerImpl.java | 34 +++- 16 files changed, 250 insertions(+), 108 deletions(-) create mode 100644 group05/183127807/HomeWork0312/out/production/HomeWork0312/download/FileDownloader$1.class diff --git a/group05/183127807/HomeWork0312/.idea/workspace.xml b/group05/183127807/HomeWork0312/.idea/workspace.xml index 795fe7d83b..f8a8f43c43 100644 --- a/group05/183127807/HomeWork0312/.idea/workspace.xml +++ b/group05/183127807/HomeWork0312/.idea/workspace.xml @@ -2,9 +2,13 @@ - - - + + + + + + +

^<7W@(9yr9mUm2tK?C|&v@%Rm35X`o{%fo+w z{@Nin^=K+(-q159c}|<&r(erZcA8oE1M(O4SGSzTmGMPY^M?9w*x&yMTliY$|8ybw z*CKaKvbUdCKpW1J3B;&!8Gtu+#yv^tcZl`ZYYWBXiDAT|u+wZv2fwN-YLcP$W02cS zv)F^Y`G!5yRb3~PUUHnBn|+`Ci@(eN^Yb0Px8IL|r-FNP0M#(JVs(l%wj#{DUvNcX z!62%xrXb%ap7?Ujcv|5i=AyRcaD9802O4w)mw?G+_%ombZtdHMb3aC~(eg~$A%8J; zOx*tMmCNRSU-_1Eal|jc7AvpApnJA#xPCVDfY}IQ*m5sn54L8ogF&;dz>%KE;2VQn zMdrkPI;&AD&w-&jNp0qDG7Hzc9s_=16-f&+N4y-_ACm*K@m5%Ol%H%T_lR*j`fXzE zj1MkV2C5^zXf9Y(Oeq+poj>$+ZUS5oDlg^VTDSPCPb~JpK`UoB=IdiwzP(Jx&Mvkc zm2O8oeS3v{JS2aDfSW3ErY|Om09839IdS1tdO&K7fjd=Yaztwod-ambO`Kt~>+POs zfHb*32xQUCgs)O8k`U97i0nl2z=F+IE*9BF0*URSEy9_irE)GOi3Extvm=(Er81C^ zRx4=HP!bJF9+ONcq4E=jn!~alegQ4FXT7bGT}Hv?ti$F69N?5`-O=aXk^k;Yf+;Su z3QLJi#M-3{q>3i8M-^^K5>63IAU(7E1#C1(w85G%I7f&iXqHlg{m<8rh! z%kn88+EBdTY2q6-D3jVVR10 zlo<{7Esacrgv#GKQZtmtW9;g3GPKSstmU}v>{B~&F?2}1I>kajZ%Xa?#pj3FY7-T0 zNdZ*{OY=cm3!XN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asn-?G{8SR>hPBXQ{jL92Z7#4hyVZp literal 0 HcmV?d00001 diff --git a/group18/1159828430/20170226/lib/jaxen-1.1-beta-6.jar b/group18/1159828430/20170226/lib/jaxen-1.1-beta-6.jar new file mode 100644 index 0000000000000000000000000000000000000000..6cef35dac44ca72c47fa43ae3603eabd8e8d366e GIT binary patch literal 244330 zcmbq*19WBEwrxcf+pgHQZQHhORcza~ZQD-8w(X>T&b{~jd(U~Vo&Q^VJG<@dw)YrW zV~*8VpQDdCS7arCfFZv9@c>Uwp#R64f4zWz{gx6^r+rHJjt@2x z7!Zur7h@CQcECE53N>8Xg(ZcuS239|GN%MH5H(+NbNHzE+&Fz4IJC&DjcivC=s2YM za;Nv=e2O2gWXv&IKZX@wVn}#w-(1i;8IzlA5}>*~49HMegv}`)FvgC3T$_=NA1xWS zQ7$OkM;;B+TVONP`GHPb0H_!I>?NMP?Re?A3(PN}QEV#yQ`!>p8%LY*%{hc{fF&ekBa!;Y)u`lEdRyub2R!pk3UCm>||}=XlC=Dsrl<6Q2%s@|Lb7n>i9Qtq5aQJ zt`3%e=k@2<%=Mi0^o{iXF1A1C%KY!o8^WJrvek3^O4Q%|@ju%;=(&EmnEuC@0W8D+ zgvLK7>c8yu^&E`;!|AWt#rRWD|K((AWNB+;@9;N%e;&D$quJj9@XzRW{TI6b$uWPu z643t?5dT;7srZ%wDb8skB_3*?}LjJrotgla%OcP0OFq?DK5Kp&ej+_ZzPC|LD z8)OW$)*#KH-H?om{Kq6kuM8}3K5D?#5?kptDNxU1|L z7+ifjU9F@`WF23tGxQ6Y^f@TPW{fo_2LjaXOalVC`R*Jh3%hIpAL@=4f3GG&4&CMU z6&|N+@@#8oMT-*)ddC_B(pIw9<%SDnYnTgycuyN-_y&l$MP}#&!gwbbkF)1z^WCmL zMA9}Mj`u)+Kj-=|X7u&>Fy|ZiwD(xO2*nK=jtORV%nieL5BZ_#mp4fCZbe%N@4+%2 zqP<^|-Vx|N`Pcwywflt|+EjSvY z3X)DQLe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vzY1M_u|CA^!{CMknREww87Q%>r7>-zU zMI>DKtxq&mSbb?Ik?@K@7k;A=UE%0!E)6B}(a?q2BJzNR-^)WU^L*A``T?`Ho6q-% z2bhK54naG^J>4arKpeU7I~eGx5LU~@Nc1O27B(OGZpOk-EFj;_n7i`ur(o^$Zx@|y zD4{S&zP<2tfAmu0v7H2nxi!Im^H_2R*&ytNXGx>Grs=Mw*o4v|srkZ`C-Gzs0!i3@cm50xQw{hlAz+7+$uc^T@NSY`pDB(I_0k6X&ub5K&4;0P6dH?_b literal 0 HcmV?d00001 From 1645e589779ca4dc760fe22fdf0bdb25c765347d Mon Sep 17 00:00:00 2001 From: kilien Date: Sun, 5 Mar 2017 23:06:50 +0800 Subject: [PATCH 108/646] week02 --- .../src/com/coderising/array/ArrayUtil.java | 263 ++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 +++ .../src/com/coderising/litestruts/SAX.java | 30 ++ .../com/coderising/litestruts/SAXmain.java | 21 ++ .../src/com/coderising/litestruts/Struts.java | 35 +++ .../com/coderising/litestruts/StrutsTest.java | 43 +++ .../src/com/coderising/litestruts/View.java | 23 ++ group09/790466157/src/struts.xml | 11 + 8 files changed, 465 insertions(+) create mode 100644 group09/790466157/src/com/coderising/array/ArrayUtil.java create mode 100644 group09/790466157/src/com/coderising/litestruts/LoginAction.java create mode 100644 group09/790466157/src/com/coderising/litestruts/SAX.java create mode 100644 group09/790466157/src/com/coderising/litestruts/SAXmain.java create mode 100644 group09/790466157/src/com/coderising/litestruts/Struts.java create mode 100644 group09/790466157/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group09/790466157/src/com/coderising/litestruts/View.java create mode 100644 group09/790466157/src/struts.xml diff --git a/group09/790466157/src/com/coderising/array/ArrayUtil.java b/group09/790466157/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..e50070bdbd --- /dev/null +++ b/group09/790466157/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,263 @@ +package com.coderising.array; +import java.util.*; + +public class ArrayUtil { + + /** + * 给定一个整形数组a , 对该数组的值进行置换 + 例如: a = [7, 9 , 30, 3] , 置换后为 [3, 30, 9,7] + 如果 a = [7, 9, 30, 3, 4] , 置换后为 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int[] origin1 = {7,9,30,3}; + //交换数组元素 + for (int i = 0; i < origin1.length/2; i++){ + int tmp = origin1[i]; + origin1[i] = origin1[origin1.length-i-1]; + origin1[origin1.length-i-1] = tmp; + } + System.out.println(Arrays.toString(origin1)); + } + + /** + * 现在有如下的一个数组: int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 要求将以上数组中值为0的项去掉,将不为0的值存入一个新的数组,生成的新数组为: + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int[] oldArray1 = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; + int newArrayLength = getLength(oldArray1); + int[] newArray = getNewArray(oldArray1, newArrayLength); + print(oldArray1); + print(newArray); + return newArray; + } + + public static int getLength(int[] array){ + int num = 0; + for(int i = 0 ; i < array.length;i++){ + if(array[i] != 0){ + num++; + } + } + return num; + } + + public static int[] getNewArray(int[] array,int num){ + int[] newArray = new int[num]; + int index = 0; + for(int i = 0; i < array.length; i ++){ + if(array[i]!=0){ + newArray[index] = array[i]; + index++; + } + } + return newArray; + } + public static void print(int [] array){ + for(int i : array){ + System.out.print(i+" "); + } + System.out.println(); + } + + + /** + * 给定两个已经排序好的整形数组, a1和a2 , 创建一个新的数组a3, 使得a3 包含a1和a2 的所有元素, 并且仍然是有序的 + * 例如 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 则 a3 为[3,4,5,6,7,8] , 注意: 已经消除了重复 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int[] a={10,20,30,40,50}; + int[] b={10,20,60}; + int[] c = new int[a.length+b.length-cf(a,b)*2]; + int index = 0; + for (int i=0;i 0) { + buf.append(separator); + } + if (array[i] != null) { + buf.append(array[i]); + } + } + return buf.toString(); + } + + +} \ No newline at end of file diff --git a/group09/790466157/src/com/coderising/litestruts/LoginAction.java b/group09/790466157/src/com/coderising/litestruts/LoginAction.java new file mode 100644 index 0000000000..dcdbe226ed --- /dev/null +++ b/group09/790466157/src/com/coderising/litestruts/LoginAction.java @@ -0,0 +1,39 @@ +package com.coderising.litestruts; + +/** + * 杩欐槸涓涓敤鏉ュ睍绀虹櫥褰曠殑涓氬姟绫伙紝 鍏朵腑鐨勭敤鎴峰悕鍜屽瘑鐮侀兘鏄‖缂栫爜鐨勩 + * @author liuxin + * + */ +public class LoginAction{ + private String name ; + private String password; + private String message; + + public String getName() { + return name; + } + + public String getPassword() { + return password; + } + + public String execute(){ + if("test".equals(name) && "1234".equals(password)){ + this.message = "login successful"; + return "success"; + } + this.message = "login failed,please check your user/pwd"; + return "fail"; + } + + public void setName(String name){ + this.name = name; + } + public void setPassword(String password){ + this.password = password; + } + public String getMessage(){ + return this.message; + } +} diff --git a/group09/790466157/src/com/coderising/litestruts/SAX.java b/group09/790466157/src/com/coderising/litestruts/SAX.java new file mode 100644 index 0000000000..ab3f0c1044 --- /dev/null +++ b/group09/790466157/src/com/coderising/litestruts/SAX.java @@ -0,0 +1,30 @@ +package com.coderising.litestruts; +import org.xml.sax.helpers.DefaultHandler; +import org.xml.sax.Attributes; +public class SAX extends DefaultHandler { + //文档开始事件处理方法 + public void startDocument() { + System.out.println("文档开始 "); + } + //文档结束事件处理方法 + public void endDocument() { + System.out.println("文档结束"); + } + //元素开始事件处理方法 + public void startElement(String uri, String localName, String qname, Attributes attr) + { System.out.println("元素开始: 本地名: " + localName + " 限定名: " + qname + " 命名空间URI: "+uri); + int attrCount = attr.getLength(); + if(attrCount>0) { + System.out.println("属性:"); + for(int i = 0 ; i parameters) { + + /* + + 0. 读取配置文件struts.xml + + 1. 根据actionName找到相对应的class , 例如LoginAction, 通过反射实例化(创建对象) + 据parameters中的数据,调用对象的setter方法, 例如parameters中的数据是 + ("name"="test" , "password"="1234") , + 那就应该调用 setName和setPassword方法 + + 2. 通过反射调用对象的exectue 方法, 并获得返回值,例如"success" + + 3. 通过反射找到对象的所有getter方法(例如 getMessage), + 通过反射来调用, 把值和属性形成一个HashMap , 例如 {"message": "登录成功"} , + 放到View对象的parameters + + 4. 根据struts.xml中的 配置,以及execute的返回值, 确定哪一个jsp, + 放到View对象的jsp字段中。 + + */ + + + return null; + } + +} diff --git a/group09/790466157/src/com/coderising/litestruts/StrutsTest.java b/group09/790466157/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..b8c81faf3c --- /dev/null +++ b/group09/790466157/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group09/790466157/src/com/coderising/litestruts/View.java b/group09/790466157/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..07df2a5dab --- /dev/null +++ b/group09/790466157/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group09/790466157/src/struts.xml b/group09/790466157/src/struts.xml new file mode 100644 index 0000000000..dd598a3664 --- /dev/null +++ b/group09/790466157/src/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file From 475a4caac0f00c801b78e2d4e6c8774b64dc9f52 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Sun, 5 Mar 2017 23:27:27 +0800 Subject: [PATCH 109/646] 3.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 绗簩娆′綔涓 --- group08/1509102580/3.5/array/ArrayUtil.java | 216 ++++++++++++++++++ .../3.5/litestruts/LoginAction.java | 39 ++++ group08/1509102580/3.5/litestruts/Struts.java | 140 ++++++++++++ .../1509102580/3.5/litestruts/StrutsTest.java | 51 +++++ group08/1509102580/3.5/litestruts/View.java | 23 ++ group08/1509102580/3.5/litestruts/struts.xml | 11 + .../1509102580/3.5/test/ArrayUtilTest.java | 158 +++++++++++++ 7 files changed, 638 insertions(+) create mode 100644 group08/1509102580/3.5/array/ArrayUtil.java create mode 100644 group08/1509102580/3.5/litestruts/LoginAction.java create mode 100644 group08/1509102580/3.5/litestruts/Struts.java create mode 100644 group08/1509102580/3.5/litestruts/StrutsTest.java create mode 100644 group08/1509102580/3.5/litestruts/View.java create mode 100644 group08/1509102580/3.5/litestruts/struts.xml create mode 100644 group08/1509102580/3.5/test/ArrayUtilTest.java diff --git a/group08/1509102580/3.5/array/ArrayUtil.java b/group08/1509102580/3.5/array/ArrayUtil.java new file mode 100644 index 0000000000..ed54429def --- /dev/null +++ b/group08/1509102580/3.5/array/ArrayUtil.java @@ -0,0 +1,216 @@ +package com.zzk.coding2017.zuoye_2.array; + +import com.zzk.coding2017.zuoye_1.ArrayList; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + */ + public void reverseArray(int[] origin){ + int head = 0;int end = origin.length-1;//瀹氫箟鏀跺熬涓や釜鎸囩ず閲 + if(end<=head){ + return ; + }else{ + int temp; + while(end>head){ + temp = origin[head]; + origin[head] =origin[end]; + origin[end] = temp; + head++; + end--; + } + } + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + int length = oldArray.length; + if(length<=0){ + return null; + }else{ + ArrayList al = new ArrayList(); + for (int i = 0; i < oldArray.length; i++) { + if(oldArray[i]!=0){ + al.add((Integer)oldArray[i]); + }else{ + continue; + } + } + int[] result = new int[al.size()]; + for (int i = 0; i < result.length; i++) { + result[i]=(int)al.get(i); + } + return result; + } + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + int i=0,j=0;//i,j鍒嗗埆鐢ㄤ簬璁板綍array1鍜宎rray2鐨勬瘮杈冭繃绋嬬殑鎸囩ず + ArrayList al = new ArrayList(); + while(i parameters) { + + View v = new View(); + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + try { + DocumentBuilder db = dbf.newDocumentBuilder(); + Document document = db + .parse("src/com/zzk/coding2017/zuoye_2/litestruts/struts.xml"); + Element element = document.getDocumentElement(); + NodeList actionList = element.getElementsByTagName("action");// 鍙栧緱鎵鏈夌殑action鑺傜偣 + for (int i = 0; i < actionList.getLength(); i++) {// 閬嶅巻鎵鏈夌殑actin鑺傜偣锛屽鎵炬槸鍚﹀瓨鍦ㄥ悕涓篴ctionName鐨勮妭鐐 + Element e = (Element) actionList.item(i); + String name = e.getAttribute("name"); + if (name.equals(actionName)) {// 鎵惧埌瀵瑰簲鐨勭被锛岀粰绫荤殑灞炴ц祴鍊煎苟璋冪敤execute鍑芥暟鎵ц + try { + String cname = e.getAttribute("class"); + Class C = Class.forName(cname); + Object o = C.newInstance(); + Method m1 = C.getDeclaredMethod("execute"); + + // 鍙栧緱鎵鏈夌殑getter鍜宻etter鏂规硶 + Method[] methods = C.getMethods(); + Hashtable getMethods = new Hashtable<>(); + Hashtable setMethods = new Hashtable<>(); + // 瀹氫箟姝e垯琛ㄨ揪寮忥紝浠庢柟娉曚腑杩囨护鍑篻etter / setter 鍑芥暟. + String gs = "get(\\w+)"; + Pattern getM = Pattern.compile(gs); + String ss = "set(\\w+)"; + Pattern setM = Pattern.compile(ss); + // 鎶婃柟娉曚腑鐨"set" 鎴栬 "get" 鍘绘帀 + String rapl = "$1"; + String param; + for (int k = 0; k < methods.length; ++k) { + Method m = methods[k]; + String methodName = m.getName(); + if (Pattern.matches(gs, methodName)) { + param = getM.matcher(methodName) + .replaceAll(rapl).toLowerCase(); + getMethods.put(param, m); + } else if (Pattern.matches(ss, methodName)) { + param = setM.matcher(methodName) + .replaceAll(rapl).toLowerCase(); + setMethods.put(param, m); + } + } + + // 缁檃ction鎵瀵瑰簲绫荤殑鍙傛暟璧嬪 + Iterator> it = parameters + .entrySet().iterator(); + while (it.hasNext()) { + Entry en = it.next(); + String Mname = en.getKey(); + Mname = "set" + Mname.substring(0, 1).toUpperCase() + + Mname.substring(1); + Method gMethod = getMethods.get(Mname); + if (gMethod != null) { + gMethod.invoke(o, en.getValue()); + } + } + + // 璋冪敤actin瀵瑰簲绫荤殑鎵ц鏂规硶 + String result = (String) m1.invoke(o, null); + + // 閬嶅巻action瀛愯妭鐐癸紝鏌ユ壘瀵瑰簲缁撴灉,骞惰繑鍥炲弬鏁 + // NodeList childNodes = e.getChildNodes(); + NodeList childNodes = element + .getElementsByTagName("result"); + for (int j = 0; j < childNodes.getLength(); j++) { + Element Child = (Element) childNodes.item(j); + String ChileName = Child.getAttribute("name"); + if (ChileName.equals(result)) { + v.setJsp(Child.getNodeValue()); + + // 缁檝iew鐨刾arameters鍙傛暟璧嬪 + Map vparameters = new HashMap<>(); + for (Entry entry : getMethods.entrySet()) { + String tmp = (String) entry.getValue().invoke(o, null); + vparameters.put(entry.getKey(), tmp); + } + v.setParameters(vparameters); + return v; + } + } + } catch (Exception e2) { + // TODO: handle exception + e2.printStackTrace(); + } + } + } + } catch (ParserConfigurationException e) { + e.printStackTrace(); + } catch (SAXException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + /* + * + * 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + * + * 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + * 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 ("name"="test" , + * "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + * + * 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + * + * 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 + * {"message": "鐧诲綍鎴愬姛"} , 鏀惧埌View瀵硅薄鐨刾arameters + * + * 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + * 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + */ + + return null; + } + +} diff --git a/group08/1509102580/3.5/litestruts/StrutsTest.java b/group08/1509102580/3.5/litestruts/StrutsTest.java new file mode 100644 index 0000000000..06b8ee96e9 --- /dev/null +++ b/group08/1509102580/3.5/litestruts/StrutsTest.java @@ -0,0 +1,51 @@ +package com.zzk.coding2017.zuoye_2.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } + + @Test + public void testRunSruts(){ + Struts s = new Struts(); + String actionName = "logon"; + Map parameters = new HashMap<>(); + s.runAction(actionName, parameters); + } +} diff --git a/group08/1509102580/3.5/litestruts/View.java b/group08/1509102580/3.5/litestruts/View.java new file mode 100644 index 0000000000..f046e1a04e --- /dev/null +++ b/group08/1509102580/3.5/litestruts/View.java @@ -0,0 +1,23 @@ +package com.zzk.coding2017.zuoye_2.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group08/1509102580/3.5/litestruts/struts.xml b/group08/1509102580/3.5/litestruts/struts.xml new file mode 100644 index 0000000000..d2111db387 --- /dev/null +++ b/group08/1509102580/3.5/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group08/1509102580/3.5/test/ArrayUtilTest.java b/group08/1509102580/3.5/test/ArrayUtilTest.java new file mode 100644 index 0000000000..f0cb28781c --- /dev/null +++ b/group08/1509102580/3.5/test/ArrayUtilTest.java @@ -0,0 +1,158 @@ +package com.zzk.coding2017.zuoye_2.test; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +import com.zzk.coding2017.zuoye_2.array.ArrayUtil; + +public class ArrayUtilTest { + ArrayUtil au; + /*@Before + public void setUp() throws Exception { + au = new ArrayUtil(); + } + + @Test + public void testReverseArray() { + + int[] a = {1,2,3,4,5}; + int[] b = {1,2,3,4}; + int[] c = {}; + int[] d = {1}; + + au.reverseArray(a); + au.reverseArray(b); + au.reverseArray(c); + au.reverseArray(d); + + for (int i = 0; i < a.length; i++) { + System.out.print(a[i]); + } + System.out.println(); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i]); + } + System.out.println(); + for (int i = 0; i < c.length; i++) { + System.out.print(c[i]); + } + System.out.println(); + for (int i = 0; i < d.length; i++) { + System.out.print(d[i]); + } + fail("Not yet implemented"); + } + + @Before + public void setUp2() throws Exception { + au = new ArrayUtil(); + System.out.println("testRemoveZero "); + } + + @Test + public void testRemoveZero() { + int[] a = {1,2,3,0,0,3}; + int[] b = {}; + int[] c = {0,0,0,0}; + int[] d = {1,2,3,3}; + a = au.removeZero(a); + b = au.removeZero(b); + c = au.removeZero(c); + d = au.removeZero(d); + System.out.println("a"); + for (int i = 0; i < a.length; i++) { + System.out.print(a[i]); + } + + System.out.println("c"); + for (int i = 0; i < c.length; i++) { + System.out.print(c[i]); + } + System.out.println("d"); + for (int i = 0; i < d.length; i++) { + System.out.print(d[i]); + } + System.out.println("b"); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i]); + } + fail("Not yet implemented"); + }*/ + + + @Before + public void setUp3() throws Exception { + au = new ArrayUtil(); + System.out.println("testMerge "); + } + @Test + public void testMerge() { + int[] a = {1,1,1,1,1,1,1,1,1,1}; + int[] b = {1,2,4,4,4,6,7,8,8,9,9,9,9,9,9}; + int[] c = au.merge(a, b); + for (int i = 0; i < c.length; i++) { + System.out.print(c[i]); + } + fail("Not yet implemented"); + } + + + + @Test + public void testGrow() { + fail("Not yet implemented"); + } + + @Before + public void setUp5() throws Exception { + au = new ArrayUtil(); + System.out.println("testFibonacci "); + } + @Test + public void testFibonacci() { + int[] result = au.fibonacci(10); + for (int i = 0; i < result.length; i++) { + System.out.print(result[i]+", "); + } + fail("Not yet implemented"); + } + + + @Before + public void setUp6() throws Exception { + au = new ArrayUtil(); + System.out.println("testGetPrimes "); + } + @Test + public void testGetPrimes() { + int[] result = au.getPrimes(20); + for (int i = 0; i < result.length; i++) { + System.out.print(result[i]+", "); + } + fail("Not yet implemented"); + } + + @Test + public void testGetPerfectNumbers() { + fail("Not yet implemented"); + } + + + + @Before + public void setUp7() throws Exception { + au = new ArrayUtil(); + System.out.println("testJoin "); + } + @Test + public void testJoin() { + int[] test1 = {1}; + System.out.println(au.join(test1, "--")); + int[] test2 = {1,2}; + System.out.println(au.join(test2, "--")); + fail("Not yet implemented"); + } + +} From c829419a7a224dae3018431a0fc3732f744eb05b Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Sun, 5 Mar 2017 23:31:37 +0800 Subject: [PATCH 110/646] =?UTF-8?q?Create=20=E6=96=87=E7=AB=A0-=E4=B8=80?= =?UTF-8?q?=E5=91=A8=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\200\345\221\250\347\254\224\350\256\260" | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 "group08/1509102580/3.5/\346\226\207\347\253\240-\344\270\200\345\221\250\347\254\224\350\256\260" diff --git "a/group08/1509102580/3.5/\346\226\207\347\253\240-\344\270\200\345\221\250\347\254\224\350\256\260" "b/group08/1509102580/3.5/\346\226\207\347\253\240-\344\270\200\345\221\250\347\254\224\350\256\260" new file mode 100644 index 0000000000..363f72d218 --- /dev/null +++ "b/group08/1509102580/3.5/\346\226\207\347\253\240-\344\270\200\345\221\250\347\254\224\350\256\260" @@ -0,0 +1,83 @@ +1銆佸熬閫掑綊 +鏍堝抚銆 + +鍑芥暟閫掑綊浣跨敤鏍堝抚鏉ュ疄鐜扮殑銆傛爤甯ф槸甯э紝鏈川鏄竴娈佃褰曚簡閫掑綊璋冪敤鐨勫繀瑕佷俊鎭殑鐗囨銆 + + + +鏍堝抚 + +杩斿洖鍊 +杩斿洖鍦板潃 + + +鏍堝抚1 + +鏍堝抚2 + +鏍堝抚3 + +鏍堝抚4 + +鏍堝抚5 + + +杩斿洖鍊6*f(5) +杩斿洖鍦板潃 + + + +杩斿洖鍊5*f(4) +杩斿洖鍦板潃 + + + +杩斿洖鍊4*f(3) +杩斿洖鍦板潃 + + + +杩斿洖鍊3*f(2) +杩斿洖鍦板潃 + + + +杩斿洖鍊2*f(1) +杩斿洖鍦板潃 + + +鍏辨湁5涓爤甯э紝姣忎釜鏍堝抚閮戒細鎸囧悜涔嬪墠璋冪敤鑷繁鐨勬爤甯с傚鏋滄槸姹俧(n)锛宯鏄竴涓緢澶х殑鍊硷紝閭d箞瀛樺偍鏍堝抚鐨勬爤鍐呭瓨寰堝彲鑳戒細婧㈠嚭銆備负浜嗛槻姝㈡孩鍑猴紝鏈変竴绉嶅熬閫掑綊鐨勬柟娉曘 + +涓婅竟鐨5涓爤甯у瓨鍌ㄤ簡涓や釜閲嶈淇℃伅锛氳繑鍥炲煎拰杩斿洖鍦板潃銆傚洜涓鸿皟鐢ㄧ殑鍑芥暟f()閮芥槸涓鏍风殑锛屼俊鎭腑涓嶅悓鐨勫彧鏈夊墠闈㈢殑绯绘暟鍜屽悗杈圭殑杩斿洖鍦板潃銆傚鏋滃彲浠ュ皢涓嶅悓淇℃伅閮藉彉鎴愮浉鍚屼俊鎭紝閭d箞涔呭彧鐢ㄤ竴涓爤甯э紝杩斿洖鍦板潃杩樻寚鍚戣嚜宸憋紝灏卞彲浠ヤ簡銆 +杩欐牱鐨勮瘽锛屽氨鏄f()鍓嶉潰鐨勭郴鏁板幓鎺夛紝閭d箞鏀惧湪鍝噷鍛紵鍝噷閮戒笉鑳斤紝鍥犱负涓轰簡淇濇寔姣忔璋冪敤鐨勬爤甯у瓨鍌ㄧ殑淇℃伅閮界浉鍚屻備负浜嗚繖鏍凤紝鍙兘鍦ㄧ郴鏁板啓杩沠锛堬級鍑芥暟 閲岋紝鍙樻垚f锛堬級鐨勫弬鏁般備篃灏辨槸璇磃锛坣-1,n*result锛夛紝鍏朵腑result灏辨槸鏈璋冨姩f鐨勭郴鏁般 +杩欐牱鎵鏈夌殑鏍堝抚灏遍兘瀛樺偍浜嗙浉鍚岀殑淇℃伅銆傜浉鍚岀殑鍑芥暟f锛堬級鍜岀浉鍚岀殑杩斿洖鍦板潃锛堟寚鍚戣嚜宸憋級銆 +浣嗘槸杩欐牱涓嶅氨浼氳涓嬩竴娆$殑璋冪敤瑕嗙洊鎺夋湰娆¤皟鐢ㄤ簡涔堬紝閭d箞鍗充究璁$畻鍑鸿皟鐢ㄧ粨鏋滐紝涓婁竴娆$殑宸茬粡琚鐩栨帀浜嗭紝杩樻庝箞浣跨敤鍛€ +涓轰簡瑙i噴杩欎竴鐐癸紝瑕佺悊瑙o紝鍥犱负璇ユ爤甯у彧璋冪敤浜嗚嚜宸憋紝鎵浠ュ鏋滄妸鑷繁姹傚嚭鏉ヤ簡锛岄偅涔堟棤闇鍐嶄繚瀛樹粈涔堝埆鐨勪笢瑗夸簡銆 +姣斿璇达細 + + +杩斿洖鍊糵(5锛1) +杩斿洖鍦板潃 + + + +杩斿洖鍊糵(4,2) +杩斿洖鍦板潃 + + + +杩斿洖鍊糵(3,2) +杩斿洖鍦板潃 + +2銆乻ync鏄悓姝ョ殑鎰忔濓紝鍚屾鏈変袱涓柟鍚戙傚埌搴曞悜鍝釜鏂瑰悜鍚屾锛岄渶瑕佺湅commit鍦ㄥ摢绔 +杩欓噷鍙堟秹鍙婂埌浜哻ommit姒傚康銆 +commit琛ㄧず鈥斺斿皢鏇存敼璁板綍鍏堟潵锛屼竴鏉℃洿鏀癸紙鍒犻櫎锛屾坊鍔狅級灏辨槸涓涓猚ommit锛宑ommit璁板綍浜嗗湪鏈湴鎴栬呰繙绔殑鎵鏈夋搷浣溿 +鍥犳锛宻ync鍚屾灏卞彲浠ヤ緷鐓ommit鏉ヨ繘琛屻傚鏋滄湰鍦板彂鐢熶簡commit锛宻ync灏辨槸灏嗚繙绔笌鏈湴鏂囦欢杩涜鍚屾锛屽鏈湴鏉ヨ鏄竴涓笂浼犵殑杩囩▼锛涘鏋滄槸杩滅杩涜浜哻ommit锛岄偅涔坰ync灏辨槸璁茶繙绔枃浠朵笅杞藉埌鏈湴锛屽鏈湴鏉ヨ灏辨槸涓嬭浇杩囩▼銆 + +褰撶劧涔熷彲浠ヤ笉璁叉墍鏈塩ommit杩涜鍚屾锛屽厑璁搁夋嫨涓浜沜ommit杩涜鍚屾銆傛瘮濡傦紝浣犲彧鎯冲皢鏌愪竴浜涙枃浠朵笂浼犲埌杩滅锛岃屽彟澶栦竴鍐欎笉鎯炽 + +3銆丳ull requests鐨勫瓧闈㈡剰鎬濇槸鈥滄媺璇锋眰鈥濄傚畠鎿嶄綔鐨勫璞℃槸fork鐨勬簮绔拰瀛愮锛屼篃灏辨槸閾炬帴浣滆呭拰鎴戣嚜宸便 +杩欎釜鎿嶄綔鐨勬剰鎬濇槸锛岃璇锋眰灏嗕竴鏂逛粨搴撲腑鐨勬敼鍙橈紙commit锛夋媺鍒板彟涓鏂圭殑浠撳簱涓幓锛屽疄鐜板悎骞剁殑浣滅敤銆備綔鐢ㄦ湁涓ょ偣锛1銆佹槸灏嗕綘鎵鍋氱殑璐$尞(commit)浜ょ粰浣滆咃紝鏈熸湜浣滆呰兘澶熷皢浣犵殑浠g爜鎷夛紙pull锛夊埌浣滆呯殑浠撳簱涓紝瀹炵幇鍚堝苟銆2銆佹槸浣滆呯殑浠撳簱鏇存敼浜嗚澶氫唬鐮侊紝鑰岃嚜宸辩殑浠撳簱涓庝綔鑰呭凡缁忓ぇ鐩稿緞搴紝涓轰簡鑳芥寔缁窡韪綔鑰呯殑浠g爜鏇存柊锛屾垜闇瑕佸皢浣滆呯殑浠撳簱涓庤嚜宸辩殑鍚屾鏇存敼銆傝繖灏遍渶瑕佸皢浣滆呯殑鏇存敼锛坈ommit锛夋媺锛坧ull锛夊埌鑷繁鐨勪粨搴撲腑銆 + + +鍦℅ithub涓紝pull requests鎿嶄綔杩欏嚑涓や釜鍙傛暟锛屾槸鍙宠竟鐨勪粨搴撲腑鐨刢ommit浼氳鎷夊掑乏杈圭殑浠撳簱鎬汇傛墍浠ワ紝浣滆呯殑浠撳簱鍜岃嚜宸辩殑浠撳簱鍝釜鍦ㄥ乏杈瑰憿涓湪鍙宠竟闇瑕佹牴鎹渶姹傛潵纭畾銆 From 36269c4bd3ac58c3ea73868c10bdae7e88da0c99 Mon Sep 17 00:00:00 2001 From: wayss000 Date: Mon, 6 Mar 2017 00:02:27 +0800 Subject: [PATCH 111/646] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=88=91=E7=9A=84?= =?UTF-8?q?=E7=83=82=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/coderising/litestruts/Struts.java | 207 ++++++++++++++++-- .../src/coderising/litestruts/StrutsTest.java | 1 - .../src/coderising/litestruts/struts.xml | 2 +- 3 files changed, 193 insertions(+), 17 deletions(-) diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java index 460e5a3751..864658703e 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/Struts.java @@ -1,12 +1,16 @@ package coderising.litestruts; import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.dom4j.Document; +import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; @@ -17,28 +21,45 @@ public class Struts { private static String filePath = "src/coderising/litestruts/struts.xml"; public static void main(String [] args) throws Exception{ - String className = getClassNameFromXml(filePath,"login"); + String actionName = "login"; + List list = getClassNameFromXml(filePath,actionName); Map parameters = new HashMap(); parameters.put("name","test"); parameters.put("password","1234"); - Class clz = Class.forName(className); + Class clz = Class.forName(list.get(0)); LoginAction loginAction = (LoginAction)clz.newInstance(); loginAction.setName(parameters.get("name")); loginAction.setPassword(parameters.get("password")); Method[] methods = clz.getMethods(); - String value; + String value = ""; for(Method m : methods){ - if(m.getName().equals("exectue")){ - value = (String) m.invoke(clz); + if(m.getName().equals("execute")){ + value = (String) m.invoke(loginAction,new Object[0]); + System.out.println(value); + } + } +// value + Map loginMap = new HashMap(); + Field[] fields = clz.getDeclaredFields(); + for(Field f : fields){ + loginMap.put(f.getName(), getGetMethod(clz, f.getName())); + } + View view = new View(); + if(loginMap != null){ + view.setParameters(loginMap); + if("success".equals(value)){ + view.setJsp(list.get(1)); + } + if("fail".equals(value)){ + view.setJsp(list.get(2)); } } - } - public static View runAction(String actionName, Map parameters) throws Exception { + public static View runAction(String actionName, Map parameters){ /* @@ -49,7 +70,7 @@ public static View runAction(String actionName, Map parameters) t ("name"="test" , "password"="1234") , 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 - 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xecute 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , @@ -59,18 +80,91 @@ public static View runAction(String actionName, Map parameters) t 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 */ - String [] result = readStrutsXml(filePath); - Class login = Class.forName(result[1]); + List list = getClassNameFromXml(filePath,actionName); +// Map parameters = new HashMap(); +// parameters.put("name","test"); +// parameters.put("password","1234"); + Class clz = null; + try { + clz = Class.forName(list.get(0)); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + LoginAction loginAction = null; + try { + loginAction = (LoginAction)clz.newInstance(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } - return null; + loginAction.setName(parameters.get("name")); + loginAction.setPassword(parameters.get("password")); + + Method[] methods = clz.getMethods(); + String value = ""; + for(Method m : methods){ + if(m.getName().equals("execute")){ + try { + value = (String) m.invoke(loginAction,new Object[0]); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + System.out.println(value); + } + } +// value + Map loginMap = new HashMap(); + Field[] fields = clz.getDeclaredFields(); + for(Field f : fields){ + loginMap.put(f.getName(), getGetMethod(clz, f.getName())); + } + View view = new View(); + if(loginMap != null){ + view.setParameters(loginMap); + if("success".equals(value)){ + view.setJsp(list.get(1)); + } + if("fail".equals(value)){ + view.setJsp(list.get(2)); + } + } + + return view; } - private static String getClassNameFromXml(String filePath,String actionName) throws Exception{ + /** + * + * @param filePath + * @param actionName + * @return list涓湁涓変釜鍙傛暟锛岀涓涓被鍚嶏紝绗簩涓猻uccess鏃讹紝绗笁涓猣ail + * @throws Exception + */ + private static List getClassNameFromXml(String filePath,String actionName){ + + List list = new ArrayList(); //鐢╠om4j璇诲彇xml SAXReader reader = new SAXReader(); - Document document = reader.read(new File(filePath)); + Document document = null; + try { + document = reader.read(new File(filePath)); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } Element rootElement = document.getRootElement(); List childElements = rootElement.elements(); @@ -78,11 +172,94 @@ private static String getClassNameFromXml(String filePath,String actionName) thr String nodeName = child.attributeValue("name"); if(actionName.equals(nodeName)){ String className = child.attributeValue("class"); - return className; + list.add(className); + List resultElements = child.elements(); + for(Element resultE : resultElements){ + list.add(resultE.getData()); + list.add(resultE.getData()); + } } } - return null; + return list; } + + /** + * java鍙嶅皠bean鐨刧et鏂规硶 + * + * @param objectClass + * @param fieldName + * @return + */ + @SuppressWarnings("unchecked") + public static Method getGetMethod(Class objectClass, String fieldName) { + StringBuffer sb = new StringBuffer(); + sb.append("get"); + sb.append(fieldName.substring(0, 1).toUpperCase()); + sb.append(fieldName.substring(1)); + try { + return objectClass.getMethod(sb.toString()); + } catch (Exception e) { + } + return null; + } + + /** + * java鍙嶅皠bean鐨剆et鏂规硶 + * + * @param objectClass + * @param fieldName + * @return + */ + @SuppressWarnings("unchecked") + public static Method getSetMethod(Class objectClass, String fieldName) { + try { + Class[] parameterTypes = new Class[1]; + Field field = objectClass.getDeclaredField(fieldName); + parameterTypes[0] = field.getType(); + StringBuffer sb = new StringBuffer(); + sb.append("set"); + sb.append(fieldName.substring(0, 1).toUpperCase()); + sb.append(fieldName.substring(1)); + Method method = objectClass.getMethod(sb.toString(), parameterTypes); + return method; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 鎵цset鏂规硶 + * + * @param o 鎵ц瀵硅薄 + * @param fieldName 灞炴 + * @param value 鍊 + */ + public static void invokeSet(Object o, String fieldName, Object value) { + Method method = getSetMethod(o.getClass(), fieldName); + try { + method.invoke(o, new Object[] { value }); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 鎵цget鏂规硶 + * + * @param o 鎵ц瀵硅薄 + * @param fieldName 灞炴 + */ + public static Object invokeGet(Object o, String fieldName) { + Method method = getGetMethod(o.getClass(), fieldName); + try { + return method.invoke(o, new Object[0]); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + } diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java b/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java index 257f3d5a89..e7170d61cf 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/StrutsTest.java @@ -34,7 +34,6 @@ public void testLoginActionFailed() { Map params = new HashMap(); params.put("name","test"); params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 - View view = Struts.runAction(actionName,params); Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); diff --git a/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml index f6aecf208a..e41c9e0ab0 100644 --- a/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml +++ b/group08/1144989424/secondPractice/src/coderising/litestruts/struts.xml @@ -1,6 +1,6 @@ - + /jsp/homepage.jsp /jsp/showLogin.jsp From 6d8c2f0926dc97d35759e96e11cb867a9e6b95a3 Mon Sep 17 00:00:00 2001 From: zzkmz <1509102580@qq.com> Date: Mon, 6 Mar 2017 00:27:50 +0800 Subject: [PATCH 112/646] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 淇敼浜嗗嚑涓鍙杧ml鏂囦欢鐨勫湴鏂 --- group08/1509102580/3.5/litestruts/Struts.java | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/group08/1509102580/3.5/litestruts/Struts.java b/group08/1509102580/3.5/litestruts/Struts.java index ba3ab97a66..c0f31dc3b3 100644 --- a/group08/1509102580/3.5/litestruts/Struts.java +++ b/group08/1509102580/3.5/litestruts/Struts.java @@ -59,7 +59,9 @@ public static View runAction(String actionName, if (Pattern.matches(gs, methodName)) { param = getM.matcher(methodName) .replaceAll(rapl).toLowerCase(); - getMethods.put(param, m); + if (!param.equals("class")) { + getMethods.put(param, m); + } } else if (Pattern.matches(ss, methodName)) { param = setM.matcher(methodName) .replaceAll(rapl).toLowerCase(); @@ -73,9 +75,7 @@ public static View runAction(String actionName, while (it.hasNext()) { Entry en = it.next(); String Mname = en.getKey(); - Mname = "set" + Mname.substring(0, 1).toUpperCase() - + Mname.substring(1); - Method gMethod = getMethods.get(Mname); + Method gMethod = setMethods.get(Mname); if (gMethod != null) { gMethod.invoke(o, en.getValue()); } @@ -85,23 +85,30 @@ public static View runAction(String actionName, String result = (String) m1.invoke(o, null); // 閬嶅巻action瀛愯妭鐐癸紝鏌ユ壘瀵瑰簲缁撴灉,骞惰繑鍥炲弬鏁 - // NodeList childNodes = e.getChildNodes(); - NodeList childNodes = element - .getElementsByTagName("result"); + NodeList childNodes = e.getChildNodes(); + /* + * NodeList childNodes = element + * .getElementsByTagName("result"); + */ for (int j = 0; j < childNodes.getLength(); j++) { - Element Child = (Element) childNodes.item(j); - String ChileName = Child.getAttribute("name"); - if (ChileName.equals(result)) { - v.setJsp(Child.getNodeValue()); + if (childNodes.item(j) instanceof Element) { + Element Child = (Element) childNodes.item(j);//杩欓噷涓嶅姞鍒ゆ柇浼氭姤绫诲瀷鏃犳硶杞崲鐨勯敊璇紝鏌ユ壘鍘熷洜锛屾槸璇磝ml涓殑鏌愪簺鏂囨湰浼氳褰撳仛鑺傜偣瀛樺叆nodelist涓 + String ChileName = Child.getAttribute("name"); + if (ChileName.equals(result)) { + v.setJsp(Child.getTextContent());//涓嶈兘鐢╣etnodevalue锛岃岃鐢╣ettextcontent - // 缁檝iew鐨刾arameters鍙傛暟璧嬪 - Map vparameters = new HashMap<>(); - for (Entry entry : getMethods.entrySet()) { - String tmp = (String) entry.getValue().invoke(o, null); - vparameters.put(entry.getKey(), tmp); + // 缁檝iew鐨刾arameters鍙傛暟璧嬪 + Map vparameters = new HashMap<>(); + for (Entry entry : getMethods + .entrySet()) { + String tmp = (String) entry.getValue() + .invoke(o); + vparameters.put(entry.getKey(), tmp); + } + v.setParameters(vparameters); + return v; } - v.setParameters(vparameters); - return v; + } } } catch (Exception e2) { From 2ffe0e2bb3cef9d8389d02011d8702a704450b28 Mon Sep 17 00:00:00 2001 From: bate999999999 <282742732@qq.com> Date: Mon, 6 Mar 2017 03:35:20 +0800 Subject: [PATCH 113/646] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 218 ++++++++++- .../src/com/coderising/array/ArrayUtil.java | 360 ++++++++++++++++++ .../coderising/litestruts/LoginAction.java | 39 ++ .../src/com/coderising/litestruts/Struts.java | 170 +++++++++ .../com/coderising/litestruts/StrutsTest.java | 43 +++ .../src/com/coderising/litestruts/View.java | 23 ++ .../src/com/coderising/litestruts/struts.xml | 11 + .../learning_1/src/lib/dom4j-1.6.1.jar | Bin 0 -> 313898 bytes 8 files changed, 863 insertions(+), 1 deletion(-) create mode 100644 group12/282742732/learning_1/src/com/coderising/array/ArrayUtil.java create mode 100644 group12/282742732/learning_1/src/com/coderising/litestruts/LoginAction.java create mode 100644 group12/282742732/learning_1/src/com/coderising/litestruts/Struts.java create mode 100644 group12/282742732/learning_1/src/com/coderising/litestruts/StrutsTest.java create mode 100644 group12/282742732/learning_1/src/com/coderising/litestruts/View.java create mode 100644 group12/282742732/learning_1/src/com/coderising/litestruts/struts.xml create mode 100644 group12/282742732/learning_1/src/lib/dom4j-1.6.1.jar diff --git a/.gitignore b/.gitignore index 8b13789179..eca0d838ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,217 @@ - +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.publishproj + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[cod] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg +.gitignore diff --git a/group12/282742732/learning_1/src/com/coderising/array/ArrayUtil.java b/group12/282742732/learning_1/src/com/coderising/array/ArrayUtil.java new file mode 100644 index 0000000000..4d93afd1fd --- /dev/null +++ b/group12/282742732/learning_1/src/com/coderising/array/ArrayUtil.java @@ -0,0 +1,360 @@ +package com.coderising.array; + +public class ArrayUtil { + + /** + * 缁欏畾涓涓暣褰㈡暟缁刟 , 瀵硅鏁扮粍鐨勫艰繘琛岀疆鎹 + 渚嬪锛 a = [7, 9 , 30, 3] , 缃崲鍚庝负 [3, 30, 9,7] + 濡傛灉 a = [7, 9, 30, 3, 4] , 缃崲鍚庝负 [4,3, 30 , 9,7] + * @param origin + * @return + * @return + */ + public int[] reverseArray(int[] origin){ + int[] newOrigin = new int[origin.length]; + + for (int i = 0; i < newOrigin.length; i++) { + newOrigin[i] = origin[origin.length-1-i]; + } + return newOrigin; + } + + /** + * 鐜板湪鏈夊涓嬬殑涓涓暟缁勶細 int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5} + * 瑕佹眰灏嗕互涓婃暟缁勪腑鍊间负0鐨勯」鍘绘帀锛屽皢涓嶄负0鐨勫煎瓨鍏ヤ竴涓柊鐨勬暟缁勶紝鐢熸垚鐨勬柊鏁扮粍涓猴細 + * {1,3,4,5,6,6,5,4,7,6,7,5} + * @param oldArray + * @return + */ + + public int[] removeZero(int[] oldArray){ + + int count = 0; + + + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] == 0) { + count++; + } + } + int newArray[] = new int[oldArray.length-count]; + int index = 0; + + for (int i = 0; i < oldArray.length; i++) { + if (oldArray[i] != 0) { + newArray[index] = oldArray[i]; + index++; + } + } + + return newArray; + } + + /** + * 缁欏畾涓や釜宸茬粡鎺掑簭濂界殑鏁村舰鏁扮粍锛 a1鍜宎2 , 鍒涘缓涓涓柊鐨勬暟缁刟3, 浣垮緱a3 鍖呭惈a1鍜宎2 鐨勬墍鏈夊厓绱狅紝 骞朵笖浠嶇劧鏄湁搴忕殑 + * 渚嬪 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 鍒 a3 涓篬3,4,5,6,7,8] , 娉ㄦ剰锛 宸茬粡娑堥櫎浜嗛噸澶 + * @param array1 + * @param array2 + * @return + */ + + public int[] merge(int[] array1, int[] array2){ + + int length = array1.length + array2.length; + + int TEMP[]= new int[length]; + System.arraycopy(array1, 0, TEMP, 0, array1.length); + System.arraycopy(array2, 0, TEMP, array1.length, array2.length); + + + for (int i = 0; i < array1.length; i++) { + for (int j = 0; j < array2.length; j++) { + if (array1[i]==array2[j]) { + length--; + } + } + } + + + + for (int i = 0; i < TEMP.length; i++) { + System.out.println(TEMP[i]); + } + + + int head = 0; + for (int i = 0; i < TEMP.length -1;i++) { + for (int j = i+1; j < TEMP.length; j++) { + if(TEMP[i]>TEMP[j]){ + int tempE=TEMP[i]; + TEMP[i] = TEMP[j]; + TEMP[j] = tempE; + } + } + } + + int NewArray[] = new int[length]; + int num = 0; + for (int i = 0; i < TEMP.length;i++) { + if (i parameters) { + + View view = new View(); + /* + + 0. 璇诲彇閰嶇疆鏂囦欢struts.xml + + + 1. 鏍规嵁actionName鎵惧埌鐩稿搴旂殑class 锛 渚嬪LoginAction, 閫氳繃鍙嶅皠瀹炰緥鍖栵紙鍒涘缓瀵硅薄锛 + 鎹畃arameters涓殑鏁版嵁锛岃皟鐢ㄥ璞$殑setter鏂规硶锛 渚嬪parameters涓殑鏁版嵁鏄 + ("name"="test" , "password"="1234") , + 閭e氨搴旇璋冪敤 setName鍜宻etPassword鏂规硶 + + 2. 閫氳繃鍙嶅皠璋冪敤瀵硅薄鐨別xectue 鏂规硶锛 骞惰幏寰楄繑鍥炲硷紝渚嬪"success" + + 3. 閫氳繃鍙嶅皠鎵惧埌瀵硅薄鐨勬墍鏈塯etter鏂规硶锛堜緥濡 getMessage锛, + 閫氳繃鍙嶅皠鏉ヨ皟鐢紝 鎶婂煎拰灞炴у舰鎴愪竴涓狧ashMap , 渚嬪 {"message": "鐧诲綍鎴愬姛"} , + 鏀惧埌View瀵硅薄鐨刾arameters + + 4. 鏍规嵁struts.xml涓殑 閰嶇疆,浠ュ強execute鐨勮繑鍥炲硷紝 纭畾鍝竴涓猨sp锛 + 鏀惧埌View瀵硅薄鐨刯sp瀛楁涓 + + */ + + + //Dom4J璇诲彇struts.xml + + //System.out.println(Struts.class.getResource("").getPath()); + + File file = new File(Struts.class.getResource("").getPath()+"struts.xml"); + + + SAXReader rd = new SAXReader(); + try { + Document doc = rd.read(file); + + Element root = doc.getRootElement(); + + Element action; + + for (Iterator iterator = root.elementIterator("action"); iterator.hasNext();) { + action = (Element) iterator.next(); + //System.out.println(action.attributeValue("name")+"===="+action.attributeValue("class")); + + + + if (null != actionName && actionName.equals(action.attributeValue("name")) ) { + + + //System.out.println(action.attributeValue("name")+"========"+action.attributeValue("class")); + + Class actionclass = Class.forName(action.attributeValue("class")); + + Object actionObj = actionclass.newInstance(); + + + Method[] methods = actionclass.getMethods(); + + for (int i = 0; i < methods.length; i++) { + + String methodName = methods[i].getName(); + + if (methodName.startsWith("set")) { + + if (parameters.get(methodName.substring(3).toLowerCase()) != null) { + + methods[i].invoke(actionObj, parameters.get(methodName.substring(3).toLowerCase())); + + } + + } + } + + Method meththod = actionclass.getMethod("execute", null); + + + + String result = (String) meththod.invoke(actionObj); + + Map resultParameters = new HashMap(); + + for (int i = 0; i < methods.length; i++) { + + String methodName = methods[i].getName(); + + if (methodName.startsWith("get")) { + + resultParameters.put(methodName.substring(3).toLowerCase(), methods[i].invoke(actionObj)); + + } + } + + + + Element resultElement; + for (Iterator iterator2 = action.elementIterator(); iterator2.hasNext();) { + resultElement = (Element) iterator2.next(); + if (resultElement.attributeValue("name").equals(result)) { + view.setJsp(resultElement.getText()); + view.setParameters(resultParameters); + } + + } + + } + + } + + + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return view; + } + + public static void main(String[] args) { + + Map map = new HashMap(); + + map.put("name","test"); + map.put("password","1234"); + + View view = runAction("login", map); + System.out.println(view.getJsp()); + + } +} diff --git a/group12/282742732/learning_1/src/com/coderising/litestruts/StrutsTest.java b/group12/282742732/learning_1/src/com/coderising/litestruts/StrutsTest.java new file mode 100644 index 0000000000..a44c1878ac --- /dev/null +++ b/group12/282742732/learning_1/src/com/coderising/litestruts/StrutsTest.java @@ -0,0 +1,43 @@ +package com.coderising.litestruts; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + + + + + +public class StrutsTest { + + @Test + public void testLoginActionSuccess() { + + String actionName = "login"; + + Map params = new HashMap(); + params.put("name","test"); + params.put("password","1234"); + + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/homepage.jsp", view.getJsp()); + Assert.assertEquals("login successful", view.getParameters().get("message")); + } + + @Test + public void testLoginActionFailed() { + String actionName = "login"; + Map params = new HashMap(); + params.put("name","test"); + params.put("password","123456"); //瀵嗙爜鍜岄璁剧殑涓嶄竴鑷 + + View view = Struts.runAction(actionName,params); + + Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp()); + Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message")); + } +} diff --git a/group12/282742732/learning_1/src/com/coderising/litestruts/View.java b/group12/282742732/learning_1/src/com/coderising/litestruts/View.java new file mode 100644 index 0000000000..0194c681f6 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coderising/litestruts/View.java @@ -0,0 +1,23 @@ +package com.coderising.litestruts; + +import java.util.Map; + +public class View { + private String jsp; + private Map parameters; + + public String getJsp() { + return jsp; + } + public View setJsp(String jsp) { + this.jsp = jsp; + return this; + } + public Map getParameters() { + return parameters; + } + public View setParameters(Map parameters) { + this.parameters = parameters; + return this; + } +} diff --git a/group12/282742732/learning_1/src/com/coderising/litestruts/struts.xml b/group12/282742732/learning_1/src/com/coderising/litestruts/struts.xml new file mode 100644 index 0000000000..a4ca47c733 --- /dev/null +++ b/group12/282742732/learning_1/src/com/coderising/litestruts/struts.xml @@ -0,0 +1,11 @@ + + + + /jsp/homepage.jsp + /jsp/showLogin.jsp + + + /jsp/welcome.jsp + /jsp/error.jsp + + \ No newline at end of file diff --git a/group12/282742732/learning_1/src/lib/dom4j-1.6.1.jar b/group12/282742732/learning_1/src/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c8c4dbb92d6c23a7fbb2813eb721eb4cce91750c GIT binary patch literal 313898 zcma&O1DIvovNf2fv~AnAD{Whqw(UyWwr$(CZQFL&x%YM7KCj<9{cnGJkF~xLF(YQg zj2UaoNdo_X1o-P_Vqe4fuMhwA0`ccvT3AVdMqEaOPVNs3836px-T1%3kpJH>X#p8= z5n)9oT4|BUm`UqCdia3rqz~A4pxPG;xK_Y3K%p`Tr4THQ!Sfx`TB3S6R}btjWOlpE zS7+k}3{DHv;nA?ZDfi@`x{n3u?NN-@^xKF+G--I|;0jW}1o1MY#le}oz8T2zos}r(pMpP!hetKh1Qbzp7GXj@m4tM9phXVG3S2MY=Afx@x07BDGl)Gz}aMmfjk* zHhIMKGHH4OLcZVS{B8k{Tzi)DQ8+FIH-sW2x3GYrmL$T|HseF zxt^>3|1sF!$?~6sL;D+ve}QfF93749|4D`Le>=#*#mxGjM)B|D9qo<&iO=7`PL5`l z{~+n#dAR-|Zu$@CzmKDk%At;!@7U@J=4!M6qG+c4*~RVzyG&x|GQTc{!O?4^46b!T=u^yIZ;tt7D)h^ zXCAIe8?EYZLcWahy0L7 zv1B(nyw26c2FLM+$MnV5=kqxm02H00mOn;t6m)P!6t)UG_rhsQ8PWj)9-f2Rd`*>} zAihdnp{8wGSC4+~u5zVBewUr8-IBYo-tsd~@xq5d( z(cyw;5jniuX2}W=63B4lv*u&mrB_@brV(PGi2734oWlz?G0_)VF$KL#F8d>L`P$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