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

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

E-mail: