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