Ìí¼Ó£º<table class="sortable">
²»ÅÅÐòÁÐ:<th class="unsortable">"></th>
×Ô¶¨ÒåÅÅÐò:<td sorttable_customkey="1">
sortable.js
/*
Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/.
Based on a script from http://www.kryogenix.org/code/browser/sorttable/.
Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html .
Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk.
Version 1.5.7
Modified by Rainertop,2009,Casia
*/
/* You can change these values */
var image_path = "";
var image_up = "arrow-up.gif";
var image_down = "arrow-down.gif";
var image_none = "arrow-none.gif";
var europeandate = true;
var alternate_row_colors = true;
/* Don't change anything below this unless you know what you're doing */
addEvent(window, "load", sortables_init);
var SORT_COLUMN_INDEX;
var thead = ......
¹ØÓÚ×éºÏÊý¼ÆËãµÄËã·¨ÎÒдÁ˺ü¸¸ö£¬·¢ÏÖÑî»ÔÈý½Ç²é±í·¨Ð§ÂʱȽϸߣ¡
²¢ÇÒÕâ¸öËã·¨ÀûÓÃC(n,k) = C(n,n-k)À´¼ò»¯Ñî»ÔÈý½ÇµÄÊý×飬Ëã·¨µÄʱ¼ä¸´ÔӶȱȽϵ͡£
Ô´´£¬Ë®Æ½ÓÐÏÞ£¬ÈçÓв»×㣬»¶ÓÖ¸³ö¡£
Mail£ºrainday163@163.com
ÏÂÃæÊÇÎÒдµÄ´úÂë²¢¸½´ø²âÊÔº¯Êý£ºDev-C++ 4.9.9.2ϲâÊÔͨ¹ý¡£
/*---------------------------------------------------------------------
//file name:combination.cpp
//Coder: rainday163
//E-mail: rainday1631@163.com
//Create date: 2009.9.4
//Last modify date: 2009.9.28
//Test platform: WinXP sp2 & Dev-C++ 4.9.9.2
---------------------------------------------------------------------*/
#include <typeinfo>
#include <vector>
#include <stdexcept>
#include <iostream>
template <typename T1,typename T2>
T1 combination(T2 const &n,T2 const &k)
{
//ÀàÐͼì²é
if( !( (typeid(T1) == typeid(unsigned long long))
||(typeid(T1) == typeid(long long))
||(typeid(T1) == typeid(unsigned lo ......
#include<stdio.h>
#include<stdlib.h>
#define MAX 41
static int i=0;
int main(void)
{
FILE *fp;
char words[MAX];
if((fp=fopen("words","a+"))==NULL)
{
fprintf(stdout,"Can't open \" word\" file\n");
exit(1);
}
puts("Enter words to add to the file,press the enter.");
puts("Key at the begining of a line to terminate.");
while(gets(words)!=NULL&&words[0]!='\0')
{
fprintf(fp,"%s",words);
i++;
}
rewind(fp);
while(fscanf(fp,"%s",words)==1)
{
puts(words);
}
if(fclose(fp)!=0)
{
fprintf(stderr,"Error closing file.\n");
}
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#define MAX 2000
int main(void)
{
FILE *fp;
char words[MAX];
int wordct=0;
if((fp=fopen("words","a+"))==NULL)
{
fprintf(stderr,"Can't open \" word\" file\n");
exit(1);
}
rewind(fp);
while (fgets(words, MAX - 1, fp) != NULL)
wordct++;
rewind(fp);
puts("Enter words to add to the file,press the enter." ......
CÓïÑÔ±ØÖª±Ø»á
Ö¸Õ룺
1.Ö¸ÕëÉùÃ÷ºóÒª¸³Öµ£¡·ñÔòÊÇ¿ÕÖ¸Õ룬¿É²»ÖªµÀÖ¸ÏòÁËÄÄÀï
ÀýÈ磺
void swap(int *a,int *b){
int *tmp;
*tmp=*a;
*a=*b;
*b=*tmp;
}
±¾À´ÊÇÏëÀûÓÃÉÏÃæµÄswapº¯ÊýʵÏÖÁ½¸öÊýµÄ»¥»»£¬µ«ÊÇ*tep=*a;Õâ¾ä»°ÊÇÓÐÎóµÄ£¬ÒòΪָÕëtmpûÓб»¸³Öµ£¡ÊÇÓÃgcc±àÒëʱ²»»á³ö´í£¬µ«ÊÇÔËÐÐʱ»á³öÏֶϴíÎó£¡
2.Êý×éÓëÖ¸Õë
ÕâÀïÓÐÁ½¸öºÜÈÝÒ×»ìÏýµÄ¸ÅÄÊý×éÖ¸ÕëºÍÖ¸ÕëÊý×é
Ö¸ÕëÖдæ·ÅµÄÊǵØÖ·£¬ËùÒԼȿÉÒÔÖ¸ÏòһάÊý×飬Ҳ¿ÉÒÔÖ¸Ïò¶àάÊý×飬ÏÂÃæÊǼòµ¥µÄÖ¸ÕëºÍÊý×éµÄÀý×Ó¡£
Àý1£º
int data[4];
int *p=data;»òint *p;p=data;
---------------------------------------------------
int data[2][3];
int *p=data;
int i=0;
while(i<2*3){
scanf("%d",&p[i++]);
}
i=0;
while(i<2*3){
printf("%d\t",p[i++]);
}
printf("\n");
ÊÇÓÃgcc±àÒëʱ»á²úÉú¾¯¸æ£º´Ó²»¼æÈݵÄÖ¸ÕëÀàÐͳõʼ»¯
Êý×éÖ¸Õ룬ÕâÀï˵µÄÊý×éÖ¸Õë¼´Ö¸ÏòÊý×éµÄÖ¸Õ룬ÕâÓÐʲôº ......
ÓÃC#²¥·ÅÒôƵºÍFlash
WinFormÖÐÈçºÎ²¥·ÅÉùÒôÓëFlash¶¯»
×¢Ò⣺СÀ¨ºÅÄÚµÄÊÇ°´Å¥µÄÆäËü·ÒëÃû³Æ£¬²»Í¬°æ±¾µÄÒëÃûÊÇÓÐÇø±ðµÄ¡£
Ò»¡¢ÔÚVC#²¥·ÅÉùÒô
н¨Ò»¸öVC#µÄWindows Form¹¤³Ì(WindowsÓ¦ÓóÌÐò)£¬²¢ÇÒ¶¨ÒåÁ½¸ö²Ëµ¥°´Å¥£¨menuItem1,menuItem2£©¡£
Ñ¡Ôñ²Ëµ¥Öеē¹¤¾ß”Öеē×Ô¶¨Ò幤¾ßÏä(Ìí¼Ó/ÒƳý¹¤¾ßÏäÏî)”£¬ÔÚ×Ô¶¨Ò幤¾ßÏäµÄ´°¿ÚÖУ¬µã»÷Õ¹¿ª“COM ×é¼þ”ÏѡÖГWindow Media Player”Ñ¡Ïȷ¶¨ºóÔÚ“¹¤¾ßÏä”Öбã»á³öÏÖ“Windows Media Player”ÕâÒ»ÏȻºóÔÙ½«ÆäÍÏÖÁFormÉÏ£¬µ÷Õû´óС£¬ÏµÍ³ÔÚ“ÒýÓÔÖÐ×Ô¶¯¼ÓÈëÁ˶ԴËdllµÄÒýÓã¬AxMediaPlayer¾ÍÊÇÎÒÃÇʹÓõÄNamespaceÓëclass¡£
ÔÚÊôÐÔÀ¸ÖÐÉèÖúô˿ؼþµÄһЩÊôÐÔ£¬ÎªÁË·½±ã£¬ÕâÀïÎÒ°ÑAutoStartÉèÖóÉΪtrue£¨ÆäʵĬÈÏÊÇtrue£©£¬Ö»ÒªFileName±»ÉèÖÃ(´ò¿ªÁËÎļþ)£¬ÔòÎļþ½«»á×Ô¶¯²¥·Å¡£ÍêÕû´úÂëÈçÏ£º
private void menuItem1_Click(object sender, System.EventArgs e)
{ OpenFileDialog ofDialog = new OpenFileDialog();
ofDialog.AddExtension = ......
char c[] = "hello world" ·ÖÅä¾Ö²¿Êý×é
char* c = "hello world" ·ÖÅäÈ«¾ÖÊý×é È«¾ÖÇøÓòµÄÖµÊDz»ÄܽøÐÐÐ޸ĵÄ
1 ³£Á¿Ö¸Õ룡Èç int b, c; int * const a = &b;
±íʾaÊÇÒ»¸ö³£Á¿Ö¸ÕëËüÖ¸Ïò±äÁ¿bµÄÄÚ´æ¡£µ«ÊÇÒòΪÊdz£Á¿Ö¸ÕëËùÒÔ²»ÄÜÔÙÓÃaÖ¸ÏòÆäËû±äÁ¿£¬Èç a = &c; ´íÎ󣡿ÉÒÔÐÞ¸ÄÖ¸ÏòÄÚ´æµÄÖµ£¬Èç:*a = 20; BTW ³£Á¿Ö¸ÕëÉùÃ÷µÄʱºò±ØÐëÏòÎÒÄÇÑù¸³³õÖµ¡£
2 Ö¸Ïò³£Á¿µÄÖ¸Õ룡Èç int b, c; int const *a; a = &b; a = &c;
¶¼¿ÉÒÔ£¬Î¨¶ÀËüÖ¸ÏòµÄÄÚ´æ²»Äܱ»Ð޸ġ£È磺*a=20;ÕâÊÇÎ¥·¨µÄ£¡´íÎó£¡
Õâ¾ÍÊÇÖ÷ÒªÇø±ð£¡
BTW »¹ÓÐÒ»¸ö¼ÇסËûÃDz»Í¬ÐÎʽµÄ¼¼ÇÉ£¡¿´const¹Ø¼ü×Ö£¬ËûºóÃæµÄ²»¿ÉÐ޸ģ¬Èçint * const a = &b; ºóÃæÊÇa,Ôò˵Ã÷a²»ÄÜÐ޸ģ¡
int const * a = &b;ºóÃæÊÇ*aÔò˵Ã÷*a²»¿É±»Ð޸ģ¡
ÔںöàÊéÉÏ»òMSDNÊǾ³£Óà const int a=5;
int b=6;
const int *p=&b;
Æäʵ const int* ºÍint const* Ò»Ñù£¬¾ÍÊdz£Ö¸Õë Ò²¾ÍÊÇËüËùÖ¸ÏòµÄÊý¾Ý£¨ÔÚÕâÊÇint£©Êdz£Á¿£¬Ëü×Ô¼ºµÄÊý¾ÝÀàÐÍÊÇconst int*
»¹ÓÐconst int *p=&b;ÊÇ¿ÉÒ﵀ ËäÈ»b²»Êdz£Á¿¡£
µ«ÊÇ const int a=6;
&nbs ......
char c[] = "hello world" ·ÖÅä¾Ö²¿Êý×é
char* c = "hello world" ·ÖÅäÈ«¾ÖÊý×é È«¾ÖÇøÓòµÄÖµÊDz»ÄܽøÐÐÐ޸ĵÄ
1 ³£Á¿Ö¸Õ룡Èç int b, c; int * const a = &b;
±íʾaÊÇÒ»¸ö³£Á¿Ö¸ÕëËüÖ¸Ïò±äÁ¿bµÄÄÚ´æ¡£µ«ÊÇÒòΪÊdz£Á¿Ö¸ÕëËùÒÔ²»ÄÜÔÙÓÃaÖ¸ÏòÆäËû±äÁ¿£¬Èç a = &c; ´íÎ󣡿ÉÒÔÐÞ¸ÄÖ¸ÏòÄÚ´æµÄÖµ£¬Èç:*a = 20; BTW ³£Á¿Ö¸ÕëÉùÃ÷µÄʱºò±ØÐëÏòÎÒÄÇÑù¸³³õÖµ¡£
2 Ö¸Ïò³£Á¿µÄÖ¸Õ룡Èç int b, c; int const *a; a = &b; a = &c;
¶¼¿ÉÒÔ£¬Î¨¶ÀËüÖ¸ÏòµÄÄÚ´æ²»Äܱ»Ð޸ġ£È磺*a=20;ÕâÊÇÎ¥·¨µÄ£¡´íÎó£¡
Õâ¾ÍÊÇÖ÷ÒªÇø±ð£¡
BTW »¹ÓÐÒ»¸ö¼ÇסËûÃDz»Í¬ÐÎʽµÄ¼¼ÇÉ£¡¿´const¹Ø¼ü×Ö£¬ËûºóÃæµÄ²»¿ÉÐ޸ģ¬Èçint * const a = &b; ºóÃæÊÇa,Ôò˵Ã÷a²»ÄÜÐ޸ģ¡
int const * a = &b;ºóÃæÊÇ*aÔò˵Ã÷*a²»¿É±»Ð޸ģ¡
ÔںöàÊéÉÏ»òMSDNÊǾ³£Óà const int a=5;
int b=6;
const int *p=&b;
Æäʵ const int* ºÍint const* Ò»Ñù£¬¾ÍÊdz£Ö¸Õë Ò²¾ÍÊÇËüËùÖ¸ÏòµÄÊý¾Ý£¨ÔÚÕâÊÇint£©Êdz£Á¿£¬Ëü×Ô¼ºµÄÊý¾ÝÀàÐÍÊÇconst int*
»¹ÓÐconst int *p=&b;ÊÇ¿ÉÒ﵀ ËäÈ»b²»Êdz£Á¿¡£
µ«ÊÇ const int a=6;
&nbs ......