Annotation of parser3/www/htdocs/index.html, revision 1.9
1.6 paf 1: #@USE
2: #z/t.p
1.1 paf 3:
1.6 paf 4: @autoz[]
5: $request:charset[windows-1251]
6: $response:charset[windows-1251]
7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
8:
9: @main[]
1.9 ! paf 10: ^doubleprobs[]
! 11: #^math:random(-10)
1.8 paf 12: #^divnamestop[]
1.7 paf 13: #^arrayclone[]
1.6 paf 14: #^operator_tricks[]
15: #^xoutputrusattr[]
16: #^xdocset1[]
17: #^regexp3[]
18: #^exec2[]
19: #^tlock[]
20: #^xmloutattrwithoutvalue[]
21: #^precisionProblem[]
22: #^xpath[]
23: #^ttablesetlang[]
24: #^mail3[]
25: #^ttime[]
26: #^tupper[]
27: #^treplace[]
28: #^xslt2[]
29: #^tcache2[]
30: #$ORIGINS(1)
31: #$t[^table::set{a b} ^table::set{c d}]
32: #^ttaintuntaint[]
33: #^tappend2[]
34: #^badvsnprintf[]
35: #^badoracequoting[]
36: #^badconstructors[]
37: #^xloadwrongtable[]
38: #^xsetwrongtable[]
39: #^if($form:test){y}{n}
40: #^tablecolumnerror[]
41: #^roll[]
42: #^cookie2[]
43: #^tableset[]
44: #^math:PI.format{%.30f}
45: #^xchildren[]
46: #^thashforeach3[]
47: #^thashforeach2[]
48: #^thashforeach[]
49: #^thashdelete[]
50: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
51: #^tappend[]
52: #^sappend[]
53: #^eval(10\3)<br>
54: #^tform[]
55: #^formattest[]
56: #^filelist[]
57: #^connect[mysql://user:pass@host]{ }
58: #^безнадёжна_попытка_поправить_непоправимое[]
59: #^tcache[]
60: #^thashfileexp[]
61: #^tcounter[]
62: #^tablehash[]
63: #j^hashfile[]
64: #^formclass[]
65: #^hren[]
66: #^domedit[]
67: #^domxslt[]
68: #^lsplit2[]
69: #^faceesize[]
70: #^imageresize[]
71: #^ifassignhash[]
72: #^tintdefault[]
73: #$response:status[404]
74: #^ifpasshash[]
75: #^movedir[]
76: #^replace[]
77: #^set[]
78: #^hash[]<hr>
79: #$t[^methresult[]] ->$t
80: #^terror[]
81: #^ssave[]
82: #^calendar[]
83: #^thash[]
84: #^tdef[]
85: #^ford[]
86: #^tif[]
87: #^image[]
88: #^mail2[]
89: #^cookie[]
90: #^response[]
91: #^regexp2[]
92: #^ttablerem[]
93: #^pcre[]
94: #^regexp[]<hr>
95: #^mail[]
96: #^exec[]
97: #^fori[]
98: #^tconnect[]
99: #^xslt[]
100: #^xml[]
101: #^header[]
102: <hr>
103: OK
1.9 ! paf 104:
! 105: @doubleprobs[]
! 106: $1(^math:radians(180))
! 107: $2($math:PI)
! 108: ^^eval(^1.format[%.10f]-^2.format[%.10f])
! 109:
1.7 paf 110:
111: @divnamestop[]
112: $a(10)
113: ^eval($a\3)
1.6 paf 114:
115: @arrayclone[]
116: $t[^table::create{a b
117: 1 11
118: 2 22
119: }]
120: $c[^table::create[$t]]
121: ^c.append{2 33}
122: ^t.count[]
123: ^c.count[]
124:
125: @operator_tricks[]
126: ^if(1){$a[^t[]]}
127: $a!
128: $a($b)
129: ^if(1){y}{n}
130: $MAIN:a(^t[] eq OK)
131: #$MAIN:a(1)
132: ^if($a){y}{n}
133: #^if(1){y}{n}
134: $form:if
135: $a[$.n[1]]
136: $a.if
137:
138: @xoutputrusattr[]
139: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
140: ^show_xdoc2[$d]
141:
142: @xdocset1[]
143: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
144: ^show_xdoc2[$d]
145:
146: @regexp3[]
147: $s[abcАБВ]
148: ^if(^s.match[][i]){y}{n}
149:
150:
151: @exec2[]
152: $a[^file::exec[bin/t.cmd]]
153: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
154:
155:
156: @tlock[]
157: ^file:lock[lockfile]{
158: code
1.1 paf 159: }
160:
1.6 paf 161: @xmloutattrwithoutvalue[]
162: #$ORIGINS(1)
163: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
164: $doc[^doc.transform[global.xsl]]
165: =^taint[html][^doc.string[$.method[html]]]=
166:
167:
168:
169: @precisionProblem[]
170: $a[123456789012345678901234567890]
171: $b(^a.double[])
172: ^b.format{%.20E}
173: <hr>
174: ^eval(2*2)
175:
176: @xpath[]
177: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
178: <document><block><p>привет</p></block></document>
179: }]
180: #^show_xdoc2[$xdoc]
181: $node[^xdoc.selectSingle[/document/block/p]]
182: ^if(def $node){
183: ^if($node is string){
184: $node
1.1 paf 185: }{
1.6 paf 186: ^if($node is hash){
187: ^node._count[]
188: }{
189: $node.nodeType
190: }
1.1 paf 191: }
1.6 paf 192: #$node.firstChild.nodeValue
193: }{
194: node not found
195: }
196:
197:
198: @ttablesetlang[]
199: $a-tab-b[a b
200: 1 2]
201:
202: $t[^table::set{$a-tab-b}]
203: =$t.a=
204: <hr>
205:
206: $t[^table::set[nameless]{^taint[$a-tab-b]}]
207: =$t.0=
208: <hr>
209:
210: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
211: =$t.a=
212:
213: #^t.append{1 2}
214:
215: @mail3[]
216: ^mail:send[
217: $.from[Александр Петросян <paf@design.ru>]
218: $.to[Александр Петросян <paf@design.ru>]
219: $.subject[проверка4]
220: $.body[
221: $.text[
222: $.content-type[$.value[text/plain] $.charset[windows-1251]]
223: $.body[проверка]
224: ]
225: $.attachment[
226: $.value[^file::load[text;index.html]]
227: $.file-name[привет всем.html]
228: ]
229: ]
230: ]
231:
232:
233: @ttime[]
234: $now[^date::now[]]
235: $now.hour:$now.minute
236:
237: @tupper[]
238: $t[abcABCабвАБВ]
239: $t<br>
240: ^t.upper[]
241:
242: @treplace[]
243: $copy-paste-clean[^table::set{a b
244: . _
245: , _
246: + _
247: & _
248: ? _
249: = _}]
250:
251: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
252: # почему-то этот replace роняет апач в 500 ошибку :(
253: #^cache_key.replace[$copy-paste-clean]
254: $test[abc]
255: ^test.save[$cache_key]saved<br>
256: $cache[^file:list[.;\.cache^$]]
257: ^file:delete[$cache_key]deleted($cache.name)<br>
258:
259:
260:
261: @xslt2[]
262: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
263: <document><block><p>привет</p></block></document>
264: }]
265: ^show_xdoc2[$xdoc]
266: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
267: <hr>
268:
269:
270: @tcache2[]
271: ^cache[$DB_HOME/keyключ](2){
272: ^math:random(100)
273: }
274:
275: @ttaintuntaint[]
276: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
277:
278: ]zz
279: <hr>
280: ^untaint[html]{1^taint[ ]2 3}
281:
282:
283: @tappend2[]
284: $t[^table::set{a b}]^t.append{1 2}$t.a
285:
286: @badvsnprintf[]
287: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
288: }
289:
290:
291: @badoracequoting[]
292: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
293: ^connect[$SQL.connect-string]{
294: ^void:sql{delete from paf}
295: ^void:sql{insert into paf values (1, '$form:text')}
296: $paf[^table::sql{select * from paf}]
297: ^paf.menu{
298: $paf.id: ^untaint{$paf.block}<hr>
299:
300: }
301: <hr>
302:
303:
304: ^rem{
305: $news[^table::sql{select description from news}[$.limit(3)]]
306: ^news.menu{
307: ^untaint{$news.description}<hr>
308:
309: }
310: <hr>
311: }
312:
313: $tables[^table::sql{select table_name from user_tables}]
314: ^tables.menu{
315: $tables.table_name<br>
316: }
317:
318: }
319: <hr>
320: $env:PATH
321:
322: @badconstructors[]
323: $bred[^string::length[]]
324: $bred[^response::clear[]]
325: $bred[^int::int[]]
326:
327:
328: @xloadwrongtable[]
329: $constr[^xdoc::load[wrongtable.xml]]
330: ^show_xdoc2[$constr]
331:
332: @xsetwrongtable[]
333: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
334: <block-list>^untaint[as-is]{$constructor}</block-list>}]
335:
336:
337: @tablecolumnerror[]
338: $t[^table::set{a}]
339: $t.$a
340:
341: @roll[]
342: #$date[^date::set(1970;1;2)]
343: #^date.roll[month](-1)
344: $date[^date::set(2038;1;1)]
345: ^date.roll[month](+1)
346: $date.year $date.month $date.day
347:
348: @cookie2[]
349: #=$cookie:clientType[$.value[test]]=<br>
350: =$cookie:clientType=<br>
351:
352:
353: @tableset[]
354: $a[^table::set{a
355: 1
356: 2}]
357: ^eval(100\$a)
358:
359:
360:
361: @zzz[]
362:
363:
364: $constructor[
365: <block1 name="main_srvr" type="0" label="Основное тело" />
366: <block2 name="main_srvr2" type="0" label="Основное тело" />
367: ]
368:
369: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
370: <block-list>^untaint[as-is]{$constructor}</block-list>}]
371:
372: $children[$constr.documentElement.childNodes]
373: ^if($children){
374: ^for[i](1;^children._count[]){
375: $node[$children.$i]
376: $node.nodeName<br>
377: }
378: }
379:
380:
381: @thashforeach3[]
382: $h[
383: $.a[1]
384: $.b[2]
385: ]
386: $c[^table::set{a
387: ^h.foreach[key;value]{$value
388: }}]
389: $c.a
390:
391: @thashforeach2[]
392: $h[
393: $.a[1]
394: $.b[2]
395: ]
396: $c[
397: ^h.foreach[key;value]{
398: $.$key[$value]
399: }
400: ]
401: $c.b
402:
403: @thashforeach[]
404: $h[
405: $.a[1]
406: $.b[2]
407: ]
408: ^h.foreach[key;value]{
409: $key=$value<br>
410: }
411:
412: @thashdelete[]
413: $h[$.a[1] $.b[2]]
414: was:<br>
415: count=^h._count[] <br>
416: b='$h.b' <br>
417:
418: ^h.delete[b]
419:
420: now:<br>
421: count=^h._count[] <br>
422: b='$h.b'
423:
424: @sappend[]
425: $test[123]
426: ^test.save[test]
427: ^test.save[append;test]
428:
429: @tappend[]
430: $test[^table::set{a b
431: a1 b1}]
432: ^test.save[test]
433: $test[^table::set{a b
434: a2 b2}]
435: ^test.save[append;test]
436:
437:
438: @tform[]
439: ^if(def $form:new_file){y}{n}
440: <form method="post" enctype="multipart/form-data">
441: <input type="file" name="new_file" />
442: <input type=submit>
443: </input>
444:
445: @formattest[]
446: $size(15.124)
447:
448: ^size.format{%.2f}
449:
450: @filelist[]
451: $html[^file:list[.;\.html^$]]
452: ^html.menu{
453: $html.name<br>
1.1 paf 454: }
1.6 paf 455: <hr>
1.1 paf 456:
1.6 paf 457: @безнадёжна_попытка_поправить_непоправимое[]
458: $dom_from_disk[^xdoc::load[input.xml]]
459: $dom_created_in_air[^xdoc::create[doc]]
460: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
461: ^show_xdoc2[$dom_created_in_air]
1.1 paf 462:
1.6 paf 463:
464: @tcache[]
465: #^hashfile:clear[cache]
466: $code[^hashfile::open[$DB_HOME;cache]]
467: ^code.cache[key](2){
468: ^math:random(100)
469: # ^code.delete[]
470: }
471:
472: @thashfileexp[]
473: $hf[^hashfile::open[$DB_HOME;hashfile]]
474: $hf.paf[$.value[крут] $.expires(3)]
475: paf=$hf.paf
476: <hr>
477: ^hf.foreach[key;value]{
478: $key=$value<br>
479: }
480: <hr>
481: $hash[^hf.hash[]]
482: =$hash.paf=
483: <hr>
484:
485: @tcounter[]
486: ^tcounterone[$DB_HOME]
487: other root:
488: ^tcounterone[${DB_HOME}2]
489: again, first:
490: ^tcounterone[$DB_HOME]
491:
492: @tcounterone[DB_HOME]
493: $counter[^hashfile::open[$DB_HOME;counter]]
494: #^counter.clear[]
495: ^counter.transaction{
496: # $counter.value(10)
497: $counter.value($counter.value+1)
498: # ^counter.delete[value]
499: $counter.value
500: }
501: <hr>
502: ^rem{
503: $hash[^counter.hash[]]
504: =$hash.value=
505: <hr>
506: }
507:
508: @tablehash[]
509: $productList[^table::set{id name
510: 1 носки
511: 2 валенки
512: 3 ушанка
513: }]
514:
515: #скажем, у первого дилера
516: $firstPriceList[^table::set{id price
517: 1 0.3
518: 3 1000
519: }]
520:
521: $firstPriceHash[^firstPriceList.hash[id]]
522:
523: ^productList.menu{
524: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
525: }
526:
527:
528: @hashfile[]
529: $hf[^hashfile::assign[hashfile]]
530: #$hf.paf[крут5]
531: paf=$hf.paf
532:
533: @formclass[]
534: ^$form:CLASS.a=$form:CLASS.a
535:
536: @domdata[]
537: ^if(1){
538: # $a{^hren[]}
539: }
540: $a
541: $xdoc[^xdoc::create[doc]]
542: $doc[$xdoc.documentElement]
543: $name[^doc.appendChild[^xdoc.createElement[name]]]
544: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
545: ^untaint[as-is]{=$text.nodeValue=}
546:
547: @domedit[]
548: ^domdata[]
549: #$paf.nodeName<br>
550: #$doc.documentElement.nodeName<br>
551:
552: ^show_xnode1[$xdoc.documentElement;0;1]
553: <hr>
554: ^show_xdoc2[$xdoc]
555: <hr>
556:
557: @domxslt[]
558: ^domdata[]
559: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
560: <hr>
561:
562: @lsplit2[]
563: $path[/optics/]
564: $pathTable[^path.lsplit[/]]
565: ^pathTable.menu{
566: ^if(def $pathTable.piece){
567: =$pathTable.piece=
1.1 paf 568: }
1.6 paf 569: }
570:
571:
572: @faceesize[]
573: $k(2)
574: $pict[^image::load[paf.gif]]
575: $small[^image::create($pict.width/$k;$pict.height/$k)]
576: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
577: $response:body[^small.gif[]]
578:
579: @imageresize[]
580: $k(2)
581: $pict[^image::create(400*$k;200*$k)]
582: $pict.line-width(2)
583: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
584: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
585: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
586: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
587: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
588: $response:body[^pict.gif[]]
589:
590: #$small[^image::create($pict.width/$k;$pict.height/$k)]
591: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
592: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
593:
594: #$response:body[^small.gif[]]
595:
596:
597: @tintdefault[]
598: #$abc[abc]
599: $abc[33]
600: ^abc.int[z]
601: #^abc.int(123)
602:
603: @ifassignhash[]
604: $h[^if(1){$.a(1);$.a(2)}]
605: $h.a
606:
607: @ifpasshash[]
608: $a[$.e[a]]
609: $b[$.e[b]]
610: ^ifpasshashdest[^if(1){$a;$b}]
611: #$x[^if(1){$a}{$b}]
612: #^ifpasshashdest[$x]
613:
614: @ifpasshashdest[p]
615: $p.e
616:
617: @movedir[]
618: ^file:move[a;deeper/a]
619:
620: @replace[]
621: $a[12^;3]
622: ^a.replace[^table::set{from to
623: 2^; !
624: }]
625:
626:
627: @set[]
628: ^setdata[]
629: ^a.add[$b]
630: add:$a.3<br>
631:
632: ^setdata[]
633: ^a.sub[$b]
634: sub2:$a.2<br>
635: sub1:$a.1<br>
636:
637: ^setdata[]
638: $c[^a.union[$b]]
639: union3:$c.3<br>
640: union2:$c.2<br>
641:
642: ^setdata[]
643: $c[^a.intersection[$b]]
644: intersection3:$c.3<br>
645: intersection2:$c.2<br>
646:
647: ^setdata[]
648: intersects:^if(^a.intersects[$b]){y;n}<br>
649: intersects2:^if(^a.intersects[ ]){y;n}<br>
650:
651:
652: <hr>
653:
654: @setdata[]
655: $a[$.1[a1] $.2[a2]]
656: $b[ $.2[b2] $.3[b3]]
657:
658:
659: @hash[]
660: $h[^hash::create[$._default[123]]]
661: $h.paf[not kretin]
662: $h.paf<br>
663: =$h.that=<br>
664:
665: @methresult[]
666: $result[^table::set{1}]
667:
668: @terror[]
669: ^error[method z must be called with z]
670:
671: @syntax1[]
672: #^a[^b]
673:
674: @syntax2[]
675: #^a[
676:
677: @ssave[]
678: $abc[abc]
679: ^abc.save[abc]
680:
681: @calendar[]
682: 2001;11:<br>
683: $week_days[^date:calendar[rus](2001;11)]
684: <pre>
685: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
686: </pre>
687:
688: @thash[]
689: $table[^table::set{id name age
690: 1 paf 278
691: 2 пиф 234
692: }]
693: $hash[^table.hash[id;^table::set[nameless]{id
694: name}]]
695: $hash.2.id $hash.2.name $hash.2.age
696:
697: @tdef[]
698: $s[0]
699: if 0=^if($s){}{n}<br>
700: if def 0=^if(def $s){y}{}<br>
701: <hr>
702:
703: @ford[]
704: ^for[i](0;5){$i}{($i)}
705:
706: @tif[]
707: ^if[def]{y;n}
708:
709: @image[]
710: $pict[^image::create(400;200)]
711: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
712: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
713: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
714: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
715: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
716: $response:body[^pict.gif[]]
717:
718:
719:
720: @mail2[]
721: ^mail:send[
722: $.content-type[$.value[text/plain] $.charset[windows-1251]]
723: $.from[Александр Петросян <paf@design.ru>]
724: $.to[Александр Петросян <paf@design.ru>]
725: $.subject[проверка]
726: $.body[проверка]
727: ]
728:
729: @cookie[]
730: $env:HTTP_COOKIE<br>
731:
732: #$cookie:переменная[test тест ТЕСТ2]
733: =$cookie:переменная=<br>
734: #$cookie:переменная2[test тест ТЕСТ3]
735: =$cookie:переменная2=<br>
736: =$cookie:CLASS.переменная2=<br>
737:
738: @response[]
739: #^if($form:reload){
740: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
1.1 paf 741: #}
1.6 paf 742:
743: @xslt[]
744: ^xdata[]
745: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
746: ^show_xdoc2[$transformed]
747:
748: @regexp2[]
749: $s[ select]
750: $s[^s.match[^^\s*][]{!}]
751: $s
752:
753: @header[]
754: $response:refresh[
755: $.value[0]
756: $.url[http://design.ru?a=^taint[123]]
757: ]
758:
759: @ttablerem[]
760: $table[^table::load[a.cfg]]
761: ^table.menu{$table.a}
762:
763: @tconnect[]
764: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
765: $tables[^table::sql{show tables}]
766: #$cols[^tables.columns[]]
767: #$cols.column
768: ^tables.menu{
769: $tables.[Tables_in_test]<br>
770: }
771: }
772:
773: @pcre[]
774: $s[1 2]
775: ^s.match[\s;ig]{!}
776: #^s.match[\d;ig]{!}
777:
778:
779: @regexp[]
780: $s[abcАБВ]
781: ^if(^s.match[б][i]){y}{n}
782:
783: @mail[]
784: #$ORIGINS(1)
785: ^mail:send[
786: $.from[paf@design.ru]
787: $.to[paf@design.ru]
788: $.body[1
789:
790: 2
791:
792:
793: 3]
794: ]
795:
796: @exec[]
797: $a[^file::exec[fc.exe;;a;b]]
798: $a.status|$a.stderr<hr>
799:
800: @fori[][i]
801: ^for[i](1;3){... =$i= ...}
802:
803: @xdata0[]
804: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
805: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
806: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
807: <people>
808: <man id="1" имя="word слово">
809: <name>P«^;AF B</name>
810: </man>
811: <man id="2">
812: <name>ПИФ^taint[&]</name>
813: </man>
814: </people>
815: }]
816:
817: @xdata[]
818: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
819: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
820: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
821: <people>
822: <man id="1" имя="word слово">
823: <name>P«^;AF B</name>
824: </man>
825: <man id="2">
826: <name>ПИФ^taint[&]</name>
827: </man>
828: </people>
829: }}]
830:
831: @xml[]
832: ^xdata[]
833:
834: ^show_xdoc2[$xdoc]<hr>
835: #^show_xnode1[$xdoc]<hr>
836: $people[^xdoc.select[*/man]]
837: #^show1[]
838: ^show_xnodes1[$people]<hr>
839: #^people.0.owner.hren[]
840:
841: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
842:
843: by id:
844: ^show_xnode1[^xdoc.getElementById[1];0;1]
845: <hr>
846:
847: @show1[array]
848: ^for[i](0;^array._count[]-1){
849: $x[$array.$i]
850: $x.firstChild.nodeValue:
851: $pattributes[$x.parentNode.attributes]
852: ^if(^pattributes._count[]){
853: $pattributes.id.name=$pattributes.id.nodeValue
854: }
855: <br>
856: }
857:
858: @show_xnodes1[array][i]
859: ^for[i](0;^array._count[]-1){
860: ^show_xnode1[$array.$i;0;1]
861: }
862:
863: @show_xnode1[x;level;single][l]
864: ^if(def $x){
865: ^for[l](0;$level-1){ ^; ^; ^; ^;}
866: ^if($x.nodeType == $xnode:ELEMENT_NODE){
867: <^;$x.nodeName
868: $pairs[$x.attributes]
869: ^if(def $pairs){
870: $names[^pairs._keys[]]
871: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
872: }
873: >^;
874: }{
875: [$x.nodeType]
876: }
877:
878: ^if(def $x.nodeValue){$x.nodeValue}<br>
879: ^show_xnode1[$x.firstChild]($level+1)
880: ^if(!$single){
881: ^show_xnode1[$x.nextSibling]($level)
882: }
883:
884: ^if($x.nodeType == $xnode:ELEMENT_NODE){
885: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
886: }
887: }
888:
889: @show_xdoc2[xdoc]
890: ^xdoc.save[out/save.xml;
891: # $.encoding[utf-8]
892: $.method[xml]
893: ]
894: $file[^xdoc.file[
895: $.encoding[utf-8]
896: $.method[html]
897: ]]
898: ^file.save[text;out/save_file.html]
899: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
900: <pre>^taint[html][^xdoc.string[
901: $.method[html]
902: # $.encoding[utF-8]
903: # $.omit-xml-declaration[yes]
904: # $.standalone[no]
905: # -$.doctype-public[-//W3C//DTD XHTML]
906: # -$.doctype-system[/a/b/c/]
907: # $.indent[yes]
908: # $.media-type[text/paf]
909: ]]
910: </pre>
E-mail: