Annotation of parser3/src/www/htdocs/index.html, revision 1.519

1.510     paf         1: @auto[]
1.503     paf         2: $request:charset[windows-1251]
                      3: $response:charset[windows-1251]
1.514     paf         4: $response:content-type[$.value[text/html]$.charset[$response:charset]]
1.510     paf         5: 
                      6: @main[]
1.517     paf         7: ^xpath[]
1.515     paf         8: #^ttablesetlang[]
1.513     paf         9: #^mail3[]
1.511     paf        10: #^ttime[]
1.506     paf        11: #^tupper[]
1.499     paf        12: #^treplace[]
1.517     paf        13: #^xslt2[]
1.507     paf        14: #^tcache2[]
1.489     paf        15: #$ORIGINS(1)
1.488     paf        16: #$t[^table::set{a b} ^table::set{c d}]
1.486     paf        17: #^ttaintuntaint[]
1.493     paf        18: #^tappend2[]
1.480     paf        19: #^badvsnprintf[]
1.479     paf        20: #^badoracequoting[]
1.477     paf        21: #^badconstructors[]
1.514     paf        22: #^xloadwrongtable[]
1.476     paf        23: #^xsetwrongtable[]
1.473     paf        24: #^if($form:test){y}{n}
1.472     paf        25: #^tablecolumnerror[]
                     26: #^roll[]
1.471     paf        27: #^cookie2[]
1.470     paf        28: #^tableset[]
1.469     paf        29: #^math:PI.format{%.30f}
1.462     paf        30: #^xchildren[]
                     31: #^thashforeach3[]
1.461     paf        32: #^thashforeach2[]
                     33: #^thashforeach[]
1.458     paf        34: #^thashdelete[]
1.456     paf        35: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
1.454     paf        36: #^tappend[]
1.453     paf        37: #^sappend[]
1.452     paf        38: #^eval(10\3)<br>
1.450     paf        39: #^tform[]
1.448     paf        40: #^formattest[]
1.447     paf        41: #^filelist[]
1.443     paf        42: #^connect[mysql://user:pass@host]{ }
1.431     paf        43: #^безнадёжна_попытка_поправить_непоправимое[]
1.493     paf        44: #^tcache[]
1.460     paf        45: #^thashfileexp[]
1.468     paf        46: #^tcounter[]
1.423     parser     47: #^tablehash[]
1.443     paf        48: #j^hashfile[]
1.417     parser     49: #^formclass[]
1.415     parser     50: #^hren[]
1.485     paf        51: #^domedit[]
1.475     paf        52: #^domxslt[]
1.402     parser     53: #^lsplit2[]
1.401     parser     54: #^faceesize[]
1.445     paf        55: #^imageresize[]
1.399     parser     56: #^ifassignhash[]
                     57: #^tintdefault[]
                     58: #$response:status[404]
1.390     parser     59: #^ifpasshash[]
1.387     parser     60: #^movedir[]
                     61: #^replace[]
1.416     parser     62: #^set[]
1.385     parser     63: #^hash[]<hr>
1.384     parser     64: #$t[^methresult[]] ->$t
1.382     parser     65: #^terror[]
1.378     parser     66: #^ssave[]
1.377     parser     67: #^calendar[]
1.376     parser     68: #^thash[]
1.373     parser     69: #^tdef[]
1.375     parser     70: #^ford[]
1.371     parser     71: #^tif[]
1.383     parser     72: #^image[]
1.369     parser     73: #^mail2[]
1.413     parser     74: #^cookie[]
1.365     parser     75: #^response[]
1.364     parser     76: #^regexp2[]
                     77: #^ttablerem[]
                     78: #^pcre[]
                     79: #^regexp[]<hr>
                     80: #^mail[]
                     81: #^exec[]
                     82: #^fori[]
1.468     paf        83: #^tconnect[]
1.509     paf        84: #^xslt[]
1.470     paf        85: #^xml[]
1.364     parser     86: #^header[]
1.477     paf        87: <hr>
1.364     parser     88: OK
1.517     paf        89: 
                     90: @xpath[]
                     91: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                     92: <document><block><p>привет</p></block></document>
                     93: }]
                     94: #^show-xdoc2[$xdoc]
1.519   ! paf        95: $node[^xdoc.selectSingle['1<2']]
        !            96: ^if(def $node){
        !            97:        ^if($node is string){$node}
        !            98:                $node.nodeType
        !            99:        }
1.518     paf       100: #$node.firstChild.nodeValue
1.519   ! paf       101: }{
        !           102:        node not found
        !           103: }
1.517     paf       104: 
1.514     paf       105: 
                    106: @ttablesetlang[]
                    107: $a-tab-b[a     b
                    108: 1      2]
                    109: 
                    110: $t[^table::set{$a-tab-b}]
                    111: =$t.a=
                    112: <hr>
                    113: 
                    114: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                    115: =$t.0=
                    116: <hr>
                    117: 
                    118: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                    119: =$t.a=
                    120: 
                    121: #^t.append{1   2}
1.511     paf       122: 
                    123: @mail3[]
                    124: ^mail:send[
                    125:        $.from[Александр Петросян <paf@design.ru>]
                    126:        $.to[Александр Петросян <paf@design.ru>]
1.512     paf       127:        $.subject[проверка4]
1.511     paf       128:        $.body[
                    129:                $.text[
                    130:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    131:                        $.body[проверка]
1.512     paf       132:                ]
                    133:                $.attachment[
                    134:                        $.value[^file::load[text;index.html]]
                    135:                        $.file-name[привет всем.html]                   
1.511     paf       136:                ]
                    137:        ]
                    138: ]
                    139: 
1.504     paf       140: 
1.510     paf       141: @ttime[]
                    142: $now[^date::now[]]
                    143: $now.hour:$now.minute
                    144: 
1.504     paf       145: @tupper[]
                    146: $t[abcABCабвАБВ]
                    147: $t<br>
                    148: ^t.upper[]
1.497     paf       149: 
                    150: @treplace[]
                    151: $copy-paste-clean[^table::set{a b
                    152: .      _
                    153: ,      _
                    154: +      _
                    155: &      _
                    156: ?      _
                    157: =      _}]
                    158: 
1.498     paf       159: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
1.497     paf       160: # почему-то этот replace роняет апач в 500 ошибку :(
1.498     paf       161: #^cache_key.replace[$copy-paste-clean]
                    162: $test[abc]
                    163: ^test.save[$cache_key]saved<br>
                    164: $cache[^file:list[.;\.cache^$]]
                    165: ^file:delete[$cache_key]deleted($cache.name)<br>
                    166: 
1.497     paf       167: 
                    168: 
                    169: @xslt2[]
                    170: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1.516     paf       171: <document><block><p>привет</p></block></document>
1.497     paf       172: }]
1.516     paf       173: ^show-xdoc2[$xdoc]
                    174: #^show-xdoc2[^xdoc.transform[templates/_document.xslt]]
1.497     paf       175: <hr>
                    176: 
1.495     paf       177: 
1.496     paf       178: @tcache2[]
                    179: ^cache[$DB_HOME/keyключ](2){
                    180:        ^math:random(100)
                    181: }
1.485     paf       182: 
1.486     paf       183: @ttaintuntaint[]
                    184: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                    185: 
                    186: ]zz
                    187: <hr>
                    188: ^untaint[html]{1^taint[  ]2  3}
                    189: 
                    190: 
1.485     paf       191: @tappend2[]
                    192: $t[^table::set{a       b}]^t.append{1  2}$t.a
1.477     paf       193: 
1.479     paf       194: @badvsnprintf[]
                    195: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                    196: }
                    197: 
                    198: 
1.477     paf       199: @badoracequoting[]
                    200: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    201: ^connect[$SQL.connect-string]{
1.478     paf       202: ^void:sql{delete from paf}
1.479     paf       203: ^void:sql{insert into paf values (1, '$form:text')}
1.478     paf       204: $paf[^table::sql{select * from paf}]
                    205: ^paf.menu{
1.479     paf       206:        $paf.id: ^untaint{$paf.block}<hr>
1.478     paf       207: 
1.477     paf       208: }
1.478     paf       209: <hr>
                    210: 
1.477     paf       211: 
1.478     paf       212: ^rem{
1.477     paf       213: $news[^table::sql{select description from news}[$.limit(3)]]
                    214: ^news.menu{
                    215:        ^untaint{$news.description}<hr>
                    216: 
                    217: }
1.478     paf       218: <hr>
                    219: }
                    220: 
                    221: $tables[^table::sql{select table_name from user_tables}]
                    222: ^tables.menu{
                    223: $tables.table_name<br>
                    224: }
                    225: 
1.477     paf       226: }
                    227: <hr>
                    228: $env:PATH
1.476     paf       229: 
                    230: @badconstructors[]
                    231: $bred[^string::length[]]
                    232: $bred[^response::clear[]]
                    233: $bred[^int::int[]]
                    234: 
1.475     paf       235: 
                    236: @xloadwrongtable[]
                    237: $constr[^xdoc::load[wrongtable.xml]]
1.513     paf       238: ^show-xdoc2[$constr]
1.475     paf       239: 
                    240: @xsetwrongtable[]
                    241: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    242: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    243: 
1.471     paf       244: 
1.472     paf       245: @tablecolumnerror[]
                    246: $t[^table::set{a}]
                    247: $t.$a
                    248: 
1.471     paf       249: @roll[]
1.472     paf       250: #$date[^date::set(1970;1;2)]
                    251: #^date.roll[month](-1)
                    252: $date[^date::set(2038;1;1)]
1.471     paf       253: ^date.roll[month](+1)
                    254: $date.year  $date.month  $date.day
1.470     paf       255: 
                    256: @cookie2[]
                    257: #=$cookie:clientType[$.value[test]]=<br>
                    258: =$cookie:clientType=<br>
                    259: 
1.469     paf       260: 
                    261: @tableset[]
                    262: $a[^table::set{a
                    263: 1
                    264: 2}]
                    265: ^eval(100\$a)
                    266: 
                    267: 
                    268: 
                    269: @zzz[]
                    270: 
1.462     paf       271: 
                    272: $constructor[
                    273: <block1 name="main_srvr" type="0" label="Основное тело" />
                    274: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    275: ]
                    276: 
                    277: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    278: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    279: 
                    280: $children[$constr.documentElement.childNodes]
                    281: ^if($children){
                    282: ^for[i](1;^children._count[]){
                    283:        $node[$children.$i]
                    284:        $node.nodeName<br>
                    285: }
                    286: }
                    287:    
1.461     paf       288: 
                    289: @thashforeach3[]
                    290: $h[
                    291:        $.a[1] 
                    292:        $.b[2]
                    293: ]
                    294: $c[^table::set{a
                    295: ^h.foreach[key;value]{$value
                    296: }}]
                    297: $c.a
                    298: 
                    299: @thashforeach2[]
                    300: $h[
                    301:        $.a[1] 
                    302:        $.b[2]
                    303: ]
                    304: $c[
                    305: ^h.foreach[key;value]{
                    306:        $.$key[$value]
                    307: }
                    308: ]
                    309: $c.b
1.458     paf       310: 
                    311: @thashforeach[]
                    312: $h[
                    313:        $.a[1] 
                    314:        $.b[2]
                    315: ]
                    316: ^h.foreach[key;value]{
                    317:        $key=$value<br>
                    318: }
1.457     paf       319: 
                    320: @thashdelete[]
                    321: $h[$.a[1] $.b[2]]
                    322: was:<br>
                    323: count=^h._count[] <br>
                    324: b='$h.b' <br>
                    325: 
                    326: ^h.delete[b] 
                    327: 
                    328: now:<br>
                    329: count=^h._count[] <br>
                    330: b='$h.b' 
1.452     paf       331: 
                    332: @sappend[]
                    333: $test[123]
                    334: ^test.save[test]
                    335: ^test.save[append;test]
                    336: 
1.453     paf       337: @tappend[]
                    338: $test[^table::set{a    b
                    339: a1     b1}]
                    340: ^test.save[test]
                    341: $test[^table::set{a    b
                    342: a2     b2}]
                    343: ^test.save[append;test]
1.452     paf       344: 
1.448     paf       345: 
                    346: @tform[]
1.449     paf       347: ^if(def $form:new_file){y}{n}
                    348: <form method="post" enctype="multipart/form-data">
                    349: <input type="file" name="new_file" />
1.448     paf       350: <input type=submit>
                    351: </input>
1.447     paf       352: 
                    353: @formattest[]
                    354: $size(15.124)
                    355: 
                    356: ^size.format{%.2f}
1.446     paf       357: 
                    358: @filelist[]
                    359: $html[^file:list[.;\.html^$]]
                    360: ^html.menu{
                    361:        $html.name<br>
                    362: }
                    363: <hr>
1.431     paf       364: 
                    365: @безнадёжна_попытка_поправить_непоправимое[]
                    366: $dom_from_disk[^xdoc::load[input.xml]]
                    367: $dom_created_in_air[^xdoc::create[doc]]
                    368: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    369: ^show-xdoc2[$dom_created_in_air]
                    370: 
1.426     parser    371: 
1.428     parser    372: @tcache[]
                    373: #^hashfile:clear[cache]
1.459     paf       374: $code[^hashfile::open[$DB_HOME;cache]]
1.496     paf       375: ^code.cache[key](2){
1.430     parser    376:        ^math:random(100)
                    377: #      ^code.delete[]
1.496     paf       378: }
1.428     parser    379: 
1.426     parser    380: @thashfileexp[]
1.459     paf       381: $hf[^hashfile::open[$DB_HOME;hashfile]]
1.428     parser    382: $hf.paf[$.value[крут] $.expires(3)]
                    383: paf=$hf.paf
1.459     paf       384: <hr>
                    385: ^hf.foreach[key;value]{
                    386:        $key=$value<br>
                    387: }
1.427     parser    388: <hr>
                    389: $hash[^hf.hash[]]
                    390: =$hash.paf=
                    391: <hr>
1.420     parser    392: 
1.423     parser    393: @tcounter[]
1.440     paf       394: ^tcounterone[$DB_HOME]
1.466     paf       395: other root:
                    396: ^tcounterone[${DB_HOME}2]
                    397: again, first:
                    398: ^tcounterone[$DB_HOME]
1.432     paf       399: 
                    400: @tcounterone[DB_HOME]
                    401: $counter[^hashfile::open[$DB_HOME;counter]]
1.440     paf       402: #^counter.clear[]
1.423     parser    403: ^counter.transaction{
                    404: #      $counter.value(10)
                    405:        $counter.value($counter.value+1)
                    406: #      ^counter.delete[value]
                    407:        $counter.value
                    408: }
1.424     parser    409: <hr>
1.432     paf       410: ^rem{
1.424     parser    411: $hash[^counter.hash[]]
1.425     parser    412: =$hash.value=
1.424     parser    413: <hr>
1.432     paf       414: }
1.423     parser    415: 
                    416: @tablehash[]
                    417: $productList[^table::set{id    name
                    418: 1      носки
                    419: 2      валенки
                    420: 3      ушанка
                    421: }]
                    422: 
                    423: #скажем, у первого дилера
                    424: $firstPriceList[^table::set{id price
                    425: 1      0.3
                    426: 3      1000
                    427: }]
                    428: 
                    429: $firstPriceHash[^firstPriceList.hash[id]]
                    430: 
                    431: ^productList.menu{
                    432:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    433: }
                    434: 
                    435: 
1.420     parser    436: @hashfile[]
                    437: $hf[^hashfile::assign[hashfile]]
1.423     parser    438: #$hf.paf[крут5]
1.420     parser    439: paf=$hf.paf
1.402     parser    440: 
1.417     parser    441: @formclass[]
                    442: ^$form:CLASS.a=$form:CLASS.a
                    443: 
1.406     parser    444: @domdata[]
1.418     parser    445: ^if(1){
1.422     parser    446: #      $a{^hren[]}
1.418     parser    447: }
1.419     parser    448: $a
1.408     parser    449: $xdoc[^xdoc::create[doc]]
                    450: $doc[$xdoc.documentElement]
1.473     paf       451: $name[^doc.appendChild[^xdoc.createElement[name]]]
1.474     paf       452: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1.435     paf       453: ^untaint[as-is]{=$text.nodeValue=}
1.406     parser    454: 
                    455: @domedit[]
                    456: ^domdata[]
1.404     parser    457: #$paf.nodeName<br>
                    458: #$doc.documentElement.nodeName<br>
                    459: 
1.406     parser    460: ^show-xnode1[$xdoc.documentElement;0;1]
                    461: <hr>
                    462: ^show-xdoc2[$xdoc]
1.411     parser    463: <hr>
1.406     parser    464: 
                    465: @domxslt[]
                    466: ^domdata[]
1.405     parser    467: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411     parser    468: <hr>
1.401     parser    469: 
                    470: @lsplit2[]
                    471: $path[/optics/]
                    472: $pathTable[^path.lsplit[/]]
                    473: ^pathTable.menu{
                    474:        ^if(def $pathTable.piece){
                    475:                =$pathTable.piece=
                    476:        }
                    477: }
                    478: 
1.395     parser    479: 
1.397     parser    480: @faceesize[]
                    481: $k(2)
                    482: $pict[^image::load[paf.gif]]
                    483: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398     parser    484: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397     parser    485: $response:body[^small.gif[]]
                    486: 
1.395     parser    487: @imageresize[]
                    488: $k(2)
                    489: $pict[^image::create(400*$k;200*$k)]
                    490: $pict.line-width(2)
1.444     paf       491: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    492: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395     parser    493: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.444     paf       494: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    495: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    496: $response:body[^pict.gif[]]
1.395     parser    497: 
1.443     paf       498: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1.396     parser    499: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.443     paf       500: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395     parser    501: 
1.443     paf       502: #$response:body[^small.gif[]]
1.395     parser    503: 
1.388     parser    504: 
                    505: @tintdefault[]
                    506: #$abc[abc]
                    507: $abc[33]
                    508: ^abc.int[z]
                    509: #^abc.int(123)
1.390     parser    510: 
                    511: @ifassignhash[]
                    512: $h[^if(1){$.a(1);$.a(2)}]
                    513: $h.a
1.387     parser    514: 
                    515: @ifpasshash[]
                    516: $a[$.e[a]]
                    517: $b[$.e[b]]
1.389     parser    518: ^ifpasshashdest[^if(1){$a;$b}]
1.387     parser    519: #$x[^if(1){$a}{$b}]
                    520: #^ifpasshashdest[$x]
                    521: 
                    522: @ifpasshashdest[p]
                    523: $p.e
                    524: 
                    525: @movedir[]
                    526: ^file:move[a;deeper/a]
1.386     parser    527: 
                    528: @replace[]
                    529: $a[12^;3]
                    530: ^a.replace[^table::set{from    to
                    531: 2^;    !
                    532: }]
                    533: 
1.385     parser    534: 
                    535: @set[]
                    536: ^setdata[]
                    537: ^a.add[$b]
                    538: add:$a.3<br>
                    539: 
                    540: ^setdata[]
                    541: ^a.sub[$b]
                    542: sub2:$a.2<br>
                    543: sub1:$a.1<br>
                    544: 
                    545: ^setdata[]
                    546: $c[^a.union[$b]]
                    547: union3:$c.3<br>
                    548: union2:$c.2<br>
                    549: 
                    550: ^setdata[]
                    551: $c[^a.intersection[$b]]
                    552: intersection3:$c.3<br>
                    553: intersection2:$c.2<br>
                    554: 
                    555: ^setdata[]
                    556: intersects:^if(^a.intersects[$b]){y;n}<br>
                    557: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    558: 
                    559: 
                    560: <hr>
                    561: 
                    562: @setdata[]
                    563: $a[$.1[a1] $.2[a2]]
                    564: $b[        $.2[b2] $.3[b3]]
                    565: 
1.383     parser    566: 
1.384     parser    567: @hash[]
                    568: $h[^hash::create[$._default[123]]]
                    569: $h.paf[not kretin]
                    570: $h.paf<br>
                    571: =$h.that=<br>
                    572: 
                    573: @methresult[]
                    574: $result[^table::set{1}]
1.377     parser    575: 
1.381     parser    576: @terror[]
                    577: ^error[method z must be called with z]
                    578: 
1.380     parser    579: @syntax1[]
                    580: #^a[^b]
                    581: 
                    582: @syntax2[]
1.381     parser    583: #^a[
1.379     parser    584: 
1.377     parser    585: @ssave[]
                    586: $abc[abc]
                    587: ^abc.save[abc]
1.376     parser    588: 
                    589: @calendar[]
                    590: 2001;11:<br>
                    591: $week_days[^date:calendar[rus](2001;11)]
                    592: <pre>
                    593: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                    594: </pre>
1.372     parser    595: 
1.375     parser    596: @thash[]
                    597: $table[^table::set{id  name    age
                    598: 1      paf     278
                    599: 2      пиф     234
                    600: }]
                    601: $hash[^table.hash[id;^table::set[nameless]{id
                    602: name}]]
                    603: $hash.2.id $hash.2.name $hash.2.age
                    604: 
1.372     parser    605: @tdef[]
                    606: $s[0]
                    607: if 0=^if($s){}{n}<br>
                    608: if def 0=^if(def $s){y}{}<br>
                    609: <hr>
1.371     parser    610: 
                    611: @ford[]
1.374     parser    612: ^for[i](0;5){$i}{($i)}
1.368     parser    613: 
1.370     parser    614: @tif[]
                    615: ^if[def]{y;n}
                    616: 
1.368     parser    617: @image[]
                    618: $pict[^image::create(400;200)]
1.379     parser    619: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    620: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                    621: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    622: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                    623: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368     parser    624: $response:body[^pict.gif[]]
                    625: 
                    626: 
1.366     parser    627: 
1.369     parser    628: @mail2[]
1.367     parser    629: ^mail:send[
1.369     parser    630:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    631:        $.from[Александр Петросян <paf@design.ru>]
1.367     parser    632:        $.to[Александр Петросян <paf@design.ru>]
1.369     parser    633:        $.subject[проверка]
                    634:        $.body[проверка]
1.367     parser    635: ]
                    636: 
1.366     parser    637: @cookie[]
1.367     parser    638: $env:HTTP_COOKIE<br>
                    639: 
                    640: #$cookie:переменная[test тест ТЕСТ2]
                    641: =$cookie:переменная=<br>
                    642: #$cookie:переменная2[test тест ТЕСТ3]
                    643: =$cookie:переменная2=<br>
1.412     parser    644: =$cookie:CLASS.переменная2=<br>
1.365     parser    645: 
                    646: @response[]
                    647: #^if($form:reload){
                    648:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                    649: #}
1.364     parser    650: 
                    651: @xslt[]
                    652: ^xdata[]
1.407     parser    653: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                    654: ^show-xdoc2[$transformed]
1.364     parser    655: 
                    656: @regexp2[]
                    657: $s[  select]
                    658: $s[^s.match[^^\s*][]{!}]
                    659: $s
                    660: 
                    661: @header[]
                    662: $response:refresh[
                    663:        $.value[0]
                    664:        $.url[http://design.ru?a=^taint[123]]
                    665: ]
                    666: 
                    667: @ttablerem[]
                    668: $table[^table::load[a.cfg]]
                    669: ^table.menu{$table.a}
                    670: 
                    671: @tconnect[]
                    672: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                    673: $tables[^table::sql{show tables}]
                    674: #$cols[^tables.columns[]]
                    675: #$cols.column
                    676: ^tables.menu{
                    677:        $tables.[Tables_in_test]<br>
                    678: }
                    679: }
                    680: 
                    681: @pcre[]
                    682: $s[1 2]
                    683: ^s.match[\s;ig]{!}
                    684: #^s.match[\d;ig]{!}
                    685: 
                    686: 
                    687: @regexp[]
                    688: $s[abcАБВ]
                    689: ^if(^s.match[б][i]){y}{n}
                    690: 
                    691: @mail[]
                    692: #$ORIGINS(1)
                    693: ^mail:send[
                    694:        $.from[paf@design.ru]
                    695:        $.to[paf@design.ru]
                    696:        $.body[1
                    697:        
                    698:        2
                    699:        
                    700:        
                    701:                3]
                    702: ]
                    703: 
                    704: @exec[]
1.370     parser    705: $a[^file::exec[fc.exe;;a;b]]
1.364     parser    706: $a.status|$a.stderr<hr>
                    707: 
                    708: @fori[][i]
                    709: ^for[i](1;3){... =$i= ...}
                    710: 
1.489     paf       711: @xdata0[]
1.364     parser    712: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.468     paf       713: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    714: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    715: <people>
                    716:        <man id="1" имя="word слово">
                    717:                <name>P&#171^;AF        B</name>
                    718:        </man>
                    719:                <man id="2">
                    720:                        <name>ПИФ^taint[&]</name>
                    721:                </man>
                    722: </people>
                    723: }]
1.489     paf       724: 
                    725: @xdata[]
                    726: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.490     paf       727: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1.489     paf       728: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    729: <people>
                    730:        <man id="1" имя="word слово">
                    731:                <name>P&#171^;AF        B</name>
                    732:        </man>
                    733:                <man id="2">
                    734:             <name>ПИФ^taint[&]</name>
                    735:                </man>
                    736: </people>
                    737: }}]
1.364     parser    738: 
                    739: @xml[]
                    740: ^xdata[]
                    741: 
                    742: ^show-xdoc2[$xdoc]<hr>
                    743: #^show-xnode1[$xdoc]<hr>
                    744: $people[^xdoc.select[*/man]]
                    745: #^show1[]
                    746: ^show-xnodes1[$people]<hr>
                    747: #^people.0.owner.hren[]
                    748: 
1.393     parser    749: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364     parser    750: 
                    751: by id:
                    752: ^show-xnode1[^xdoc.getElementById[1];0;1]
                    753: <hr>
                    754: 
                    755: @show1[array]
                    756: ^for[i](0;^array._count[]-1){
                    757:     $x[$array.$i]
                    758:        $x.firstChild.nodeValue: 
                    759:                $pattributes[$x.parentNode.attributes]
                    760:                ^if(^pattributes._count[]){
                    761:                        $pattributes.id.name=$pattributes.id.nodeValue
                    762:                }
                    763:        <br>
                    764: }
                    765:        
                    766: @show-xnodes1[array][i]
                    767: ^for[i](0;^array._count[]-1){
                    768:        ^show-xnode1[$array.$i;0;1]
                    769: }
                    770: 
                    771: @show-xnode1[x;level;single][l]
                    772: ^if(def $x){
                    773:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                    774:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    775:        &lt^;$x.nodeName
                    776:            $pairs[$x.attributes]
                    777:            ^if(def $pairs){
                    778:                $names[^pairs._keys[]]
                    779:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                    780:            }
                    781:            &gt^;
                    782:     }{
                    783:        [$x.nodeType]
                    784:     }
                    785:     
                    786:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                    787:     ^show-xnode1[$x.firstChild]($level+1)
                    788:     ^if(!$single){
                    789:            ^show-xnode1[$x.nextSibling]($level)
                    790:     }
                    791: 
                    792:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    793:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                    794:     }
                    795: }
                    796: 
                    797: @show-xdoc2[xdoc]
1.516     paf       798: ^rem{
1.473     paf       799: ^xdoc.save[out/save.xml;
1.364     parser    800: #      $.encoding[windows-1251]
                    801:        $.method[xml]
                    802: ]
                    803: $file[^xdoc.file[
                    804: #      $.encoding[windows-1251]
                    805:        $.method[html]
                    806: ]]
1.473     paf       807: ^file.save[text;out/save_file.html]
1.516     paf       808: }
1.487     paf       809: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                    810: <pre>^taint[html][^xdoc.string[
1.508     paf       811:        $.method[html]
1.487     paf       812: #      $.version[1.0]
                    813: #      $.encoding[utf-8]
                    814: #      $.omit-xml-declaration[yes]
                    815: #      $.standalone[yes]
                    816: #      $.doctype-public[-//W3C//DTD XHTML]
                    817: #      $.doctype-system[/a/b/c/]
                    818: #      $.indent[no]
                    819:        $.media-type[text/paf]
1.486     paf       820: ]]
1.413     parser    821: </pre>

E-mail: