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

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

E-mail: