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

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

E-mail: