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