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

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

E-mail: