C/SģʽÓëB/SģʽµÄ±È½Ï·ÖÎö
Ò»¡¢C/SģʽÓëB/SģʽµÄ±È½Ï·ÖÎö
¡¡¡¡C/SģʽÖ÷ÒªÓÉ¿Í»§Ó¦ÓóÌÐò(Client)¡¢·þÎñÆ÷¹ÜÀí³ÌÐò(Server)ºÍÖмä¼þ(middleware)Èý¸ö²¿¼þ×é³É¡£¿Í»§Ó¦ÓóÌÐòÊÇϵͳÖÐÓû§ÓëÊý¾Ý½øÐн»»¥µÄ²¿¼þ¡£·þÎñÆ÷³ÌÐò¸ºÔðÓÐЧµØ¹ÜÀíϵͳ×ÊÔ´£¬Èç¹ÜÀíÒ»¸öÐÅÏ¢Êý¾Ý¿â£¬ÆäÖ÷Òª¹¤×÷Êǵ±¶à¸ö¿Í»§²¢·¢µØÇëÇó·þÎñÆ÷ÉϵÄÏàͬ×ÊԴʱ£¬¶ÔÕâЩ×ÊÔ´½øÐÐ×îÓÅ»¯¹ÜÀí¡£Öмä¼þ¸ºÔðÁª½á¿Í»§Ó¦ÓóÌÐòÓë·þÎñÆ÷¹ÜÀí³ÌÐò£¬ÐͬÍê³ÉÒ»¸ö×÷Òµ£¬ÒÔÂú×ãÓû§²éѯ¹ÜÀíÊý¾ÝµÄÒªÇó¡£
¡¡¡¡B/SģʽÊÇÒ»ÖÖÒÔWeb¼¼ÊõΪ»ù´¡µÄÐÂÐ͵ÄMISϵͳƽ̨ģʽ¡£°Ñ´«Í³C/SģʽÖеķþÎñÆ÷²¿·Ö·Ö½âΪһ¸öÊý¾Ý·þÎñÆ÷ÓëÒ»¸ö»ò¶à¸öÓ¦Ó÷þÎñÆ÷(Web·þÎñÆ÷)£¬´Ó¶ø¹¹³ÉÒ»¸öÈý²ã½á¹¹µÄ¿Í»§·þÎñÆ÷Ìåϵ¡£
¡¡¡¡µÚÒ»²ã¿Í»§»úÊÇÓû§ÓëÕû¸öϵͳµÄ½Ó¿Ú¡£¿Í»§µÄÓ¦ÓóÌÐò¾«¼òµ½Ò»¸öͨÓõÄä¯ÀÀÆ÷Èí¼þ£¬ÈçNetscape Navigator£¬Î¢Èí¹«Ë¾µÄIEµÈ¡£ä¯ÀÀÆ÷½«HTML´úÂëת»¯³ÉͼÎIJ¢Ã¯µÄÍøÒ³¡£ÍøÒ³»¹¾ß±¸Ò»¶¨µÄ½»»¥¹¦ÄÜ£¬ÔÊÐíÓû§ÔÚÍøÒ³ÌṩµÄÉêÇë±íÉÏÊäÈëÐÅÏ¢Ìá½»¸øºǫ́£¬²¢Ìá³ö´¦ÀíÇëÇó¡£Õâ¸öºǫ́¾ÍÊǵڶþ²ãµÄWeb·þÎñÆ÷¡£
¡¡¡¡µÚ¶þ²ãWeb·þÎñÆ÷½«Æô¶¯ÏàÓ¦µÄ½ø³ÌÀ´ÏìÓ¦ÕâÒ»ÇëÇ󣬲¢¶¯Ì¬Éú³ÉÒ»´®HTML´úÂ룬ÆäÖÐǶÈë´¦ÀíµÄ½á¹û£¬·µ»Ø¸ø¿Í»§»úµÄä¯ÀÀÆ÷¡£Èç¹û¿Í»§»úÌá½»µÄÇëÇó°üÀ¨Êý¾ÝµÄ´æÈ¡£¬Web·þÎñÆ÷»¹ÐèÓëÊý¾Ý¿â·þÎñÆ÷ÐͬÍê³ÉÕâÒ»´¦Àí¹¤×÷¡£
¡¡¡¡µÚÈý²ãÊý¾Ý¿â·þÎñÆ÷µÄÈÎÎñÀàËÆÓÚC/Sģʽ£¬¸ºÔðе÷²»Í¬µÄWeb·þÎñÆ÷·¢³öµÄSQÇëÇ󣬹ÜÀíÊý¾Ý¿â¡£
1. B/SģʽµÄÓÅÊÆ
¡¡¡¡Ê×ÏÈËü¼ò»¯ÁË¿Í»§¶Ë¡£ËüÎÞÐèÏóC/SģʽÄÇÑùÔÚ²»Í¬µÄ¿Í»§»úÉÏ°²×°²»Í¬µÄ¿Í»§Ó¦ÓóÌÐò£¬¶øÖ»Ð谲װͨÓõÄä¯ÀÀÆ÷Èí¼þ¡£ÕâÑù²»µ«¿ÉÒÔ½ÚÊ¡¿Í»§»úµÄÓ²ÅÌ¿Õ¼äÓëÄڴ棬¶øÇÒʹ°²×°¹ý³Ì¸ü¼Ó¼ò±ã¡¢ÍøÂç½á¹¹¸ü¼ÓÁé»î¡£¼ÙÉèÒ»¸öÆóÒµµÄ¾ö²ß²ãÒª¿ªÒ»¸öÌÖÂÛ¿â´æÎÊÌâµÄ»áÒ飬ËûÃÇÖ»Ðè´Ó»áÒéÊҵļÆËã»úÉÏÖ±½Óͨ¹ýä¯ÀÀÆ÷²éѯÊý¾Ý£¬È»ºóÏÔʾ¸ø´ó¼Ò¿´¾Í¿ÉÒÔÁË¡£ÉõÖÁÓë»áÕß»¹¿ÉÒ԰ѱʼDZ¾µçÄÔÁªÉÏ»áÒéÊÒµÄÍøÂç²å¿Ú£¬×Ô¼ºÀ´²éѯÏà¹ØµÄÊý¾Ý¡£Æä´Î£¬Ëü¼ò»¯ÁËϵͳµÄ¿ª·¢ºÍά»¤¡£ÏµÍ³µÄ¿ª·¢ÕßÎÞÐëÔÙΪ²»Í¬¼¶±ðµÄÓû§Éè¼Æ¿ª·¢²»Í¬µÄ¿Í»§Ó¦ÓóÌÐòÁË£¬Ö»Ðè°ÑËùÓеŦÄܶ¼ÊµÏÖÔÚWeb·þÎñÆ÷ÉÏ£¬²¢¾Í²»Í¬µÄ¹¦ÄÜΪ¸÷¸ö×é±ðµÄÓû§ÉèÖÃȨÏ޾ͿÉÒÔÁË¡£¸÷¸öÓû§Í¨¹ýHTTPÇëÇóÔÚȨÏÞ·¶Î§ÄÚµ÷ÓÃWeb·þÎñÆ÷Éϲ»Í¬´¦Àí³ÌÐò£¬´Ó¶øÍê³É¶ÔÊý¾ÝµÄ²éѯ»òÐ޸ġ£ÏÖ´úÆóÒµÃæÁÙ×ÅÈÕÐÂÔÂÒìµÄ¾ºÕù»·¾³£¬¶ÔÆóÒµÄÚ²¿ÔË×÷»úÖƵĸüÐÂÓëµ÷ÕûÒ²±äµÃÖð½¥Æµ·±¡£Ïà¶ÔÓÚC/S£¬B/SµÄά»¤¾ßÓиü´óµÄÁé»îÐÔ¡£µ±ÐÎÊƱ仯ʱ£¬ËüÎÞÐëÔÙΪÿÒ
Ïà¹ØÎĵµ£º
/*
˼·£ºµÝ¹éËã·¨
Ç°0..cur-1λÖÃÉÏÒѾÅźã¬µ±Ç°curλÖÃÈ¡Ò»¸öºÍÇ°Ã涼²»Ò»ÑùµÄ£¬È»ºóµÝ¹é´¦ÀíºóÃæµÄ¡£
*/
/* Êä³ö1,2,3,..,nµÄÅÅÁÐÊý */
#include <stdio.h>
#include <assert.h>
#include <malloc.h>
void p(int n)
{
extern void _p(int n, int cur, int *a);
int *a;
a = ......
#include "Stdio.h"
#include "Conio.h"
#include
#define size 81
#define lim 5
#define tstr "ABCDEFGH"
void display(char **p,int i);
void display2(char *p[],int i);
void display3(char (*p)[40],int i);
void testint();
int main(void)
{
testint();
getch();
return 0;
}
test1() ......
Àí½âcÖеÄÐòÁеã
http://blog.chinaunix.net/u1/42826/showart_364176.html
ÈÃÎÒÃÇÀ´¿´¿´ÏÂÃæµÄ´úÂ룺
int i=7;
printf(”%d\n”, i++ * i++);
ÄãÈÏΪ»á·µ»Øʲô£¿56£¿no¡£ÕýÈ·´ð°¸ÊÇ·µ»Ø 49£¿ºÜ¶àÈË»áÎÊΪʲô£¿ÄѵÀ²»¸Ã´òÓ¡³ö56Âð£¿ÔÚccfaqÖÐÓзdz£Ï꾡µÄ½âÊÍ£¬¸ù±¾ÔÒòÔÚÓÚcÖеÄÐòÁÐ ......
C/C++ optimizing compilers are great--but there *are* a few techniques for hand-tuning your code to run as efficiently as possible on the AMD Athlon64 and Opteron processors, especially when developing DLLs, device drivers, or other performance-bound pieces of code.
Alan Zeichick
Share | ......