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