MsgBox and InputBox. The following code makes them available in JScript too. MsgBox and InputBox. The following code makes them available in JScript too. CMD.EXE features. After that here (in Russian too) i have simplified this way until two lines of a code. But both ways are platform-dependent - the order of date parts depends on the locale settings.
CMD.EXE, the command line interpreter in Windows, does not allows to collect favorite scripts under appropriate folders and use them multiple times in the future. So we have to use the "copy-and-paste" technology to migrate some needed functionalities from one script to another.
something.log and we'd like to keep records in this file for the long time as much as possible. But for some reason this file is cleaning up periodically or a size of the file affects on the application's performance.
something.log and the previously saved records are available under the name something.log.1, etc until the something.log.5. After the following rotation the content of the last file will be lost and replaced by the content of the previous file (something.log.4 will be copied to the something.log.5) and the first file something.log will be copied to the something.log.1. At the same time the something.log will be truncated.
rotate something.log 10
WHICH is unix-world command, implemented using CMD/BAT feature only.
call :progressbar 50
call :progressbar 50 *
set progressbar_t=1 call :progressbar 50
String. Of course, it has own shortcomings but in the most cases it covers the wide range of URLs and protocols (http(s), ftp, mailto, etc; the mandatory part of URL, host is considered as domain names, IPs, and localhost separately), and moreover it considers the more complex URLs like jdbc:oracle://localhost:1521.
JS2BAT tool has ben implemented with batch features only. In this topic the same tool has been implemented in pure javascript. As opposed to the previous version the present one is the more functional and has optional parmeters.
Previously the js2bat.js script has been implemented in javascript. After that it has been converted to the js2bat.bat batch script by itself with the following command:
cscript js2bat.js js2bat.js
pl2bat but for wrapping of perl-scripts with batch-scripts. I am not author of this idea, i just implemented this feature as the standalone tool.
The main feature is to write the prolog code that is valid both in a batch and javascript. When launching the batch it runs as batch and calls the javascript interpreter with the same file as javascript file. But the second one skips this prolog as valid javascript comments.
SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript.It is really true! It is very useful, very flexible and easy to customize. The main idea is to use so-named brushes to colorize codes within
<pre /> tags (it is defined by default and customizable too!). Colorizing is simple. You have to link scripts and styles to your pages and add brush via class attribute (like this class="brush:js" for colorizing of Javascript codes). cmd/bat scripts and i have implemented this embedding to the blog's layout the code from below.
UPPER lower. For example, the translation table for Cyrillic characters is following:
А а Б б ... Ю ю Я яJust remember that the capitals have to be the first with following lowercase letters.
QWERTY.
CAPS qwerty /uThe first character is capital, and others are in lower case. Results to
Qwerty.
CAPS qwerty /ufInvert the result of the previous example. Both result to
qWERTY.
CAPS qwerty /uf /l CAPS qwerty /lf
@echo off
if "%~1" == "" (
echo EMPTY
goto :EOF
)
if "%~1" == "0" (
echo ZERO
goto :EOF
)
set /a number_var=%~1 2>nul
if errorlevel 2 (
echo ILLEGAL
goto :EOF
)
if %~1 neq %number_var% (
echo ERROR
goto :EOF
)
set number_var
goto :EOF