¹é²¢ÅÅÐòËã·¨µÄJAVAʵÏÖ
package Utils.Sort;
/**
*¹é²¢ÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×é±ØÐëʵÏÖComparable½Ó¿Ú
*/
public class MergeSort implements SortStrategy
{
private Comparable[] bridge;
/**
*ÀûÓù鲢ÅÅÐòËã·¨¶ÔÊý×éobj½øÐÐÅÅÐò
*/
public void sort(Comparable[] obj)
{
if (obj == null)
{
throw new NullPointerException("The param can not be null!");
}
bridge = new Comparable[obj.length]; //³õʼ»¯ÖмäÊý×é
mergeSort(obj, 0, obj.length - 1); //¹é²¢ÅÅÐò
bridge = null;
}
/**
*½«Ï±ê´Óleftµ½rightµÄÊý×é½øÐй鲢ÅÅÐò
*@param obj¡¡ÒªÅÅÐòµÄÊý×éµÄ¾ä±ú
*@param left ÒªÅÅÐòµÄÊý×éµÄµÚÒ»¸öÔªËØϱê
*@param right ÒªÅÅÐòµÄÊý×éµÄ×îºóÒ»¸öÔªËصÄϱê
*/
private void
Ïà¹ØÎĵµ£º
1. ³éÏó
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2. ¼Ì³Ð
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀàµÄÖØÓã¬ËüÌṩÁËÒ»ÖÖÃ÷È· ......
JavaÖÐͨ¹ýimplements SerializableÀ´ÊµÏÖ¶ÔÏóµÄÐòÁл¯¡£ÆäʵSerializable½Ó¿ÚÖв¢Ã»ÓÐÐèҪʵÏֵķ½·¨£¬×¢Ã÷ij¸öÀàimplements SerializableÖ»ÊÇΪÁ˱êʶ»ò±íÃ÷Õâ¸öÀà¿ÉÒÔ±»ÐòÁл¯¡£
ÄÇôʲôÊÇÐòÁл¯ÄØ£¬ÐòÁл¯ÓÖÓÐʲô×÷ÓÃÄØ£¿
Ò»¸öÀ࣬»ò ......
Main.cpp (Win/*nix)
#include "FlexSecurityBox.h"
int main(int argc, char ** argv) {
char * address;
short port;
if (argc == 2)
{
address = "0.0.0.0";
port = atoi(argv[1]);
} else if (argc == 3)
{
address = argv[1];
port = atoi(argv[2]);
} else
{
printf("Y ......
»ùÓÚjavaµÄÆóÒµËÑË÷ÒýÇæÓÅ»¯ÄÚÈݹÜÀíϵͳ
»ùÓÚJavaµÄÆóÒµËÑË÷ÒýÇæÓÅ»¯ÄÚÈݹÜÀíϵͳ(SEO-ECMS-v1.0)ÏîĿ˵Ã÷£º
ÍøÂçÉÏÁ÷´«µÄÆóÒµÍøÕ¾¹ÜÀíϵͳ´ó¶¼ºöÂÔÁËÒ»µã¼´Ã¿¸öÒ³ÃæµÄ Ò³Ãæ±êÌâ Ò³Ãæ¹Ø¼ü×Ö Ò³ÃæÃèÊöµÄÉèÖá£
¶øÕâЩǡǡÊÇËÑË÷ÒýÇæ×î¹ØÐĵĶ«Î÷¡£ÔÚ´ÓÊÂseoµÄÅóÓѵİïÖúÏ£¬¿ª·¢ÁËÕâÌ×ÊʺÏseoµÄcms¡£
ÏîÄ¿²ÉÓÃÎȶ¨ÇÒÁé» ......