newObjects (fromerly known as ZmeY soft) JScript/JavaScript code snippets
Home Products Development
pixel.gif (49 bytes)
Home
Products by category
ALP area
ISAPI filters
ActiveX
Forums (discussions)
Articles and samples
Buy
Code snippets
A little help
ACOMTools

Site navigation
Code snippets
JScript code

Downloads of the day
ActiveX Pack1 2.4.2
Desktop Windows, CE/CE.NET and PocketPC! About 30 powerful components for all the Windows platforms.
Active Local Pages 1.1
Write desktop apps in ASP and CGI. Create wutorun CDs using WEB technologies - yes it is possible!
Script Service
Run VBScript/JScript as service and call it just like a system wide COM object.
NetStreams
TCP/IP, IRDA and others - all as easy as access to files.
ASP Compiler 1.1 beta
Create COM DLLs from ASP pages, program the compiler itself.
ISAPI Variable Parser
ISAPI filter that converts path-like URLs to script calls with parameters

Quick contact
General
zmeyinc@newobjects.com
Support
support@newobjects.com
Sales
sales@newobjects.com

sprintf simple realization in JScript

JScript has no strict types thus this realization does not support C library
format, instead it supports format applicable for the Javascript specifics. It
has only field width and alignment capabilities implemented. Example sprintf("A=%20l,B=%30r","Blah
Blah",234.56)
will generate string with % escapes replaced with 20 and 30
characters wide fields containing: 1-st "Blah Blah" left aligned in the field
and 2-nd 234.56 right aligned. Also it supports a little type conversion excapes
but their purpose is to specify the type of the printed value. Genraal format
is:

%[width][type]alignment

width
- optional integer field width in characters. Only the resulting
string is formatted!

type - type to convert to. Can be f - convert to float or n
- convert to integer.

alignment - Alignment in the field (as specified by width). Can be l
- left, r - right, c - center. If width is not specified the
letter used is not meaningful.

Click the image below to download (sprintf.js-code)
click here ...

File prprocessor

UNIX OS-es have some good utilities for file preprocessing based on
regular expressions, but Microsoft Windows does not. But Microsoft Windows has powerful scripting
engines and WSH thus the problem can be solved.

This script is able to process files described by the command line parameters
and replace some texts in them. It supports directory tree recursing, matching
file names with regular expression, processing parts of the files files
depending on the begin-end statements (defined by reg. exps. too) and so on.

Please note! You must be familiar with the JScript regular expressions in order
to use this utility. Wrong usage may cause loss of data thus it is recommended to
test it over some not important files first.

Also download the JScript documentation from the Microsoft site and see Regular Expression
object for the regular expressions syntax.

preprocessor.zip
click here ...


Spread your traffic to several servers

ISAPI Redirector filter is capable of redirecting entire sites, parts of the site to one or more servers. It can be used to save the site integrity or/and to distribute requests between several servers.


Check these sites
Windows PocketPC News & Information Source
Web development portal
1000 WebSite Tools
BullDownload Free Software Download
BullDownload Free Software Download


Active visitors
20
Suggested links
Suggest this page to the other visitors. Click the button below to place this page in the list above .
Copyright newObjects (ZmeY soft) 2001