- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
几年前,@ Mofi帮助我创建了一个了不起的.bat
脚本,用于对许多内容的值求和,还加入了它们的名称并对其求和。
请检查有关它的旧答案,并以Mofi的答案为重点。
How to ignore first and third data column on sorting and summing the text using batch file?
但是我注意到一个问题。
.txt
文件进行重新格式化:
04 VERO BANRICOMPRAS A PRAZO 651326 885,92
VERO BANRICOMPRAS A VISTA 038937 470,90
VERO CARTAO CREDITO 100810 2.126,17
VERO CARTAO CREDITO 100811 1.354,05
VERO CARTAO CREDITO 100812 148,91
CIELO S/A CARTAO CREDITO 084036 45,75
CIELO S/A CARTAO CREDITO 084037 24,18
CIELO S/A CARTAO CREDITO 084038 108,34
REDECARD S.A CARTAO CREDITO 154346 163,81
VERO CARTAO DEBITO 214591 1.338,66
VERO CARTAO DEBITO 214592 556,16
VERO CARTAO DEBITO 214593 113,96
CIELO S/A CARTAO DEBITO 186651 491,87
CIELO S/A CARTAO DEBITO 186652 678,53
05 VERO BANRICOMPRAS A PRAZO 976373 504,55
VERO BANRICOMPRAS A VISTA 440325 397,56
VERO CARTAO CREDITO 496411 725,69
VERO CARTAO CREDITO 496412 545,53
CIELO S/A CARTAO CREDITO 488259 135,32
CIELO S/A CARTAO CREDITO 488260 33,72
REDECARD S.A CARTAO CREDITO 519807 22,81
VERO CARTAO DEBITO 555957 619,03
VERO CARTAO DEBITO 555958 452,29
CIELO S/A CARTAO DEBITO 542472 946,15
06 VERO BANRICOMPRAS A PRAZO 419616 257,17
VERO BANRICOMPRAS A VISTA 771632 379,49
VERO CARTAO CREDITO 818228 1.317,35
VERO CARTAO CREDITO 818229 708,32
VERO CARTAO CREDITO 818230 84,28
CIELO S/A CARTAO CREDITO 809536 14,88
REDECARD S.A CARTAO CREDITO 846159 51,57
VERO CARTAO DEBITO 883969 229,31
VERO CARTAO DEBITO 883970 85,83
CIELO S/A CARTAO DEBITO 870136 49,18
CIELO S/A CARTAO DEBITO 870137 42,28
RESGATE AUTOMATICO 000000 6.200,00
07 VERO BANRICOMPRAS A PRAZO 742635 148,84
VERO BANRICOMPRAS A VISTA 135047 111,52
VERO CARTAO CREDITO 178947 867,82
VERO CARTAO CREDITO 178948 41,02
CIELO S/A CARTAO CREDITO 169813 133,68
CIELO S/A CARTAO CREDITO 169814 24,98
VERO CARTAO DEBITO 244107 596,02
VERO CARTAO DEBITO 244108 364,95
CIELO S/A CARTAO DEBITO 229583 651,76
08 VERO BANRICOMPRAS A PRAZO 085581 274,00
VERO BANRICOMPRAS A VISTA 489251 950,36
VERO CARTAO CREDITO 532717 601,15
VERO CARTAO CREDITO 532718 488,93
CIELO S/A CARTAO CREDITO 523033 69,76
CIELO S/A CARTAO CREDITO 523034 58,36
CIELO S/A CARTAO CREDITO 523035 34,30
REDECARD S.A CARTAO CREDITO 562700 185,53
VERO CARTAO DEBITO 603103 2.608,68
VERO CARTAO DEBITO 603104 1.124,42
CIELO S/A CARTAO DEBITO 588005 1.419,60
11 VERO BANRICOMPRAS A PRAZO 451443 770,43
VERO BANRICOMPRAS A VISTA 800736 1.377,51
VERO CARTAO CREDITO 859775 1.673,38
VERO CARTAO CREDITO 859776 836,50
VERO CARTAO CREDITO 859777 27,42
VERO CARTAO CREDITO 859778 39,24
CIELO S/A CARTAO CREDITO 844066 26,44
CIELO S/A CARTAO CREDITO 844067 45,37
CIELO S/A CARTAO CREDITO 844068 54,34
REDECARD S.A CARTAO CREDITO 910400 127,17
VERO CARTAO DEBITO 972748 3.560,31
VERO CARTAO DEBITO 972749 1.939,33
CIELO S/A CARTAO DEBITO 944629 175,81
CIELO S/A CARTAO DEBITO 944630 2.161,99
CIELO S/A CARTAO DEBITO 944631 58,72
CIELO S/A CARTAO DEBITO 944632 1.559,94
RESGATE AUTOMATICO 000000 15.500,00
12 VERO BANRICOMPRAS A PRAZO 742222 159,97
VERO BANRICOMPRAS A VISTA 190951 1.247,06
VERO CARTAO CREDITO 334660 669,75
VERO CARTAO CREDITO 334661 263,14
VERO CARTAO CREDITO 334662 99,13
CIELO S/A CARTAO CREDITO 325837 17,40
CIELO S/A CARTAO CREDITO 325838 161,58
REDECARD S.A CARTAO CREDITO 358417 106,89
VERO CARTAO DEBITO 394014 128,39
VERO CARTAO DEBITO 394015 349,08
CIELO S/A CARTAO DEBITO 381003 892,94
RESGATE AUTOMATICO 000000 6.900,00
DEVOLUCAO DOC. ELETRONICO 000060 3.949,49
13 VERO BANRICOMPRAS A PRAZO 147127 136,58
VERO BANRICOMPRAS A VISTA 564315 225,14
VERO CARTAO CREDITO 917004 656,04
VERO CARTAO CREDITO 917005 84,70
VERO CARTAO CREDITO 917006 103,07
CIELO S/A CARTAO CREDITO 907873 190,28
CIELO S/A CARTAO CREDITO 907874 65,24
REDECARD S.A CARTAO CREDITO 945528 155,34
VERO CARTAO DEBITO 981014 488,95
VERO CARTAO DEBITO 981015 112,82
14 VERO BANRICOMPRAS A PRAZO 534959 19,21
VERO BANRICOMPRAS A VISTA 123609 343,33
VERO CARTAO CREDITO 174070 225,84
VERO CARTAO CREDITO 174071 237,41
CIELO S/A CARTAO CREDITO 164650 40,68
CIELO S/A CARTAO CREDITO 164651 26,54
VERO CARTAO DEBITO 237408 608,63
VERO CARTAO DEBITO 237409 1.061,97
CIELO S/A CARTAO DEBITO 224104 232,16
15 VERO BANRICOMPRAS A PRAZO 091718 212,73
VERO BANRICOMPRAS A VISTA 412318 528,61
VERO CARTAO CREDITO 464462 1.255,15
VERO CARTAO CREDITO 464463 82,57
VERO CARTAO CREDITO 464464 72,84
CIELO S/A CARTAO CREDITO 454334 25,47
CIELO S/A CARTAO CREDITO 454335 204,90
CIELO S/A CARTAO CREDITO 454336 218,38
REDECARD S.A CARTAO CREDITO 495065 81,70
VERO CARTAO DEBITO 532669 340,94
VERO CARTAO DEBITO 532670 63,15
CIELO S/A CARTAO DEBITO 518884 699,42
18 VERO BANRICOMPRAS A PRAZO 383614 691,40
VERO BANRICOMPRAS A VISTA 719756 955,41
VERO CARTAO CREDITO 766119 3.335,37
VERO CARTAO CREDITO 766120 1.460,17
VERO CARTAO CREDITO 766121 637,74
CIELO S/A CARTAO CREDITO 749384 185,38
REDECARD S.A CARTAO CREDITO 818055 341,85
VERO CARTAO DEBITO 876849 1.686,83
VERO CARTAO DEBITO 876850 623,29
VERO CARTAO DEBITO 876851 24,33
CIELO S/A CARTAO DEBITO 852038 157,38
CIELO S/A CARTAO DEBITO 852039 892,36
CIELO S/A CARTAO DEBITO 852040 818,90
19 VERO BANRICOMPRAS A PRAZO 660866 118,53
VERO BANRICOMPRAS A VISTA 080453 244,18
VERO CARTAO CREDITO 126719 533,66
VERO CARTAO CREDITO 126720 95,94
VERO CARTAO CREDITO 126721 47,87
CIELO S/A CARTAO CREDITO 118299 46,64
CIELO S/A CARTAO CREDITO 118300 137,53
REDECARD S.A CARTAO CREDITO 149953 27,27
VERO CARTAO DEBITO 184851 1.325,03
VERO CARTAO DEBITO 184852 511,96
CIELO S/A CARTAO DEBITO 171809 437,77
20 VERO BANRICOMPRAS A PRAZO 044755 415,29
VERO BANRICOMPRAS A VISTA 349028 493,91
VERO CARTAO CREDITO 403626 673,75
VERO CARTAO CREDITO 403627 342,59
VERO CARTAO CREDITO 403628 58,28
REDECARD S.A CARTAO CREDITO 433775 67,90
REDECARD S.A CARTAO CREDITO 433776 67,61
VERO CARTAO DEBITO 472002 297,51
VERO CARTAO DEBITO 472003 131,56
RESGATE AUTOMATICO 000000 9.700,00
21 VERO BANRICOMPRAS A PRAZO 319063 305,54
VERO BANRICOMPRAS A VISTA 679182 473,10
VERO CARTAO CREDITO 724092 594,46
VERO CARTAO CREDITO 724093 290,86
CIELO S/A CARTAO CREDITO 716700 133,04
CIELO S/A CARTAO CREDITO 716701 244,63
REDECARD S.A CARTAO CREDITO 744273 109,34
VERO CARTAO DEBITO 779495 461,80
VERO CARTAO DEBITO 779496 61,27
CIELO S/A CARTAO DEBITO 765528 1.369,41
22 VERO BANRICOMPRAS A PRAZO 625121 272,86
VERO BANRICOMPRAS A VISTA 947266 173,69
VERO CARTAO CREDITO 049605 794,90
VERO CARTAO CREDITO 049606 181,81
VERO CARTAO CREDITO 049607 123,49
CIELO S/A CARTAO CREDITO 040363 115,22
CIELO S/A CARTAO CREDITO 040364 21,09
CIELO S/A CARTAO CREDITO 040365 116,42
REDECARD S.A CARTAO CREDITO 079047 156,19
VERO CARTAO DEBITO 114585 404,29
VERO CARTAO DEBITO 114586 199,87
CIELO S/A CARTAO DEBITO 101926 262,24
25 VERO BANRICOMPRAS A PRAZO 898216 619,60
VERO BANRICOMPRAS A VISTA 263855 333,14
VERO CARTAO CREDITO 656240 2.182,05
VERO CARTAO CREDITO 656241 1.153,70
CIELO S/A CARTAO CREDITO 641077 41,86
CIELO S/A CARTAO CREDITO 641078 93,03
REDECARD S.A CARTAO CREDITO 705335 156,27
VERO CARTAO DEBITO 761345 1.229,09
VERO CARTAO DEBITO 761346 307,53
CIELO S/A CARTAO DEBITO 737468 290,03
CIELO S/A CARTAO DEBITO 737469 412,93
RESGATE AUTOMATICO 000000 74.100,00
27 VERO BANRICOMPRAS A PRAZO 916537 254,76
VERO BANRICOMPRAS A VISTA 463886 910,60
VERO CARTAO CREDITO 027887 801,29
VERO CARTAO CREDITO 027888 479,59
VERO CARTAO CREDITO 027889 41,91
VERO CARTAO CREDITO 224868 267,26
VERO CARTAO CREDITO 224869 161,01
VERO CARTAO CREDITO 224870 144,73
CIELO S/A CARTAO CREDITO 019299 42,74
CIELO S/A CARTAO CREDITO 019300 72,49
CIELO S/A CARTAO CREDITO 217578 141,70
REDECARD S.A CARTAO CREDITO 055906 22,87
REDECARD S.A CARTAO CREDITO 244646 49,75
VERO CARTAO DEBITO 279344 458,92
VERO CARTAO DEBITO 279345 393,74
CIELO S/A CARTAO DEBITO 266081 380,41
CIELO S/A CARTAO DEBITO 266082 848,21
28 VERO BANRICOMPRAS A PRAZO 427354 332,90
VERO BANRICOMPRAS A VISTA 269379 232,29
VERO CARTAO CREDITO 314994 912,53
VERO CARTAO CREDITO 314995 536,39
CIELO S/A CARTAO CREDITO 305504 33,87
CIELO S/A CARTAO CREDITO 305505 56,26
REDECARD S.A CARTAO CREDITO 344054 89,10
VERO CARTAO DEBITO 381678 810,07
VERO CARTAO DEBITO 381679 463,54
CIELO S/A CARTAO DEBITO 367679 285,99
29 VERO BANRICOMPRAS A PRAZO 228273 139,72
VERO BANRICOMPRAS A VISTA 637529 499,77
VERO CARTAO CREDITO 678028 831,50
VERO CARTAO CREDITO 678029 318,86
CIELO S/A CARTAO CREDITO 668143 38,70
REDECARD S.A CARTAO CREDITO 708785 29,82
VERO CARTAO DEBITO 746619 1.159,92
CIELO S/A CARTAO DEBITO 732531 839,64
RESGATE AUTOMATICO 12.400,00
但实际上正确的输出将是:
RESGATE AUTOMATICO 112.400,00
它缺少第一个数字。
if not "%DataName:~2,1%" == " " goto CheckName
if "%DataName:~0,1%" == ";" goto CheckName
for /F "delims=01234567890" %%A in ("%DataName:~0,2%") do goto CheckName
set "DataName=%DataName:~3%"
000000
使脚本理解为删除第一个字符(12.400而不是112.400)。
最佳答案
这是增强的批处理脚本,解决了两个问题。
@echo off
setlocal EnableExtensions DisableDelayedExpansion
set "DataCount=0"
set "MaxNameLength=19"
set "TempFile1=%TEMP%\Output.tmp"
set "TempFile2=%TEMP%\Sorted.tmp"
set "OutputFile=Output.txt"
"%ProgramFiles(x86)%\CoolUtils\Total PDF Converter\PDFConverter.exe" "%UserProfile%\Desktop\teste.oxps" "%UserProfile%\Desktop\teste.txt"
del /F "%UserProfile%\Desktop\teste.pdf"
%SystemRoot%\System32\findstr.exe /V /R /C:"http" /C:"Banrisul" /C:"Sac" /C:":" /C:"-" /C:"SAC" /C:"OUVIDORIA" /C:"B A N R I S U L" /C:"+" "%UserProfile%\Desktop\teste.txt" >"%TempFile1%"
if not exist "%TempFile1%" goto EndBatch
rem Process each line in the output file line by line with leading
rem spaces and tabs already removed by FOR, but no other characters.
for /F usebackq^ tokens^=*^ eol^= %%I in ("%TempFile1%") do (
set "DataRow=%%~I"
call :ProcessLine
)
goto FormatOutput
:ProcessLine
rem Remove all double quotes within the data row.
set "DataRow=%DataRow:"=%"
rem Remove all exclamation marks within the data row.
set "DataRow=%DataRow:!=%"
rem Remove all horizontal tabs within the data row by spaces.
set "DataRow=%DataRow: = %"
rem Replace all $ by the string #DollarSign# within the data row.
set "DataRow=%DataRow:$=#DollarSign#%"
rem Replace two spaces in series by a dollar sign.
set "DataRow=%DataRow: =$%"
rem Replace all occurrences of dollar sign plus space by dollar sign.
set "DataRow=%DataRow:$ =$%"
rem Split up the data row using dollar sign as delimiter which can result
rem in four or just three tokenized substrings depending on existence of
rem 01, 02, ... in first data column. Of interest is the name string in
rem first or second data column and the value string in third or fourth
rem data column.
for /F tokens^=1-4^ delims^=$^ eol^= %%J in ("%DataRow%") do (
if "%%M" == "" (
set "DataName=%%~J"
set "DataValue=%%L"
) else (
set "DataName=%%~K"
set "DataValue=%%M"
)
)
rem It is safe now to replace the string #DollarSign# back to dollar sign.
set "DataName=%DataName:#DollarSign#=$%"
rem If the first 2 characters of data name are two digits and third
rem character is a space then remove those 3 characters from data name.
if not "%DataName:~2,1%" == " " goto CheckName
if "%DataName:~0,1%" == ";" goto CheckName
for /F "delims=01234567890" %%J in ("%DataName:~0,2%") do goto CheckName
set "DataName=%DataName:~3%"
rem Data names not containing one of the following four strings
rem should be at end of the list and not included in the total sum.
:CheckName
if not "%DataName:DEBITO=%" == "%DataName%" goto ReformatValue
if not "%DataName:CREDITO=%" == "%DataName%" goto ReformatValue
if not "%DataName:A VISTA=%" == "%DataName%" goto ReformatValue
if not "%DataName:A PRAZO=%" == "%DataName%" goto ReformatValue
set "DataName=z_%DataName%"
rem Floating point arithmetic is not supported by Windows command processor,
rem just signed 32-bit integer arithmetic with values in range -2147483648
rem to 2147483647. Therefore remove all dots and commas from data value.
:ReformatValue
set "DataValue=%DataValue:.=%"
set "DataValue=%DataValue:,=%"
for /F "tokens=* delims=0" %%J in ("%DataValue%") do set "DataValue=%%J"
if not defined DataValue set "DataValue=0"
rem Add the data value as integer to total sum. There is no special
rem overflow handling implemented yet in case of total sum exceeds
rem the maximum 32-bit positive signed integer value 2147483647.
if not "%DataName:~0,2%" == "z_" set /A "#TotalSum+=DataValue"
rem Find out if a data value of current data name is already in list
rem of environment variables and in this case just add the data value
rem to the existing sum for data data name and exit the subroutine.
for /F "tokens=1* delims==" %%J in ('set $\ 2^>nul') do if /I "%%K" == "%DataName%" set /A "#%%~nJ+=DataValue" & goto :EOF
rem This is a new data name with its first data value. So set
rem the appropriate environment variables for name and value.
set /A DataCount+=1
set "$\%DataCount%=%DataName%"
set "#%DataCount%=%DataValue%"
rem For a later aligned output find out the length of the data name and
rem remember its length if being greater than longest data name up to now.
rem z_ added at beginning of some data names must be always ignored for
rem length of data name.
set "NameLength=1"
:GetNameLength
set "DataName=%DataName:~1%"
if not "%DataName%" == "" set /A "NameLength+=1" & goto GetNameLength
if "%DataName:~0,2%" == "z_" set /A NameLength-=2
if %NameLength% GTR %MaxNameLength% set "MaxNameLength=%NameLength%"
rem Exit the subroutine.
goto :EOF
:FormatOutput
rem Add 3 to maximum name length to have always at least 3 spaces
rem between longest data name and the sum of the data values.
set /A MaxNameLength+=3
setlocal EnableDelayedExpansion
rem Build a string consisting of spaces according to maximum name length.
set "SpacesName="
for /L %%I in (1,1,%MaxNameLength%) do set "SpacesName=!SpacesName! "
rem Find out the maximum value which is usually the total sum, but
rem could be also a different value like sum of RESGATE AUTOMATICO.
set "MaximumValue=%#TotalSum%"
setlocal EnableDelayedExpansion
for /F "tokens=2 delims==" %%I in ('set #') do if %%I GTR !MaximumValue! set "MaximumValue=%%I"
endlocal & set "MaximumValue=%MaximumValue%"
rem Format value of maximum value.
call :FormatNumber %MaximumValue%
rem For a later aligned output find out the length of the maximum value.
set "ValueLength=1"
:GetValueLength
set "DataValue=%DataValue:~1%"
if not "%DataValue%" == "" set /A "ValueLength+=1" & goto GetValueLength
rem Build a string consisting of spaces according to maximum name length.
set "SpacesValue="
for /L %%I in (1,1,%ValueLength%) do set "SpacesValue=!SpacesValue! "
rem Output the data names with appropriate number of aligning spaces
rem and the data sum for each data name formatted and with aligning
rem spaces into the output file.
set /A ExtraNameLength=MaxNameLength+2
del "%TempFile1%" 2>nul
(for /F "tokens=1* delims==" %%I in ('set $\ 2^>nul') do (
set "DataName=%%J%SpacesName%"
if not "!DataName:~0,2!" == "z_" (
set "DataName=!DataName:~0,%MaxNameLength%!"
) else set "DataName=!DataName:~0,%ExtraNameLength%!"
call :FormatNumber !#%%~nI!
set "DataValue=%SpacesValue%!DataValue!"
set "DataValue=!DataValue:~-%ValueLength%!"
echo !DataName!!DataValue!
))>>"%TempFile1%"
rem Sort the lines in output file according to name.
%SystemRoot%\System32\sort.exe "%TempFile1%" /O "%TempFile2%"
del "%TempFile1%" 2>nul
rem 16 is the length of string CARDS OF MONTH with a space on both sides.
set /A LineLength=MaxNameLength+ValueLength
set /A HeadLength=(LineLength-16) / 2
rem Build the heading for the output file with centered CARDS OF MONTH
rem and create the output file with this heading as first line.
set "HyphensHead="
for /L %%I in (1,1,%HeadLength%) do set "HyphensHead=!HyphensHead!-"
set "Heading=%HyphensHead% CARDS OF MONTH %HyphensHead%"
set /A HeadLength=HeadLength*2 + 16
if not %HeadLength% == %LineLength% set "Heading=%Heading%-"
echo %Heading%>"%OutputFile%"
set "TotalSumWrite=1"
for /F usebackq^ tokens^=*^ eol^= %%I in ("%TempFile2%") do (
set "DataRow=%%I"
if defined TotalSumWrite (
if not "!DataRow:~0,2!" == "z_" (
echo !DataRow!>>"%OutputFile%"
) else (
rem Append the total summary to the output file.
set "TotalSumWrite="
>>"%OutputFile%" echo %SpacesName: =-%%SpacesValue: =-%
set "DataName=TOTAL OF ALL:%SpacesName%"
set "DataName=!DataName:~0,%MaxNameLength%!"
call :FormatNumber %#TotalSum%
set "DataValue=%SpacesValue%!DataValue!"
set "DataValue=!DataValue:~-%ValueLength%!"
>>"%OutputFile%" echo !DataName!!DataValue!
>>"%OutputFile%" echo %SpacesName: =-%%SpacesValue: =-%
>>"%OutputFile%" echo !DataRow:~2!
)
) else echo !DataRow:~2!>>"%OutputFile%"
)
if defined TotalSumWrite (
>>"%OutputFile%" echo %SpacesName: =-%%SpacesValue: =-%
set "DataName=TOTAL OF ALL:%SpacesName%"
set "DataName=!DataName:~0,%MaxNameLength%!"
call :FormatNumber %#TotalSum%
set "DataValue=%SpacesValue%!DataValue!"
set "DataValue=!DataValue:~-%ValueLength%!"
>>"%OutputFile%" echo !DataName!!DataValue!
)
del "%TempFile2%" 2>nul
endlocal
goto EndBatch
rem The subroutine below reformats 0 to 99 to 0,00 to 0,99 and inserts
rem dots on larger values after a series of 3 digits left to the comma.
:FormatNumber
set "DataValue=%1"
if "%DataValue:~1,1%" == "" set "DataValue=0%DataValue%"
if "%DataValue:~2,1%" == "" set "DataValue=0%DataValue%"
set "DataValue=%DataValue:~0,-2%,%DataValue:~-2%"
if not "%DataValue:~6,1%" == "" set "DataValue=%DataValue:~0,-6%.%DataValue:~-6%"
if not "%DataValue:~10,1%" == "" set "DataValue=%DataValue:~0,-10%.%DataValue:~-10%"
goto :EOF
:EndBatch
endlocal
0,08
到
0,99
范围内的值由于前导
0
而在删除逗号后被错误解释为无效或有效的八进制数字而不是十进制数字。
for /F "tokens=* delims=0" %%J in ("%DataValue%") do set "DataValue=%%J"
if not defined DataValue set "DataValue=0"
0,08
到
0,99
中的所有值(值中包含数字
8
或
9
)均被解释为无效的八进制数,导致在算术表达式中使用值
0
计算总和。
0
,如果在循环后由于值是
0,00
而不再定义该数据值,那么将使用值
DataValue
重新定义环境变量
0
。
RESGATE AUTOMATICO
的输出总和错误,原因是:
rem Format value of total sum.
call :FormatNumber %#TotalSum%
rem For a later aligned output find out the length of the total
rem sum which is expected to be the greatest value in output.
98.847,01
而
RESGATE AUTOMATICO
的总和为
112.400,00
,其中字符更多。
rem Find out the maximum value which is usually the total sum, but
rem could be also a different value like sum of RESGATE AUTOMATICO.
set "MaximumValue=%#TotalSum%"
setlocal EnableDelayedExpansion
for /F "tokens=2 delims==" %%I in ('set #') do if %%I GTR !MaximumValue! set "MaximumValue=%%I"
endlocal & set "MaximumValue=%MaximumValue%"
rem Format value of maximum value.
call :FormatNumber %MaximumValue%
rem For a later aligned output find out the length of the maximum value.
关于windows - 使用批处理脚本将相同名称的内容连接在一起,然后将每个内容的值求和,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62268664/
我正在尝试做这样的事情:Name[i] = "Name"+ (i+1) 在 forloop 中,这样数组的值将是:Name[0] = Name1,Name[1] = Name2,Name[2] = N
我读了here,在GSP中我们可以这样写: ${params.action} 从GSP中,我们可以使用${params.action}作为参数调用Javascript函数(请参阅here)。 是否有其
我的问题:非常具体。我正在尝试想出解析以下文本的最简单方法: ^^domain=domain_value^^version=version_value^^account_type=account_ty
我创建了一条与此类似的路线: Router::connect("/backend/:controller/:action/*"); 现在我想将符合此模式的每个 Controller 路由重命名为类似
我在 Visual Studio 2013 项目中收到以下警告: SQL71502 - Procedure has an unresolved reference to object 最佳答案 这可以
任何人都可以指导我使用名称/值 .NET 集合或 .NET 名称/值字典以获得最佳性能吗?请问最好的方法是什么?我的应用程序是 ASP.NET、WCF/WF Web 应用程序。每个集合应该有 10 到
我在 Zend Framework 2 中有一个默认模块: namespace Application\Controller; use Zend\Mvc\Controller\AbstractActi
这是表格: 关于javascript - 在 javascript 中,这是一个有效的结构吗? : document. 名称.名称.值?,我们在Stack Overflow上找到一个类似的
HtmlHelper.ActionLink(htmlhelper,string linktext,string action) 如何找出正确的路线? 如果我有这个=> HtmlHelper.Actio
我需要一些有关如何将 Controller 定义传递给嵌套在 outer 指令中的 inner 指令的帮助。请参阅http://plnkr.co/edit/Om2vKdvEty9euGXJ5qan一个
请提出一个数据结构来表示内存中的记录列表。每条记录由以下部分组成: 用户名 积分 排名(基于积分)- 可选字段- 可以存储在记录中或可以动态计算 数据结构应该支持高效实现以下操作: Insert(re
错误 : 联合只能在具有兼容列类型的表上执行。 结构(层:字符串,skyward_number:字符串,skyward_points:字符串)<> 结构(skyward_number:字符串,层:字符
我想要一个包含可变数量函数的函数,但我希望在实际使用它们之前不要对它们求值。我可以使用 () => type 语法,但我更愿意使用 => type 语法,因为它似乎是为延迟评估而定制的。 当我尝试这样
我正在编写一个 elisp 函数,它将给定键永久绑定(bind)到当前主要模式的键盘映射中的给定命令。例如, (define-key python-mode-map [C-f1] 'pytho
卡在R中的错误上。 Error in names(x) <- value : 'names' attribute must be the same length as the ve
我有字符串,其中包含名称,有时在字符串中包含用户名,后跟日期时间戳: GN1RLWFH0546-2020-04-10-18-09-52-563945.txt JOHN-DOE-2020-04-10-1
有人知道为什么我会收到此错误吗?这显示将我的项目升级到新版本的Unity3d之后。 Error CS0103: The name `Array' does not exist in the curre
由于 Embarcadero 的 NNTP 服务器从昨天开始就停止响应,我想我可以在这里问:我使用非数据库感知网格,我需要循环遍历数据集以提取列数、它们的名称、数量行数以及每行中每个字段的值。 我知道
在构建Android应用程序的子项目中,我试图根据根build.gradle中的变量设置版本代码/名称。 子项目build.gradle: apply plugin: 'com.android.app
示例用例: 我有一个带有属性“myProperty”的对象,具有 getter 和 setter(自 EcmaScript 5 起支持“Property Getters 和 Setters”:http
我是一名优秀的程序员,十分优秀!