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

1.15      paf         1: #@USE
                      2: #z/t.p
                      3: 
                      4: @autoz[]
                      5: $request:charset[windows-1251]
                      6: $response:charset[windows-1251]
                      7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
                      8: 
                      9: @main[]
1.26    ! paf        10: #^roll2[]
1.25      paf        11: ^rolls[]
                     12: #^exceptions1[]
1.22      paf        13: #^locate_by_expr[]
1.18      paf        14: #^method_junction_params{...}
1.17      paf        15: #^verifyCookie[paf]
1.21      paf        16: #^execlangs[]
1.16      paf        17: #$t[^tobjeresult[]]$t.a
                     18: #^xmlprobs[]
1.15      paf        19: #^doubleprobs[]
                     20: #^math:random(-10)
                     21: #^divnamestop[]
                     22: #^arrayclone[]
                     23: #^operator_tricks[]
                     24: #^xoutputrusattr[]
                     25: #^xdocset1[]
                     26: #^regexp3[]
                     27: #^exec2[]
                     28: #^tlock[]
                     29: #^xmloutattrwithoutvalue[]
                     30: #^precisionProblem[]
                     31: #^xpath[]
                     32: #^ttablesetlang[]
                     33: #^mail3[]
                     34: #^ttime[]
                     35: #^tupper[]
                     36: #^treplace[]
                     37: #^xslt2[]
                     38: #^tcache2[]
                     39: #$ORIGINS(1)
                     40: #$t[^table::set{a b} ^table::set{c d}]
                     41: #^ttaintuntaint[]
                     42: #^tappend2[]
                     43: #^badvsnprintf[]
                     44: #^badoracequoting[]
                     45: #^badconstructors[]
                     46: #^xloadwrongtable[]
                     47: #^xsetwrongtable[]
                     48: #^if($form:test){y}{n}
                     49: #^tablecolumnerror[]
                     50: #^roll[]
                     51: #^cookie2[]
                     52: #^tableset[]
                     53: #^math:PI.format{%.30f}
                     54: #^xchildren[]
                     55: #^thashforeach3[]
                     56: #^thashforeach2[]
                     57: #^thashforeach[]
                     58: #^thashdelete[]
                     59: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                     60: #^tappend[]
                     61: #^sappend[]
                     62: #^eval(10\3)<br>
                     63: #^tform[]
                     64: #^formattest[]
                     65: #^filelist[]
                     66: #^connect[mysql://user:pass@host]{ }
                     67: #^безнадёжна_попытка_поправить_непоправимое[]
                     68: #^tcache[]
                     69: #^thashfileexp[]
                     70: #^tcounter[]
                     71: #^tablehash[]
                     72: #j^hashfile[]
                     73: #^formclass[]
                     74: #^hren[]
                     75: #^domedit[]
                     76: #^domxslt[]
                     77: #^lsplit2[]
                     78: #^faceesize[]
                     79: #^imageresize[]
                     80: #^ifassignhash[]
                     81: #^tintdefault[]
                     82: #$response:status[404]
                     83: #^ifpasshash[]
                     84: #^movedir[]
                     85: #^replace[]
                     86: #^set[]
                     87: #^hash[]<hr>
                     88: #$t[^methresult[]] ->$t
                     89: #^terror[]
                     90: #^ssave[]
                     91: #^calendar[]
                     92: #^thash[]
                     93: #^tdef[]
                     94: #^ford[]
                     95: #^tif[]
                     96: #^image[]
                     97: #^mail2[]
                     98: #^cookie[]
                     99: #^response[]
                    100: #^regexp2[]
                    101: #^ttablerem[]
                    102: #^pcre[]
                    103: #^regexp[]<hr>
                    104: #^mail[]
                    105: #^exec[]
                    106: #^fori[]
                    107: #^tconnect[]
                    108: #^xslt[]
                    109: #^xml[]
                    110: #^header[]
                    111: <hr>
                    112: OK
1.26    ! paf       113: 
        !           114: @roll2[]
        !           115: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
        !           116: ^d.roll[day](-2) ^d.sql-string[]<br>
        !           117: 
1.25      paf       118: 
                    119: @rolls[]
                    120: $d[^date::create(2002;4;4)]
                    121: ^d.sql-string[]<br>
                    122: ^for[i](1;7){
                    123: ^d.roll[day](-1)
                    124: ^d.sql-string[]<br>
                    125: }
                    126: <hr>
                    127: $d[^date::create(2002;3;28)]
                    128: ^d.sql-string[]<br>
                    129: ^for[i](1;7){
                    130: ^d.roll[day](+1)
                    131: ^d.sql-string[]<br>
                    132: }
                    133: <hr>
                    134: $d[^date::create(2002;12;3)]
                    135: ^d.sql-string[]<br>
                    136: ^for[i](1;14){
                    137: ^d.roll[day](-1)
                    138: ^d.sql-string[]<br>
                    139: }
                    140: <hr>
                    141: $d[^date::create(2002;10;19)]
                    142: ^d.sql-string[]<br>
                    143: ^for[i](1;14){
                    144: ^d.roll[day](+1)
                    145: ^d.sql-string[]<br>
                    146: }
                    147: 
                    148: 
                    149: 
                    150: 
                    151: 
1.22      paf       152: 
                    153: @exceptions1[]
                    154: ^try{
                    155:        aaa
1.24      paf       156:        ^throw[custom1;paf;is stupid]
1.22      paf       157: }{
1.24      paf       158:        ^if($exception.type eq custom1){
                    159:                $exception.handled(1)
                    160: #      ^throw[$exception]
                    161:                type=$exception.type<br>
                    162:            source=$exception.source<br>
                    163:            file=$exception.file<br>
                    164:            lineno=$exception.lineno<br>
                    165:        comment=$exception.comment<br>
                    166:        }
1.22      paf       167: }
1.21      paf       168: 
                    169: @locate_by_expr[]
                    170: $t[^table::create{a    b
                    171: 1      nok
                    172: 2      ok
                    173: 3      nok
                    174: }]
                    175: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf       176: 
                    177: @method_junction_params[param]
                    178: ^if($param is junction){junction}{ne junction}
                    179: 
                    180: @verifyCookie[value] 
                    181: ^if($cookie:dummyvote eq $value){ 
                    182:        $result(1) 
                    183: }{ 
                    184:        $cookie:dummyvote[$value] 
                    185:        $result(0) 
                    186: }
1.16      paf       187: 
                    188: @execlangs[]
1.20      paf       189: $f[^file::exec[test.pl]]
1.16      paf       190: ^process{$f.text}
                    191: #$c[^t.columns[]]
                    192: #^c.menu{
                    193: #* $c.column<br>
                    194: #}
                    195: =$t.c=
                    196: 
                    197: @tobjeresult[]
                    198: ^table::create{a
                    199: 12}
1.15      paf       200: 
                    201: @xmlprobs[]
                    202: $xmlDataType[^xdoc::load[program.xml]]
                    203: #<pre>^taint[^xmlDataType.string[]]
                    204: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                    205: #=^xmlDataTypes._count[]=
                    206: =^xmlDataTypes.0.getAttribute[type-id]=
                    207: 
                    208: @doubleprobs[]
                    209: $1(^math:radians(180))
                    210: $2($math:PI)
                    211: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                    212: ^if($1==$2){y;n}
                    213: ^if(^math:radians(180)==$math:PI){y;n}
                    214: 
                    215: 
                    216: @divnamestop[]
                    217: $a(10)
                    218: ^eval($a\3)
                    219: 
                    220: @arrayclone[]
                    221: $t[^table::create{a    b
                    222: 1      11
                    223: 2      22
                    224: }]
                    225: $c[^table::create[$t]]
                    226: ^c.append{2    33}
                    227: ^t.count[]
                    228: ^c.count[]
                    229: 
                    230: @operator_tricks[]
                    231: ^if(1){$a[^t[]]}
                    232: $a!
                    233: $a($b)
                    234: ^if(1){y}{n}
                    235: $MAIN:a(^t[] eq OK)
                    236: #$MAIN:a(1)
                    237: ^if($a){y}{n}
                    238: #^if(1){y}{n}
                    239: $form:if
                    240: $a[$.n[1]]
                    241: $a.if
                    242: 
                    243: @xoutputrusattr[]
                    244: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                    245: ^show_xdoc2[$d]
                    246: 
                    247: @xdocset1[]
                    248: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                    249: ^show_xdoc2[$d]
                    250: 
                    251: @regexp3[]
                    252: $s[abcАБВ]
                    253: ^if(^s.match[][i]){y}{n}
                    254: 
                    255: 
                    256: @exec2[]
                    257: $a[^file::exec[bin/t.cmd]]
                    258: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                    259: 
                    260: 
                    261: @tlock[]
                    262: ^file:lock[lockfile]{
                    263:        code
                    264: }
                    265: 
                    266: @xmloutattrwithoutvalue[]
                    267: #$ORIGINS(1)
                    268: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                    269: $doc[^doc.transform[global.xsl]]
                    270: =^taint[html][^doc.string[$.method[html]]]=
                    271: 
                    272: 
                    273: 
                    274: @precisionProblem[]
                    275: $a[123456789012345678901234567890]
                    276: $b(^a.double[])
                    277: ^b.format{%.20E}
                    278: <hr>
                    279: ^eval(2*2)
                    280: 
                    281: @xpath[]
                    282: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    283: <document><block><p>привет</p></block></document>
                    284: }]
                    285: #^show_xdoc2[$xdoc]
                    286: $node[^xdoc.selectSingle[/document/block/p]]
                    287: ^if(def $node){
                    288:        ^if($node is string){
                    289:                $node
                    290:        }{
                    291:        ^if($node is hash){
                    292:                ^node._count[]
                    293:        }{
                    294:                $node.nodeType
                    295:        }
                    296:        }
                    297: #$node.firstChild.nodeValue
                    298: }{
                    299:        node not found
                    300: }
                    301: 
                    302: 
                    303: @ttablesetlang[]
                    304: $a-tab-b[a     b
                    305: 1      2]
                    306: 
                    307: $t[^table::set{$a-tab-b}]
                    308: =$t.a=
                    309: <hr>
                    310: 
                    311: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                    312: =$t.0=
                    313: <hr>
                    314: 
                    315: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                    316: =$t.a=
                    317: 
                    318: #^t.append{1   2}
                    319: 
                    320: @mail3[]
                    321: ^mail:send[
                    322:        $.from[Александр Петросян <paf@design.ru>]
                    323:        $.to[Александр Петросян <paf@design.ru>]
                    324:        $.subject[проверка4]
                    325:        $.body[
                    326:                $.text[
                    327:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    328:                        $.body[проверка]
                    329:                ]
                    330:                $.attachment[
                    331:                        $.value[^file::load[text;index.html]]
                    332:                        $.file-name[привет всем.html]                   
                    333:                ]
                    334:        ]
                    335: ]
                    336: 
                    337: 
                    338: @ttime[]
                    339: $now[^date::now[]]
                    340: $now.hour:$now.minute
                    341: 
                    342: @tupper[]
                    343: $t[abcABCабвАБВ]
                    344: $t<br>
                    345: ^t.upper[]
                    346: 
                    347: @treplace[]
                    348: $copy-paste-clean[^table::set{a b
                    349: .      _
                    350: ,      _
                    351: +      _
                    352: &      _
                    353: ?      _
                    354: =      _}]
                    355: 
                    356: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                    357: # почему-то этот replace роняет апач в 500 ошибку :(
                    358: #^cache_key.replace[$copy-paste-clean]
                    359: $test[abc]
                    360: ^test.save[$cache_key]saved<br>
                    361: $cache[^file:list[.;\.cache^$]]
                    362: ^file:delete[$cache_key]deleted($cache.name)<br>
                    363: 
                    364: 
                    365: 
                    366: @xslt2[]
                    367: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    368: <document><block><p>привет</p></block></document>
                    369: }]
                    370: ^show_xdoc2[$xdoc]
                    371: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                    372: <hr>
                    373: 
                    374: 
                    375: @tcache2[]
                    376: ^cache[$DB_HOME/keyключ](2){
                    377:        ^math:random(100)
                    378: }
                    379: 
                    380: @ttaintuntaint[]
                    381: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                    382: 
                    383: ]zz
                    384: <hr>
                    385: ^untaint[html]{1^taint[  ]2  3}
                    386: 
                    387: 
                    388: @tappend2[]
                    389: $t[^table::set{a       b}]^t.append{1  2}$t.a
                    390: 
                    391: @badvsnprintf[]
                    392: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                    393: }
                    394: 
                    395: 
                    396: @badoracequoting[]
                    397: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    398: ^connect[$SQL.connect-string]{
                    399: ^void:sql{delete from paf}
                    400: ^void:sql{insert into paf values (1, '$form:text')}
                    401: $paf[^table::sql{select * from paf}]
                    402: ^paf.menu{
                    403:        $paf.id: ^untaint{$paf.block}<hr>
                    404: 
                    405: }
                    406: <hr>
                    407: 
                    408: 
                    409: ^rem{
                    410: $news[^table::sql{select description from news}[$.limit(3)]]
                    411: ^news.menu{
                    412:        ^untaint{$news.description}<hr>
                    413: 
                    414: }
                    415: <hr>
                    416: }
                    417: 
                    418: $tables[^table::sql{select table_name from user_tables}]
                    419: ^tables.menu{
                    420: $tables.table_name<br>
                    421: }
                    422: 
                    423: }
                    424: <hr>
                    425: $env:PATH
                    426: 
                    427: @badconstructors[]
                    428: $bred[^string::length[]]
                    429: $bred[^response::clear[]]
                    430: $bred[^int::int[]]
                    431: 
                    432: 
                    433: @xloadwrongtable[]
                    434: $constr[^xdoc::load[wrongtable.xml]]
                    435: ^show_xdoc2[$constr]
                    436: 
                    437: @xsetwrongtable[]
                    438: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    439: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    440: 
                    441: 
                    442: @tablecolumnerror[]
                    443: $t[^table::set{a}]
                    444: $t.$a
                    445: 
                    446: @roll[]
                    447: #$date[^date::set(1970;1;2)]
                    448: #^date.roll[month](-1)
                    449: $date[^date::set(2038;1;1)]
                    450: ^date.roll[month](+1)
                    451: $date.year  $date.month  $date.day
                    452: 
                    453: @cookie2[]
                    454: #=$cookie:clientType[$.value[test]]=<br>
                    455: =$cookie:clientType=<br>
                    456: 
                    457: 
                    458: @tableset[]
                    459: $a[^table::set{a
                    460: 1
                    461: 2}]
                    462: ^eval(100\$a)
                    463: 
                    464: 
                    465: 
                    466: @zzz[]
                    467: 
                    468: 
                    469: $constructor[
                    470: <block1 name="main_srvr" type="0" label="Основное тело" />
                    471: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    472: ]
                    473: 
                    474: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    475: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    476: 
                    477: $children[$constr.documentElement.childNodes]
                    478: ^if($children){
                    479: ^for[i](1;^children._count[]){
                    480:        $node[$children.$i]
                    481:        $node.nodeName<br>
                    482: }
                    483: }
                    484:    
                    485: 
                    486: @thashforeach3[]
                    487: $h[
                    488:        $.a[1] 
                    489:        $.b[2]
                    490: ]
                    491: $c[^table::set{a
                    492: ^h.foreach[key;value]{$value
                    493: }}]
                    494: $c.a
                    495: 
                    496: @thashforeach2[]
                    497: $h[
                    498:        $.a[1] 
                    499:        $.b[2]
                    500: ]
                    501: $c[
                    502: ^h.foreach[key;value]{
                    503:        $.$key[$value]
                    504: }
                    505: ]
                    506: $c.b
                    507: 
                    508: @thashforeach[]
                    509: $h[
                    510:        $.a[1] 
                    511:        $.b[2]
                    512: ]
                    513: ^h.foreach[key;value]{
                    514:        $key=$value<br>
                    515: }
                    516: 
                    517: @thashdelete[]
                    518: $h[$.a[1] $.b[2]]
                    519: was:<br>
                    520: count=^h._count[] <br>
                    521: b='$h.b' <br>
                    522: 
                    523: ^h.delete[b] 
                    524: 
                    525: now:<br>
                    526: count=^h._count[] <br>
                    527: b='$h.b' 
                    528: 
                    529: @sappend[]
                    530: $test[123]
                    531: ^test.save[test]
                    532: ^test.save[append;test]
                    533: 
                    534: @tappend[]
                    535: $test[^table::set{a    b
                    536: a1     b1}]
                    537: ^test.save[test]
                    538: $test[^table::set{a    b
                    539: a2     b2}]
                    540: ^test.save[append;test]
                    541: 
                    542: 
                    543: @tform[]
                    544: ^if(def $form:new_file){y}{n}
                    545: <form method="post" enctype="multipart/form-data">
                    546: <input type="file" name="new_file" />
                    547: <input type=submit>
                    548: </input>
                    549: 
                    550: @formattest[]
                    551: $size(15.124)
                    552: 
                    553: ^size.format{%.2f}
                    554: 
                    555: @filelist[]
                    556: $html[^file:list[.;\.html^$]]
                    557: ^html.menu{
                    558:        $html.name<br>
                    559: }
                    560: <hr>
                    561: 
                    562: @безнадёжна_попытка_поправить_непоправимое[]
                    563: $dom_from_disk[^xdoc::load[input.xml]]
                    564: $dom_created_in_air[^xdoc::create[doc]]
                    565: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    566: ^show_xdoc2[$dom_created_in_air]
                    567: 
                    568: 
                    569: @tcache[]
                    570: #^hashfile:clear[cache]
                    571: $code[^hashfile::open[$DB_HOME;cache]]
                    572: ^code.cache[key](2){
                    573:        ^math:random(100)
                    574: #      ^code.delete[]
                    575: }
                    576: 
                    577: @thashfileexp[]
                    578: $hf[^hashfile::open[$DB_HOME;hashfile]]
                    579: $hf.paf[$.value[крут] $.expires(3)]
                    580: paf=$hf.paf
                    581: <hr>
                    582: ^hf.foreach[key;value]{
                    583:        $key=$value<br>
                    584: }
                    585: <hr>
                    586: $hash[^hf.hash[]]
                    587: =$hash.paf=
                    588: <hr>
                    589: 
                    590: @tcounter[]
                    591: ^tcounterone[$DB_HOME]
                    592: other root:
                    593: ^tcounterone[${DB_HOME}2]
                    594: again, first:
                    595: ^tcounterone[$DB_HOME]
                    596: 
                    597: @tcounterone[DB_HOME]
                    598: $counter[^hashfile::open[$DB_HOME;counter]]
                    599: #^counter.clear[]
                    600: ^counter.transaction{
                    601: #      $counter.value(10)
                    602:        $counter.value($counter.value+1)
                    603: #      ^counter.delete[value]
                    604:        $counter.value
                    605: }
                    606: <hr>
                    607: ^rem{
                    608: $hash[^counter.hash[]]
                    609: =$hash.value=
                    610: <hr>
                    611: }
                    612: 
                    613: @tablehash[]
                    614: $productList[^table::set{id    name
                    615: 1      носки
                    616: 2      валенки
                    617: 3      ушанка
                    618: }]
                    619: 
                    620: #скажем, у первого дилера
                    621: $firstPriceList[^table::set{id price
                    622: 1      0.3
                    623: 3      1000
                    624: }]
                    625: 
                    626: $firstPriceHash[^firstPriceList.hash[id]]
                    627: 
                    628: ^productList.menu{
                    629:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    630: }
                    631: 
                    632: 
                    633: @hashfile[]
                    634: $hf[^hashfile::assign[hashfile]]
                    635: #$hf.paf[крут5]
                    636: paf=$hf.paf
                    637: 
                    638: @formclass[]
                    639: ^$form:CLASS.a=$form:CLASS.a
                    640: 
                    641: @domdata[]
                    642: ^if(1){
                    643: #      $a{^hren[]}
                    644: }
                    645: $a
                    646: $xdoc[^xdoc::create[doc]]
                    647: $doc[$xdoc.documentElement]
                    648: $name[^doc.appendChild[^xdoc.createElement[name]]]
                    649: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                    650: ^untaint[as-is]{=$text.nodeValue=}
                    651: 
                    652: @domedit[]
                    653: ^domdata[]
                    654: #$paf.nodeName<br>
                    655: #$doc.documentElement.nodeName<br>
                    656: 
                    657: ^show_xnode1[$xdoc.documentElement;0;1]
                    658: <hr>
                    659: ^show_xdoc2[$xdoc]
                    660: <hr>
                    661: 
                    662: @domxslt[]
                    663: ^domdata[]
                    664: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                    665: <hr>
                    666: 
                    667: @lsplit2[]
                    668: $path[/optics/]
                    669: $pathTable[^path.lsplit[/]]
                    670: ^pathTable.menu{
                    671:        ^if(def $pathTable.piece){
                    672:                =$pathTable.piece=
                    673:        }
                    674: }
                    675: 
                    676: 
                    677: @faceesize[]
                    678: $k(2)
                    679: $pict[^image::load[paf.gif]]
                    680: $small[^image::create($pict.width/$k;$pict.height/$k)]
                    681: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                    682: $response:body[^small.gif[]]
                    683: 
                    684: @imageresize[]
                    685: $k(2)
                    686: $pict[^image::create(400*$k;200*$k)]
                    687: $pict.line-width(2)
                    688: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    689: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                    690: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    691: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    692: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    693: $response:body[^pict.gif[]]
                    694: 
                    695: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                    696: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                    697: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                    698: 
                    699: #$response:body[^small.gif[]]
                    700: 
                    701: 
                    702: @tintdefault[]
                    703: #$abc[abc]
                    704: $abc[33]
                    705: ^abc.int[z]
                    706: #^abc.int(123)
                    707: 
                    708: @ifassignhash[]
                    709: $h[^if(1){$.a(1);$.a(2)}]
                    710: $h.a
                    711: 
                    712: @ifpasshash[]
                    713: $a[$.e[a]]
                    714: $b[$.e[b]]
                    715: ^ifpasshashdest[^if(1){$a;$b}]
                    716: #$x[^if(1){$a}{$b}]
                    717: #^ifpasshashdest[$x]
                    718: 
                    719: @ifpasshashdest[p]
                    720: $p.e
                    721: 
                    722: @movedir[]
                    723: ^file:move[a;deeper/a]
                    724: 
                    725: @replace[]
                    726: $a[12^;3]
                    727: ^a.replace[^table::set{from    to
                    728: 2^;    !
                    729: }]
                    730: 
                    731: 
                    732: @set[]
                    733: ^setdata[]
                    734: ^a.add[$b]
                    735: add:$a.3<br>
                    736: 
                    737: ^setdata[]
                    738: ^a.sub[$b]
                    739: sub2:$a.2<br>
                    740: sub1:$a.1<br>
                    741: 
                    742: ^setdata[]
                    743: $c[^a.union[$b]]
                    744: union3:$c.3<br>
                    745: union2:$c.2<br>
                    746: 
                    747: ^setdata[]
                    748: $c[^a.intersection[$b]]
                    749: intersection3:$c.3<br>
                    750: intersection2:$c.2<br>
                    751: 
                    752: ^setdata[]
                    753: intersects:^if(^a.intersects[$b]){y;n}<br>
                    754: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    755: 
                    756: 
                    757: <hr>
                    758: 
                    759: @setdata[]
                    760: $a[$.1[a1] $.2[a2]]
                    761: $b[        $.2[b2] $.3[b3]]
                    762: 
                    763: 
                    764: @hash[]
                    765: $h[^hash::create[$._default[123]]]
                    766: $h.paf[not kretin]
                    767: $h.paf<br>
                    768: =$h.that=<br>
                    769: 
                    770: @methresult[]
                    771: $result[^table::set{1}]
                    772: 
                    773: @terror[]
                    774: ^error[method z must be called with z]
                    775: 
                    776: @syntax1[]
                    777: #^a[^b]
                    778: 
                    779: @syntax2[]
                    780: #^a[
                    781: 
                    782: @ssave[]
                    783: $abc[abc]
                    784: ^abc.save[abc]
                    785: 
                    786: @calendar[]
                    787: 2001;11:<br>
                    788: $week_days[^date:calendar[rus](2001;11)]
                    789: <pre>
                    790: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                    791: </pre>
                    792: 
                    793: @thash[]
                    794: $table[^table::set{id  name    age
                    795: 1      paf     278
                    796: 2      пиф     234
                    797: }]
                    798: $hash[^table.hash[id;^table::set[nameless]{id
                    799: name}]]
                    800: $hash.2.id $hash.2.name $hash.2.age
                    801: 
                    802: @tdef[]
                    803: $s[0]
                    804: if 0=^if($s){}{n}<br>
                    805: if def 0=^if(def $s){y}{}<br>
                    806: <hr>
                    807: 
                    808: @ford[]
                    809: ^for[i](0;5){$i}{($i)}
                    810: 
                    811: @tif[]
                    812: ^if[def]{y;n}
                    813: 
                    814: @image[]
                    815: $pict[^image::create(400;200)]
                    816: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    817: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                    818: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    819: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                    820: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                    821: $response:body[^pict.gif[]]
                    822: 
                    823: 
                    824: 
                    825: @mail2[]
                    826: ^mail:send[
                    827:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    828:        $.from[Александр Петросян <paf@design.ru>]
                    829:        $.to[Александр Петросян <paf@design.ru>]
                    830:        $.subject[проверка]
                    831:        $.body[проверка]
                    832: ]
                    833: 
                    834: @cookie[]
                    835: $env:HTTP_COOKIE<br>
                    836: 
                    837: #$cookie:переменная[test тест ТЕСТ2]
                    838: =$cookie:переменная=<br>
                    839: #$cookie:переменная2[test тест ТЕСТ3]
                    840: =$cookie:переменная2=<br>
                    841: =$cookie:CLASS.переменная2=<br>
                    842: 
                    843: @response[]
                    844: #^if($form:reload){
                    845:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                    846: #}
                    847: 
                    848: @xslt[]
                    849: ^xdata[]
                    850: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                    851: ^show_xdoc2[$transformed]
                    852: 
                    853: @regexp2[]
                    854: $s[  select]
                    855: $s[^s.match[^^\s*][]{!}]
                    856: $s
                    857: 
                    858: @header[]
                    859: $response:refresh[
                    860:        $.value[0]
                    861:        $.url[http://design.ru?a=^taint[123]]
                    862: ]
                    863: 
                    864: @ttablerem[]
                    865: $table[^table::load[a.cfg]]
                    866: ^table.menu{$table.a}
                    867: 
                    868: @tconnect[]
                    869: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                    870: $tables[^table::sql{show tables}]
                    871: #$cols[^tables.columns[]]
                    872: #$cols.column
                    873: ^tables.menu{
                    874:        $tables.[Tables_in_test]<br>
                    875: }
                    876: }
                    877: 
                    878: @pcre[]
                    879: $s[1 2]
                    880: ^s.match[\s;ig]{!}
                    881: #^s.match[\d;ig]{!}
                    882: 
                    883: 
                    884: @regexp[]
                    885: $s[abcАБВ]
                    886: ^if(^s.match[б][i]){y}{n}
                    887: 
                    888: @mail[]
                    889: #$ORIGINS(1)
                    890: ^mail:send[
                    891:        $.from[paf@design.ru]
                    892:        $.to[paf@design.ru]
                    893:        $.body[1
                    894:        
                    895:        2
                    896:        
                    897:        
                    898:                3]
                    899: ]
                    900: 
                    901: @exec[]
                    902: $a[^file::exec[fc.exe;;a;b]]
                    903: $a.status|$a.stderr<hr>
                    904: 
                    905: @fori[][i]
                    906: ^for[i](1;3){... =$i= ...}
                    907: 
                    908: @xdata0[]
                    909: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                    910: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    911: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    912: <people>
                    913:        <man id="1" имя="word слово">
                    914:                <name>P&#171^;AF        B</name>
                    915:        </man>
                    916:                <man id="2">
                    917:                        <name>ПИФ^taint[&]</name>
                    918:                </man>
                    919: </people>
                    920: }]
                    921: 
                    922: @xdata[]
                    923: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                    924: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    925: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    926: <people>
                    927:        <man id="1" имя="word слово">
                    928:                <name>P&#171^;AF        B</name>
                    929:        </man>
                    930:                <man id="2">
                    931:             <name>ПИФ^taint[&]</name>
                    932:                </man>
                    933: </people>
                    934: }}]
                    935: 
                    936: @xml[]
                    937: ^xdata[]
                    938: 
                    939: ^show_xdoc2[$xdoc]<hr>
                    940: #^show_xnode1[$xdoc]<hr>
                    941: $people[^xdoc.select[*/man]]
                    942: #^show1[]
                    943: ^show_xnodes1[$people]<hr>
                    944: #^people.0.owner.hren[]
                    945: 
                    946: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                    947: 
                    948: by id:
                    949: ^show_xnode1[^xdoc.getElementById[1];0;1]
                    950: <hr>
                    951: 
                    952: @show1[array]
                    953: ^for[i](0;^array._count[]-1){
                    954:     $x[$array.$i]
                    955:        $x.firstChild.nodeValue: 
                    956:                $pattributes[$x.parentNode.attributes]
                    957:                ^if(^pattributes._count[]){
                    958:                        $pattributes.id.name=$pattributes.id.nodeValue
                    959:                }
                    960:        <br>
                    961: }
                    962:        
                    963: @show_xnodes1[array][i]
                    964: ^for[i](0;^array._count[]-1){
                    965:        ^show_xnode1[$array.$i;0;1]
                    966: }
                    967: 
                    968: @show_xnode1[x;level;single][l]
                    969: ^if(def $x){
                    970:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                    971:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    972:        &lt^;$x.nodeName
                    973:            $pairs[$x.attributes]
                    974:            ^if(def $pairs){
                    975:                $names[^pairs._keys[]]
                    976:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                    977:            }
                    978:            &gt^;
                    979:     }{
                    980:        [$x.nodeType]
                    981:     }
                    982:     
                    983:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                    984:     ^show_xnode1[$x.firstChild]($level+1)
                    985:     ^if(!$single){
                    986:            ^show_xnode1[$x.nextSibling]($level)
                    987:     }
                    988: 
                    989:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    990:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                    991:     }
                    992: }
                    993: 
                    994: @show_xdoc2[xdoc]
                    995: ^xdoc.save[out/save.xml;
                    996: #      $.encoding[utf-8]
                    997:        $.method[xml]
                    998: ]
                    999: $file[^xdoc.file[
                   1000:        $.encoding[utf-8]
                   1001:        $.method[html]
                   1002: ]]
                   1003: ^file.save[text;out/save_file.html]
                   1004: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   1005: <pre>^taint[html][^xdoc.string[
                   1006:        $.method[html]
                   1007: #      $.encoding[utF-8]
                   1008: #      $.omit-xml-declaration[yes]
                   1009: #      $.standalone[no]
                   1010: #      -$.doctype-public[-//W3C//DTD XHTML]
                   1011: #      -$.doctype-system[/a/b/c/]
                   1012: #      $.indent[yes]
                   1013: #      $.media-type[text/paf]
                   1014: ]]
                   1015: </pre>

E-mail: