易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

java:大数据文件写入,读取,分割,排序,合并

package arrays.file;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Random;
public class ConcludeCombinationSortWrite {
 /**
  * 大数据排序合并
  *
  * @param args
  */
 public static void main(String[] args) throws IOException {
  // 写入文件的路径
  String filePath = "D:\\456";
  // 切分文件的路径
  String sqlitFilePath = "D:\\456\\123";
  //数据的个数
  int CountNumbers=10000000;
  
  //子文件的个数
  int CountFile=10;
  
  //精度
  int countAccuracy=30*CountFile;
  
  long startNumber=System.currentTimeMillis();
  // 写入大数据文件
  ......

java:经典文件写入和读取,速度超快

package arrays.file;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.Writer;
public class CreateFile {
 public static void main(String[] args) {
  // readerFile("E:/workspace6/Arrays/src/myArray/Nodes.java");
//  readerFileToo();
  //writeInMemroy();
  writeFile2();
 }
 // 经典读取数据一
 public static String readerFile() {
  // E:/workspace6/Arrays/src/myArray/Nodes.java
  String s, s2 = "";
  try {
   BufferedReader in = new BufferedReader(new FileReader
     ("E:/workspace6/Arrays/src/myArray/Nodes.java"));
   try {
&nb ......

java:手写二叉树BinaryTree添加和查询方法

package arrays.myArray;
public class BinaryTree {
 private Node root;
 // 添加数据
 public void add(int data) {
  // 递归调用
  if (null == root)
   root = new Node(data, null, null);
  else
   addTree(root, data);
 }
 private void addTree(Node rootNode, int data) {
  // 添加到左边
  if (rootNode.data > data) {
   if (rootNode.left == null)
    rootNode.left = new Node(data, null, null);
   else
    addTree(rootNode.left, data);
  } else {
   // 添加到右边
   if (rootNode.right == null)
    rootNode.right = new Node(data, null, null);
   else
    addTree(rootNode.right, data);
  }
 }
 // 查询数据
 public void show() {
  showTree(root);
 }
 priv ......

java:手写MyArrayLisy的常用方法,增删改查

package arrays.myArray;
public class MyArrayList {
 private Object[] arrObj = new Object[3];
 private int size = 0;
 
 // 长度
 public int size() {
  return size;
 }
 // insert
 public void add(Object obj) {
  add(size,obj);
 }
 // update
 // 把前面的往后移动
 public void add(int index, Object obj) {
  if(size==arrObj.length){
   Object[] temp=new Object[size*2];
   for(int i=0;i<arrObj.length;i++){
    temp[i]=arrObj[i];
   }
   arrObj=temp;
  }
  //从前往后
  for (int i =size; i>index ; i--) {
   arrObj[i] = arrObj[i-1];
  }
  arrObj[index]=obj;
  size++;
 }
 // delete
 // 把后面的往前移动
 public void remove(int index) {
  size--;
  for (int i =index;i<size; i+ ......

java:手写MyLinkedList所有方法,增删改查

package arrays.myArray;
public class MyLinkedList {
 private int size = 0;
 private Node1 head = null;
 // 添加
 public void add(Object obj) {
  add(size, obj);
 }
 // 修改
 public void add(int index, Object obj) {
  if (null == head) {
   head = new Node1(obj, null);
  } else {
   if (0 == index) {
    head = new Node1(obj, head);
   } else {
    Node1 temp = head;
    for (int i = 0; i < index - 1; i++) {
     temp = temp.next;
    }
    temp.next = new Node1(obj, temp.next);
   }
  }
  size++;
 }
 // 移除
 public void remove(int index) {
  if (0 == index) {
   head = head.next;
  } else {
   Node1 temp = head;
 &nbs ......

java:三种经典大排序汇总,冒泡,插入,选择

package arrays.myArray;
public class SortArr {
 public static void main(String[] args) {
  int[] arrInt = { 4, 7, 8, 5, 6, 3, 2, 3, 4 };
  maoPaoSort(arrInt);
  print("冒泡排序:", arrInt);
  arrInt = new int[]{ 4, 7, 8, 5, 6, 3, 2, 3, 4 };
  insertSort(arrInt);
  print("插入排序:", arrInt);
  arrInt = new int[]{ 4, 7, 8, 5, 6, 3, 2, 3, 4 };
  checkSort(arrInt);
  print("选择排序:", arrInt);
 }
 // 冒泡排序
 private static void maoPaoSort(int[] arrInt) {
  int temp = 0;
  for (int i = 0; i < arrInt.length; i++) {
   for (int j = 0; j < arrInt.length - 1; j++) {
    if (arrInt[i] < arrInt[j]) {
     temp = arrInt[i];
     arrInt[i] = arrInt[j];
     arrInt[j] = temp;
    }
   }
&nbs ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [598] [599] [600] [601] 602 [603] [604] [605] [606] [607]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号