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

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

E-mail: