1. 主力識別指標源碼是什麼
主力識別指標源碼是:.RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;J1:=REVERSE(J);AA:=REF(MA(C,1),10)>REF(MA(C,60),10);買點:CROSS(J,J1)AA;STICKLINE(買點,0,30,6,0),COLORBLUE;STICKLINE(買點,30,60,4,0),COLORWHITE;STICKLINE(買點,60,80,2,0),COLORYELLOW;DRAWTEXT(買點,70,´敵軍潛入´),COLORRED;{主力進出場}VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);主力進場:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED,NODRAW;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),COLORRED;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),COLOR000055;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0),COLOR000077;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0),COLOR000099;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0),COLOR0000BB;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0),COLOR0000DD;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0),COLOR0000FF;洗盤:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLORGREEN;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00;VAR12:=SMA(ABS(VAR1-H),13,1)/SMA(MAX(VAR1-H,0),10,1);VAR13:=EMA(VAR12,10);VAR14:=HHV(H,33);VAR15:=EMA(IF(H>=VAR14,VAR13,0),3);沖頂:IF(VAR15>REF(VAR15,1),VAR15,0),COLORFF00FF,NODRAW;STICKLINE(VAR15>REF(VAR15,1),0,VAR15,3,0),COLORFF00FF;STICKLINE(VAR15>REF(VAR15,1),0,VAR15,3,0),COLOR550055;STICKLINE(VAR15>REF(VAR15,1),0,VAR15,2.6,0),COLOR770077;STICKLINE(VAR15>REF(VAR15,1),0,VAR15,2.1
2. 自己可以編譯安卓源碼嗎
用最新的Ubuntu 16.04,請首先確保自己已經安裝了Git.沒安裝的同學可以通過以下命令進行安裝:
sudo apt-get install git git config –global user.email 「[email protected]」 git config –global user.name 「test」
其中[email protected]為你自己的郵箱.
簡要說明
android源碼編譯的四個流程:1.源碼下載;2.構建編譯環境;3.編譯源碼;4運行.下文也將按照該流程講述.
源碼下載
由於某牆的原因,這里我們採用國內的鏡像源進行下載.
目前,可用的鏡像源一般是科大和清華的,具體使用差不多,這里我選擇清華大學鏡像進行說明.(參考:科大源,清華源)
repo工具下載及安裝
通過執行以下命令實現repo工具的下載和安裝
mkdir ~/binPATH=~/bin:$PATHcurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo
補充說明
這里,我來簡單的介紹下repo工具,我們知道AOSP項目由不同的子項目組成,為了方便進行管理,Google採用Git對AOSP項目進行多倉庫管理.在聊repo工具之前,我先帶你來聊聊多倉庫項目:
我們有個非常龐大的項目Pre,該項目由很多個子項目R1,R2,...Rn等組成,為了方便管理和協同開發,我們為每個子項目創立自己的倉庫,整個項目的結構如下:
這里寫圖片描述
執行完該命令後,再使用make命令繼續編譯.某些情況下,當你執行jack-admin kill-server時可能提示你命令不存在,此時去你去out/host/linux-x86/bin/目錄下會發現不存在jack-admin文件.如果我是你,我就會重新repo sync下,然後從頭來過.
錯誤三:使用emulator時,虛擬機停在黑屏界面,點擊無任何響應.此時,可能是kerner內核問題,解決方法如下:
執行如下命令:
通過使用kernel-qemu-armv7內核 解決模擬器等待黑屏問題.而-partition-size 1024 則是解決警告: system partion siez adjusted to match image file (163 MB >66 MB)
如果你一開始編譯的版本是aosp_arm-eng,使用上述命令仍然不能解決等待黑屏問題時,不妨編譯aosp_arm64-eng試試.
結束吧
到現在為止,你已經了解了整個android編譯的流程.除此之外,我也簡單的說明android源碼的多倉庫管理機制.下面,不妨自己動手嘗試一下.
3. 通達信 uos終極波動指標源碼
N1:=7;
N2:=14;
N3:=28;
M:=6;
TH:=MAX(HIGH,REF(CLOSE,1));
TL:=MIN(LOW,REF(CLOSE,1));
ACC1:=SUM(CLOSE-TL,N1)/SUM(TH-TL,N1);
ACC2:=SUM(CLOSE-TL,N2)/SUM(TH-TL,N2);
ACC3:=SUM(CLOSE-TL,N3)/SUM(TH-TL,N3);
UOS:(ACC1*N2*N3+ACC2*N1*N3+ACC3*N1*N2)*100/(N1*N2+N1*N3+N2*N3);
MAUOS:EXPMEMA(UOS,M);
4. 求麟龍軟體決策曲線指標源碼,通達信版本。造福廣大股友,請大家踴躍發帖。
MA01:=MA(CLOSE,5);
MA02:=MA(CLOSE,8);
P01:=IF(CROSS(MA01,MA02),1,0);
P02:=IF(CROSS(MA02,MA01),-1,0);
P0:=P01+P02;
MA11:=MA(CLOSE,8);
MA12:=MA(CLOSE,21);
P11:=IF(CROSS(MA11,MA12),1,0);
P12:=IF(CROSS(MA12,MA11),-1,0);
P1:=P11+P12;
RSV:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*100;
K:=SMA(RSV,12,1);
D:=SMA(K,24,1);
J:=3*K-2*D;
P21:=IF(CROSS(K,D)AND D<20,1,0);
P22:=IF(CROSS(D,K)AND K>80,-1,0);
P23:=IF(CROSS(J,0),0.5,0);
P24:=IF(CROSS(100,J),-0.5,0);
P2:=P21+P22+P23+P24;
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
P31:=IF(CROSS(DIFF,DEA)AND DEA<0,1,0);
P32:=IF(CROSS(DEA,DIFF)AND DIFF>0,-1,0);
P3:=P31+P32;
WR1:=100*(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,113));
P41:=IF(WR1>80,1,0);
P42:=IF(WR1<20,-1,0);
P4:=P41+P42;
OB:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
P51:=IF(OBV>REF(EMA(OBV,24),1),1.5,0);
P52:=IF(OBV<REF(EMA(OBV,24),1),-1.5,0);
P5:=P51+P52;
BR:=SUM(MAX(0,HIGH-REF(CLOSE,1)),26)/SUM(MAX(0,REF(CLOSE,1)-LOW),26)*100;
AR:=SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
P61:=IF(BR>350,3,0);
P62:=IF(BR<45,-3,0);
P63:=IF(AR>180,3,0);
P64:=IF(AR<45,-3,0);
P6:=P61+P62+P63+P64;
TH:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),26);
TL:=SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),26);
TQ:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),26);
VR:=100*(TH*2+TQ)/(TL*2+TQ);
P71:=IF(VR>350,3,0);
P72:=IF(VR<45,-3,0);
P7:=P71+P72;
MASS:=SUM(MA(HIGH-LOW,9)/MA(MA(HIGH-LOW,9),9),25);
MAMASS:=MA(MASS,6);
P81:=IF(MASS<27 AND CROSS(MASS,26.5),2,0);
P82:=IF(MASS>27 AND CROSS(MASS,26.5),-2,0);
P8:=P81+P82;
WVAD:=SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,24)/10000;
MAWVAD:=MA(WVAD,6);
P91:=IF(WVAD>0,1,0);
P92:=IF(WVAD<0,-1,0);
P9:=P91+P92;
VOLUME:=MA(VOL,10)/VOL;
MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);
EMV:=MA(MID*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,14),14);
Q11:=IF(EMV>0,1.5,0);
Q12:=IF(EMV<0,-1.5,0);
Q1:=Q11+Q12;
TR0:=EMA(EMA(EMA(CLOSE,13),13),13);
TRIX:=(TR0-REF(TR0,1))/REF(TR0,1)*100;
Q21:=IF( CROSS(TRIX,TR0),1.5,0);
Q22:=IF( CROSS(TR0,TRIX),-1.5,0);
Q2:=Q21+Q22;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
Q31:=IF(RSI>80,1,0);
Q32:=IF(RSI<20,-1,0);
Q3:=Q31+Q32;
OSC:=100*(CLOSE-MA(CLOSE,20));
MAOSC:=EXPMEMA(OSC,6);
Q41:=IF(CROSS(OSC,MAOSC),1,0);
Q42:=IF(CROSS(MAOSC,OSC),-1,0);
Q4:=Q41+Q42;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,13))/(0.015*AVEDEV(TYP,13));
Q51:=IF(CCI>180,2,0);
Q52:=IF(CCI<-180,-2,0);
Q5:=Q51+Q52;
TR1:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
PDI:=DMP*100/TR1;
MDI:=DMM*100/TR1;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=EXPMEMA(ADX,6);
Q61:=IF(CROSS(PDI,MDI),2,0);
Q62:=IF(CROSS(DMI,PDI),-2,0);
Q6:=Q61+Q62;
DPO:=CLOSE-REF(MA(CLOSE,21),21/2+1);
MADPO:=MA(DPO,6);
Q71:=IF(DPO>0,1,0);
Q72:=IF(DPO<0,-1,0);
Q7:=Q71+Q72;
MTM:CLOSE-REF(CLOSE,12);
MAMTM:=MA(MTM,6);
Q81:=IF(CROSS(MTM,MAMTM),1,0);
Q82:=IF(CROSS(MAMTM,MTM),-1,0);
Q8:=Q81+Q82;
MID1:=SUM(VOL*(2*CLOSE-HIGH-LOW)/(HIGH+LOW),0);
CHO:=MA(MID,10)-MA(MID,20);
MACHO:=MA(CHO,6);
Q91:=IF((CLOSE>MA(CLOSE,90))AND CROSS(CLOSE,0), 1.5,0);
Q92:= IF((CLOSE<MA(CLOSE,90))AND CROSS(0,CLOSE), -1.5,0);
Q9:=Q91+Q92;
PSY:=COUNT(CLOSE>REF(CLOSE,1),12)/12*100;
PSYMA:=MA(PSY,6);
R11:=IF(PSY>75,1.5,0);
R12:=IF(PSY<25,-1.5,0);
R1:=R11+R12;
MID2 := MA(CLOSE,20);
UPPER:= MID2+2*STD(CLOSE,20);
LOWER:= MID2-2*STD(CLOSE,20);
R21:=IF(CROSS(CLOSE,LOWER),2,0);
R22:=IF(CROSS(UPPER,CLOSE),-2,0);
R2:=R21+R22;
TYP1 := (HIGH + LOW + CLOSE)/3;
V1:=SUM(IF(TYP1>REF(TYP1,1),TYP1*VOL,0),14)/SUM(IF(TYP1<REF(TYP1,1),
TYP1*VOL,0),14);
MFI:=100-(100/(1+V1));
R31:=IF(MFI>80,1,0);
R32:=IF(MFI<20,-1,0);
R3:=R31+R32;
VARA:=R1+R2+R3+Q1+Q2+Q3+Q4+Q5+Q6+Q7+Q8+Q9+P0+P1+P2+P3+P4+P5+P6+P7+P8+P9;
決策曲線:VARA;
5. 天龍八部源代碼是誰泄露的
沒有,張朝陽不能聲張這件事。游戲的源代碼是整個游戲最重要的部分,每一個公司出的游戲源代碼基本相同,最突出的就算是完美了,基本上所有游戲都是遵照同一個源代碼做出的。降龍之劍除外。
所以泄露獸狐游戲源代碼的黑客即使受處分也是秘密進行的,像鹿鼎記這類游戲,源代碼全是按照天龍八部的游戲源代碼改的,如果泄露了這個游戲源代碼,獸狐。額 張朝陽就不用掙錢了。
找到應該是沒找到, 那個黑客很厲害,進入程序的文件被抹的我非常完美,以至於獸狐的高手沒有絲毫的辦法,他竊取玩代碼就走,再沒回過獸狐,獸狐方對這個人也很無奈。
按照法律,這個人如是抓住了,錢得賠很多。因為源代碼的外泄導致私服層出不窮,游戲虧損變得空前。如果我是張朝陽,我絕對會讓他賠償全部虧損。而且,源代碼是受法律保證的,泄露源代碼已經觸犯了法律。他得做個十幾年牢吧。
別問我是誰。我只是一個資深玩家。對獸狐所做的事痛心疾首的資深玩家而已。
6. C++通訊錄的源代碼
分是萬能的嗎?
請客氣些。
7. 誰能提供錢隆軟體中QIANLONG指標的原碼,該指標有兩條線一條是QIAN,另一條是6MA.能用到通達信股軟的。
我搜了一下,搜到的錢龍指標源碼如下:
僅提供源碼:QLSHO
錢龍短鼠
L3 1 300 5
L2 1 300 5
N 1 50 10
vZF:=ma((v-ref(v,1))/ref(v,1),l2);
BIAS3 :=(CLOSE-MA(CLOSE,L3))/MA(CLOSE,L3)*100;
{BIAS3:=MA((C-REF(C,1))/REF(C,1)*100,10);}
my:bias3*(1+vZF);
錢龍短線:my,colorstick;
ma(錢龍短線,n),coloryellow;
錢龍布林
N 1 100 20
D 1.01 5 2
mb:ma(c,n);
r:=pow((c-mb),2);
x1:=ma(r,n);
x:=SQRT(x1);
upper:mb+d*x;
lower:mb-d*x;
STICKLINE(close>=open,open,close,5,1),colorred;
STICKLINE(open>close,close,open,5,0 ),colorgreen;
STICKLINE(close>=open,close,HIGH,0.5 ,1 ),colorred;
STICKLINE(close>=open,open,low,0.5 ,1 ),colorred;
STICKLINE(open>close,close,low,0.5 ,0 ),colorgreen;
STICKLINE(open>close,open,HIGH,0.5 ,0 ),colorgreen;
LONG
乾龍長線
N 1 100 10
乾龍長線:0;
Var1:=REF(CLOSE,1);
Var2:=SUM(VOL,2)/((HHV(HIGH,2)-LLV(LOW,2))*100);
Var3:=(CLOSE-Var1)*Var2;
Var4:=SUM(Var3,0);
Var5:=SMA(Var4,10,1);
Var6:=SMA(Var4,20,1);
LONMA: MA(Var5-Var6,n)COLORgreen;
Var5-Var6,COLORyellow;
Var5-Var6,COLORSTICK
錢龍EXPMA
{n1=5 100 12 n2=5 100 50}
EXPMA1 : (CLOSE-REF(EMA(CLOSE,N1),1))*2/(N1+1)+REF(EMA(CLOSE,N1),1);
EXPMA2 : (CLOSE-REF(EMA(CLOSE,N2),1))*2/(N2+1)+REF(EMA(CLOSE,N2),1);
STICKLINE(CLOSE>OPEN,OPEN,CLOSE,6,1), , COLORRED;
STICKLINE(CLOSE=OPEN,OPEN,CLOSE,6,1), , COLORRED;
STICKLINE(CLOSE>OPEN,LOW,OPEN,0.8,1), , COLORRED;
STICKLINE(CLOSE=OPEN,LOW,OPEN,0.8,1), , COLORRED;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.8,1),,COLORRED;
STICKLINE(CLOSE=OPEN,CLOSE,HIGH,0.8,1),,COLORRED;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,6,0), , COLORCYAN;
STICKLINE(CLOSE<OPEN,LOW,HIGH,0.8,0), , COLORCYAN;
終極指標
TH:=MAX(HIGH,REF(CLOSE,1));
TL:=MIN(LOW,REF(CLOSE,1));
ACC1:=SUM(CLOSE-TL,7)/SUM(TH-TL,7);
ACC2:=SUM(CLOSE-TL,60)/SUM(TH-TL,60);
ACC3:=SUM(CLOSE-TL,28)/SUM(TH-TL,28);
UOS:(ACC1*60*28+ACC2*7*28+ACC3*7*60)*100/(7*60+7*28+60*28);
70,COLORYELLOW;
50,COLORMAGENTA;
35,COLORGREEN;
壓縮K線
hsl:=(v/ma(vol,55));
STICKLINE( c>open,c,o,hsl*10 ,1),COLORRED;
STICKLINE( c>open,h,c,0.5 ,0),COLORRED;
STICKLINE( c>open,o,l,0.1 ,0),COLORRED;
STICKLINE( c<open,c,o,hsl*10 ,0),COLORWHITE;
STICKLINE( c<open,h,l,0.1 ,0),COLORWHITE;
STICKLINE( c=open and c>ref(c,1),c,o,hsl*10 ,1),COLORRED;
STICKLINE( c=open and c>ref(c,1),h,l,0.1,0),COLORRED;
STICKLINE( c=open and c<ref(c,1),c,o,hsl*10 ,1),COLORWHITE;;
STICKLINE( c=open and c<ref(c,1),h,l,0.1,0),,COLORWHITE;;
STICKLINE( c=open ,h,l,0.1,0),,COLORWHITE;
STICKLINE( c=open ,c,o,hsl*10,0),,COLORWHITE;
錢龍DPO(區間振盪線)
dpo:C - REF(MA(CLOSE,20),11);
mb:=ma(dpo,20);
r:=(dpo-mb)*(dpo-mb);
x:=SQRT(ma(r,20));
mb+1.96*x;
mb-1.96*x
錢龍OSC
艾略特震盪器
Var1:=REF(CLOSE,1);
Var2:=SUM(VOL,2)/((HHV(HIGH,2)-LLV(LOW,2))*100);
Var3:=(CLOSE-Var1)*Var2;
Var4:=SUM(Var3,0);
Var5:=SMA(Var4,5,1);
Var6:=SMA(Var4,8,1);
OSC: Var5-Var6;
OSCMA: MA(OSC,4);
OSC, COLORSTICK;
VD: SUM(IF(OSC>0,OSC*1.003,OSC*1.003>0),34)/34;
VE: SUM(IF(OSC<=0,OSC*0.97,OSC*0.97<0),34)/34, ;
0;
錢龍地量線
a:=v*c/1000;
b:ma(a,9),COLORYELLOW;
STICKLINE(b,0,b,1.2,0);
平均地量線:llv(b,0),colorred,LINETHICK2;
相對地量線:llv(b,500),COLORBLUE,LINETHICK2;
錢龍量布林
mb:ma(v,13);
r:=pow((v-mb),2);
x1:=ma(r,13);
x:=SQRT(x1);
upper:mb+1*x;
lower:mb-1*x;
錢龍慢威廉
RSV:= (HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100;
LWR1:SMA(RSV,3,1);
LWR2:SMA(LWR1,3,1)
曲腰量
{Q(5,1,20)Q1(3,1,10)Q2(3,1,10)}
var1:=AMOUNT/10000000;
量能:var1/ma(var1,5) COLOR999999,POINTDOT;
var2:=if(c>=ref(c,1),var1,REVERSE(var1));
var3:=(c-ref(c,1))/ref(c,1)*100;
var4:=var3*36;
var5:=var4-var2;
曲腰量:EMA(SUM(var5,q),q1) COLORWHITE;
ma1:ema(曲腰量,q2),COLORSTICK;
STICKLINE(曲腰量>=ma1 ,ma1,曲腰量 ,2 ,0 ),COLORYELLOW;
變動速率
INPUT:N(13,1,100),M(6,1,50);
R:(C-REF(C,N))/REF(C,N)*100;
RMA:MA(R,M);
d:if(R<0,-R,R);
0,LINEDOT;
8. 求幾個比較有趣,簡單的C語言源代碼 小白自己敲著練一下手感
最簡單的模擬計時器:
#include<stdio.h>
#include<conio.h>
#include<windows.h>
int m=0,s=0,ms=0; //m是分 s是秒 ms是毫秒
//以下是5個自編函數
void csh( ); //初始化界面
void yinc(int x,int y); //隱藏游標的函數(y值設為0就會隱藏)
void jishi( ); //計時器運行(每100毫秒變化一次)
void Color (short x, short y); //設定顏色的函數(y設為0就是黑底)
void gtxy (int x, int y); //控制游標位置的函數
int main( ) //主函數
{ csh( );
getch( );
while(1)
{ jishi( );
Sleep(100); //間隔100毫秒
if( kbhit( ) )break; //有鍵按下就退出循環
}
return 0;
}
void csh( ) //初始化界面
{Color(14,0); //設定淡黃字配黑底
printf(「 計時器」);
Color(10,0); //設定淡綠字配黑底
printf(" ┌───────────┐");
printf(" │ │");
printf(" └───────────┘");
gtxy(10,4); //游標到屏幕第10列4行處輸出
Color(7,0); //恢復白字黑底
printf(" 00:00:00 ");
yinc(1,0 ); //隱藏游標(yinc代表隱藏)
return;
}
void jishi( ) //計時器運行
{ms+=1;
if(ms==10){s+=1;ms=0;}
if(s==60){m+=1;s=0;}
gtxy(10,4);
Color(9,0); //設定淡藍字配黑底
if(m>9) printf(" %d:",m);
else printf(" 0%d:",m);
Color(14,0); //設定淡黃字配黑底
if(s>9) printf("%d:",s);
else printf("0%d:",s);
Color(12,0); //設定淡紅字配黑底
printf("0%d",ms);
}
void gtxy (int x, int y) //控制游標位置的函數
{ COORD pos;
pos.X = x;
pos.Y = y;
SetConsoleCursorPosition ( GetStdHandle (STD_OUTPUT_HANDLE), pos );
}
void Color (short ForeColor= 7, short BackGroundColor= 0) //設定顏色的函數
{ HANDLE handle = GetStdHandle ( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute ( handle, ForeColor + BackGroundColor * 0x10 );
}
void yinc(int x,int y) //隱藏游標的設置(gb代表游標)
{ CONSOLE_CURSOR_INFO gb={x,y}; //x為1-100,y為0就隱藏游標
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &gb);
}