Annotation of parser3/www/htdocs/index.html, revision 1.112

1.104     paf         1: @USE
1.105     paf         2: /derived.p
1.15      paf         3: 
1.72      paf         4: @auto[filespec]
                      5: $selffilespec[$filespec]
1.63      paf         6: #$form:here
1.84      paf         7: #$request:charset[UTF-8]
                      8: #$response:charset[windows-1251]
1.112   ! paf         9: #$request:charset[windows-1251]
        !            10: #$response:charset[UTF-8]
1.84      paf        11: #$response:content-type[$.value[text/html]$.charset[$response:charset]]
1.15      paf        12: 
1.60      paf        13: #@postprocess[body]
                     14: #<b>$body</b>
                     15: #$result[123]
1.37      paf        16: 
1.15      paf        17: @main[]
1.112   ! paf        18: $request:hren
1.72      paf        19: #$a(123)
                     20: #^a.format[%.10u]
1.71      paf        21: #$result[111]
1.70      paf        22: #^f[a]
1.97      paf        23: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
1.88      paf        24: #      ^int:sql{select news_id from news where news_id=-1}[
                     25: ##     $.default{2}
                     26: #      ]<br>
                     27: #    ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
1.109     paf        28: #      ^file::load[text;^string:sql{select 'from sql server' }]
1.95      paf        29: #      ^string:sql{select '^^hello[]' }] $ORIGINS(1)
1.96      paf        30: #      ^process{       ^^h[]}
1.97      paf        31: #      ^process{^string:sql{select '1
                     32: #      ^^hello[]' }]   }
                     33: #}
1.49      paf        34: #^eval(2)
1.48      paf        35: #^tcrashlocaljunctionsv2[]
1.49      paf        36: #^tcrashlocaljunctions[]
1.50      paf        37: #^tjunctions[]
1.47      paf        38: #^replacetest[]
1.48      paf        39: #^matchoptionpp[]
1.46      paf        40: #^txdocxnodechild[]
1.44      paf        41: #^tclasses[]
1.43      paf        42: #$math:PI
                     43: #^b:method[]
1.42      paf        44: #^main[]
1.41      paf        45: #^errort[]
1.44      paf        46: #^tselectNumber[]
1.39      paf        47: #$result[hello]
1.36      paf        48: #^invaliddate2[]
                     49: #^process2[]
                     50: #^casehashtext[]
1.35      paf        51: #^subjvaltest[]
                     52: #^tableselect0[]
1.34      paf        53: #^memnotest1[]
1.32      paf        54: #^voidparams[]
1.31      paf        55: #^rolls2[]
1.30      paf        56: #^cacheexpireschanging[]
1.29      paf        57: #^cacheexpiresfixed[]
                     58: #^dateoffsets[]
                     59: #^exceptionTypes[]
1.28      paf        60: #^roll2[]
1.27      paf        61: #^rolls[]
1.25      paf        62: #^exceptions1[]
1.22      paf        63: #^locate_by_expr[]
1.18      paf        64: #^method_junction_params{...}
1.17      paf        65: #^verifyCookie[paf]
1.37      paf        66: #^execlangs[]
1.16      paf        67: #$t[^tobjeresult[]]$t.a
                     68: #^xmlprobs[]
1.15      paf        69: #^doubleprobs[]
                     70: #^math:random(-10)
                     71: #^divnamestop[]
                     72: #^arrayclone[]
                     73: #^operator_tricks[]
                     74: #^xoutputrusattr[]
                     75: #^xdocset1[]
                     76: #^regexp3[]
                     77: #^exec2[]
                     78: #^tlock[]
                     79: #^xmloutattrwithoutvalue[]
                     80: #^precisionProblem[]
                     81: #^xpath[]
                     82: #^ttablesetlang[]
                     83: #^ttime[]
                     84: #^tupper[]
                     85: #^treplace[]
                     86: #^xslt2[]
                     87: #^tcache2[]
                     88: #$ORIGINS(1)
                     89: #$t[^table::set{a b} ^table::set{c d}]
                     90: #^ttaintuntaint[]
                     91: #^tappend2[]
                     92: #^badvsnprintf[]
                     93: #^badoracequoting[]
                     94: #^badconstructors[]
                     95: #^xloadwrongtable[]
                     96: #^xsetwrongtable[]
                     97: #^if($form:test){y}{n}
                     98: #^tablecolumnerror[]
                     99: #^roll[]
                    100: #^cookie2[]
                    101: #^tableset[]
                    102: #^math:PI.format{%.30f}
                    103: #^xchildren[]
                    104: #^thashforeach3[]
                    105: #^thashforeach2[]
                    106: #^thashforeach[]
                    107: #^thashdelete[]
                    108: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                    109: #^tappend[]
                    110: #^sappend[]
                    111: #^eval(10\3)<br>
                    112: #^tform[]
                    113: #^formattest[]
                    114: #^filelist[]
                    115: #^connect[mysql://user:pass@host]{ }
                    116: #^безнадёжна_попытка_поправить_непоправимое[]
                    117: #^tcache[]
                    118: #^thashfileexp[]
                    119: #^tcounter[]
                    120: #^tablehash[]
                    121: #j^hashfile[]
                    122: #^formclass[]
                    123: #^hren[]
                    124: #^domedit[]
                    125: #^domxslt[]
                    126: #^lsplit2[]
                    127: #^faceesize[]
                    128: #^imageresize[]
                    129: #^ifassignhash[]
                    130: #^tintdefault[]
                    131: #$response:status[404]
                    132: #^ifpasshash[]
                    133: #^movedir[]
                    134: #^replace[]
                    135: #^set[]
                    136: #^hash[]<hr>
                    137: #$t[^methresult[]] ->$t
                    138: #^terror[]
                    139: #^ssave[]
                    140: #^thash[]
                    141: #^tdef[]
                    142: #^ford[]
                    143: #^tif[]
1.84      paf       144: #^image[]
1.15      paf       145: #^mail2[]
                    146: #^cookie[]
                    147: #^response[]
                    148: #^regexp2[]
                    149: #^ttablerem[]
                    150: #^pcre[]
                    151: #^regexp[]<hr>
                    152: #^mail[]
                    153: #^exec[]
                    154: #^fori[]
                    155: #^tconnect[]
                    156: #^xslt[]
                    157: #^xml[]
                    158: #^header[]
1.53      paf       159: #^tablehasht[]
1.54      paf       160: #^datecreatestring[]
1.56      paf       161: #^mssqltypes1[]
                    162: #^badthrows[]
1.57      paf       163: #^xmlspace[]
                    164: #^counter[main.counter]
                    165: #^xpath2[]
                    166: #^callindirect[]
                    167: #^junctionprob[]
1.59      paf       168: #^datecreatestring2[]
                    169: #^tstoredproc[]
                    170: #^tstoredproc2[]
                    171: #^forkeys[]
1.60      paf       172: #^pngsize[]
1.61      paf       173: #^checkList[]
1.63      paf       174: #^datetest[]
1.65      paf       175: #^tserge[]
1.69      paf       176: #^envt[]
1.67      paf       177: #^selectt[]
                    178: #^select2[]
                    179: #^selectSingle2[]
                    180: #^selectString2[]
                    181: #^selectNumber2[]
                    182: #^selectBool2[]
                    183: #^xdoccreate[]
                    184: #^xdoccreatetag[]
1.70      paf       185: #^xdocload[]
1.67      paf       186: #^xdocstring[]
                    187: #^xdocsave[]
1.68      paf       188: #^div[]
                    189: #^datecreatestring3[]
1.73      paf       190: #^tfilespec[]
1.77      paf       191: #^tcrypt[]
1.74      paf       192: #^cryptdocsample[]
1.78      paf       193: #^tnormalize[]
1.83      paf       194: #^xmltransformbyxdoc[]
1.81      paf       195: #^sergestrandef[]
1.83      paf       196: #^tstdin[]
                    197: #^tfind[]
1.86      paf       198: #^mimet[]
1.88      paf       199: #^cgit[]
1.92      paf       200: #^joinlimit[]
1.89      paf       201: #^tableclonelimit[]
1.91      paf       202: #^transparams[]
                    203: #^sendtests[]
1.93      paf       204: #^wwrapperpass[]
1.95      paf       205: #^badpos[]
1.98      paf       206: #^processtest[]
                    207: #^mail3[]
1.99      paf       208: #^mail4[]
1.100     paf       209: #^datesaving[]
1.101     paf       210: #^badconstructor[]
1.103     paf       211: #^calendar[]
1.104     paf       212: #^monthdays(8)
                    213: #^xdoctypetest[]
1.105     paf       214: #^xtabletest[]
1.108     paf       215: ^staticstest[]
                    216: #^staticstest2[]
1.77      paf       217: <hr>
1.74      paf       218: OK
1.107     paf       219: 
                    220: @staticstest2[]
                    221: ^$derived:derived_var=$derived:derived_var<br>
                    222: ^$derived:a=$derived:a<br>
1.108     paf       223: $derived:a[changed] ^$derived:a=$derived:a<br>
1.107     paf       224: $derived:derived_var[changed] 
                    225: ^$derived:derived_var=$derived:derived_var<br>
                    226: 
1.105     paf       227: @staticstest[]
                    228: $derived[^derived::create[]]
                    229: ^derived.test[]
1.110     paf       230: <hr>
1.106     paf       231: ^$derived.a=$derived.a<br>
                    232: ^$derived.x=$derived.x<br>
1.110     paf       233: <hr>
                    234: ^if($derived is derived){derived is derived}{error: derived is not derived}<br>
                    235: ^if($derived is table){derived is table}{error:derived is not table}<br>
1.111     paf       236: <hr>
                    237: ^^eval(^$derived)=^eval($derived)<br>
                    238: ^^if(^$derived)=^if($derived){y}{n}<br>
1.106     paf       239: 
1.105     paf       240: 
1.104     paf       241: @xdoctypetest[]
                    242: $xdoc[^xdoc::create[x]]
                    243: ^if($xdoc is xdoc){y}{n}
                    244: 
                    245: @xtabletest[]
                    246: $xtableo[^xtable::create[]]
                    247: ^if($xtableo is table){y}{n}
1.105     paf       248: #^xtableo.columns[]
1.100     paf       249: 
1.103     paf       250: @monthdays[month]
                    251: $from[^date::create(2000;$month;1)]
                    252: $to[^date::create($from)] ^to.roll[month](+1)
                    253: $result($to-$from)
                    254: 
1.100     paf       255: @badconstructor[]
                    256: ^date::now[]
1.99      paf       257: 
                    258: @datesaving[]
                    259: $now[^date::now[]]
                    260: $now.daylightsaving<br>
                    261: $now.yearday<br>
                    262: #
                    263: $date[^date::create(2002;1;3)]
                    264: $date.daylightsaving<br>
                    265: $date.yearday
1.97      paf       266: 
1.98      paf       267: @mail4[]
                    268: ^mail:send[
                    269:        $.from[paf@mail.design.ru]
                    270:        $.to[paf@mail.design.ru]
                    271:        $.subject[^taint[uri][москва]=2]
                    272:        $.text[^taint[uri][москва]=]
                    273:        $.html{<a href=http://there.ru/?city=^taint[uri][Москва]>link</a>}
                    274: ]
1.97      paf       275: @processtest[]
                    276:     $f[^file::load[text;piece.p]]      ^process{$f.text}
                    277:        $ORIGINS(1)
1.93      paf       278: 
                    279: 
                    280: @badpos[]
                    281: $s[123]
1.94      paf       282: ^s.mid(0;2)
1.92      paf       283: 
                    284: @wwrapperpass[]
                    285: $h[^hash::create[]]
                    286: $h.a(1)
                    287: ^my_method[^if(1){$h}]
                    288: работает. так и должно быть?
                    289: 
                    290: @my_method[p]
                    291: ^p._count[]
                    292: 
1.88      paf       293: 
                    294: @tableclonelimit[]
                    295: $source[^table::create{a
                    296: aa
                    297: bb
                    298: cc}]
                    299: ^source.offset(1)
                    300: #$dest[^table::create[$source]]
                    301: $dest[^table::create[$source;$.offset(2)]]
                    302: $dest[^table::create[$source;$.limit(2)]]
                    303: $dest[^table::create[$source;$.offset(1)$.limit(1)]]
                    304: $dest[^table::create[$source;$.offset(1)$.limit(2)]]
                    305: $dest[^table::create[$source;$.offset[cur]$.limit(2)]]
                    306: 
                    307: ^dest.menu{$dest.a}[,]<br>
                    308: 
                    309: @joinlimit[]
                    310: $source[^table::create{a
                    311: aa
                    312: bb
                    313: cc}]
                    314: ^source.offset(2)
                    315: $dest[^table::create{a
                    316: xx
                    317: }]
                    318: #^dest.join[$source]
                    319: #^dest.join[$source;$.offset(2)]
                    320: #^dest.join[$source;$.limit(2)]
                    321: #^dest.join[$source;$.offset(1)$.limit(1)]
                    322: #^dest.join[$source;$.offset(1)$.limit(2)]
1.91      paf       323: #^dest.join[$source;$.offset[cur]$.limit(1)]
                    324: ^dest.join[$source;$.limit(0)]
1.88      paf       325: 
                    326: ^dest.menu{$dest.a}[,]<br>
1.86      paf       327: 
                    328: @cgit[]
                    329: $f[^file::cgi[showenv.cmd]]
                    330: $f.HELLO=<br>
                    331: $f.CONTENT-TYPE=<br>
                    332: $f.content-type=<br>
                    333: 
1.83      paf       334: 
1.84      paf       335: @mimet[]
1.85      paf       336: $f[^file::stat[a.GIF]]
                    337: $f.content-type
1.84      paf       338: 
                    339: 
1.83      paf       340: @tfind[]
                    341: ^file:find[index.html]
                    342: 
                    343: @tstdin[]
                    344: $f[^file::exec[test.pl;$.stdin[проверка stdin потока]]]
                    345: <pre>$f.text</pre>
1.80      paf       346: 
                    347: @sergestrandef[]
                    348: $sQuantity[ ]
                    349: ^sQuantity.int(10)
1.78      paf       350: 
                    351: @xmltransformbyxdoc[]
                    352: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    353: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    354: <people>
                    355:        <man id="1" имя="word слово">
                    356:                <name>1  2</name>
                    357:        </man>
                    358: </people>
                    359: }}]
                    360: $sheet[^xdoc::create{<?xml version="1.0"?> 
1.79      paf       361: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                    362: 
                    363: >
1.78      paf       364: <!--<xsl:output doctype-public ="-//W3C//DTD XHTML" indent="yes"/>-->
                    365: 
1.79      paf       366:        <!--<xsl:import href="http://localhost/html.xsl"/>-->
                    367:        <xsl:import href="html.xsl"/>
                    368: 
1.78      paf       369: <xsl:param name="param1">defparam1</xsl:param>
                    370: <xsl:param name="param2">defparam2</xsl:param>
1.79      paf       371: 
1.78      paf       372: 
                    373:        <xsl:template match="doc">
                    374:                param1=<xsl:value-of select="^$param1"/><br/>
                    375:                param2=<xsl:value-of select="^$param2"/><br/>
                    376: 
                    377:                test return <something background=""/>
                    378:        </xsl:template>
                    379: 
                    380:        <xsl:template name="test">
1.81      paf       381:                test return3
1.78      paf       382:        </xsl:template>
                    383: 
                    384:   <xsl:template match="people">
                    385:      <html>
                    386:      <head>z</head>
                    387:                para1=<xsl:copy-of select="^$param1"/>
                    388:        <xsl:apply-templates/>
                    389:        <hr/>
                    390:        <xsl:call-template name="test"/>
                    391:      </html>   
                    392:   </xsl:template>
                    393: 
                    394:   <xsl:template match="name">
                    395:     <b><xsl:value-of select="."/></b>
                    396:   </xsl:template>
                    397: </xsl:stylesheet>
                    398: }]
                    399: 
                    400: 
                    401: $xdoc[^xdoc.transform[$sheet]]
                    402: $string[^xdoc.string[$.method[html]]]
                    403: ^string.save[a]
                    404: ^untaint[html]{$string}
                    405: 
                    406: 
1.77      paf       407: 
                    408: @tnormalize[]
                    409: #s состоит из 1000 фрагментов
                    410: $s[^for[i](0;999){фрагмент }]
                    411: #это займет много ресурсов
                    412: ^s.match[фраг][g]{перга}
                    413: #это займет меньше ресурсов
                    414: #$normalized[^s.normalize[]]
                    415: #^normalized.match[фраг][g]{перга}
1.74      paf       416: 
                    417: @sendtests[]
1.89      paf       418: ^text[]
1.74      paf       419: #^html[]
                    420: #^text-n-html[]
                    421: #^file[]
                    422: #^text-n-file[]
1.89      paf       423: #^text-n-html-n-file[]
1.74      paf       424: #^backwardcomp[]
                    425: 
                    426: @backwardcomp[]
                    427: ^mail:send[
                    428:        $.from[paf]
                    429:        $.to[paf]
                    430:        $.body[this is text value]
                    431: ]
                    432: 
                    433: @text[]
                    434: ^mail:send[
                    435:        $.from[paf]
1.90      paf       436:        $.to[paf]
1.74      paf       437:        $.text[
                    438:                $.value[this is text value]
                    439:        ]
                    440: ]
                    441: 
                    442: @html[]
                    443: ^mail:send[
                    444:        $.from[paf]
                    445:        $.to[paf]
                    446:        $.html{this is <b>html</b> value ^taint[<] 10}
                    447: ]
                    448: 
                    449: @text-n-html[]
                    450: ^mail:send[
                    451:        $.from[paf]
                    452:        $.to[paf]
                    453:        $.text[
                    454:                $.value[this is text value]
                    455:        ]
                    456:        $.html[
                    457:        $.value{this is <b>html</b> value ^taint[<] 10}
                    458:        ]
                    459: ]
                    460: 
                    461: @file[]
                    462: ^mail:send[
                    463:        $.from[paf]
                    464:        $.to[paf]
                    465:        $.file[^file::load[binary;image.jpg]]
                    466: ]
                    467: 
                    468: @text-n-file[]
                    469: ^mail:send[
                    470:        $.from[paf]
                    471:        $.to[paf]
                    472:        $.text[
                    473:                $.value[this is text value]
                    474:        ]
                    475:        $.file[^file::load[binary;image.jpg]]
                    476: ]
                    477: 
                    478: @text-n-html-n-file[]
                    479: ^mail:send[
                    480:        $.from[paf]
                    481:        $.to[paf]
                    482:        $.text[
                    483:                $.value[this is text value]
                    484:        ]
                    485:        $.html[
                    486:        $.COntent-type[$.value[text/html]$.charset[windows-1251xx]]
                    487:        $.value{this is <b>html</b> value ^taint[<] 10}
                    488:        ]
                    489:        $.file[^file::load[binary;image.jpg]]
                    490: ]
                    491: 
                    492: 
                    493: 
                    494: @md5salt[]
                    495: 1234
                    496: 
                    497: @cryptdocsample[]
                    498: $users[^table::create{name     password
                    499: alice  ***
                    500: bob    ***
                    501: }]
                    502: 
                    503: $htpasswd[^table::create[nameless]{}]
                    504: ^users.menu{
                    505:        ^htpasswd.append{$users.name:^math:crypt[$users.password;^$apr1^$^md5salt[]]}
                    506: }
                    507: 
                    508: ^htpasswd.save[nameless;.htpasswd-parser-test]
                    509: 
1.73      paf       510: 
                    511: @tcrypt[]
1.76      paf       512: #^math:crypt[123;^$apr1^$1234567890abcdef]<br>
                    513: ^math:crypt[123;^$apr1^$]<br>
1.72      paf       514: 
                    515: @tfilespec[]
                    516: src=$selffilespec<br>
                    517: dirname=^file:dirname[$selffilespec]<br>
                    518: basename=^file:basename[$selffilespec]<br>
                    519: justname=^file:justname[$selffilespec]<br>
                    520: justext=^file:justext[$selffilespec]<br>
1.68      paf       521: 
                    522: @datecreatestring3[]
                    523: $new_after[^date::now(-3)]
                    524: $articles[^table::create{id    title   last_update
                    525: 1      привет  2002-07-03}]
                    526: ^articles.menu{
                    527:     $last_update[^date::create[$articles.last_update]]
                    528:     <a href=${articles.id}.html>$articles.title</a>
                    529:     ^if($last_update > $new_after){новая}
                    530:     <br>
                    531: }
1.67      paf       532: 
                    533: @div[]
                    534: $var(5)
                    535: ^var.inc(7)
                    536: ^var.dec(3)
                    537: ^var.div(4)
                    538: ^var.mul(2)
                    539: $var
                    540: 
                    541: 
                    542: @xdocsave[]
                    543: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    544: <document>
                    545: строка1<br/>
                    546: строка2<br/>
                    547: </document>}]
                    548: ^document.save[test.xml]
                    549: 
                    550: @xdocstring[]
                    551: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    552: <document>
                    553: строка1<br/>
                    554: строка2<br/>
                    555: </document>}]
                    556: ^document.string[
                    557:     $.method[html]
                    558: ]
                    559: 
                    560: 
                    561: @xdocload[]
                    562: $document[^xdoc::load[article.xml]]
                    563: $response:body[^document.file[$.media-type[text/xml]]]
                    564: 
                    565: 
                    566: @xdoccreatetag[]
                    567: $document[^xdoc::create[document]]
                    568: $paraNode[^document.createElement[para]]
                    569: $dummy[^document.documentElement.appendChild[$paraNode]]
                    570: $response:body[^document.file[$.media-type[text/xml]]]
                    571: 
                    572: 
                    573: @xdoccreate[]
                    574: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    575: <document>
                    576: текст
                    577: </document>}]
                    578: $response:body[^document.file[$.media-type[text/xml]]]
                    579: 
                    580: @selectBool2[]
                    581: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    582: <t attr="привет" n="123"/>}]
                    583: ^if(^d.selectBool[/t/@n > 10]){
                    584:     /t/@n больше 10
                    585: }{
                    586:     не больше
                    587: }
                    588: 
                    589: 
                    590: @selectNumber2[]
                    591: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    592: <t attr="привет" n="123"/>}]
                    593: ^d.selectNumber[number(/t/@n)+1]<br>
                    594: ^d.selectNumber[2*2]<br>
                    595: 
                    596: 
                    597: @selectString2[]
                    598: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    599: <t attr="привет" n="123"/>}]
                    600: # результат=привет
                    601: ^d.selectString[string(t/@attr)]
                    602: 
                    603: 
                    604: @selectSingle2[]
                    605: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    606: <t attr="привет" n="123"/>}]
                    607: # результат=один элемент "t"
                    608: $element[^d.selectSingle[t]]
                    609: # результат=2 (количество атрибутов <t>)
                    610: Количество атрибутов: ^element.attributes._count[]<br>
                    611: # результат=не существует (нет <x>)
                    612: ^if(^d.select[x]){
                    613:     x существует
                    614: }{
                    615:     x не существует
                    616: }
                    617: 
                    618: @select2[]
                    619: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                    620: # результат: список из одного элемента "t"
                    621: $list[^d.select[t]]
                    622: # результат: 2 = количество атрибутов <t>
                    623: ^list.0.attributes._count[]<br>
                    624: ^for[i](0;$list-1){
                    625:     $attr[$list.$i]
                    626:     $attr.nodeName = $attr.nodeType<br>
                    627: }
                    628: 
                    629: 
                    630: @selectt[]
                    631: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                    632: $list[^d.select[t]]
                    633: ^list.0.attributes._count[]
1.65      paf       634: 
                    635: @envt[]
1.66      paf       636: $f[^file::exec[showenv.cmd;
                    637:        $.bad[value]
                    638:        $.CGI_good[value]
                    639: ]]
1.65      paf       640: $f.status<br>
                    641: $f.stderr<br>
                    642: <pre>$f.text</pre>
                    643: 
1.63      paf       644: 
                    645: @tserge[]
1.64      paf       646: ^if(" 09 "){y}
1.61      paf       647: 
                    648: @datetest[]
                    649:        $f[^file::stat[some.zip]]
                    650: Размер в байтах: $f.size<br>
                    651: Год создания: $f.cdate.year<br>
                    652: $now[^date::now[]]
                    653: $DAYS_CONSIDERED_NEW(3)
                    654: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
                    655: 
1.60      paf       656: 
                    657: @checkList[]
                    658: ...^oneOf[a;a,b,c]...<br>
                    659: #...^oneOf[a;ax,b,c]...<br>
                    660: ...^oneWord[word]...<br>
                    661: #...^oneWord[wo rd]...<br>
                    662: 
                    663: 
                    664: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
                    665: $t[^list.lsplit[,]]
                    666: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
                    667: $result[$s]
                    668: 
                    669: @oneWord[s]
                    670: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59      paf       671: 
                    672: @pngsize[]
                    673: $i[^image::measure[test.png]]
                    674: ^i.html[]
                    675: 
                    676: 
                    677: @forkeys[]
                    678: $text[^form:fields.foreach[key;val]{$key=$val
                    679: }]
                    680: ^text.save[ttt.txt]
                    681: =$text=
                    682: 
                    683: 
                    684: @tstoredproc2[]
                    685: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                    686:        ^void:sql{exec pafvoid}
                    687: }
                    688: 
                    689: @tstoredproc[]
                    690: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                    691:        $t[^table::sql{exec pafproc}]
                    692: #      $t[^table::sql{{call pafproc}}]
                    693:        $c[^t.columns[]]
                    694:        ^c.menu{$c.column}[<br>]
                    695: }
1.57      paf       696: 
                    697: @datecreatestring2[]
1.58      paf       698: <table border=1>
                    699: ^datecreatestring2show[2000]
                    700: ^datecreatestring2show[2000-02]
1.59      paf       701: ^datecreatestring2show[2000-2-03]
1.58      paf       702: ^datecreatestring2show[2000-02-03 15]
                    703: ^datecreatestring2show[2000-02-03 15:30] 
                    704: ^datecreatestring2show[2000-02-03 15:30:04] 
                    705: ^datecreatestring2show[2000-02-03 15:30:04 hren] 
                    706: ^datecreatestring2show[15:30] 
                    707: ^datecreatestring2show[15:30:05] 
                    708: ^datecreatestring2show[15:30:05 hren] 
                    709: </table>
                    710: 
                    711: @datecreatestring2show[s]
                    712: $date[^date::create[$s]]
                    713: <tr>
                    714: <td>$s</td><td align=right>^date.sql-string[]</td>
                    715: </tr>
                    716: 
1.57      paf       717: 
                    718: @junctionprob[][l]
                    719: $l[123]
                    720: $a{$l}
                    721: ^junctionprobnested[$a]
                    722: @junctionprobnested[p]
                    723: $p
                    724: 
                    725: 
                    726: @callindirecttarget[]
                    727: callindirecttarget called
                    728: @callindirect[]
                    729: $f[$callindirecttarget]
                    730: ^f[]
                    731: 
                    732: @xpath2[]
                    733: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
                    734: <doc>
                    735: <field-list>
                    736: <field name="aa"/>
                    737: <field name="bb"/>
                    738: </field-list>
                    739: </doc>
                    740: }]
                    741: 
                    742: #^xdoc.string[]
                    743: 
                    744: $fieldList[^xdoc.selectSingle[/doc/field-list]]
                    745: #^fieldList.childNodes._count[]
                    746: $fields[^fieldList.select[field]]
                    747: #^fields._count[]
                    748: ^fields.foreach[k;node]{
                    749:        $node.nodeName<br>
                    750: }
                    751: @counter[filespec][f;s]
                    752: ^file:lock[$filespec]{
                    753:        $f[^file::load[text;$filespec]]
                    754:        $s[^eval($f.text+1)]
                    755:        ^s.save[$filespec]      
                    756: }
                    757: $s
1.56      paf       758: 
                    759: @xmlspace[]
                    760: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    761: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    762: <people>
                    763:        <man id="1" имя="word слово">
                    764:                <name>1  2</name>
                    765:        </man>
                    766: </people>
                    767: }}]
                    768: $xdoc[^xdoc.transform[global.xsl]]
                    769: $string[^xdoc.string[$.method[html]]]
                    770: ^string.save[a]
                    771: ^untaint[html]{$string}
                    772: 
                    773: @badthrows[]
                    774: #^throw[a;b;]
                    775: ^throw[a;]
1.54      paf       776: 
                    777: @mssqltypes1[]
                    778: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55      paf       779: #    ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
                    780: #    ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
                    781: #      ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
                    782:        $t[^table::sql{select a from paf}]
                    783:        ^t.count[]
1.54      paf       784: }
1.51      paf       785: 
1.53      paf       786: @datecreatestring[]
1.54      paf       787: $d[^date::create[2002-04-33 01:03:04]]
1.53      paf       788: ^d.sql-string[]
1.52      paf       789: 
                    790: @method[hash]
                    791: $hash.key
                    792: @mainZ[]
                    793: ^method[
                    794:     $.key{code}
                    795: ]
                    796: 
1.51      paf       797: @tablehasht[]
                    798: $t[^table::create{p
                    799: 1
                    800: 3
                    801: 2
                    802: 4}]
                    803: 
                    804: $h[^t.hash[p]]
                    805: 
                    806: =^h._count[]=
                    807: 
                    808: 
                    809: @sqldefaults[]
                    810: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                    811:        ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
                    812:     ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
                    813: }
1.60      paf       814: =======
                    815: <hr>
                    816: OK
                    817: >>>>>>> 1.50
1.48      paf       818: 
                    819: @tcrashlocaljunctionsv2[]
                    820: $a[
                    821:        $b{  $c[1] }
                    822: ]
                    823: $b
                    824: $c
                    825: 
                    826: @tcrashlocaljunctions[]
                    827: $var[aaa]
                    828: ^if(1){
                    829: ^tcrashlocaljunctions1[]
                    830: }
                    831: 
                    832: $j
                    833: 
1.49      paf       834: @tcrashlocaljunctions1[][var]
                    835: $var[varvalue]
1.48      paf       836:        $j{
                    837:                $var
                    838:        }
1.49      paf       839: $j
1.48      paf       840: 
                    841: @tjunctions[][tl]
                    842: $t[^t::create[]]
                    843: ^tjunctionsi[]
                    844: 
                    845: @tjunctionsi[][tl]
                    846: $tl[12345]
                    847: ^t.tjunctionsm[
                    848:        $.key{
                    849:                $tl
                    850:        }
                    851: ]
1.46      paf       852: 
1.47      paf       853: @replacetest[]
                    854: $b[b]
                    855: $s[
                    856: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    857: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    858: ]
                    859: ^s.replace[^table::create{from to
                    860: ba     !_}]
                    861: 
                    862: 
1.46      paf       863: @matchoptionpp[]
1.47      paf       864: #$ORIGINS(1)
1.46      paf       865: $s[
                    866: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47      paf       867: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    868: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    869: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    870: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    871: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    872: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    873: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    874: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    875: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46      paf       876: ]
                    877: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
                    878: 
1.44      paf       879: 
                    880: @txdocxnodechild[]
                    881: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
                    882: $xdoc.nodeName
                    883: ^xdoc.selectNumber[2*2]
1.45      paf       884: $xdoc:ELEMENT_NODE
1.44      paf       885: 
                    886: 
                    887: @tclasses[]
                    888: $t[^t::create[]]
                    889: ^t.method[]
                    890: <hr>
                    891: ^t.base_method[]
                    892: 
1.40      paf       893: 
                    894: @errort[]
1.42      paf       895: ^xdoc::create[a]
1.40      paf       896: #^throw[user;here;this]
                    897: 
                    898: @tselectNumber[]
                    899: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                    900: ^d.selectString[string(d/@attr)]<br>
                    901: ^d.selectNumber[2*2]<br>
                    902: ^d.selectNumber[number(/d/@n)+1]<br>
                    903: 
1.34      paf       904: 
1.36      paf       905: @invaliddate2[]
                    906: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                    907: 
                    908: @process2[]
                    909: ^^process{
                    910:        ^process{
                    911:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                    912:        }
                    913: }
                    914: 
1.35      paf       915: @casehashtext[]
                    916: $tt[1]
                    917: $tmp[
                    918:         ^switch[$tt]{
                    919:                 ^case[1]{
                    920:                         $.aaa[123]
                    921:                 }
                    922:                 ^case[DEFAULT]{
                    923:                         $.bbb[456]
                    924:                 }
                    925:         }
1.36      paf       926:         shit!
1.35      paf       927: ]
1.36      paf       928: #$tmp
1.35      paf       929: $tmp.aaa
                    930: 
                    931: @subjvaltest[]
                    932: $a12[val]
                    933: $b[12]
                    934: $a$b
                    935: 
1.34      paf       936: @tableselect0[]
                    937: $person[^table::create{name    height
                    938: paf    1.77
                    939: шохин  2.07
                    940: moko   1.77
                    941: }]
                    942: $nottoohigh[^person.select($person.height<2)]
                    943: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf       944: 
                    945: @transparams[]
                    946: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                    947: $odoc[^idoc.transform[global.xsl;
                    948:        $.param1['1']
                    949:        $.param2['2']
                    950: ]]
                    951: <pre>^taint[^odoc.string[$.method[html]]]
                    952: 
                    953: @memnotest1[]
                    954: ^for[i](0;4000){
                    955: 
                    956:  $xxxx[$i]
                    957:  $xxxx
                    958: 
                    959: }
                    960: 
                    961: @memnotest1notes[]
                    962: одна итерация цикла:
                    963: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf       964: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf       965: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    966: [Mon Apr  8 20:12:02 2002]  "|| "
                    967: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                    968: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    969: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf       970: [Mon Apr  8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32      paf       971: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                    972: [Mon Apr  8 20:12:02 2002] 17:VALUE
                    973: [Mon Apr  8 20:12:02 2002]  "i" string
                    974: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf       975: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                    976: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf       977: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                    978: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    979: [Mon Apr  8 20:12:02 2002]  "| "
                    980: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                    981: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    982: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                    983: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                    984: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                    985: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf       986: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf       987: [Mon Apr  8 20:12:02 2002] <-ja returned
                    988: [Mon Apr  8 20:12:02 2002] ja->
                    989: 
                    990: 201/328=0.612804878049 %%optimized
                    991: 
                    992: 1.
                    993: CREATE_*POOL
                    994:     сделать
                    995: *POOL_POOLED+CODE
                    996:     где
                    997:         wwrapper
                    998:         и(возможно) wcodeframe
                    999:         +string
                   1000:         стековая переменная
                   1001: 
                   1002: 2.
                   1003: избавиться от обёртки при возврате результата process [см. тело _for]
                   1004: 
                   1005: 3.
                   1006: сделать callback для process, чтобы вынести invariants из _for & co.
                   1007: 
                   1008: 4.
                   1009:  @todo склеить get_element и write_value (при вставлении? write_value)
                   1010: 
                   1011: 5.
                   1012: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                   1013: обёртка сразу выбрасывается = не нужна]
                   1014: 
                   1015: 6.
                   1016: process вариант получить именно string, без VString обёртки [часто обёртка
                   1017: сразу выбрасывается = не нужна]
                   1018: 
                   1019: 7.
                   1020: string head, убить 8 байт неправильной link
1.31      paf      1021: 
                   1022: @voidparams[]
                   1023: ^voidparamsm[$form:field]
                   1024: 
                   1025: @voidparamsm[p]
                   1026: ^p.int(123)
1.29      paf      1027: 
1.30      paf      1028: @rolls2[]
                   1029: $now[^date::now[]]
                   1030: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                   1031: ^for[i](1;12){
                   1032:        ^d.roll[month](-1) ^d.sql-string[]<br>
                   1033: }
                   1034: 
1.29      paf      1035: @cacheexpireschanging[]
                   1036: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                   1037:     ^cache[^date::now(+4/24/60/60)]
                   1038: #    ^cache(2)
1.30      paf      1039: #    ^cache(0)
1.29      paf      1040:        ^math:random(100)
                   1041: }
                   1042: 
                   1043: 
                   1044: 
                   1045: @cacheexpiresfixed[]
                   1046: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                   1047:        ^math:random(100)
                   1048: }
                   1049: 
                   1050: @dateoffsets[]
                   1051: $d[^date::create(^date::now[]+1/24/60)]
                   1052: #$d[^date::now(+1/24/60)]
                   1053: ^d.sql-string[]
                   1054: #$d
1.26      paf      1055: 
1.28      paf      1056: @exceptionTypes[]
                   1057: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                   1058: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                   1059: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                   1060: #    number.format        ^eval(abc*5)
                   1061: #    file.missing         ^file:delete[delme]                       not found
                   1062: #    file.access          ^table::load[.]                       no rights
                   1063: #    image.format         ^image::measure[index.html]                        not gif/jpg
                   1064: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                   1065: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                   1066: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                   1067: #    smtp.connect                                not found/timeout
                   1068: #    smtp.execute                                communication error
                   1069: 
1.26      paf      1070: @roll2[]
                   1071: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf      1072: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf      1073: 
1.25      paf      1074: 
                   1075: @rolls[]
                   1076: $d[^date::create(2002;4;4)]
                   1077: ^d.sql-string[]<br>
                   1078: ^for[i](1;7){
                   1079: ^d.roll[day](-1)
                   1080: ^d.sql-string[]<br>
                   1081: }
                   1082: <hr>
                   1083: $d[^date::create(2002;3;28)]
                   1084: ^d.sql-string[]<br>
                   1085: ^for[i](1;7){
                   1086: ^d.roll[day](+1)
                   1087: ^d.sql-string[]<br>
                   1088: }
                   1089: <hr>
                   1090: $d[^date::create(2002;12;3)]
                   1091: ^d.sql-string[]<br>
                   1092: ^for[i](1;14){
                   1093: ^d.roll[day](-1)
                   1094: ^d.sql-string[]<br>
                   1095: }
                   1096: <hr>
                   1097: $d[^date::create(2002;10;19)]
                   1098: ^d.sql-string[]<br>
                   1099: ^for[i](1;14){
                   1100: ^d.roll[day](+1)
                   1101: ^d.sql-string[]<br>
                   1102: }
                   1103: 
                   1104: 
                   1105: 
                   1106: 
                   1107: 
1.22      paf      1108: 
                   1109: @exceptions1[]
                   1110: ^try{
                   1111:        aaa
1.24      paf      1112:        ^throw[custom1;paf;is stupid]
1.22      paf      1113: }{
1.24      paf      1114:        ^if($exception.type eq custom1){
1.28      paf      1115: #              $exception.handled(1)
                   1116:        ^throw[$exception]
1.24      paf      1117:                type=$exception.type<br>
                   1118:            source=$exception.source<br>
                   1119:            file=$exception.file<br>
                   1120:            lineno=$exception.lineno<br>
                   1121:        comment=$exception.comment<br>
                   1122:        }
1.22      paf      1123: }
1.21      paf      1124: 
                   1125: @locate_by_expr[]
                   1126: $t[^table::create{a    b
                   1127: 1      nok
                   1128: 2      ok
                   1129: 3      nok
                   1130: }]
                   1131: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf      1132: 
                   1133: @method_junction_params[param]
                   1134: ^if($param is junction){junction}{ne junction}
                   1135: 
                   1136: @verifyCookie[value] 
                   1137: ^if($cookie:dummyvote eq $value){ 
                   1138:        $result(1) 
                   1139: }{ 
                   1140:        $cookie:dummyvote[$value] 
                   1141:        $result(0) 
                   1142: }
1.16      paf      1143: 
                   1144: @execlangs[]
1.20      paf      1145: $f[^file::exec[test.pl]]
1.36      paf      1146: err:$f.stderr<br>
1.16      paf      1147: ^process{$f.text}
                   1148: #$c[^t.columns[]]
                   1149: #^c.menu{
                   1150: #* $c.column<br>
                   1151: #}
1.36      paf      1152: c:$t.c<br>
1.16      paf      1153: 
                   1154: @tobjeresult[]
                   1155: ^table::create{a
                   1156: 12}
1.15      paf      1157: 
                   1158: @xmlprobs[]
                   1159: $xmlDataType[^xdoc::load[program.xml]]
                   1160: #<pre>^taint[^xmlDataType.string[]]
                   1161: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                   1162: #=^xmlDataTypes._count[]=
                   1163: =^xmlDataTypes.0.getAttribute[type-id]=
                   1164: 
                   1165: @doubleprobs[]
                   1166: $1(^math:radians(180))
                   1167: $2($math:PI)
                   1168: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                   1169: ^if($1==$2){y;n}
                   1170: ^if(^math:radians(180)==$math:PI){y;n}
                   1171: 
                   1172: 
                   1173: @divnamestop[]
                   1174: $a(10)
                   1175: ^eval($a\3)
                   1176: 
                   1177: @arrayclone[]
                   1178: $t[^table::create{a    b
                   1179: 1      11
                   1180: 2      22
                   1181: }]
                   1182: $c[^table::create[$t]]
                   1183: ^c.append{2    33}
                   1184: ^t.count[]
                   1185: ^c.count[]
                   1186: 
                   1187: @operator_tricks[]
                   1188: ^if(1){$a[^t[]]}
                   1189: $a!
                   1190: $a($b)
                   1191: ^if(1){y}{n}
                   1192: $MAIN:a(^t[] eq OK)
                   1193: #$MAIN:a(1)
                   1194: ^if($a){y}{n}
                   1195: #^if(1){y}{n}
                   1196: $form:if
                   1197: $a[$.n[1]]
                   1198: $a.if
                   1199: 
                   1200: @xoutputrusattr[]
                   1201: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                   1202: ^show_xdoc2[$d]
                   1203: 
                   1204: @xdocset1[]
                   1205: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                   1206: ^show_xdoc2[$d]
                   1207: 
                   1208: @regexp3[]
                   1209: $s[abcАБВ]
                   1210: ^if(^s.match[][i]){y}{n}
                   1211: 
                   1212: 
                   1213: @exec2[]
                   1214: $a[^file::exec[bin/t.cmd]]
                   1215: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                   1216: 
                   1217: 
                   1218: @tlock[]
                   1219: ^file:lock[lockfile]{
                   1220:        code
                   1221: }
                   1222: 
                   1223: @xmloutattrwithoutvalue[]
                   1224: #$ORIGINS(1)
                   1225: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                   1226: $doc[^doc.transform[global.xsl]]
                   1227: =^taint[html][^doc.string[$.method[html]]]=
                   1228: 
                   1229: 
                   1230: 
                   1231: @precisionProblem[]
                   1232: $a[123456789012345678901234567890]
                   1233: $b(^a.double[])
                   1234: ^b.format{%.20E}
                   1235: <hr>
                   1236: ^eval(2*2)
                   1237: 
                   1238: @xpath[]
                   1239: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1240: <document><block><p>привет</p></block></document>
                   1241: }]
                   1242: #^show_xdoc2[$xdoc]
                   1243: $node[^xdoc.selectSingle[/document/block/p]]
                   1244: ^if(def $node){
                   1245:        ^if($node is string){
                   1246:                $node
                   1247:        }{
                   1248:        ^if($node is hash){
                   1249:                ^node._count[]
                   1250:        }{
                   1251:                $node.nodeType
                   1252:        }
                   1253:        }
                   1254: #$node.firstChild.nodeValue
                   1255: }{
                   1256:        node not found
                   1257: }
                   1258: 
                   1259: 
                   1260: @ttablesetlang[]
                   1261: $a-tab-b[a     b
                   1262: 1      2]
                   1263: 
                   1264: $t[^table::set{$a-tab-b}]
                   1265: =$t.a=
                   1266: <hr>
                   1267: 
                   1268: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                   1269: =$t.0=
                   1270: <hr>
                   1271: 
                   1272: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                   1273: =$t.a=
                   1274: 
                   1275: #^t.append{1   2}
                   1276: 
                   1277: @mail3[]
                   1278: ^mail:send[
1.98      paf      1279:        $.from[Александр Петросян <paf@mail.design.ru>]
                   1280:        $.to[Александр Петросян <paf@mail.design.ru>]
                   1281:        $.subject[проверка2]
1.15      paf      1282:        $.body[
                   1283:                $.text[
                   1284:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
1.98      paf      1285:                        $.body[проверка^taint[uri][москва]=]
1.15      paf      1286:                ]
                   1287:                $.attachment[
                   1288:                        $.value[^file::load[text;index.html]]
                   1289:                        $.file-name[привет всем.html]                   
                   1290:                ]
                   1291:        ]
                   1292: ]
                   1293: 
                   1294: 
                   1295: @ttime[]
                   1296: $now[^date::now[]]
                   1297: $now.hour:$now.minute
                   1298: 
                   1299: @tupper[]
                   1300: $t[abcABCабвАБВ]
                   1301: $t<br>
                   1302: ^t.upper[]
                   1303: 
                   1304: @treplace[]
                   1305: $copy-paste-clean[^table::set{a b
                   1306: .      _
                   1307: ,      _
                   1308: +      _
                   1309: &      _
                   1310: ?      _
                   1311: =      _}]
                   1312: 
                   1313: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                   1314: # почему-то этот replace роняет апач в 500 ошибку :(
                   1315: #^cache_key.replace[$copy-paste-clean]
                   1316: $test[abc]
                   1317: ^test.save[$cache_key]saved<br>
                   1318: $cache[^file:list[.;\.cache^$]]
                   1319: ^file:delete[$cache_key]deleted($cache.name)<br>
                   1320: 
                   1321: 
                   1322: 
                   1323: @xslt2[]
                   1324: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1325: <document><block><p>привет</p></block></document>
                   1326: }]
                   1327: ^show_xdoc2[$xdoc]
                   1328: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                   1329: <hr>
                   1330: 
                   1331: 
                   1332: @tcache2[]
                   1333: ^cache[$DB_HOME/keyключ](2){
                   1334:        ^math:random(100)
                   1335: }
                   1336: 
                   1337: @ttaintuntaint[]
                   1338: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                   1339: 
                   1340: ]zz
                   1341: <hr>
                   1342: ^untaint[html]{1^taint[  ]2  3}
                   1343: 
                   1344: 
                   1345: @tappend2[]
                   1346: $t[^table::set{a       b}]^t.append{1  2}$t.a
                   1347: 
                   1348: @badvsnprintf[]
                   1349: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                   1350: }
                   1351: 
                   1352: 
                   1353: @badoracequoting[]
                   1354: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                   1355: ^connect[$SQL.connect-string]{
                   1356: ^void:sql{delete from paf}
                   1357: ^void:sql{insert into paf values (1, '$form:text')}
                   1358: $paf[^table::sql{select * from paf}]
                   1359: ^paf.menu{
                   1360:        $paf.id: ^untaint{$paf.block}<hr>
                   1361: 
                   1362: }
                   1363: <hr>
                   1364: 
                   1365: 
                   1366: ^rem{
                   1367: $news[^table::sql{select description from news}[$.limit(3)]]
                   1368: ^news.menu{
                   1369:        ^untaint{$news.description}<hr>
                   1370: 
                   1371: }
                   1372: <hr>
                   1373: }
                   1374: 
                   1375: $tables[^table::sql{select table_name from user_tables}]
                   1376: ^tables.menu{
                   1377: $tables.table_name<br>
                   1378: }
                   1379: 
                   1380: }
                   1381: <hr>
                   1382: $env:PATH
                   1383: 
                   1384: @badconstructors[]
                   1385: $bred[^string::length[]]
                   1386: $bred[^response::clear[]]
                   1387: $bred[^int::int[]]
                   1388: 
                   1389: 
                   1390: @xloadwrongtable[]
                   1391: $constr[^xdoc::load[wrongtable.xml]]
                   1392: ^show_xdoc2[$constr]
                   1393: 
                   1394: @xsetwrongtable[]
                   1395: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                   1396: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1397: 
                   1398: 
                   1399: @tablecolumnerror[]
                   1400: $t[^table::set{a}]
                   1401: $t.$a
                   1402: 
                   1403: @roll[]
                   1404: #$date[^date::set(1970;1;2)]
                   1405: #^date.roll[month](-1)
                   1406: $date[^date::set(2038;1;1)]
                   1407: ^date.roll[month](+1)
                   1408: $date.year  $date.month  $date.day
                   1409: 
                   1410: @cookie2[]
                   1411: #=$cookie:clientType[$.value[test]]=<br>
                   1412: =$cookie:clientType=<br>
                   1413: 
                   1414: 
                   1415: @tableset[]
                   1416: $a[^table::set{a
                   1417: 1
                   1418: 2}]
                   1419: ^eval(100\$a)
                   1420: 
                   1421: 
                   1422: 
                   1423: @zzz[]
                   1424: 
                   1425: 
                   1426: $constructor[
                   1427: <block1 name="main_srvr" type="0" label="Основное тело" />
                   1428: <block2 name="main_srvr2" type="0" label="Основное тело" />
                   1429: ]
                   1430: 
                   1431: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1432: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1433: 
                   1434: $children[$constr.documentElement.childNodes]
                   1435: ^if($children){
                   1436: ^for[i](1;^children._count[]){
                   1437:        $node[$children.$i]
                   1438:        $node.nodeName<br>
                   1439: }
                   1440: }
                   1441:    
                   1442: 
                   1443: @thashforeach3[]
                   1444: $h[
                   1445:        $.a[1] 
                   1446:        $.b[2]
                   1447: ]
                   1448: $c[^table::set{a
                   1449: ^h.foreach[key;value]{$value
                   1450: }}]
                   1451: $c.a
                   1452: 
                   1453: @thashforeach2[]
                   1454: $h[
                   1455:        $.a[1] 
                   1456:        $.b[2]
                   1457: ]
                   1458: $c[
                   1459: ^h.foreach[key;value]{
                   1460:        $.$key[$value]
                   1461: }
                   1462: ]
                   1463: $c.b
                   1464: 
                   1465: @thashforeach[]
                   1466: $h[
                   1467:        $.a[1] 
                   1468:        $.b[2]
                   1469: ]
                   1470: ^h.foreach[key;value]{
                   1471:        $key=$value<br>
                   1472: }
                   1473: 
                   1474: @thashdelete[]
                   1475: $h[$.a[1] $.b[2]]
                   1476: was:<br>
                   1477: count=^h._count[] <br>
                   1478: b='$h.b' <br>
                   1479: 
                   1480: ^h.delete[b] 
                   1481: 
                   1482: now:<br>
                   1483: count=^h._count[] <br>
                   1484: b='$h.b' 
                   1485: 
                   1486: @sappend[]
                   1487: $test[123]
                   1488: ^test.save[test]
                   1489: ^test.save[append;test]
                   1490: 
                   1491: @tappend[]
                   1492: $test[^table::set{a    b
                   1493: a1     b1}]
                   1494: ^test.save[test]
                   1495: $test[^table::set{a    b
                   1496: a2     b2}]
                   1497: ^test.save[append;test]
                   1498: 
                   1499: 
                   1500: @tform[]
                   1501: ^if(def $form:new_file){y}{n}
                   1502: <form method="post" enctype="multipart/form-data">
                   1503: <input type="file" name="new_file" />
                   1504: <input type=submit>
                   1505: </input>
                   1506: 
                   1507: @formattest[]
                   1508: $size(15.124)
                   1509: 
                   1510: ^size.format{%.2f}
                   1511: 
                   1512: @filelist[]
                   1513: $html[^file:list[.;\.html^$]]
                   1514: ^html.menu{
                   1515:        $html.name<br>
                   1516: }
                   1517: <hr>
                   1518: 
                   1519: @безнадёжна_попытка_поправить_непоправимое[]
                   1520: $dom_from_disk[^xdoc::load[input.xml]]
                   1521: $dom_created_in_air[^xdoc::create[doc]]
                   1522: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                   1523: ^show_xdoc2[$dom_created_in_air]
                   1524: 
                   1525: 
                   1526: @tcache[]
                   1527: #^hashfile:clear[cache]
                   1528: $code[^hashfile::open[$DB_HOME;cache]]
                   1529: ^code.cache[key](2){
                   1530:        ^math:random(100)
                   1531: #      ^code.delete[]
                   1532: }
                   1533: 
                   1534: @thashfileexp[]
                   1535: $hf[^hashfile::open[$DB_HOME;hashfile]]
                   1536: $hf.paf[$.value[крут] $.expires(3)]
                   1537: paf=$hf.paf
                   1538: <hr>
                   1539: ^hf.foreach[key;value]{
                   1540:        $key=$value<br>
                   1541: }
                   1542: <hr>
                   1543: $hash[^hf.hash[]]
                   1544: =$hash.paf=
                   1545: <hr>
                   1546: 
                   1547: @tcounter[]
                   1548: ^tcounterone[$DB_HOME]
                   1549: other root:
                   1550: ^tcounterone[${DB_HOME}2]
                   1551: again, first:
                   1552: ^tcounterone[$DB_HOME]
                   1553: 
                   1554: @tcounterone[DB_HOME]
                   1555: $counter[^hashfile::open[$DB_HOME;counter]]
                   1556: #^counter.clear[]
                   1557: ^counter.transaction{
                   1558: #      $counter.value(10)
                   1559:        $counter.value($counter.value+1)
                   1560: #      ^counter.delete[value]
                   1561:        $counter.value
                   1562: }
                   1563: <hr>
                   1564: ^rem{
                   1565: $hash[^counter.hash[]]
                   1566: =$hash.value=
                   1567: <hr>
                   1568: }
                   1569: 
                   1570: @tablehash[]
                   1571: $productList[^table::set{id    name
                   1572: 1      носки
                   1573: 2      валенки
                   1574: 3      ушанка
                   1575: }]
                   1576: 
                   1577: #скажем, у первого дилера
                   1578: $firstPriceList[^table::set{id price
                   1579: 1      0.3
                   1580: 3      1000
                   1581: }]
                   1582: 
                   1583: $firstPriceHash[^firstPriceList.hash[id]]
                   1584: 
                   1585: ^productList.menu{
                   1586:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                   1587: }
                   1588: 
                   1589: 
                   1590: @hashfile[]
                   1591: $hf[^hashfile::assign[hashfile]]
                   1592: #$hf.paf[крут5]
                   1593: paf=$hf.paf
                   1594: 
                   1595: @formclass[]
                   1596: ^$form:CLASS.a=$form:CLASS.a
                   1597: 
                   1598: @domdata[]
                   1599: ^if(1){
                   1600: #      $a{^hren[]}
                   1601: }
                   1602: $a
                   1603: $xdoc[^xdoc::create[doc]]
                   1604: $doc[$xdoc.documentElement]
                   1605: $name[^doc.appendChild[^xdoc.createElement[name]]]
                   1606: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                   1607: ^untaint[as-is]{=$text.nodeValue=}
                   1608: 
                   1609: @domedit[]
                   1610: ^domdata[]
                   1611: #$paf.nodeName<br>
                   1612: #$doc.documentElement.nodeName<br>
                   1613: 
                   1614: ^show_xnode1[$xdoc.documentElement;0;1]
                   1615: <hr>
                   1616: ^show_xdoc2[$xdoc]
                   1617: <hr>
                   1618: 
                   1619: @domxslt[]
                   1620: ^domdata[]
                   1621: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                   1622: <hr>
                   1623: 
                   1624: @lsplit2[]
                   1625: $path[/optics/]
                   1626: $pathTable[^path.lsplit[/]]
                   1627: ^pathTable.menu{
                   1628:        ^if(def $pathTable.piece){
                   1629:                =$pathTable.piece=
                   1630:        }
                   1631: }
                   1632: 
                   1633: 
                   1634: @faceesize[]
                   1635: $k(2)
                   1636: $pict[^image::load[paf.gif]]
                   1637: $small[^image::create($pict.width/$k;$pict.height/$k)]
                   1638: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                   1639: $response:body[^small.gif[]]
                   1640: 
                   1641: @imageresize[]
                   1642: $k(2)
                   1643: $pict[^image::create(400*$k;200*$k)]
                   1644: $pict.line-width(2)
                   1645: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   1646: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                   1647: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   1648: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                   1649: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                   1650: $response:body[^pict.gif[]]
                   1651: 
                   1652: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                   1653: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                   1654: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                   1655: 
                   1656: #$response:body[^small.gif[]]
                   1657: 
                   1658: 
                   1659: @tintdefault[]
                   1660: #$abc[abc]
                   1661: $abc[33]
                   1662: ^abc.int[z]
                   1663: #^abc.int(123)
                   1664: 
                   1665: @ifassignhash[]
                   1666: $h[^if(1){$.a(1);$.a(2)}]
                   1667: $h.a
                   1668: 
                   1669: @ifpasshash[]
                   1670: $a[$.e[a]]
                   1671: $b[$.e[b]]
                   1672: ^ifpasshashdest[^if(1){$a;$b}]
                   1673: #$x[^if(1){$a}{$b}]
                   1674: #^ifpasshashdest[$x]
                   1675: 
                   1676: @ifpasshashdest[p]
                   1677: $p.e
                   1678: 
                   1679: @movedir[]
                   1680: ^file:move[a;deeper/a]
                   1681: 
                   1682: @replace[]
                   1683: $a[12^;3]
                   1684: ^a.replace[^table::set{from    to
                   1685: 2^;    !
                   1686: }]
                   1687: 
                   1688: 
                   1689: @set[]
                   1690: ^setdata[]
                   1691: ^a.add[$b]
                   1692: add:$a.3<br>
                   1693: 
                   1694: ^setdata[]
                   1695: ^a.sub[$b]
                   1696: sub2:$a.2<br>
                   1697: sub1:$a.1<br>
                   1698: 
                   1699: ^setdata[]
                   1700: $c[^a.union[$b]]
                   1701: union3:$c.3<br>
                   1702: union2:$c.2<br>
                   1703: 
                   1704: ^setdata[]
                   1705: $c[^a.intersection[$b]]
                   1706: intersection3:$c.3<br>
                   1707: intersection2:$c.2<br>
                   1708: 
                   1709: ^setdata[]
                   1710: intersects:^if(^a.intersects[$b]){y;n}<br>
                   1711: intersects2:^if(^a.intersects[ ]){y;n}<br>
                   1712: 
                   1713: 
                   1714: <hr>
                   1715: 
                   1716: @setdata[]
                   1717: $a[$.1[a1] $.2[a2]]
                   1718: $b[        $.2[b2] $.3[b3]]
                   1719: 
                   1720: 
                   1721: @hash[]
                   1722: $h[^hash::create[$._default[123]]]
                   1723: $h.paf[not kretin]
                   1724: $h.paf<br>
                   1725: =$h.that=<br>
                   1726: 
                   1727: @methresult[]
                   1728: $result[^table::set{1}]
                   1729: 
                   1730: @terror[]
                   1731: ^error[method z must be called with z]
                   1732: 
                   1733: @syntax1[]
                   1734: #^a[^b]
                   1735: 
                   1736: @syntax2[]
                   1737: #^a[
                   1738: 
                   1739: @ssave[]
                   1740: $abc[abc]
                   1741: ^abc.save[abc]
                   1742: 
                   1743: @calendar[]
1.103     paf      1744: $year(2002)
                   1745: $month(12)
1.84      paf      1746: ${year}-${month}:<br>
                   1747: $week_days[^date:calendar[rus]($year;$month)]
1.15      paf      1748: <pre>
1.101     paf      1749: ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }=$week_days.week,$week_days.year=<br>}
1.15      paf      1750: </pre>
                   1751: 
                   1752: @thash[]
                   1753: $table[^table::set{id  name    age
                   1754: 1      paf     278
                   1755: 2      пиф     234
                   1756: }]
                   1757: $hash[^table.hash[id;^table::set[nameless]{id
                   1758: name}]]
                   1759: $hash.2.id $hash.2.name $hash.2.age
                   1760: 
                   1761: @tdef[]
                   1762: $s[0]
                   1763: if 0=^if($s){}{n}<br>
                   1764: if def 0=^if(def $s){y}{}<br>
                   1765: <hr>
                   1766: 
                   1767: @ford[]
                   1768: ^for[i](0;5){$i}{($i)}
                   1769: 
                   1770: @tif[]
                   1771: ^if[def]{y;n}
                   1772: 
                   1773: @image[]
                   1774: $pict[^image::create(400;200)]
                   1775: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   1776: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   1777: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   1778: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   1779: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   1780: $response:body[^pict.gif[]]
                   1781: 
                   1782: 
                   1783: 
                   1784: @mail2[]
                   1785: ^mail:send[
                   1786:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   1787:        $.from[Александр Петросян <paf@design.ru>]
                   1788:        $.to[Александр Петросян <paf@design.ru>]
                   1789:        $.subject[проверка]
                   1790:        $.body[проверка]
                   1791: ]
                   1792: 
                   1793: @cookie[]
                   1794: $env:HTTP_COOKIE<br>
                   1795: 
                   1796: #$cookie:переменная[test тест ТЕСТ2]
                   1797: =$cookie:переменная=<br>
                   1798: #$cookie:переменная2[test тест ТЕСТ3]
                   1799: =$cookie:переменная2=<br>
                   1800: =$cookie:CLASS.переменная2=<br>
                   1801: 
                   1802: @response[]
                   1803: #^if($form:reload){
                   1804:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   1805: #}
                   1806: 
                   1807: @xslt[]
                   1808: ^xdata[]
                   1809: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   1810: ^show_xdoc2[$transformed]
                   1811: 
                   1812: @regexp2[]
                   1813: $s[  select]
                   1814: $s[^s.match[^^\s*][]{!}]
                   1815: $s
                   1816: 
                   1817: @header[]
                   1818: $response:refresh[
                   1819:        $.value[0]
                   1820:        $.url[http://design.ru?a=^taint[123]]
                   1821: ]
                   1822: 
                   1823: @ttablerem[]
                   1824: $table[^table::load[a.cfg]]
                   1825: ^table.menu{$table.a}
                   1826: 
                   1827: @tconnect[]
                   1828: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   1829: $tables[^table::sql{show tables}]
                   1830: #$cols[^tables.columns[]]
                   1831: #$cols.column
                   1832: ^tables.menu{
                   1833:        $tables.[Tables_in_test]<br>
                   1834: }
                   1835: }
                   1836: 
                   1837: @pcre[]
                   1838: $s[1 2]
                   1839: ^s.match[\s;ig]{!}
                   1840: #^s.match[\d;ig]{!}
                   1841: 
                   1842: 
                   1843: @regexp[]
                   1844: $s[abcАБВ]
                   1845: ^if(^s.match[б][i]){y}{n}
                   1846: 
                   1847: @mail[]
                   1848: #$ORIGINS(1)
                   1849: ^mail:send[
                   1850:        $.from[paf@design.ru]
                   1851:        $.to[paf@design.ru]
                   1852:        $.body[1
                   1853:        
                   1854:        2
                   1855:        
                   1856:        
                   1857:                3]
                   1858: ]
                   1859: 
                   1860: @exec[]
                   1861: $a[^file::exec[fc.exe;;a;b]]
                   1862: $a.status|$a.stderr<hr>
                   1863: 
                   1864: @fori[][i]
                   1865: ^for[i](1;3){... =$i= ...}
                   1866: 
                   1867: @xdata0[]
                   1868: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1869: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1870: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1871: <people>
                   1872:        <man id="1" имя="word слово">
                   1873:                <name>P&#171^;AF        B</name>
                   1874:        </man>
                   1875:                <man id="2">
                   1876:                        <name>ПИФ^taint[&]</name>
                   1877:                </man>
                   1878: </people>
                   1879: }]
                   1880: 
                   1881: @xdata[]
                   1882: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1883: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1884: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1885: <people>
                   1886:        <man id="1" имя="word слово">
                   1887:                <name>P&#171^;AF        B</name>
                   1888:        </man>
                   1889:                <man id="2">
                   1890:             <name>ПИФ^taint[&]</name>
                   1891:                </man>
                   1892: </people>
                   1893: }}]
                   1894: 
                   1895: @xml[]
                   1896: ^xdata[]
                   1897: 
                   1898: ^show_xdoc2[$xdoc]<hr>
                   1899: #^show_xnode1[$xdoc]<hr>
                   1900: $people[^xdoc.select[*/man]]
                   1901: #^show1[]
                   1902: ^show_xnodes1[$people]<hr>
                   1903: #^people.0.owner.hren[]
                   1904: 
                   1905: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   1906: 
                   1907: by id:
                   1908: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   1909: <hr>
                   1910: 
                   1911: @show1[array]
                   1912: ^for[i](0;^array._count[]-1){
                   1913:     $x[$array.$i]
                   1914:        $x.firstChild.nodeValue: 
                   1915:                $pattributes[$x.parentNode.attributes]
                   1916:                ^if(^pattributes._count[]){
                   1917:                        $pattributes.id.name=$pattributes.id.nodeValue
                   1918:                }
                   1919:        <br>
                   1920: }
                   1921:        
                   1922: @show_xnodes1[array][i]
                   1923: ^for[i](0;^array._count[]-1){
                   1924:        ^show_xnode1[$array.$i;0;1]
                   1925: }
                   1926: 
                   1927: @show_xnode1[x;level;single][l]
                   1928: ^if(def $x){
                   1929:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   1930:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1931:        &lt^;$x.nodeName
                   1932:            $pairs[$x.attributes]
                   1933:            ^if(def $pairs){
                   1934:                $names[^pairs._keys[]]
                   1935:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   1936:            }
                   1937:            &gt^;
                   1938:     }{
                   1939:        [$x.nodeType]
                   1940:     }
                   1941:     
                   1942:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   1943:     ^show_xnode1[$x.firstChild]($level+1)
                   1944:     ^if(!$single){
                   1945:            ^show_xnode1[$x.nextSibling]($level)
                   1946:     }
                   1947: 
                   1948:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1949:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   1950:     }
                   1951: }
                   1952: 
                   1953: @show_xdoc2[xdoc]
                   1954: ^xdoc.save[out/save.xml;
                   1955: #      $.encoding[utf-8]
                   1956:        $.method[xml]
                   1957: ]
                   1958: $file[^xdoc.file[
                   1959:        $.encoding[utf-8]
                   1960:        $.method[html]
                   1961: ]]
                   1962: ^file.save[text;out/save_file.html]
                   1963: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   1964: <pre>^taint[html][^xdoc.string[
                   1965:        $.method[html]
                   1966: #      $.encoding[utF-8]
                   1967: #      $.omit-xml-declaration[yes]
                   1968: #      $.standalone[no]
                   1969: #      -$.doctype-public[-//W3C//DTD XHTML]
                   1970: #      -$.doctype-system[/a/b/c/]
                   1971: #      $.indent[yes]
                   1972: #      $.media-type[text/paf]
                   1973: ]]
                   1974: </pre>

E-mail: