Vortex: Texis Web Script Reference Manual Version 8.00

Total Page:16

File Type:pdf, Size:1020Kb

Vortex: Texis Web Script Reference Manual Version 8.00 Vortex: Texis Web Script Reference Manual Version 8.00 Thunderstone Software Expansion Programs International, Inc. July 17, 2021 Contents 1 Texis Web Script 1 1.1 Overview ........................................ ... 1 1.1.1 Directives.................................... ... 2 1.1.2 Functions..................................... 2 1.1.3 Statements .................................... 3 1.1.4 Variables ..................................... 4 1.1.5 Execution..................................... 8 1.1.6 URLSyntax ..................................... 8 1.2 VortexStatements................................ ....... 12 1.2.1 A –functiondefinition ................................ 13 1.2.2 IF, ELSE, ELSEIF – conditional execution . 18 1.2.3 SWITCH – multi-choice branch . 20 1.2.4 Variable assignment – assign values to variables . ............... 22 1.2.5 LOCAL – declare local variables . 24 1.2.6 LOOP – iterate through variables . 26 1.2.7 SQL –executeSQLstatement ............................ 28 1.2.8 DB –setdatabasepath ................................ 39 1.2.9 USER, PASS – set SQL user and password . 40 1.2.10 WHILE –conditionalloop .............................. 41 1.2.11 READLN –readfilealineatatime.......................... 42 1.2.12 WRITE –writetofile................................. 45 1.2.13 EXEC –executeprogram............................... 47 1.2.14 CAPTURE –captureoutput.............................. 52 i ii CONTENTS 1.2.15 TIMPORT – general purpose data import . 54 1.2.16 BREAK –exitloop .................................. 56 1.2.17 CONTINUE –continueloop ............................. 57 1.2.18 RETURN – return from current function . 58 1.2.19 VERB –rawoutput.................................. 60 1.3 VortexDirectives ................................ ....... 62 1.3.1 TIMEOUT –settimeout ............................... 63 1.3.2 EXPORT – retain variables across invocations . 65 1.3.3 PUTMSG – set error message actions . 69 1.3.4 ENTRYFUNC, EXITFUNC – set entry/exit functions . 71 1.3.5 USES –useamodule................................. 73 1.3.6 SCHEDULE – schedule periodic execution of script . 75 1.3.7 COOKIES – control cookie import . 78 1.3.8 STACK –setstacklimit ............................... 79 1.3.9 TRACESQL –traceSQLcalls ............................ 80 1.3.10 SQLCACHE – control SQL handle caching . 82 1.3.11 TRAP –trapsignals.................................. 83 1.3.12 ADDTRAILINGSLASH – add trailing slash to “directory” URLs . 85 1.3.13 pragma – inline compiler directive . 86 1.4 SpecialVariables ................................ ....... 92 1.4.1 $cmd ......................................... 92 1.4.2 $cmdlnargs .................................... 92 1.4.3 $errnum, $errscript, $errline etc...................... 92 1.4.4 $indexcount ................................... 92 1.4.5 $rows.min, $rows.max ............................. 92 1.4.6 $sqlresult....vars................................ 93 1.4.7 $loop ........................................ 93 1.4.8 $next ........................................ 93 1.4.9 $null ........................................ 93 1.4.10 $pathroot ..................................... 94 CONTENTS iii 1.4.11 $ret ......................................... 94 1.4.12 $ret.count .................................... 94 1.4.13 $ret.seq ...................................... 94 1.4.14 $ret.off ...................................... 94 1.4.15 $ret.err, $ret.owner, $ret.group, $ret.size,etc. .......... 94 1.4.16 $ret.code, $ret.token, $ret.msg ..................... 95 1.4.17 $sourcepath ................................... 95 1.4.18 $url ......................................... 95 1.4.19 $urlfunc, $urlext ............................... 95 1.4.20 $urlq ........................................ 95 1.4.21 $urlroot ...................................... 96 1.4.22 $userpath ..................................... 96 1.4.23 $ FILE ...................................... 96 1.4.24 $ LINE ...................................... 96 1.4.25 $ SCRIPT ..................................... 96 1.4.26 $ FUNCTION ................................... 96 1.5 BuiltinFunctions ................................ ....... 97 1.5.1 sum – return sum of variable values . 98 1.5.2 fmt, strfmt – formatted output . 100 1.5.3 fmtcp – set fmt control parameters . 116 1.5.4 fmtinfo – get fmt control parameters . 120 1.5.5 mm – enable/disable automatic hit markup . 121 1.5.6 sb – enable/disable automatic search and replace . ....... 123 1.5.7 apicp – modify Metamorph query control parameters . 124 1.5.8 apiinfo – get current Metamorph query control parameters . 135 1.5.9 sqlcp – modify low-level SQL control parameters . 136 1.5.10 pagelinks – paginate SQL results . 143 1.5.11 flush –flushoutput ................................ 149 1.5.12 header –printHTTPheader ............................ 151 1.5.13 rex, split – regular expression search . 155 iv CONTENTS 1.5.14 sandr – regular expression search and replace . 162 1.5.15 strstr, strstri – find substring in string . 164 1.5.16 substr – extract substring from string . 166 1.5.17 strcmp, strcmpi – compare strings . 167 1.5.18 strncmp, strnicmp – compare strings, fixed length . 168 1.5.19 strlen –lengthofstring .............................. 169 1.5.20 strrev –reversestring............................... 170 1.5.21 upper – convert to upper case . 171 1.5.22 lower –converttolowercase. ..... ...... ...... ..... ..... 172 1.5.23 strfold –foldstringbycase ........................... 173 1.5.24 strfoldcmp – compare strings folded by case . 174 1.5.25 sort –sortvariables................................. 175 1.5.26 uniq, uniqcount – produce unique list of values . 178 1.5.27 count – return number of variable values . 180 1.5.28 strtonum – convert string to number . 181 1.5.29 rand – generate pseudo-random number . 183 1.5.30 randpick – return pseudo-random value of a variable . 184 1.5.31 srand – seed the pseudo-random number generator . 185 1.5.32 exit –exitprogram................................. 186 1.5.33 fetch –fetchURLs................................. 187 1.5.34 submit –submitHTMLform ........................... 191 1.5.35 urlinfo – get detailed page info . 194 1.5.36 urltext, urllinks – get formatted text, URL links . 206 1.5.37 urlcp – modify URL control parameters . 207 1.5.38 urlutil – URL/network utility . 248 1.5.39 nslookup – domain name and IP address lookup . 252 1.5.40 nsinfo – get info from last name lookup . 255 1.5.41 options – print options list . 257 1.5.42 radiobutton – print radio buttons list . 259 1.5.43 checkbox – print checkbox list . 261 CONTENTS v 1.5.44 doctype – print DOCTYPE declaration . 263 1.5.45 cal – print a calendar with links . 264 1.5.46 calrule – translate a calendar rule and iterate dates . 269 1.5.47 calendar – print calendar form . 271 1.5.48 caldate – create date list from calendar submission . 273 1.5.49 clist – create comma-separated list . 274 1.5.50 slist – create Metamorph set list . 275 1.5.51 wordlist, wordcount, wordoccurrencecounts – get words and frequen- ciesfromindex.................................... 276 1.5.52 createdb –createdatabase ............................ 278 1.5.53 adminsql – execute arbitrary SQL . 279 1.5.54 loguser –loguseraccesses ............................ 281 1.5.55 userstats – get user statistics . 282 1.5.56 resetstats – reset user statistics . 283 1.5.57 abstract – generate an abstract from text . 284 1.5.58 rmcommon – remove common prefix/suffix from text . 286 1.5.59 pwencrypt – encrypt/hash password Unix-style . 287 1.5.60 encrypt –encryptdata............................... 289 1.5.61 decrypt –decryptdata............................... 290 1.5.62 readvars – read URL-encoded variables . 291 1.5.63 varinfo – get miscellaneous variable information . 293 1.5.64 getvar – get variable values . 296 1.5.65 setvar –setanamedvariable ........................... 298 1.5.66 push – push values into a variable . 299 1.5.67 pop –popvalueoffavariable ............................ 301 1.5.68 slice – get sequence of values from a variable . 303 1.5.69 vxcp – set Vortex control parameters . 305 1.5.70 vxinfo – get miscellaneous Vortex information . 314 1.5.71 hash – produce a hash or checksum for data . 320 1.5.72 geo2code – latitude/longitude encoding for regional search . 325 1.5.73 code2geo – decode latitude/longitude encoding . 327 vi CONTENTS 1.5.74 pdfxml – convert Metamorph hit to PDF markup information . 328 1.5.75 xtree – maintain sorted list of values . 331 1.5.76 profiler – assist in searching query profiles . 336 1.5.77 read –readfiles................................... 338 1.5.78 send –printrawdata ................................ 339 1.5.79 spew –printfiles................................... 340 1.5.80 sleep –sleepforawhile .............................. 341 1.5.81 sysinfo – get system-specific information . 342 1.5.82 syscp – set system-specific information . 347 1.5.83 sysutil – file and system utilities . 349 1.5.84 stat – obtain file size and attributes . 353 1.5.85 watchpath – watch a file or directory for changes . 358 1.5.86 getpid –getprocessid............................... 362 1.5.87 procexists – see if process exists . 363 1.5.88 kill – terminate or send a signal to a process . 364 1.5.89 loadavg – return system load averages . 365 1.6 XMLAPI.......................................... 366 1.6.1 Overview ...................................... 366 1.6.2 CharacterEncodings . 366 1.6.3 Treevs.StreamingAPIs . 367 1.6.4 DataTypes ..................................... 369 1.6.5 Using the xmlTree ................................. 370 1.6.6
Recommended publications
  • Administering Unidata on UNIX Platforms
    C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\ADMINUNIX\ADMINUNIXTITLE.fm March 5, 2010 1:34 pm Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta UniData Administering UniData on UNIX Platforms UDT-720-ADMU-1 C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\ADMINUNIX\ADMINUNIXTITLE.fm March 5, 2010 1:34 pm Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Notices Edition Publication date: July, 2008 Book number: UDT-720-ADMU-1 Product version: UniData 7.2 Copyright © Rocket Software, Inc. 1988-2010. All Rights Reserved. Trademarks The following trademarks appear in this publication: Trademark Trademark Owner Rocket Software™ Rocket Software, Inc. Dynamic Connect® Rocket Software, Inc. RedBack® Rocket Software, Inc. SystemBuilder™ Rocket Software, Inc. UniData® Rocket Software, Inc. UniVerse™ Rocket Software, Inc. U2™ Rocket Software, Inc. U2.NET™ Rocket Software, Inc. U2 Web Development Environment™ Rocket Software, Inc. wIntegrate® Rocket Software, Inc. Microsoft® .NET Microsoft Corporation Microsoft® Office Excel®, Outlook®, Word Microsoft Corporation Windows® Microsoft Corporation Windows® 7 Microsoft Corporation Windows Vista® Microsoft Corporation Java™ and all Java-based trademarks and logos Sun Microsystems, Inc. UNIX® X/Open Company Limited ii SB/XA Getting Started The above trademarks are property of the specified companies in the United States, other countries, or both. All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names as designated by the companies who own or market them. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc., are furnished under license, and may be used and copied only in accordance with the terms of such license and with the inclusion of the copyright notice.
    [Show full text]
  • About:Config .Init About:Me About:Presentation Web 2.0 User
    about:config .init about:me about:presentation Web 2.0 User View Technical View Simple Overview Picture Complex Overview Picture Main Problems Statistics I Statistics II .next Targets Of Attack Targets Methods Kinds Of Session Hijacking SQL Injection Introduction Examples SQL Injection Picture Analysis SQL Escaping SQL Escaping #2 SQL Parameter Binding XSS Introduction What Can It Do? Main Problem Types Of XSS Components Involved In XSS Reflected XSS Picture Reflected XSS Analysis (Server Side) Stored XSS Picture Server Side Stored XSS (Local) DOM XSS Example Picture local DOM XSS CSRF Introduction Example Picture CSRF Session Riding Analysis Complex Example Hijack Via DNS + XSS Picture DNS+XSS Combo Cookie Policy Analysis Variant Components .next Misplaced Trust 3rd Party Script Picture Trust 3rd Party Script Analysis Misplaced Trust In Middleware Misplaced Trust In Server­Local Data Picture Local Scripts Analysis Same Origin Policy Frame Policy UI Redressing Introduction Clickjacking Picture Clickjacking Analysis BREAK .next Summary of Defense Strategies "Best Effort" vs. "Best Security" Protection against Hijacking Session Theft Riding, Fixation, Prediction Separate by Trust Validation Why Input Validation at Server Check Origin and Target of Request Validation of Form Fields Validation of File Upload Validation Before Forwarding Validation of Server Output Validation of Target in Client Validation of Origin in Client Validation of Input in Client Normalization What's That? Normalizing HTML Normalizing XHTML Normalizing Image, Audio,
    [Show full text]
  • Text Processing Tools
    Tools for processing text David Morgan Tools of interest here sort paste uniq join xxd comm tr fmt sed fold head file tail dd cut strings 1 sort sorts lines by default can delimit fields in lines ( -t ) can sort by field(s) as key(s) (-k ) can sort fields of numerals numerically ( -n ) Sort by fields as keys default sort sort on shell (7 th :-delimited) field UID as secondary (tie-breaker) field 2 Do it numerically versus How sort defines text ’s “fields ” by default ( a space character, ascii 32h = ٠ ) ٠bar an 8-character string ٠foo “By default, fields are separated by the empty string between a non-blank character and a blank character.” ٠bar separator is the empty string between non-blank “o” and the space ٠foo 1 2 ٠bar and the string has these 2 fields, by default ٠foo 3 How sort defines text ’s “fields ” by –t specification (not default) ( a space character, ascii 32h = ٠ ) ٠bar an 8-character string ٠foo “ `-t SEPARATOR' Use character SEPARATOR as the field separator... The field separator is not considered to be part of either the field preceding or the field following ” separators are the blanks themselves, and fields are ' "٠ " ٠bar with `sort -t ٠foo whatever they separate 12 3 ٠bar and the string has these 3 fields ٠foo data sort fields delimited by vertical bars field versus sort field ("1941:japan") ("1941") 4 sort efficiency bubble sort of n items, processing grows as n 2 shell sort as n 3/2 heapsort/mergesort/quicksort as n log n technique matters sort command highly evolved and optimized – better than you could do it yourself Big -O: " bogdown propensity" how much growth requires how much time 5 sort stability stable if input order of key-equal records preserved in output unstable if not sort is not stable GNU sort has –stable option sort stability 2 outputs, from same input (all keys identical) not stable stable 6 uniq operates on sorted input omits repeated lines counts them uniq 7 xxd make hexdump of file or input your friend testing intermediate pipeline data cf.
    [Show full text]
  • Linux Toolsettoolset (Part(Part A)A)
    [Software[Software Development]Development] LinuxLinux ToolSetToolSet (part(part A)A) Davide Balzarotti Eurecom – Sophia Antipolis, France 1 If Unix can Do It, You Shouldn't As a general rule: Don't implement your own code unless you have a solid reason why common tools won't solve the problem Modern Linux distributions are capable of performing a lot of tasks Most of the hard problems have already been solved (by very smart people) for you... … you just need to know where to look … and choose the right tool for your job 2 Different Tools for Different Jobs Locate the data Extract the data Filter the data Modify the data 3 Getting Help Any Linux distribution comes with thousands of files in /usr/bin Knowing each command is difficult Knowing each option of each command is practically impossible The most useful skill is to know where to look for help Google knows all the answers (if you know how to pose the right questions) help ± documentation for the shell builtin commands cmd --help ± most of the programs give you some help if you ask 4 The Manual Unix man pages were introduced in 1971 to have an online documentation of all the system commands The pages are organized in 8 sections: 1. general commands 5. file formats 2. system calls 6. games 3. C functions 7. misc 4. special files 8. admin commands CAL(1) BSD General Commands Manual CAL(1) NAME cal, ncal - displays a calendar and the date of easter SYNOPSIS cal [-3jmy] [[month] year] ncal [-jJpwy] [-s country_code] [[month] year] ncal [-Jeo] [year] DESCRIPTION The cal utility displays a simple calendar in traditional format and ncal offers an alternative layout, more options and the date of easter 5 Other forms of Help info ± access the Info pages Official documentation of the GNU project Simple hypertext apropos ± searches for keywords in the header lines of all the manpages balzarot:~> apropos calendar cal (1) - displays a calendar and the date of easter calendar (1) - reminder service gcal (1) - a program for calculating and printing calendars.
    [Show full text]
  • QLOAD Queue Load / Unload Utility for IBM MQ
    Queue Load / Unload Utility for IBM MQ User Guide Version 9.1.1 27th August 2020 Paul Clarke MQGem Software Limited [email protected] Queue Load / Unload Utility for IBM MQ Take Note! Before using this User's Guide and the product it supports, be sure to read the general information under "Notices” Twenty-fourth Edition, August 2020 This edition applies to Version 9.1.1 of Queue Load / Unload Utility for IBM MQ and to all subsequent releases and modifications until otherwise indicated in new editions. (c) Copyright MQGem Software Limited 2015, 2020. All rights reserved. ii Queue Load / Unload Utility for IBM MQ Notices The following paragraph does not apply in any country where such provisions are inconsistent with local law. MQGEM SOFTWARE LIMITED PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore this statement may not apply to you. The information contained in this document has not be submitted to any formal test and is distributed AS IS. The use of the information or the implementation of any of these techniques is a customer responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. While each item has been reviewed by MQGem Software for accuracy in a specific situation, there is no guarantee that the same or similar results will be obtained elsewhere.
    [Show full text]
  • Database Globalization Support Guide
    Oracle® Database Database Globalization Support Guide 19c E96349-05 May 2021 Oracle Database Database Globalization Support Guide, 19c E96349-05 Copyright © 2007, 2021, Oracle and/or its affiliates. Primary Author: Rajesh Bhatiya Contributors: Dan Chiba, Winson Chu, Claire Ho, Gary Hua, Simon Law, Geoff Lee, Peter Linsley, Qianrong Ma, Keni Matsuda, Meghna Mehta, Valarie Moore, Cathy Shea, Shige Takeda, Linus Tanaka, Makoto Tozawa, Barry Trute, Ying Wu, Peter Wallack, Chao Wang, Huaqing Wang, Sergiusz Wolicki, Simon Wong, Michael Yau, Jianping Yang, Qin Yu, Tim Yu, Weiran Zhang, Yan Zhu This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S.
    [Show full text]
  • BSCW Administrator Documentation Release 7.2.1
    BSCW Administrator Documentation Release 7.2.1 OrbiTeam Software Oct 10, 2019 CONTENTS 1 How to read this Manual1 2 Installation of the BSCW server3 2.1 General Requirements........................................3 2.2 Security considerations........................................4 2.3 EU - General Data Protection Regulation..............................4 2.4 Upgrading to BSCW 7.2.1......................................5 2.4.1 Upgrading on Unix..................................... 13 2.4.2 Upgrading on Windows................................... 17 3 Installation procedure for Unix 19 3.1 System requirements......................................... 19 3.2 Installation.............................................. 20 3.3 Software for BSCW Preview..................................... 25 3.4 Configuration............................................. 29 3.4.1 Apache HTTP Server Configuration............................ 29 3.4.2 BSCW instance configuration............................... 33 3.4.3 Administrator account................................... 35 3.4.4 De-Installation....................................... 35 3.5 Database Server Startup, Garbage Collection and Backup..................... 36 3.5.1 BSCW Startup....................................... 36 3.5.2 Garbage Collection..................................... 37 3.5.3 Backup........................................... 37 3.6 Folder Mail Delivery......................................... 38 3.6.1 BSCW mail delivery agent (MDA)............................. 38 3.6.2 Local Mail Transfer Agent
    [Show full text]
  • From Donor to Patient: Collection, Preparation and Cryopreservation of Fecal Samples for Fecal Microbiota Transplantation
    diseases Review From Donor to Patient: Collection, Preparation and Cryopreservation of Fecal Samples for Fecal Microbiota Transplantation Carole Nicco 1 , Armelle Paule 2, Peter Konturek 3 and Marvin Edeas 1,* 1 Cochin Institute, INSERM U1016, University Paris Descartes, Development, Reproduction and Cancer, Cochin Hospital, 75014 Paris, France; [email protected] 2 International Society of Microbiota, 75002 Paris, France; [email protected] 3 Teaching Hospital of the University of Jena, Thuringia-Clinic Saalfeld, 07318 Saalfeld, Germany; [email protected] * Correspondence: [email protected] Received: 6 March 2020; Accepted: 10 April 2020; Published: 15 April 2020 Abstract: Fecal Microbiota Transplantation (FMT) is suggested as an efficacious therapeutic strategy for restoring intestinal microbial balance, and thus for treating disease associated with alteration of gut microbiota. FMT consists of the administration of fresh or frozen fecal microorganisms from a healthy donor into the intestinal tract of diseased patients. At this time, in according to healthcare authorities, FMT is mainly used to treat recurrent Clostridium difficile. Despite the existence of a few existing stool banks worldwide and many studies of the FMT, there is no standard method for producing material for FMT, and there are a multitude of factors that can vary between the institutions. The main constraints for the therapeutic uses of FMT are safety concerns and acceptability. Technical and logistical issues arise when establishing such a non-standardized treatment into clinical practice with safety and proper governance. In this context, our manuscript describes a process of donor safety screening for FMT compiling clinical and biological examinations, questionnaires and interviews of donors.
    [Show full text]
  • Plain Text & Character Encoding
    Journal of eScience Librarianship Volume 10 Issue 3 Data Curation in Practice Article 12 2021-08-11 Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson Pennsylvania State University Let us know how access to this document benefits ou.y Follow this and additional works at: https://escholarship.umassmed.edu/jeslib Part of the Scholarly Communication Commons, and the Scholarly Publishing Commons Repository Citation Erickson S. Plain Text & Character Encoding: A Primer for Data Curators. Journal of eScience Librarianship 2021;10(3): e1211. https://doi.org/10.7191/jeslib.2021.1211. Retrieved from https://escholarship.umassmed.edu/jeslib/vol10/iss3/12 Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License. This material is brought to you by eScholarship@UMMS. It has been accepted for inclusion in Journal of eScience Librarianship by an authorized administrator of eScholarship@UMMS. For more information, please contact [email protected]. ISSN 2161-3974 JeSLIB 2021; 10(3): e1211 https://doi.org/10.7191/jeslib.2021.1211 Full-Length Paper Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson The Pennsylvania State University, University Park, PA, USA Abstract Plain text data consists of a sequence of encoded characters or “code points” from a given standard such as the Unicode Standard. Some of the most common file formats for digital data used in eScience (CSV, XML, and JSON, for example) are built atop plain text standards. Plain text representations of digital data are often preferred because plain text formats are relatively stable, and they facilitate reuse and interoperability.
    [Show full text]
  • A Type System for Format Strings E
    ifact t * r * Comple t te A A n * te W E is s * e C n l l o D C A o * * c T u e m S s E u e S e n I R t v A Type System for Format Strings e o d t y * s E a * a l d u e a t Konstantin Weitz Gene Kim Siwakorn Srisakaokul Michael D. Ernst University of Washington, USA {weitzkon,genelkim,ping128,mernst}@cs.uw.edu ABSTRACT // Untested code (Hadoop) Most programming languages support format strings, but their use Resource r = ... format("Insufficient memory %d", r); is error-prone. Using the wrong format string syntax, or passing the wrong number or type of arguments, leads to unintelligible text // Unchecked input (FindBugs) output, program crashes, or security vulnerabilities. String urlRewriteFormat = read(); This paper presents a type system that guarantees that calls to format(urlRewriteFormat, url); format string APIs will never fail. In Java, this means that the API will not throw exceptions. In C, this means that the API will not // User unaware log is a format routine (Daikon) log("Exception " + e); return negative values, corrupt memory, etc. We instantiated this type system for Java’s Formatter API, and // Invalid syntax for Formatter API (ping-gcal) evaluated it on 6 large and well-maintained open-source projects. format("Unable to reach {0}", server); Format string bugs are common in practice (our type system found Listing 1: Real-world code examples of common programmer 104 bugs), and the annotation burden on the user of our type system mistakes that lead to format routine call failures.
    [Show full text]
  • DICOM PS3.5 2021C
    PS3.5​ DICOM PS3.5 2021d - Data Structures and Encoding​ Page 2​ PS3.5: DICOM PS3.5 2021d - Data Structures and Encoding​ Copyright © 2021 NEMA​ A DICOM® publication​ - Standard -​ DICOM PS3.5 2021d - Data Structures and Encoding​ Page 3​ Table of Contents​ Notice and Disclaimer ........................................................................................................................................... 13​ Foreword ............................................................................................................................................................ 15​ 1. Scope and Field of Application ............................................................................................................................. 17​ 2. Normative References ....................................................................................................................................... 19​ 3. Definitions ....................................................................................................................................................... 23​ 4. Symbols and Abbreviations ................................................................................................................................. 27​ 5. Conventions ..................................................................................................................................................... 29​ 6. Value Encoding ...............................................................................................................................................
    [Show full text]
  • Some UNIX Commands At
    CTEC1863/2007F Operating Systems – UNIX Commands Some UNIX Commands at Syntax: at time [day] [file] Description: Provides ability to perform UNIX commands at some time in the future. At time time on day day, the commands in filefile will be executed. Comment: Often used to do time-consuming work during off-peak hours, or to remind yourself to do something during the day. Other at-related commands: atq - Dump the contents of the at event queue. atrm - Remove at jobs from the queue. Examples: # at 0300 calendar | mail john ^D # # cat > DOTHIS nroff -ms doc1 >> doc.fmt nroff -ms file2 >> doc.fmt spell doc.fmt > SPELLerrs ^D # at 0000 DOTHIS cal Syntax: cal [month] year Description: Prints a calendar for the specified year or month. The year starts from year 0 [the calendar switched to Julian in 1752], so you typically must include the century Comment: Typical syntax: cal 11 1997 cal 1998 /Users/mboldin/2007F/ctec1863/unixnotes/UNIX-07_Commands.odt Page 1 of 5 CTEC1863/2007F Operating Systems – UNIX Commands calendar Syntax: calendar [-] Description: You must set-up a file, typically in your home directory, called calendar. This is a database of events. Comment: Each event must have a date mentioned in it: Sept 10, 12/5, Aug 21 1998, ... Each event scheduled for the day or the next day will be listed on the screen. lpr Syntax: lpr [OPTIONS] [FILE] [FILE] ... Description: The files are queued to be output to the printer. Comment: On some UNIX systems, this command is called lp, with slightly different options. Both lpr and lp first make a copy of the file(s) to be printed in the spool directory.
    [Show full text]