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

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

E-mail: