![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 17:26 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| 网络日志(Blog) » 523066680 Editing Area |
| Printable Version 34,798 / 42 |
| Floor1 523066680 | Posted 2009-02-13 18:49 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
Version 2 [ Last edited by 523066680 on 2009-2-21 at 10:46 ] |
|
| Floor2 523066680 | Posted 2009-02-13 18:50 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
2016-09 Update link address:
Articles Batch Rename's Bug http://www.cn-dos.net/forum/viewthread.php?tid=45655 TalkAboutString http://www.cn-dos.net/forum/viewthread.php?tid=45654 Improvement of Paragraph Redirection Method http://www.cn-dos.net/forum/viewthread.php?tid=45409 2 times ping1 is not equal to 1 time ping2 http://www.cn-dos.net/forum/viewthread.php?tid=45410 %var% instead of statement execution http://www.cn-dos.net/forum/viewthread.php?tid=45240 Snake Idea Analysis (23rd floor) http://www.cn-dos.net/forum/viewthread.php?tid=43369 Establishing a Permanent Abnormal Drive Letter http://www.cn-dos.net/forum/viewthread.php?tid=41796 Mathematics related: Batch Processing to Calculate 24 Points http://www.cn-dos.net/forum/viewthread.php?tid=45488 Square Root of Integers from 1 to 99 http://www.cn-dos.net/forum/viewthread.php?tid=43046 Applications: Can the Process Name of a Batch Script be Changed? (The solution is found in the link on the 24th floor.) http://www.cn-dos.net/forum/viewthread.php?tid=42169 How to Implement Standby and Open Screen Saver with Script? http://www.cn-dos.net/forum/viewthread.php?tid=45522 Batch Script Packaging Tool http://www.cn-dos.net/forum/viewthread.php?tid=44620 Shutdown After 1 Hour http://www.cn-dos.net/forum/viewthread.php?tid=45242 Generate Test Scripts to be Written http://www.cn-dos.net/forum/viewthread.php?tid=45250 List the Current Smallest and Largest bat Files http://www.cn-dos.net/forum/viewthread.php?tid=41517 Batch Renaming in 001, 002, 003 Format http://www.cn-dos.net/forum/viewthread.php?tid=41643 Entertainment, Special Effects: Digital Matrix Appears Point by Point, Random http://www.cn-dos.net/forum/viewthread.php?tid=45878 Batch Processing to Write Large Character Effect - New Year Greeting Card http://www.cn-dos.net/forum/viewthread.php?tid=45411 Animation Special Effects: Drawing Circles, Bouncing Balls, Progress Bars, Rising and Falling, etc. http://www.cn-dos.net/forum/viewthread.php?tid=42124 Pure Batch Processing Version of Snake http://www.cn-dos.net/forum/viewthread.php?tid=43369 Gradually Larger Circle in the Middle http://www.cn-dos.net/forum/viewthread.php?tid=44785 Spatial Random Walking Particles + Initial Version of Snake http://www.cn-dos.net/forum/viewthread.php?tid=43059 【Visual Category】Advancing Road + Airplane and Cannon http://www.cn-dos.net/forum/viewthread.php?tid=41333 【Visual Category】Square Frame Gradually Expanding from the Middle and Then Becoming Smaller + Changing Color http://www.cn-dos.net/forum/viewthread.php?tid=40711 Clock - Italic + Milliseconds (Updated, Reduced CPU and Flicker) http://www.cn-dos.net/forum/viewthread.php?tid=41833 After Diving for Several Days, Completed Self-Satisfied Digital Rain http://www.cn-dos.net/forum/viewthread.php?tid=42113 【Considered Monthly Post】I Try to Minimize Flicker Batch Processing Large Clock http://www.cn-dos.net/forum/viewthread.php?tid=41757 Running All the Way, Episode 1, Jump! http://www.cn-dos.net/forum/viewthread.php?tid=41981 Made a Self-Satisfied Scrolling Subtitle http://www.cn-dos.net/forum/viewthread.php?tid=39780 Replies: 【Challenge】Draw Square and Parabola with Batch Processing 14th floor 15th floor 18th floor http://bbs.bathome.cn/thread-3537-2-1.html Batch Processing Fun Mathematics of n-order Snake Matrix 28th floor http://www.cn-dos.net/forum/viewthread.php?tid=42472 How to Generate a Pure Digital Password Dictionary 6th floor http://www.cn-dos.net/forum/viewthread.php?tid=33139 Permutation and Combination 27th floor http://www.cn-dos.net/forum/viewthread.php?tid=41243 Water Area: Handmade Sudoku Matrix http://www.cn-dos.net/forum/viewthread.php?tid=45817 Treat Discrimination with Discrimination http://www.cn-dos.net/forum/viewthread.php?tid=45986 523066680 Quotes http://www.cn-dos.net/forum/viewthread.php?tid=46304 Half Story http://www.cn-dos.net/forum/viewthread.php?tid=45521 Lightspeed Contradiction http://www.cn-dos.net/forum/viewthread.php?tid=44789 1=0.9999999……? http://www.cn-dos.net/forum/viewthread.php?tid=43058
[ Last edited by 523066680 on 2016-9-28 at 11:42 ] |
|
| Floor3 523066680 | Posted 2009-02-17 18:15 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
My exist . 仅仅是exist.
|
|
| Floor4 523066680 | Posted 2009-02-17 18:42 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```
@echo off &setlocal enabledelayedexpansion set /p inp=" : " call :funa na %inp% call :funa nb %inp:* =% set /a lpna=0,lpr=-1 :lpna set /a lpna+=1,lpnb=0,lpr+=1,lp=lpr :lpnb set /a lpnb+=1,lp+=1 :::::::::::::::::::::::::: set /a axb=na%lpna%*nb%lpnb% set /a cup%lp%=axb+cup%lp% if !cup%lp%! gtr 9 (set "do=") else (set do=::) %do% set /a tlpa=lp,tlpb=tlpa+1 %do% :cuplp %do% set /a cup%tlpa%=cup%tlpa%-10,cup%tlpb%+=1 %do% set /a tlpa+=1,tlpb=tlpa+1 %do% if !cup%tlpb%! gtr 9 (goto :cuplp) :::::::::::::::::::::::::: if %lpnb% lss %nb% (goto :lpnb) if %lpna% lss %na% (goto :lpna) for /l %%a in (1,1,8) do echo !cup%%a! set /a temp=1234*1234 echo %temp% pause>nul &exit :funa set /a %1=%2,funaa=0 :funaa set /a funaa+=1 set %1%funaa%=!%1:~-%funaa%,1! if not "!%1:~%funaa%!"=="" (goto :funaa) set /a %1=funaa ``` |
|
| Floor5 523066680 | Posted 2009-02-20 18:49 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
@echo off &setlocal enabledelayedexpansion
title code by 523066680 set /p inp="Enter two multipliers, separated by space: " call :naxnb %inp% pause :naxnb set numa=%1 set numb=%2 set /a la=0,lb=0,lp=0 :la set /a la+=1,lb+=1,lp+=1 set /a lb+=1,tlpa=lp,tlpb=lp+1 ::::::::::::::::::::::::: set /a cup%lp%+=!numa:~-%la%,1! + !numb:~-%lb%,1! :cuplp set /a cup%tlpb%+=cup%tlpa%/10,cup%tlpa%=cup%tlpa%%%10 if !cup%tlpb%! gtr 9 ( set /a tlpa+=1,tlpb=tlpa+1 goto :cuplp ) else (if !cup%tlpb%! equ 0 set /a tlpb-=1) :::::::::::::::::::::::::: if not "!numb:~%lb%!"=="" (goto :la) if not "!numa:~%la%!"=="" (goto :la) for /l %%a in (%tlpb%,-1,1) do set /p=!cup%%a!<nul ::::::::vbs verification::::::::::: echo, echo,wscript.echo %inp: =+%>x.vbs cscript //nologo x.vbs pause>nul &exit [ Last edited by 523066680 on 2009-2-21 at 11:29 ] |
|
| Floor6 523066680 | Posted 2009-03-07 06:27 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
@echo off&setlocal enabledelayedexpansion
set /a sa=63456,sb=61426 :a echo, %sb:~1,1% echo,%sa:~1,3% echo, %sb:~3,1% echo, echo, %sb:~0,1% echo,&echo, set /p inp="(w a s d): " echo, if %inp% equ w ( set sb=%sb:~1%%sb:~1,1% ) if %inp% equ s ( set sb=%sb:~3,1%%sb:~0,4% ) if %inp% equ a ( set sa=%sa:~1%%sa:~1,1% ) if %inp% equ d ( set sa=%sa:~3,1%%sa:~0,4% ) goto :a |
|
| Floor7 523066680 | Posted 2009-06-03 05:24 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```c
typedef struct { int fa,fb; } fraction; char axb; fraction arr; fraction outvar; int whox; int overa; void arrangement(int a,int n); void next(fraction a,int n); void count(fraction a,int x,fraction b,int n); main() { int i,ma; for (i=0;i<4;i++) arr.fb=1; while (1) { printf("______________________\nPress = Quit \n\n"); printf("Input 4 numbers,such as: 3 3 8 8 : "); scanf("%d %d %d %d",&ma,&ma,&ma,&ma); overa=0; arrangement(ma,4); if (overa==0) printf("\n Not result!\n\n"); } getch(); } void arrangement(int a,int n) { int temp; int i,j,k; if (n==0) { next(arr,4); return; } for (i=0;i<n;i++) { k=0; arr.fa=a; for (j=0;j<n;j++) {if (i!=j) temp=a;} arrangement(temp,n-1); } } void next(fraction a,int n) { int i,j; fraction temp; if ((overa==0)&&(n==1)&&(a.fa==24*a.fb)) {printf("\n "); if (whox==0) { if (whox==0) {printf(" %c %d",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} else if (whox==1) {printf(" %c %d",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} else if (whox==2) {printf("(%d %c %d) %c (%d %c %d)",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} } else { if (whox==0) {printf("(%d %c %d) %c (%d %c %d)",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} else if (whox==1) {printf("%d %c ",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} else if (whox==2) {printf("%d %c ",arr.fa,axb,arr.fa,axb,arr.fa,axb,arr.fa);} } printf(" = 24 \n\n"); overa=1; return; } for (i=0;i<n-1;i++) { whox=i; for (j=0;j<n;j++){temp.fa=a.fa;temp.fb=a.fb;} for (j=i+1;j<n-1;j++){temp.fa=temp.fa;temp.fb=a.fb;} for (j=0;j<4;j++) { count(a,j,a,n); temp.fa=outvar.fa; temp.fb=outvar.fb; if (outvar.fb!=0) next(temp,n-1); } } } void count(fraction a,int x,fraction b,int n) { if (x==0) { axb='+'; outvar.fa=(a.fa*b.fb)+(b.fa*a.fb); outvar.fb=a.fb*b.fb; } else if (x==1) { axb='-'; outvar.fa=(a.fa*b.fb)-(b.fa*a.fb); outvar.fb=a.fb*b.fb; } else if (x==2) { axb='*'; outvar.fa=a.fa*b.fa; outvar.fb=a.fb*b.fb; } else if (x==3) { axb='/'; outvar.fa=a.fa*b.fb; outvar.fb=a.fb*b.fa; } } ``` Attachments COUNT24B.rar (7.78 KiB) |
|
| Floor8 523066680 | Posted 2009-07-07 23:33 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```cpp
#include "Conio.h" #include "graphics.h" #include "stdlib.h" #define closegr closegraph void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } int main(void) { int a,b,x,y,i,j; randomize(); initgr(); /* BGI initialization */ x=y=200; for (i=1;i<=15;i++) { a=rand()%600+1;b=rand()%400+20; putpixel(x,y,4); while (x!=a||y!=b) { if (x<a) x++; else if (x>a) x--; else { if (y<b) y++; else if (y>b) y--; } for (j=0;j<=100;j++) delay(10); putpixel(x,y,i); } } rectangle(x-5,y-5,x+5,y+5); getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` |
|
| Floor9 523066680 | Posted 2009-07-07 23:57 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```cpp
#include "Conio.h" #include "graphics.h" #include "stdlib.h" #define closegr closegraph void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } int main(void) { int a, b, x, y, i, j, dtl = 50, dtn = 0; int dot; randomize(); initgr(); /* BGI initialization */ x = y = 200; dot = dot = 200; for (i = 1; i < dtl; i++) { dot = 0; dot = 0; } for (i = 1; i <= 15; i++) { a = rand() % 600 + 1; b = rand() % 400 + 20; putpixel(x, y, 4); while (x != a || y != b) { if (x < a) x++; else if (x > a) x--; else { if (y < b) y++; else if (y > b) y--; } for (j = 0; j <= 100; j++) delay(10); putpixel(x, y, i); if (dtn < (dtl - 1)) dtn++; else dtn = 0; if (dot != 0) putpixel(dot, dot, 0); dot = x; dot = y; } } rectangle(x - 5, y - 5, x + 5, y + 5); getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` |
|
| Floor10 523066680 | Posted 2009-07-13 00:07 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
NLine 5RandDot [ Last edited by 523066680 on 2009-7-13 at 22:18 ] |
|
| Floor11 523066680 | Posted 2009-07-13 22:31 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```c
#include <Conio.h> #include <graphics.h> #include <stdlib.h> #define closegr closegraph #define NDOT 3 void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } void delta(int xa,int ya,int xb,int yb,int xc,int yc,int c) { setcolor(c); line(xa,ya,xb,yb); line(xa,ya,xc,yc); line(xb,yb,xc,yc); } int main(void) { int i,j,whi=0; struct { int a,b,x,y,tx,ty; } snk; initgr(); /* BGI initialization */ for (i=0;i<NDOT;i++) { snk.a=snk.b=snk.x=snk.y=200; } randomize(); while (!kbhit()) { if (whi<3) whi++; else whi=0; for (i=0;i<200;i++) delay(10); delta(snk.tx,snk.ty,snk.tx,snk.ty,snk.tx,snk.ty,0); delta(snk.x,snk.y,snk.x,snk.y,snk.x,snk.y,2); for (i=0;i<NDOT;i++){ if ((snk.x==snk.a)&&(snk.y==snk.b)){ snk.a=rand()%600+1; snk.b=rand()%400+20; } } for (i=0;i<NDOT;i++){ snk.tx=snk.x; snk.ty=snk.y; if (whi>i) continue; if (snk.x>snk.a) snk.x--; else if (snk.x<snk.a) snk.x++; else { if (snk.y>snk.b) snk.y--; else if (snk.y<snk.b) snk.y++; } } } getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` |
|
| Floor12 523066680 | Posted 2009-07-13 23:07 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```cpp
#include <Conio.h> #include <graphics.h> #include <stdlib.h> #define closegr closegraph #define NDOT 4 typedef struct { int a, b, x, y; } DotInf; void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } void delta(DotInf dot, int c) { int i, j; setcolor(c); for (i = 0; i < NDOT; i++) for (j = i + 1; j < NDOT; j++) line(dot.x, dot.y, dot.x, dot.y); } int main(void) { int i, j, whi = 0; DotInf snk, everdot; initgr(); /* BGI initialization */ for (i = 0; i < NDOT; i++) { snk.a = snk.b = snk.x = snk.y = 200; } delta(snk, 2); randomize(); while (!kbhit()) { if (whi < 4) whi++; else whi = 0; for (i = 0; i < 600; i++) delay(10); delta(everdot, 0); delta(snk, 2); for (i = 0; i < NDOT; i++) { if ((snk.x == snk.a) && (snk.y == snk.b)) { snk.a = rand() % 600 + 1; snk.b = rand() % 400 + 20; } } for (i = 0; i < NDOT; i++) { everdot.x = snk.x; everdot.y = snk.y; if (whi > i) continue; if (snk.x > snk.a) snk.x--; else if (snk.x < snk.a) snk.x++; else { if (snk.y > snk.b) snk.y--; else if (snk.y < snk.b) snk.y++; } } } getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` [ Last edited by 523066680 on 2009-8-23 at 07:13 ] |
|
| Floor13 523066680 | Posted 2009-07-14 03:06 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
```cpp
#include <Conio.h> #include <graphics.h> #include <stdlib.h> #define closegr closegraph void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } int main(void) { int i,j; initgr(); /* BGI initialization */ randomize(); while (!kbhit()) { for (j=200;j<=300;j++) { putpixel(rand()%400+1,j,4); putpixel(rand()%400+1,j,0); } for (j=0;j<200;j++) delay(10); } getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` Feels like a barrage~ Randomly made ```cpp #include <Conio.h> #include <graphics.h> #include <stdlib.h> #define closegr closegraph void initgr(void) /* BGI initialization */ { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } void func(int x,int y,int c) { setcolor(c); rectangle(x-4,y-4,x+4,y+4); } int main(void) { int i,j; initgr(); /* BGI initialization */ randomize(); while (!kbhit()) { for (i=1;i<=30;i++) { for (j=1;j<=30;j++) if (rand()%30>20) func(j*10,i*10,1); for (j=1;j<=30;j++) if (rand()%30>10) func(j*5,i*5,0); } for (j=0;j<500;j++) delay(20); } getch(); closegr(); /* Restore TEXT screen mode */ return 0; } ``` [ Last edited by 523066680 on 2009-7-14 at 03:26 ] |
|
| Floor14 523066680 | Posted 2009-08-02 10:06 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
![]() [ Last edited by 523066680 on 2009-8-2 at 10:09 ] |
|
| Floor15 523066680 | Posted 2009-08-18 09:39 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
It seems that the text - operation code that doesn't meet the requirements, I'll keep it for myself. The text to be processed is text.txt.
If it exceeds 80 bytes, it will be converted to one line. The character processing is okay, but the efficiency is not good. [ Last edited by 523066680 on 2009-8-18 at 09:41 ] |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |