#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i
標(biāo)簽: 查詢(xún)學(xué)會(huì)少年宮
上傳時(shí)間: 2016-12-29
上傳用戶(hù):767483511
#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i<j;i++) printf("%5d",add[i]); if(i%5==0) printf("\n"); getch(); fclose(fp); } else printf("Sorry!Cannot find the word(^_^)"); } main() { char pd[10],choose='y'; int flag=1; while(flag) {printf("In put the word you want to seqarch:"); scanf("%s",pd); search(strlwr(pd)); printf("\nWould you want to continue?(Y/N):"); getchar(); scanf("%c",&choose); if((tolower(choose))=='n') flag=0; else flag=1; } printf("Thanks for your using!Bye-bye!\n"); getch(); }
標(biāo)簽: 學(xué)生專(zhuān)用
上傳時(shí)間: 2016-12-29
上傳用戶(hù):767483511
notepad2_4.2.25漢化資源文件 CSDN-tags:notepad2 sChinese 中文rc資源 Notepad2中文資源修改自: http://www.flos-freeware.ch/zip/notepad2_4.2.25_src.zip\src\Notepad2.rc
上傳時(shí)間: 2018-09-08
上傳用戶(hù):xxagri
采用C語(yǔ)言編寫(xiě),易于上手,采用d2q9模型
上傳時(shí)間: 2019-06-06
上傳用戶(hù):ILKW
#include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t請(qǐng)輸入稀疏矩陣的行數(shù),列數(shù)和非零元素個(gè)數(shù)(用逗號(hào)隔開(kāi)):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t輸入非零元素值(格式:行號(hào),列號(hào),值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t對(duì)角線元素的和::%d\n",p->v); else printf("\n\t\t對(duì)角線元素的和為::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩陣的三元組系統(tǒng) "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------創(chuàng)建 "); printf("\n\t\t 2------------顯示 "); printf("\n\t\t 3------------求對(duì)角線元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t請(qǐng)選擇菜單號(hào)(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t輸入錯(cuò)誤!請(qǐng)重新輸入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上傳時(shí)間: 2020-06-11
上傳用戶(hù):ccccy
道路車(chē)輛——電氣及電子設(shè)備的環(huán)境條件和試驗(yàn)
上傳時(shí)間: 2021-10-25
上傳用戶(hù):
STM32L475開(kāi)發(fā)板PDF原理圖+AD集成3D封裝庫(kù)+主要器件技術(shù)手冊(cè),集成封裝庫(kù)型號(hào)列表如下:Library Component Count : 44Name Description----------------------------------------------------------------------------------------------------ANT-2.4G ANT,2.4G,PCB天線ATK-TEST-1*4-2.54mm 測(cè)試點(diǎn)ATK_MODULE 單排母,1*6,2.54mmBEEP 3.3V有源蜂鳴器BUTTON_DIP3 撥動(dòng)開(kāi)關(guān)SS-12F44C-0402-SMD C-0603-SMD C-CAP-SMD-220uF/10V C-CEP-220uF/16V D-1N4148 Header-1*3-2.54mm 單排針-2.54mmHeader-2*10-2.54mm 雙排針-2.54mmHeader-2*2-2.54mm 雙排針-2.54mmHeader-2*3-2.54mm 雙排針-2.54mmHeader-2*4-2.54mm 雙排座-2.54mmIR-LED 1206紅外發(fā)射管(側(cè))IR-LF0038GKLL-1 紅外接收管SMDJ-MICRO-USB-5S Micro USB 5.9有柱腳長(zhǎng)1.25加長(zhǎng)針L-0420-4.7uH 電感,4.7uH,3ALCD-TFT-H13TS38A LCD,TFT,1.3'240*240,禹龍LED-0603-RED 發(fā)光二極管-紅色LED-RGB-1615-0603 RGB,共陽(yáng),1615,0603MIC-6022 MICMotor-SMD 電機(jī),SMDPhone-3-M 耳機(jī)座,三節(jié)R-0402-SMD 貼片電阻R-0805-SMD 貼片電阻RT9193-3.3S-KEY-SMD-324225 KEY,SMD,324225S8050-SMD SD-MICRO-TF SD,MICRO,TFU-AHT10 Sensor,溫濕度傳感器U-AP3216C Sensor.光照/距離U-AP6181 WIFI Module,SDIOU-ES8388 AUDIO,2-ch DAC,2-ch ADCU-ICM-20608 三軸陀螺儀/三軸加速度計(jì),U-L9110S 電機(jī)驅(qū)動(dòng),800mAU-RT9013-3.3 LDO,500mAU-STM32F103C8T6 U-STM32L475VET6 MCU,LQFP100,512K FLASH,128K RAMU-W25Q128 SPI FLASH,16MY-12M-SMD 晶振 - 12M貼片Y-3215-32.768K XTAL,3215,32.768KY-3215-8M XTAL,3215,8MHz
標(biāo)簽: stm32l475 開(kāi)發(fā)板
上傳時(shí)間: 2021-12-15
上傳用戶(hù):
The PW8205A8TS is the highest performance trench N-ch MOSFETs with extreme high cell density,which provide excellent RDSON and gate charge for most of the small power switching and loadswitch applications. The meet the RoHS and Product requirement with full function reliabilityapproved .
標(biāo)簽: 8205a8
上傳時(shí)間: 2022-02-14
上傳用戶(hù):wangshoupeng199
Ansoft HFSS軟件是應(yīng)用有限元方法的原理來(lái)編制的,深入的了解有限元方法的理論基礎(chǔ),及其在電磁場(chǎng)與微波技術(shù)領(lǐng)域的應(yīng)用原理,對(duì)于我們靈活、準(zhǔn)確地使用Ansoft HFSS軟件來(lái)解決實(shí)際工程問(wèn)題能夠提供幫助。這一部分教材的內(nèi)容就是在結(jié)合 Ansoft HFSS軟件中涉及到的有限元技術(shù),力爭(zhēng)在最小的篇幅和最短的時(shí)間里為學(xué)員建立理論結(jié)合實(shí)際的有限元方法的基本概念。有限元方法是近似求解數(shù)理邊值問(wèn)題的一種數(shù)值技術(shù),大約有40年的歷史。他首先在本世紀(jì)40年代被提出在50年用于飛機(jī)的設(shè)計(jì)。在六七十年代被引進(jìn)到電磁場(chǎng)問(wèn)題的求解中。電磁場(chǎng)的邊值問(wèn)題和很多的物理系統(tǒng)中的數(shù)學(xué)模型中的邊值問(wèn)題一樣,都可以用區(qū)域Ω內(nèi)的控制微分方程(電磁場(chǎng)問(wèn)題中可以是泊松方程、標(biāo)量波動(dòng)方程和矢量波動(dòng)方程等)和包圍區(qū)域的邊界廠上的邊界條件(可以是第一類(lèi)的 Dirichlet條件和第二類(lèi)的 NEumann條件或者是阻抗和輻射邊界條件等)來(lái)定義。微分方程可表為從上一小節(jié)的內(nèi)容我們可以看到電磁場(chǎng)邊值問(wèn)題變分解法的這樣的兩個(gè)特點(diǎn):(1)變分問(wèn)題已經(jīng)將原來(lái)電磁場(chǎng)邊值問(wèn)題的嚴(yán)格求解變?yōu)榍蠼庠诜汉馑枷碌娜踅猓@個(gè)解可以和原來(lái)的解式不一樣的。(2)在電磁場(chǎng)邊值問(wèn)題的變分方法中,展開(kāi)函數(shù)(也可成為試探函數(shù))是由定義在全域上的一組基函數(shù)組成,這種組合必須能夠表示真實(shí)解,也必須滿(mǎn)足適當(dāng)?shù)倪吔鐥l件,這對(duì)于二維、三維問(wèn)題是非常困難的。
標(biāo)簽: Ansoft
上傳時(shí)間: 2022-03-12
上傳用戶(hù):qdxqdxqdxqdx
#include "NUC1xx.h"#include "Hal.h"#include "pwm.h"//wait current PWM cycle done, otherwise there maybe short pulse on FETvoid PWM_Stop(U8 ch){ switch(ch) { case PWM_CHANNEL_A: PWMA->u32CNR1 = 0; PWMA->u32CMR1 = 0; while(PWMA->u32PDR1 != 0); break; case PWM_CHANNEL_B: PWMA->u32CNR2 = 0; PWMA->u32CMR2 = 0; while(PWMA->u32PDR2 != 0); break; case PWM_CHANNEL_C: PWMA->u32CNR3 = 0; PWMA->u32CMR3 = 0; while(PWMA->u32PDR3 != 0); break; default: while(1); } PWMA->u32POE &= ~(1<<ch); PWMA->u32PCR &= ~(1<<(ch*8));}
上傳時(shí)間: 2022-06-01
上傳用戶(hù):kingwide
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1