|
s11ss
银牌会员
积分 2098
发帖 566
注册 2007-9-11
状态 离线
|
『楼 主』:
[原创]***********堆排序*************
@echo off
setlocal enabledelayedexpansion
:::::::::::::::::::::::::::::::::::::::::Heap Sort:::::::::::::::::::::::::::::::::::::::::
::::::::Get Original Numbers::::::::
echo Please input some numbers separated from "," , like 2007,9,14,88:
set /a s=0
set /p str=
set /a len=0
set /a nx=0
:c
call set word=%%str:~%len%,1%%
set /a len+=1
if "%word%" equ "," (set /a nx+=1 & call :e)
if not "%word%" equ "" (goto :c)
set /a nx+=1
call :e
goto :o
:e
set /a sn=%len%-%s%-1
call set n%nx%=%%str:~%s%,%sn%%%
set /a s=%len%
goto :eof
::::::::Get Original Numbers::::::::
::::::::Deal With Numbers::::::::
:o
set /a iv=%nx%/2
:v
call :sift %iv% %nx%
set /a iv-=1
if %iv% geq 1 goto :v
set /a iv=%nx%
:b
set /a tmpr=!n1!
set /a n1=!n%iv%!
set /a n%iv%=%tmpr%
set /a iii=%iv%-1
call :sift 1 %iii%
set /a iv-=1
if %iv% geq 2 goto :b
goto :p
:sift
set /a i=%1
set /a ww=%2
:oo
set /a t=!n%i%!
set /a j=2*%i%
:ooo
if not %j% leq %ww% goto :eof
if %j% lss %ww% (
set /a k=%j%+1
if !n%j%! lss !n%k%! (set /a j+=1)
)
if !t! lss !n%j%! (
set /a n%i%=!n%j%!
set /a i=%j%
set /a j=2*!i!
) else (goto :oooo)
set /a n%i%=%t%
if %j% leq %ww% goto :ooo
goto :eof
:oooo
set /a n!i!=%t%
goto :eof
::::::::Deal With Numbers::::::::
::::::::Print The Result::::::::
:p
for /l %%c in (1,1,%nx%) do (set str2=!str2!!n%%c! )
echo.
echo The numbers after sorting are:
echo !str2!
echo.
echo Press Any Key To Exit...
pause>nul
goto :eof
::::::::Print The Result::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::s11ss
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::2007-9-16
|
|
2007-9-16 20:03 |
|
|
danlanse8025
新手上路
积分 9
发帖 5
注册 2007-9-17
状态 离线
|
『第
2 楼』:
一运行CPU 100%
......
|
|
2007-9-17 02:18 |
|
|
danlanse8025
新手上路
积分 9
发帖 5
注册 2007-9-17
状态 离线
|
|
2007-9-17 02:18 |
|
|
s11ss
银牌会员
积分 2098
发帖 566
注册 2007-9-11
状态 离线
|
『第
4 楼』:
Quote: | Originally posted by danlanse8025 at 2007-9-17 02:18 AM:
为何? |
|
是么?我本机测试没有任何问题.(Windows XP)
|
|
2007-9-17 12:12 |
|
|
yovie
初级用户
积分 92
发帖 42
注册 2007-8-14 来自 重庆市巫山县
状态 离线
|
『第
5 楼』:
好像我不能发表主题了。借用一下你这里的地方把下面的转换成彩色的。谢谢了。
Quote: | @echo off
REM ======================================================================
REM DATE : 2007-9-17
REM ======================================================================
cls
setlocal
set HostName=主机名 <nul
set Ethernetadapter=网络适配器 <nul
set PhysicalAddress.=实际地址
set IPAddress.= IP 地址
set SubnetMask=子网掩码
set DefaultGateway=默认网关
set DNSServers=DNS 服务器
echo.
echo ◆ 正在检测, 请稍候ゞ
echo.
for /f "tokens=1-3* delims=: " %%i in ('ipconfig /all') do if defined %%i%%j (
set str=%%k%%l
call set str=%%str:*:= %%
if %%i%%j==IPAddress. call set IP=%%str%%
if %%i%%j==DefaultGateway call set GW=%%str%%
call echo %%%%i%%j%% %%str%%
)
echo.
echo ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
echo.
ping %IP% -n 1 | findstr "Reply" >nul&&echo √. 本地连接配置正常ゞ||echo ★ 注意: 本地连接可能有问题ゞ
echo.
ping %GW% -n 1 | findstr "Reply" >nul&&echo √. 网络连接网关正常ゞ||echo ★ 注意: 连接网关时出现问题ゞ
echo.
ping www.baidu.com -n 1 | findstr "Reply" >nul&&echo √. 因特网连接正常ゞ||echo ★ 注意: 因特网连接可能有问题ゞ
echo.
endlocal
pause
@echo off
:port
cls
echo.
echo ◎ 外部IP及端口 -通讯状态- 本机TCP端口 进程名 『PID』
echo ══════════════════════════════════════
:pro
setlocal
set LISTENING=★侦听
set TIME_WAIT=★等待响应
set ESTABLISHED=☆已连接
set SYN_SENT=☆请求连接
set CLOSE_WAIT=☆断开连接
set CLOSED=☆无连接状态
echo System Idle Process #0#>1.tmp
for /f "skip=2 tokens=1,2" %%i in ('tasklist /nh') do echo %%i #%%j#>>1.tmp
for /f "skip=4 tokens=3-7 delims=: " %%a in ('netstat /ano /p TCP') do (
for /f "tokens=*" %%i in ('findstr "#%%e#$" 1.tmp') do (
set proc=%%i
call set proc=%%proc:~0,15%%
set port= 『%%a』
set remote=%%b:%%c <nul
call echo %%remote:~0,21%%-%%%%d%%- %%port:~-7%% %%proc%% 『%%e』
))
del 1.tmp
endlocal
pause
@ECHO off
echo.
echo ☆★ 常用工具下载 ☆★
echo.
echo /////////////////////////////////////////////////////////////////////
echo.
echo ● 删除类工具: 1.xdelbox 2.KillBox 3.powerrmv
echo.
echo ● 清理类工具: 4.ATF-Cleaner 5.WIN清理助手 6.毒霸清理专家
echo.
echo ● 系统类工具: 7.SRENG 8.微软正版验证通知去除补丁
echo.
echo ● 专杀类工具: a.AV终结者 b.灰鸽子专杀 c.USBCleaner
echo.
echo d.江民_威金 e.魏淘序_威金 f.农夫_熊猫烧香
echo.
echo /////////////////////////////////////////////////////////////////////
:yesdown
echo.
setlocal enabledelayedexpansion
set /p choice= ╬ 请选择要下载的工具(格式如:1,3-6,a-c表示下载第一个,第三个至第六个,以及A,B,C;0,下载所有):
set 1=http://www.i170.com/Attach/51FD704F-C0BD-41E7-B0E9-60673A888FD6
set 2=http://hzqedison.mm9mm.com/virus/KillBox-CN.exe
set 3=http://dl.filseclab.com/down/powerrmv.zip
set 4=http://www.atribune.org/public-beta/ATF-Cleaner.exe
set 5=http://www.duba.net/zt/ksc/down.shtml
set 6=http://www.kztechs.com/sreng/download.html
set 7=http://www.arswp.com/download/arswp/arswp.rar
set 8=http://blog.hzqedison.cn/tools/WGA1.0_Crack.zip
set 9=http://down.www.kingsoft.com/db/download/othertools/DubaTool_AV_Killer2.COM
set 10=http://zhuansha.duba.net/255.shtml
set 11=http://www.yoinfo.cn/upload/temp_07021016372390.rar
set 12=http://www.jiangmin.com/download/zhuansha04.htm
set 13=http://www.chenoe.com/downloads/AntiVirus.rar
set 14=http://hzqedison.mm9mm.com/mopery/nimuya.zip
set /a a=9,b=10,c=11,d=12,e=13,f=14
for %%i in (a b c d e f) do call set choice=!choice:%%i=%%%%i%%!
if "%choice%"=="0" set choice=1-14
echo 正在打开下载页,请等待...
for %%i in (%choice%) do (
for %%j in (%%i) do (
set num=%%j
set num_tmp=!num:-=!
if !num_tmp! equ %%j (
set string=!string!,%%j
) else call :change %%j
)
set string=!string:~1!
)
for %%i in (%string%) do start /w iexplore -new !%%i!
endlocal
goto :eof
:change
set str=%~1
set str=%str:-=,1,%
for /l %%i in (%str%) do set string=!string!,%%i
goto :eof
2007-09-17 12:57 |
|
[ Last edited by yovie on 2007-9-17 at 05:06 PM ]
|
拾人牙慧者! |
|
2007-9-17 13:21 |
|
|
tireless
银牌会员
积分 2025
发帖 1122
注册 2007-9-5
状态 离线
|
|
2007-9-19 02:12 |
|
|