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

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

E-mail: