07 2011 档案

摘要:OpenGL ES Tutorial for Android– Part II'm going to write a couple of tutorials on using OpenGL ES on Android phones. The theory of OpenGL ES is the same on different devices so it should be quite easy to convert them to another platform.I can't always remember where I found particular info s 阅读全文
posted @ 2011-07-20 21:34 朱旭东 阅读(24044) 评论(3) 推荐(3) 编辑
摘要:开始Android 3D 游戏开发教程– Part I-VI本帖最后由 huzht 于 2010-4-25 07:58 编辑 这几篇Android 3D游戏开发的文章原文出自一位德国人Martin 在droidnova.com写的文章,有lixinso翻译为中文。第一部分首先介绍OpenGL相关的术语,并引导你开始3D开发的第一步。这个关于3D游戏的系列的叫做 Vortex .这个教程主要focus在3D编程上,其他的东西比如菜单和程序生命周期虽然是代码的一部分,但是在这里不会被提到。首先开始介绍OpenGL的术语。 顶点Vertex 顶点是3D空间中的一个点,也是许多对象的基础元素。在Ope 阅读全文
posted @ 2011-07-20 21:28 朱旭东 阅读(3072) 评论(0) 推荐(1) 编辑
摘要:VIPS:基于视觉的Web页面分页算法1.问题的提出目前,随着互联网的高速发展,Web已经成为这个世界上最大的信息来源。Web 作为信息技术的载体已成为人们重要的工作、学习、生活、娱乐工具。Web的发展给人类生活带来了巨大的方便,人们可以跨越时间和空间界限来共享大量信息。 但是如何去获取这些Web信息为我们所用则是大家面临的共同问题。在最基本的层次上,整个Web网络就是由无数的Web页面而构成,因此如果获取了这些 Web页面就相当于获取了Web信息内容。事实上,目前的很多Web信息获取技术都是基于这种理论。但是把整个页面作为一个基本的信息获取单位并不是太合理,尽管用户通常会把一些相关的内容放在 阅读全文
posted @ 2011-07-19 15:58 朱旭东 阅读(2113) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class MergeSort { public static void mergeSort(DataWraper[] data){ System.out.println("开始排序:"); sort(data,0,data.length-1); } /*将索引从left到right范围的数组元素进行归并排序 * data 待排序数组 * left 待排序数组的第一个元素索引 * right 待排序数组的最后一个元素索引 */ private static void sort(DataWraper[] data, 阅读全文
posted @ 2011-07-18 15:52 朱旭东 阅读(3807) 评论(0) 推荐(1) 编辑
摘要:import java.util.Arrays;public class ShellSort { public static void shellSort(DataWraper[] data){ System.out.println("开始排序:"); int arrayLength=data.length; int h=1; //按h*3+1得到增量序列的最大值 while(h<arrayLength/3){ h=h*3+1; } while(h>0){ System.out.println("====h的值:"+h+"===&q 阅读全文
posted @ 2011-07-18 15:05 朱旭东 阅读(287) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class BinaryInsertSort { public static void binaryInsertSort(DataWraper[] data){ System.out.println("开始排序:"); int arrayLength=data.length; for(int i=1;i<arrayLength;i++){ DataWraper tmp=data[i]; int low=0; int high=i-1; while(low<=high){ //找出low、high的中间 阅读全文
posted @ 2011-07-18 14:21 朱旭东 阅读(552) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class InsertSort { public static void insertSort(DataWraper[] data){ System.out.println("开始排序:"); int arrayLength=data.length; for(int i=1;i<arrayLength;i++){ //当整体后移是,保证data[i]的值不会丢失 DataWraper tmp=data[i]; //i索引处的值已经比前面所有值都大,表明已经有序,无需插入 if(data[i].compar 阅读全文
posted @ 2011-07-18 14:11 朱旭东 阅读(264) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class QuickSort { public static void quickSort(DataWraper[] data){ System.out.println("开始排序"); subSort(data,0,data.length-1); } //对data数组中从start到end索引范围的子序列进行处理, //使所有小于分界值的放在左面,所有大于分界值的放在右面 private static void subSort(DataWraper[] data, int start, int end) { 阅读全文
posted @ 2011-07-18 14:01 朱旭东 阅读(430) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class BubbleSort { public static void bubbleSort(DataWraper[] data){ System.out.println("开始排序"); int arrayLength=data.length; for(int i=0;i<arrayLength-1;i++){ boolean flag=false; for(int j=0;j<arrayLength-i-1;j++){ if(data[j].compareTo(data[j+1])>0) 阅读全文
posted @ 2011-07-18 13:41 朱旭东 阅读(430) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class HeapSort { public static void heapSort(DataWraper[] data){ System.out.println("开始排序"); int arrayLength=data.length; //循环建堆 for(int i=0;i<arrayLength-1;i++){ //建堆 buildMaxHeap(data,arrayLength-1-i); //交换堆顶和最后一个元素 swap(data,0,arrayLength-1-i); System.o 阅读全文
posted @ 2011-07-18 13:30 朱旭东 阅读(3488) 评论(1) 推荐(0) 编辑
摘要:import java.util.Arrays;class DataWraper implements Comparable<DataWraper>{ int data; String flag; public DataWraper(int data, String flag) { super(); this.data = data; this.flag = flag; } public String toString(){ return data+flag; } @Override public int compareTo(DataWraper dw) { // TODO Aut 阅读全文
posted @ 2011-07-18 11:22 朱旭东 阅读(627) 评论(0) 推荐(0) 编辑
摘要:1.编写带有native声明的方法的java类新建HelloWorld.javaclass HelloWorld{ public native void displayHelloWorld(); static{ System.loadLibrary("HelloWorldImpl"); } public static void main(String args[]){ new HelloWorld().displayHelloWorld(); }}声明native方法:如果你想将一个方法做为一个本地方法的话,那么你就必须声明改方法为native的,并且不能实现。其中方法的参 阅读全文
posted @ 2011-07-17 20:08 朱旭东 阅读(2414) 评论(1) 推荐(0) 编辑
摘要:立体package com.sunny;import java.nio.ByteBuffer;import java.nio.ByteOrder;import java.nio.FloatBuffer;import java.nio.ShortBuffer;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.opengles.GL10;import android.opengl.GLSurfaceView;public class VortexRenderer implements 阅读全文
posted @ 2011-07-17 15:11 朱旭东 阅读(457) 评论(0) 推荐(0) 编辑
摘要:透视package com.sunny;import java.nio.ByteBuffer;import java.nio.ByteOrder;import java.nio.FloatBuffer;import java.nio.ShortBuffer;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.opengles.GL10;import android.opengl.GLSurfaceView;public class VortexRenderer implements 阅读全文
posted @ 2011-07-17 15:11 朱旭东 阅读(417) 评论(0) 推荐(0) 编辑
摘要:增加color modepackage com.sunny;import java.nio.ByteBuffer;import java.nio.ByteOrder;import java.nio.FloatBuffer;import java.nio.ShortBuffer;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.opengles.GL10;import android.opengl.GLSurfaceView;public class VortexRenderer i 阅读全文
posted @ 2011-07-17 15:10 朱旭东 阅读(476) 评论(0) 推荐(0) 编辑
摘要:package com.sunny;import android.app.Activity;import android.os.Bundle;public class mainActivity extends Activity { private static final String LOG_TAG=mainActivity.class.getSimpleName(); private VortexView _vortexView; /** Called when the activity is first created. */ @Override public void onCreate 阅读全文
posted @ 2011-07-17 13:39 朱旭东 阅读(858) 评论(0) 推荐(1) 编辑
摘要:public class LinkList<T> { public class Node{ private T data; private Node next; public Node(){ } public Node(T data,Node next){ this.data=data; this.next=next; } } private Node header; private Node ... 阅读全文
posted @ 2011-07-16 21:12 朱旭东 阅读(293) 评论(0) 推荐(0) 编辑
摘要:public class LinkList<T> { public class Node{ private T data; private Node next; public Node(){ } public Node(T data,Node next){ this.data=data; this.next=next; } } private Node header; private Node ... 阅读全文
posted @ 2011-07-16 21:07 朱旭东 阅读(491) 评论(0) 推荐(0) 编辑
摘要:import java.util.Arrays;public class SequenceList<T> { private int DEFAULT_SIZE=16; //保存数组的长度 private int capacity; //定义一个数组用于保存顺序线性表的元素 private Object[] elementData; //保存顺序表中元素的当前个数 private int size=0; public SequenceList(){ capacity=DEFAULT_SIZE; elementData=new Object[capacity]; } public Se 阅读全文
posted @ 2011-07-16 20:08 朱旭东 阅读(813) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示