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

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

E-mail: