Search found 763 matches

by einstein1969
07 Oct 2017 08:45
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6105

Re: Batch macro vs function call test

Thanks for the link. What is the best method for optimize this? I have profiled for 30 Numquads and the results are this: C:\Users\ACER\Desktop>pi.bat 30 pi.bat - By Don Cross - http://cosinekitty.com NumQuads=30 16:38:44,18 - started pi = 3.1415926535897932384626433832795028841971693993751058209749...
by einstein1969
07 Oct 2017 07:35
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6105

Re: Batch macro vs function call test

I have done some test. I have changed the original pi with input the NUMQUADS parameter. Then I have tested at 15,30,45,60,75 NUMQUADS. The time is show in this table: Quads | Time --------------- 15 3 sec. ||| 30 8 sec. |||||||| 45 18 sec. |||||||||||||||||| 60 34 sec. |||||||||||||||||||||||||||||...
by einstein1969
05 Oct 2017 06:28
Forum: DOS Batch Forum
Topic: Math Challenge game in Batch
Replies: 1
Views: 968

Re: Math Challenge game in Batch

multi thread in dos batch ...
I like it!

+1 Antonio ;)
by einstein1969
01 Oct 2017 08:59
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 6105

Re: Batch macro vs function call test

I post the original code too (not modified): @if defined talk (echo on) else (echo off) setlocal EnableDelayedExpansion echo.pi.bat - By Don Cross - http://cosinekitty.com set /a NumQuads = 30 set /a MaxQuadIndex = NumQuads - 1 echo. echo.%time% - started echo. call :PiEngine 48 18 32 57 -20 239 cal...
by einstein1969
01 Oct 2017 08:48
Forum: DOS Batch Forum
Topic: math.cmd: a math expression parser written in native WinNT batch script
Replies: 17
Views: 4589

Re: math.cmd: a math expression parser written in native WinNT batch script

simple code for elpsed milliseconds: setlocal EnableDelayedExpansion set t0=!time! math ..... set t1=!time! for /F "tokens=1-8 delims=:.," %%a in ("!t0: =0!:!t1: =0!") do set /a "a=(((1%%e-1%%a)*60)+1%%f-1%%b)*6000+1%%g%%h-1%%c%%d, a+=(a>>31) & 8640000, a*=10" echo ...
by einstein1969
08 Sep 2017 11:12
Forum: DOS Batch Forum
Topic: Emulating Truecolor with dithering and 16 color palette
Replies: 6
Views: 1392

Re: Emulating Truecolor with dithering and 16 color palette

this is for windows 7 pure batch dithering. show usage for sierra lite or floyd dithering using fonts 2x1 @echo off & setlocal EnableDelayedExpansion mode 330,145 & cls echo Use Lucida console font 5 echo Disable ClearType echo Enable "Smooth Edges of Screen Fonts" ping -n 5 localh...
by einstein1969
08 Sep 2017 10:40
Forum: DOS Batch Forum
Topic: Display .PPM files in RGB colors - WIN 10 ONLY
Replies: 4
Views: 1260

Re: Display .PPM files in RGB colors - WIN 10 ONLY

This remember me my old work (not finished?) on old windows.
by einstein1969
08 Sep 2017 10:02
Forum: DOS Batch Forum
Topic: Display .PPM files in RGB colors - WIN 10 ONLY
Replies: 4
Views: 1260

Re: Display .PPM files in RGB colors - WIN 10 ONLY

Hi IcarusLives!

I not have windows 10 but this is very great. 8)

einstein1969
by einstein1969
07 Jul 2017 11:32
Forum: DOS Batch Forum
Topic: Original batch file cmd window to other window jump
Replies: 7
Views: 1877

Re: Original batch file cmd window to other window jump

@Dave for my experiment I have used a jscript implementation of tail -f. tail-f.cmd @if(0)==(0) ECHO OFF CScript.exe //NoLogo //E:JScript "%~f0" %1 GOTO :EOF @end var StdIn=new ActiveXObject('Scripting.FileSystemObject').OpenTextFile(WScript.Arguments.Item(0)); while(true) if(StdIn.AtEndOf...
by einstein1969
06 Jul 2017 17:36
Forum: DOS Batch Forum
Topic: Original batch file cmd window to other window jump
Replies: 7
Views: 1877

Re: Original batch file cmd window to other window jump

this is an approch: Open two command prompts in the same current directory, On the server side, Call >0 Tail-f 0 | cmd 1>1 2>2 On the client side, Start /b tail-f 1 Start /b tail-f 2 Copy /y con 0 When you enter a command here, it is executed on the server side and the result is displayed on the cli...
by einstein1969
06 Jul 2017 12:53
Forum: DOS Batch Forum
Topic: Question for FOR /F.
Replies: 3
Views: 1130

Re: Question for FOR /F.

thanks Dave!
by einstein1969
06 Jul 2017 10:52
Forum: DOS Batch Forum
Topic: Question for FOR /F.
Replies: 3
Views: 1130

Question for FOR /F.

why this not work how expected?

Code: Select all

@echo off
FOR /F "usebackq delims=;" %%1 IN ('aa; bb; c c') DO ECHO %%1


result

Code: Select all

aa bb c c


Einstein1969
by einstein1969
06 Jul 2017 10:34
Forum: DOS Batch Forum
Topic: Color Macro
Replies: 4
Views: 1229

Re: Color Macro

hi IcarusLives,

very good work. 8)

I not known if possible make it faster. I thinks that is the maximum level of speed.

einstein1969
by einstein1969
18 Jun 2017 16:30
Forum: DOS Batch Forum
Topic: Delete 2nd line of text files
Replies: 7
Views: 2059

Re: Delete 2nd line of text files

this skip line 2 of file test.txt and create test2.txt without 2nd line. need line size <=8190 byte @echo off setlocal disableDelayedexpansion >test2.txt ( break | for /F "tokens=*" %%F in (test.txt) do @( echo %%F exit /b ) for /F "skip=2 tokens=*" %%F in (test.txt) do echo %%F ...