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

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

E-mail: