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

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

E-mail: