Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 org.rut.util.algorithm.support;
import org.rut.util.algorithm.SortUtil;
/** *//**
 * @author treeroot
 * @since 2006-2-2
 * @version 1.0
 */
public class InsertSort implements SortUtil.Sort...{
    /**//* (non-Javadoc)
     * @see org.rut.util.algorithm.SortUtil.Sort#sort(int[])
     */
    public void sort(int[] data) ...{
        int temp;
        for(int i=1;i<data.length;i++)...{
            for(int j=i;(j>0)&&(data[j]<data[j-1]);j--)...{
                SortUtil.swap(data,j,j-1);
            }
        }       
    } ......

JAVA ×ÔÓÉÂäÌåºÍƽÅ×ÎÞÄÜÔ˶¯

±¾Îijö´¦:http://blog.163.com/mr_liuyong/blog/static/123424376200994104952814/
JAVA ×ÔÓÉÂäÌåºÍƽÅ×ÎÞÄÜÔ˶¯
±àдһ¸öJava GUIÓ¦ÓóÌÐò£¬²ÉÓÃJava¶àÏ̼߳¼Êõ£¬Ä£Äâ×ÔÓÉÂäÌåºÍƽÅ×Ô˶¯£ºÒ»¸öÇò×ÔÓÉÂäÏ£¬Ò»¸öÇòˮƽÅ׳ö¡££¨±¾Ìâ30·Ö£©£¨×ÔÓÉÂäÌåÎïÀí¹«Ê½£ºh= g *t2/2 £»Æ½Å×Ô˶¯ÎïÀí¹«Ê½£ºh= g *t2/2 £¬x=26*t £»
h´ú±í¸ß¶È£¬t´ú±íʱ¼ä£¬g´ú±íÖØÁ¦¼ÓËÙ¶È=9.8 m/s2
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Panel;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
public class DropTest extends Frame implements Runnable,ActionListener{
 double x1 = 100,y1 = 0;//AµÄÆðʼλÖÃ
 double x2 = 100,y2 = 0;//BµÄÆðʼλÖÃ
 double s2 = 26;//BµÄˮƽËÙ¶È
 double g = 9.8;//G
 long t ......

Mysql×Ö¶ÎÀàÐÍ×Ü»ã

MySQLÖ§³Ö´óÁ¿µÄÁÐÀàÐÍ£¬Ëü¿ÉÒÔ±»·ÖΪ3ÀࣺÊý×ÖÀàÐÍ¡¢ÈÕÆÚºÍʱ¼äÀàÐÍÒÔ¼°×Ö·û´®(×Ö·û)ÀàÐÍ¡£±¾½ÚÊ×Ïȸø³ö¿ÉÓÃÀàÐ͵ÄÒ»¸ö¸ÅÊö£¬²¢ÇÒ×ܽáÿ¸öÁÐÀàÐ͵Ĵ洢ÐèÇó£¬È»ºóÌṩÿ¸öÀàÖеÄÀàÐÍÐÔÖʵĸüÏêϸµÄÃèÊö¡£¸ÅÊöÓÐÒâ¼ò»¯£¬¸üÏêϸµÄ˵Ã÷Ó¦¸Ã¿¼Âǵ½ÓйØÌض¨ÁÐÀàÐ͵ĸ½¼ÓÐÅÏ¢£¬ÀýÈçÄãÄÜΪÆäÖ¸¶¨ÖµµÄÔÊÐí¸ñʽ¡£
ÓÉMySQLÖ§³ÖµÄÁÐÀàÐÍÁÐÔÚÏÂÃæ¡£ÏÂÁдúÂë×ÖĸÓÃÓÚÃèÊöÖУº
M
Ö¸³ö×î´óµÄÏÔʾ³ß´ç¡£×î´óµÄºÏ·¨µÄÏÔʾ³ß´çÊÇ 255 ¡£
D
ÊÊÓÃÓÚ¸¡µãÀàÐͲ¢ÇÒÖ¸³ö¸úËæÔÚÊ®½øÖÆÐ¡ÊýµãºóµÄÊýÂëµÄÊýÁ¿¡£×î´ó¿ÉÄܵÄÖµÊÇ30£¬µ«ÊÇÓ¦¸Ã²»´óÓÚM-2¡£
·½À¨ºÅ(“[”ºÍ“]”)Ö¸³ö¿ÉÑ¡µÄÀàÐÍÐÞÊηûµÄ²¿·Ö¡£
×¢Ò⣬Èç¹ûÄãÖ¸¶¨Ò»¸öÁËΪZEROFILL£¬MySQL½«Îª¸ÃÁÐ×Ô¶¯µØÔö¼ÓUNSIGNEDÊôÐÔ¡£
TINYINT[(M)] [UNSIGNED] [ZEROFILL]
Ò»¸öºÜСµÄÕûÊý¡£ÓзûºÅµÄ·¶Î§ÊÇ-128µ½127£¬ÎÞ·ûºÅµÄ·¶Î§ÊÇ0µ½255¡£
SMALLINT[(M)] [UNSIGNED] [ZEROFILL]
Ò»¸öСÕûÊý¡£ÓзûºÅµÄ·¶Î§ÊÇ-32768µ½32767£¬ÎÞ·ûºÅµÄ·¶Î§ÊÇ0µ½65535¡£
MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]
Ò»¸öÖеȴóСÕûÊý¡£ÓзûºÅµÄ·¶Î§ÊÇ-8388608µ½8388607£¬ÎÞ·ûºÅµÄ·¶Î§ÊÇ0µ½16777215¡£
INT[(M)] [UNSIGNED] [ZEROFILL ......

Ò»¸ö»ùÓÚmysqlÊý¾Ý¿âµÄÏîÄ¿µÄÉý¼¶½â¾ö·½°¸Ð¡½á(½ÚÑ¡)

1  ÒýÑÔ
Êý¾Ý¿âʹÓÃMYSQL4.0°æ±¾¡£ËæÓÃÓû§ÊýµÄÖð²½Ôö¶à£¬ÒòΪÊý¾Ý¿â°æ±¾¹ýµÍ¶øÒýÆðµÄ±§Ô¹Ò²Ô½À´Ô½¶à£¬²»×ãÒ²Ô½À´Ô½Ã÷ÏÔ¡£
Ê×ÏÈ£¬¶Ô²úÆ·»¯²¿Êð²úÉúÁËÖÆÔ¼¡£ÓÉÓÚMYSQL4.0Êý¾Ý¿âµÄÅäÖÃÎļþmy.iniÊÇ´æ·ÅÔÚWindowsµÄϵͳĿ¼Ïµģ¬Í¬Ê±MYSQL4.0µÄ°²×°³ÌÐòÎÞ·¨¶Ô¶Ë¿ÚºÅ½øÐÐÉèÖá£ËùÒÔÈç¹ûÒ»¸ö·þÎñÆ÷ÉÏÒѾ­°²×°ÁËÈÎÒâÒ»¸ö°æ±¾MYSQLÊý¾Ý¿â£¬ÔÙ°²×°Ò»¸öMYSQL4.0£¬ÒÔǰµÄMYSQL Êý¾Ý¿â½«ÎÞ·¨Ê¹Óᣵ«ÊÇËæ×ÅÓû§µÄÈÕÒæÔö¶à£¬¿Í»§ÌṩµÄ·þÎñÆ÷µÄÈí¼þ»·¾³Ò²ÊǸ÷ʽ¸÷Ñù¡£²»¿É±ÜÃâ»á³öÏÖ¿Í»§ÌṩµÄ·þÎñÆ÷ÉÏÒѾ­°²×°ÁËMYSQLµÄÇé¿ö£¬¶øÄ¿Ç°ÏµÍ³Ö»ÔÚMYSQL4.0ÉÏ¿ÉÒÔʹÓã¬ËùÒÔÖ»ÄܺͿͻ§ÉÌÁ¿¸ü»»·þÎñÆ÷À´½â¾öÕâ¸öÎÊÌ⣨ĿǰÒѾ­Óжà¼Ò¿Í»§´æÔÚÕâÖÖÇé¿ö£©¡£Òò´Ë£¬Èç¹ûҪʹµÃϵͳʵÏÖ²úÆ·»¯²¿Ê𣬠MYSQL4.0²¢²»·ûºÏÒªÇó¡£ÁíÍ⣬ÔÚMYSQLµÄ¹Ù·½ÍøÕ¾ÉÏ£¬ÒѾ­Í£Ö¹¶ÔMYSQL4.0ÌṩÏÂÔØ¡£Ò»·½ÃæËµÃ÷£¬MYSQL4.0Òѽ¥½¥±»ÌÔÌ­£»ÁíÒ»·½Ã棬MYSQLÔÚδ¾­¿ª·¢ÉÌÊÚȨÊDz»Äܱ»ÉÌÓõÄ[2]£¬Òò´ËÔÚʵ¼ÊµÄ²¿ÊðÖУ¬Ô­ÔòÉÏÊý¾Ý¿âÐèÒªÓû§×ÔÐа²×°µÄ£¬µ«°²×°°üµÄ¹Ù·½ÏÂÔØµØÖ·ÒѾ­²»´æÔÚÁË£¬Ò²»áÔì³ÉÉÌÒµÉϵÄһЩÎÊÌâ¡£ËùÒÔMYSQL4.0ÊǸÃϵͳ²úÆ·»¯µÄÒ»¸öÆ¿¾±¡£
Æä´Î£¬¶Ô¶à¹úÓïÑÔÖ§³Ö¹¦ÄÜÈõ¡£ÓÉÓÚMYSQL4.0·¢²¼Ê±¼ä½ÏÔ ......

MYSQLµÄ»ù´¡ÃüÁî

mysql »ù±¾ÃüÁî
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µÚÈýÕС¢Ôö¼ÓÐÂÓû§
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
È磬Ôö¼ÓÒ»¸öÓû§user1ÃÜÂëΪpassword1£¬ÈÃÆä¿ÉÒÔÔÚ±¾»úÉϵǼ£¬ ²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬Èëmysql£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to user1@localhost Identified by "password1";
Èç¹ûÏ£Íû¸ÃÓû§Äܹ»ÔÚÈκλúÆ÷Éϵǽmysql£¬Ôò½«localhost¸ÄΪ"%"¡£
Èç¹ûÄã²»Ïëuser1ÓÐÃÜÂ룬¿ÉÒÔÔÙ´òÒ»¸öÃüÁÃÜÂëÈ¥µô¡£
grant select,insert,update,delete on mydb.* to user1@localhost identified by "";
µÚËÄÕУº ²Ù×÷Êý¾Ý¿â
µÇ¼µ½mysqlÖУ¬È»ºóÔÚmysqlµÄÌáʾ·ûÏÂÔËÐÐÏÂÁÐÃüÁÿ¸öÃüÁîÒԷֺŽáÊø¡£
1¡¢ ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
ȱʡÓÐÁ½¸öÊý¾Ý¿â£ºmys ......

MySqlÓÅ»¯


ÊìϤSQLµÄÈ˶¼ÖªµÀ£¬Íê³Éͬһ¸öÈÎÎñ£¬SQL¿ÉÄÜÓжàÖÖд·¨£¬µ«²»Í¬Ð´·¨µÄ²éѯÐÔÄÜ¿ÉÄÜ»áÓÐÌìÈÀÖ®±ð£¬±¾ÎÄÁоٳöÎå¸ö²éѯÓÅ»¯µÄ·½·¨£¬µ±È»£¬ÓÅ»¯µÄ·½·¨»¹Óкܶࡣ
¡¡¡¡1¡¢ÓÅ»¯Êý¾ÝÀàÐÍ
¡¡
¡¡MySQLÖÐÊý¾ÝÀàÐÍÓжàÖÖ£¬Èç¹ûÄãÊÇÒ»ÃûDBA£¬ÕýÔÚ°´ÕÕÓÅ»¯µÄÔ­Ôò¶ÔÊý¾ÝÀàÐͽøÐÐÑϸñµÄ¼ì²é£¬µ«¿ª·¢ÈËÔ±¿ÉÄÜ»áÑ¡ÔñËûÃÇÈÏΪ×î¼òµ¥µÄ·½°¸£¬ÒÔ¼Ó¿ì±à
ÂëËÙ¶È£¬»òÕßÑ¡Ôñ×îÃ÷ÏÔµÄÑ¡Ôñ£¬Òò´Ë£¬Äã¿ÉÄÜÃæÁٵͼ²»ÊÇ×î¼ÑµÄÑ¡Ôñ£¬Èç¹û¿ÉÄܵϰ£¬ÄãÓ¦¸Ã³¢ÊÔÒÔͨÓÃ×¼ÔòÀ´¸Ä±äÕâЩ¾ö¶¨¡£ 
ITר¼ÒÍø¶À¼Ò£ºMySQL´æ´¢
¹ý³Ìµ÷ÊÔ
¡¡¡¡(1)±ÜÃâʹÓÃNULL
¡¡¡¡NULL¶ÔÓÚ´ó¶àÊýÊý¾Ý¿â¶¼ÐèÒªÌØÊâ´¦Àí£¬MySQLÒ²²»ÀýÍ⣬ËüÐèÒª¸ü¶àµÄ´úÂ룬¸ü¶àµÄ¼ì²éºÍÌØÊâµÄË÷ÒýÂß¼­£¬ÓÐЩ¿ª·¢ÈËÔ±ÍêȫûÓÐÒâʶµ½£¬´´½¨±íʱNULLÊÇĬÈÏÖµ£¬µ«´ó¶àÊýʱºòÓ¦¸ÃʹÓÃNOT NULL£¬»òÕßʹÓÃÒ»¸öÌØÊâµÄÖµ£¬Èç0£¬-1×÷ΪĬÈÏÖµ¡£
¡¡¡¡(2)½ö¿ÉÄÜʹÓøüСµÄ×Ö¶Î
¡¡¡¡MySQL´Ó´ÅÅ̶ÁÈ¡Êý¾ÝºóÊÇ´æ´¢µ½ÄÚ´æ
ÖÐ
µÄ£¬È»ºóʹÓÃcpuÖÜÆÚºÍ´ÅÅÌI/O¶ÁÈ¡Ëü£¬ÕâÒâζ×ÅԽСµÄÊý¾ÝÀàÐÍÕ¼ÓõĿռäԽС£¬´Ó´ÅÅ̶Á»ò´ò°üµ½ÄÚ´æµÄЧÂʶ¼¸üºÃ£¬µ«Ò²²»ÒªÌ«¹ýִ׿õСÊý¾ÝÀàÐÍ£¬
ÒªÊÇÒÔºóÓ¦ÓóÌÐò·¢Éúʲô±ä»¯¾ÍûÓпռäÁË¡£ÐÞ¸Ä±í½«ÐèÒªÖØ¹¹£¬¼ä½ÓµØ¿ÉÄ ......
×ܼǼÊý:40319; ×ÜÒ³Êý:6720; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [6109] [6110] [6111] [6112] 6113 [6114] [6115] [6116] [6117] [6118]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ