Annotation of parser3/www/htdocs/index.html, revision 1.68
1.61 paf 1: #@USE
2: #t.p
1.15 paf 3:
1.63 paf 4: @autoZ[]
5: #$form:here
1.15 paf 6: $request:charset[windows-1251]
7: $response:charset[windows-1251]
8: $response:content-type[$.value[text/html]$.charset[$response:charset]]
9:
1.60 paf 10: #@postprocess[body]
11: #<b>$body</b>
12: #$result[123]
1.37 paf 13:
1.15 paf 14: @main[]
1.61 paf 15: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
16: # ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
17: # ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
18: #}
1.49 paf 19: #^eval(2)
1.48 paf 20: #^tcrashlocaljunctionsv2[]
1.49 paf 21: #^tcrashlocaljunctions[]
1.50 paf 22: #^tjunctions[]
1.47 paf 23: #^replacetest[]
1.48 paf 24: #^matchoptionpp[]
1.46 paf 25: #^txdocxnodechild[]
1.44 paf 26: #^tclasses[]
1.43 paf 27: #$math:PI
28: #^b:method[]
1.42 paf 29: #^main[]
1.41 paf 30: #^errort[]
1.44 paf 31: #^tselectNumber[]
1.39 paf 32: #$result[hello]
1.36 paf 33: #^invaliddate2[]
34: #^process2[]
35: #^casehashtext[]
1.35 paf 36: #^subjvaltest[]
37: #^tableselect0[]
1.34 paf 38: #^memnotest1[]
1.33 paf 39: #^transparams[]
1.32 paf 40: #^voidparams[]
1.31 paf 41: #^rolls2[]
1.30 paf 42: #^cacheexpireschanging[]
1.29 paf 43: #^cacheexpiresfixed[]
44: #^dateoffsets[]
45: #^exceptionTypes[]
1.28 paf 46: #^roll2[]
1.27 paf 47: #^rolls[]
1.25 paf 48: #^exceptions1[]
1.22 paf 49: #^locate_by_expr[]
1.18 paf 50: #^method_junction_params{...}
1.17 paf 51: #^verifyCookie[paf]
1.37 paf 52: #^execlangs[]
1.16 paf 53: #$t[^tobjeresult[]]$t.a
54: #^xmlprobs[]
1.15 paf 55: #^doubleprobs[]
56: #^math:random(-10)
57: #^divnamestop[]
58: #^arrayclone[]
59: #^operator_tricks[]
60: #^xoutputrusattr[]
61: #^xdocset1[]
62: #^regexp3[]
63: #^exec2[]
64: #^tlock[]
65: #^xmloutattrwithoutvalue[]
66: #^precisionProblem[]
67: #^xpath[]
68: #^ttablesetlang[]
69: #^mail3[]
70: #^ttime[]
71: #^tupper[]
72: #^treplace[]
73: #^xslt2[]
74: #^tcache2[]
75: #$ORIGINS(1)
76: #$t[^table::set{a b} ^table::set{c d}]
77: #^ttaintuntaint[]
78: #^tappend2[]
79: #^badvsnprintf[]
80: #^badoracequoting[]
81: #^badconstructors[]
82: #^xloadwrongtable[]
83: #^xsetwrongtable[]
84: #^if($form:test){y}{n}
85: #^tablecolumnerror[]
86: #^roll[]
87: #^cookie2[]
88: #^tableset[]
89: #^math:PI.format{%.30f}
90: #^xchildren[]
91: #^thashforeach3[]
92: #^thashforeach2[]
93: #^thashforeach[]
94: #^thashdelete[]
95: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
96: #^tappend[]
97: #^sappend[]
98: #^eval(10\3)<br>
99: #^tform[]
100: #^formattest[]
101: #^filelist[]
102: #^connect[mysql://user:pass@host]{ }
103: #^безнадёжна_попытка_поправить_непоправимое[]
104: #^tcache[]
105: #^thashfileexp[]
106: #^tcounter[]
107: #^tablehash[]
108: #j^hashfile[]
109: #^formclass[]
110: #^hren[]
111: #^domedit[]
112: #^domxslt[]
113: #^lsplit2[]
114: #^faceesize[]
115: #^imageresize[]
116: #^ifassignhash[]
117: #^tintdefault[]
118: #$response:status[404]
119: #^ifpasshash[]
120: #^movedir[]
121: #^replace[]
122: #^set[]
123: #^hash[]<hr>
124: #$t[^methresult[]] ->$t
125: #^terror[]
126: #^ssave[]
127: #^calendar[]
128: #^thash[]
129: #^tdef[]
130: #^ford[]
131: #^tif[]
132: #^image[]
133: #^mail2[]
134: #^cookie[]
135: #^response[]
136: #^regexp2[]
137: #^ttablerem[]
138: #^pcre[]
139: #^regexp[]<hr>
140: #^mail[]
141: #^exec[]
142: #^fori[]
143: #^tconnect[]
144: #^xslt[]
145: #^xml[]
146: #^header[]
1.53 paf 147: #^tablehasht[]
1.54 paf 148: #^datecreatestring[]
1.56 paf 149: #^mssqltypes1[]
150: #^badthrows[]
1.57 paf 151: #^xmlspace[]
152: #^counter[main.counter]
153: #^xpath2[]
154: #^callindirect[]
155: #^junctionprob[]
1.59 paf 156: #^datecreatestring2[]
157: #^tstoredproc[]
158: #^tstoredproc2[]
159: #^forkeys[]
1.60 paf 160: #^pngsize[]
1.61 paf 161: #^checkList[]
1.63 paf 162: #^datetest[]
1.65 paf 163: #^tserge[]
1.68 ! paf 164: ^envt[]
1.67 paf 165: #^selectt[]
166: #^select2[]
167: #^selectSingle2[]
168: #^selectString2[]
169: #^selectNumber2[]
170: #^selectBool2[]
171: #^xdoccreate[]
172: #^xdoccreatetag[]
173: #^xdocload[]
174: #^xdocstring[]
175: #^xdocsave[]
1.68 ! paf 176: #^div[]
! 177: #^datecreatestring3[]
! 178:
! 179: @datecreatestring3[]
! 180: $new_after[^date::now(-3)]
! 181: $articles[^table::create{id title last_update
! 182: 1 привет 2002-07-03}]
! 183: ^articles.menu{
! 184: $last_update[^date::create[$articles.last_update]]
! 185: <a href=${articles.id}.html>$articles.title</a>
! 186: ^if($last_update > $new_after){новая}
! 187: <br>
! 188: }
1.67 paf 189:
190: @div[]
191: $var(5)
192: ^var.inc(7)
193: ^var.dec(3)
194: ^var.div(4)
195: ^var.mul(2)
196: $var
197:
198:
199: @xdocsave[]
200: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
201: <document>
202: строка1<br/>
203: строка2<br/>
204: </document>}]
205: ^document.save[test.xml]
206:
207: @xdocstring[]
208: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
209: <document>
210: строка1<br/>
211: строка2<br/>
212: </document>}]
213: ^document.string[
214: $.method[html]
215: ]
216:
217:
218: @xdocload[]
219: $document[^xdoc::load[article.xml]]
220: $response:body[^document.file[$.media-type[text/xml]]]
221:
222:
223: @xdoccreatetag[]
224: $document[^xdoc::create[document]]
225: $paraNode[^document.createElement[para]]
226: $dummy[^document.documentElement.appendChild[$paraNode]]
227: $response:body[^document.file[$.media-type[text/xml]]]
228:
229:
230: @xdoccreate[]
231: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
232: <document>
233: текст
234: </document>}]
235: $response:body[^document.file[$.media-type[text/xml]]]
236:
237: @selectBool2[]
238: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
239: <t attr="привет" n="123"/>}]
240: ^if(^d.selectBool[/t/@n > 10]){
241: /t/@n больше 10
242: }{
243: не больше
244: }
245:
246:
247: @selectNumber2[]
248: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
249: <t attr="привет" n="123"/>}]
250: ^d.selectNumber[number(/t/@n)+1]<br>
251: ^d.selectNumber[2*2]<br>
252:
253:
254: @selectString2[]
255: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
256: <t attr="привет" n="123"/>}]
257: # результат=привет
258: ^d.selectString[string(t/@attr)]
259:
260:
261: @selectSingle2[]
262: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
263: <t attr="привет" n="123"/>}]
264: # результат=один элемент "t"
265: $element[^d.selectSingle[t]]
266: # результат=2 (количество атрибутов <t>)
267: Количество атрибутов: ^element.attributes._count[]<br>
268: # результат=не существует (нет <x>)
269: ^if(^d.select[x]){
270: x существует
271: }{
272: x не существует
273: }
274:
275: @select2[]
276: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
277: # результат: список из одного элемента "t"
278: $list[^d.select[t]]
279: # результат: 2 = количество атрибутов <t>
280: ^list.0.attributes._count[]<br>
281: ^for[i](0;$list-1){
282: $attr[$list.$i]
283: $attr.nodeName = $attr.nodeType<br>
284: }
285:
286:
287: @selectt[]
288: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
289: $list[^d.select[t]]
290: ^list.0.attributes._count[]
1.65 paf 291:
292: @envt[]
1.66 paf 293: $f[^file::exec[showenv.cmd;
294: $.bad[value]
295: $.CGI_good[value]
296: ]]
1.65 paf 297: $f.status<br>
298: $f.stderr<br>
299: <pre>$f.text</pre>
300:
1.63 paf 301:
302: @tserge[]
1.64 paf 303: ^if(" 09 "){y}
1.61 paf 304:
305: @datetest[]
306: $f[^file::stat[some.zip]]
307: Размер в байтах: $f.size<br>
308: Год создания: $f.cdate.year<br>
309: $now[^date::now[]]
310: $DAYS_CONSIDERED_NEW(3)
311: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
312:
1.60 paf 313:
314: @checkList[]
315: ...^oneOf[a;a,b,c]...<br>
316: #...^oneOf[a;ax,b,c]...<br>
317: ...^oneWord[word]...<br>
318: #...^oneWord[wo rd]...<br>
319:
320:
321: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
322: $t[^list.lsplit[,]]
323: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
324: $result[$s]
325:
326: @oneWord[s]
327: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59 paf 328:
329: @pngsize[]
330: $i[^image::measure[test.png]]
331: ^i.html[]
332:
333:
334: @forkeys[]
335: $text[^form:fields.foreach[key;val]{$key=$val
336: }]
337: ^text.save[ttt.txt]
338: =$text=
339:
340:
341: @tstoredproc2[]
342: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
343: ^void:sql{exec pafvoid}
344: }
345:
346: @tstoredproc[]
347: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
348: $t[^table::sql{exec pafproc}]
349: # $t[^table::sql{{call pafproc}}]
350: $c[^t.columns[]]
351: ^c.menu{$c.column}[<br>]
352: }
1.57 paf 353:
354: @datecreatestring2[]
1.58 paf 355: <table border=1>
356: ^datecreatestring2show[2000]
357: ^datecreatestring2show[2000-02]
1.59 paf 358: ^datecreatestring2show[2000-2-03]
1.58 paf 359: ^datecreatestring2show[2000-02-03 15]
360: ^datecreatestring2show[2000-02-03 15:30]
361: ^datecreatestring2show[2000-02-03 15:30:04]
362: ^datecreatestring2show[2000-02-03 15:30:04 hren]
363: ^datecreatestring2show[15:30]
364: ^datecreatestring2show[15:30:05]
365: ^datecreatestring2show[15:30:05 hren]
366: </table>
367:
368: @datecreatestring2show[s]
369: $date[^date::create[$s]]
370: <tr>
371: <td>$s</td><td align=right>^date.sql-string[]</td>
372: </tr>
373:
1.57 paf 374:
375: @junctionprob[][l]
376: $l[123]
377: $a{$l}
378: ^junctionprobnested[$a]
379: @junctionprobnested[p]
380: $p
381:
382:
383: @callindirecttarget[]
384: callindirecttarget called
385: @callindirect[]
386: $f[$callindirecttarget]
387: ^f[]
388:
389: @xpath2[]
390: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
391: <doc>
392: <field-list>
393: <field name="aa"/>
394: <field name="bb"/>
395: </field-list>
396: </doc>
397: }]
398:
399: #^xdoc.string[]
400:
401: $fieldList[^xdoc.selectSingle[/doc/field-list]]
402: #^fieldList.childNodes._count[]
403: $fields[^fieldList.select[field]]
404: #^fields._count[]
405: ^fields.foreach[k;node]{
406: $node.nodeName<br>
407: }
408: @counter[filespec][f;s]
409: ^file:lock[$filespec]{
410: $f[^file::load[text;$filespec]]
411: $s[^eval($f.text+1)]
412: ^s.save[$filespec]
413: }
414: $s
1.56 paf 415:
416: @xmlspace[]
417: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
418: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
419: <people>
420: <man id="1" имя="word слово">
421: <name>1 2</name>
422: </man>
423: </people>
424: }}]
425: $xdoc[^xdoc.transform[global.xsl]]
426: $string[^xdoc.string[$.method[html]]]
427: ^string.save[a]
428: ^untaint[html]{$string}
429:
430: @badthrows[]
431: #^throw[a;b;]
432: ^throw[a;]
1.54 paf 433:
434: @mssqltypes1[]
435: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55 paf 436: # ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
437: # ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
438: # ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
439: $t[^table::sql{select a from paf}]
440: ^t.count[]
1.54 paf 441: }
1.51 paf 442:
1.53 paf 443: @datecreatestring[]
1.54 paf 444: $d[^date::create[2002-04-33 01:03:04]]
1.53 paf 445: ^d.sql-string[]
1.52 paf 446:
447: @method[hash]
448: $hash.key
449: @mainZ[]
450: ^method[
451: $.key{code}
452: ]
453:
1.51 paf 454: @tablehasht[]
455: $t[^table::create{p
456: 1
457: 3
458: 2
459: 4}]
460:
461: $h[^t.hash[p]]
462:
463: =^h._count[]=
464:
465:
466: @sqldefaults[]
467: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
468: ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
469: ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
470: }
1.60 paf 471: =======
472: <hr>
473: OK
474: >>>>>>> 1.50
1.48 paf 475:
476: @tcrashlocaljunctionsv2[]
477: $a[
478: $b{ $c[1] }
479: ]
480: $b
481: $c
482:
483: @tcrashlocaljunctions[]
484: $var[aaa]
485: ^if(1){
486: ^tcrashlocaljunctions1[]
487: }
488:
489: $j
490:
1.49 paf 491: @tcrashlocaljunctions1[][var]
492: $var[varvalue]
1.48 paf 493: $j{
494: $var
495: }
1.49 paf 496: $j
1.48 paf 497:
498: @tjunctions[][tl]
499: $t[^t::create[]]
500: ^tjunctionsi[]
501:
502: @tjunctionsi[][tl]
503: $tl[12345]
504: ^t.tjunctionsm[
505: $.key{
506: $tl
507: }
508: ]
1.46 paf 509:
1.47 paf 510: @replacetest[]
511: $b[b]
512: $s[
513: aaaaaaaaaa${b}aaaaaaaaaaaaaaa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531: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
532: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46 paf 533: ]
534: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
535:
1.44 paf 536:
537: @txdocxnodechild[]
538: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
539: $xdoc.nodeName
540: ^xdoc.selectNumber[2*2]
1.45 paf 541: $xdoc:ELEMENT_NODE
1.44 paf 542:
543:
544: @tclasses[]
545: $t[^t::create[]]
546: ^t.method[]
547: <hr>
548: ^t.base_method[]
549:
1.40 paf 550:
551: @errort[]
1.42 paf 552: ^xdoc::create[a]
1.40 paf 553: #^throw[user;here;this]
554:
555: @tselectNumber[]
556: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
557: ^d.selectString[string(d/@attr)]<br>
558: ^d.selectNumber[2*2]<br>
559: ^d.selectNumber[number(/d/@n)+1]<br>
560:
1.34 paf 561:
1.36 paf 562: @invaliddate2[]
563: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
564:
565: @process2[]
566: ^^process{
567: ^process{
568: ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
569: }
570: }
571:
1.35 paf 572: @casehashtext[]
573: $tt[1]
574: $tmp[
575: ^switch[$tt]{
576: ^case[1]{
577: $.aaa[123]
578: }
579: ^case[DEFAULT]{
580: $.bbb[456]
581: }
582: }
1.36 paf 583: shit!
1.35 paf 584: ]
1.36 paf 585: #$tmp
1.35 paf 586: $tmp.aaa
587:
588: @subjvaltest[]
589: $a12[val]
590: $b[12]
591: $a$b
592:
1.34 paf 593: @tableselect0[]
594: $person[^table::create{name height
595: paf 1.77
596: шохин 2.07
597: moko 1.77
598: }]
599: $nottoohigh[^person.select($person.height<2)]
600: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32 paf 601:
602: @transparams[]
603: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
604: $odoc[^idoc.transform[global.xsl;
605: $.param1['1']
606: $.param2['2']
607: ]]
608: <pre>^taint[^odoc.string[$.method[html]]]
609:
610: @memnotest1[]
611: ^for[i](0;4000){
612:
613: $xxxx[$i]
614: $xxxx
615:
616: }
617:
618: @memnotest1notes[]
619: одна итерация цикла:
620: [Mon Apr 8 20:12:02 2002] execution-------------------------|
1.35 paf 621: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32 paf 622: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
623: [Mon Apr 8 20:12:02 2002] "|| "
624: [Mon Apr 8 20:12:02 2002] 12:WITH_ROOT
625: [Mon Apr 8 20:12:02 2002] 13:VALUE
626: [Mon Apr 8 20:12:02 2002] "xxxx" string
1.35 paf 627: [Mon Apr 8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32 paf 628: [Mon Apr 8 20:12:02 2002] 16:WITH_READ
629: [Mon Apr 8 20:12:02 2002] 17:VALUE
630: [Mon Apr 8 20:12:02 2002] "i" string
631: [Mon Apr 8 20:12:02 2002] 18:GET_ELEMENT
1.35 paf 632: [Mon Apr 8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
633: [Mon Apr 8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32 paf 634: [Mon Apr 8 20:12:02 2002] 15:CONSTRUCT_VALUE
635: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
636: [Mon Apr 8 20:12:02 2002] "| "
637: [Mon Apr 8 20:12:02 2002] 12:WITH_READ
638: [Mon Apr 8 20:12:02 2002] 13:VALUE
639: [Mon Apr 8 20:12:02 2002] "xxxx" string
640: [Mon Apr 8 20:12:02 2002] 14:GET_ELEMENT
641: [Mon Apr 8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
642: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
1.35 paf 643: [Mon Apr 8 20:12:02 2002] "||"'469617+=24 VString -> 0 !optimize[6]'
1.32 paf 644: [Mon Apr 8 20:12:02 2002] <-ja returned
645: [Mon Apr 8 20:12:02 2002] ja->
646:
647: 201/328=0.612804878049 %%optimized
648:
649: 1.
650: CREATE_*POOL
651: сделать
652: *POOL_POOLED+CODE
653: где
654: wwrapper
655: и(возможно) wcodeframe
656: +string
657: стековая переменная
658:
659: 2.
660: избавиться от обёртки при возврате результата process [см. тело _for]
661:
662: 3.
663: сделать callback для process, чтобы вынести invariants из _for & co.
664:
665: 4.
666: @todo склеить get_element и write_value (при вставлении? write_value)
667:
668: 5.
669: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
670: обёртка сразу выбрасывается = не нужна]
671:
672: 6.
673: process вариант получить именно string, без VString обёртки [часто обёртка
674: сразу выбрасывается = не нужна]
675:
676: 7.
677: string head, убить 8 байт неправильной link
1.31 paf 678:
679: @voidparams[]
680: ^voidparamsm[$form:field]
681:
682: @voidparamsm[p]
683: ^p.int(123)
1.29 paf 684:
1.30 paf 685: @rolls2[]
686: $now[^date::now[]]
687: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
688: ^for[i](1;12){
689: ^d.roll[month](-1) ^d.sql-string[]<br>
690: }
691:
1.29 paf 692: @cacheexpireschanging[]
693: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
694: ^cache[^date::now(+4/24/60/60)]
695: # ^cache(2)
1.30 paf 696: # ^cache(0)
1.29 paf 697: ^math:random(100)
698: }
699:
700:
701:
702: @cacheexpiresfixed[]
703: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
704: ^math:random(100)
705: }
706:
707: @dateoffsets[]
708: $d[^date::create(^date::now[]+1/24/60)]
709: #$d[^date::now(+1/24/60)]
710: ^d.sql-string[]
711: #$d
1.26 paf 712:
1.28 paf 713: @exceptionTypes[]
714: # parser.compile ^test[} компиляция (непарная скобка, ...)
715: # parser.runtime ^if(0). параметры (больше/меньше, чем нужно, не тех типов, ...)
716: # number.zerodivision ^eval(1/0) ^eval(1%0)
717: # number.format ^eval(abc*5)
718: # file.missing ^file:delete[delme] not found
719: # file.access ^table::load[.] no rights
720: # image.format ^image::measure[index.html] not gif/jpg
721: # sql.connect ^connect[mysql://baduser:pass@host/db]{} not found/timeout
722: # sql.execute ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}} syntax error
723: # xml ^xdoc::create{<forgot?>} any error in xml/xslt libs
724: # smtp.connect not found/timeout
725: # smtp.execute communication error
726:
1.26 paf 727: @roll2[]
728: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27 paf 729: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26 paf 730:
1.25 paf 731:
732: @rolls[]
733: $d[^date::create(2002;4;4)]
734: ^d.sql-string[]<br>
735: ^for[i](1;7){
736: ^d.roll[day](-1)
737: ^d.sql-string[]<br>
738: }
739: <hr>
740: $d[^date::create(2002;3;28)]
741: ^d.sql-string[]<br>
742: ^for[i](1;7){
743: ^d.roll[day](+1)
744: ^d.sql-string[]<br>
745: }
746: <hr>
747: $d[^date::create(2002;12;3)]
748: ^d.sql-string[]<br>
749: ^for[i](1;14){
750: ^d.roll[day](-1)
751: ^d.sql-string[]<br>
752: }
753: <hr>
754: $d[^date::create(2002;10;19)]
755: ^d.sql-string[]<br>
756: ^for[i](1;14){
757: ^d.roll[day](+1)
758: ^d.sql-string[]<br>
759: }
760:
761:
762:
763:
764:
1.22 paf 765:
766: @exceptions1[]
767: ^try{
768: aaa
1.24 paf 769: ^throw[custom1;paf;is stupid]
1.22 paf 770: }{
1.24 paf 771: ^if($exception.type eq custom1){
1.28 paf 772: # $exception.handled(1)
773: ^throw[$exception]
1.24 paf 774: type=$exception.type<br>
775: source=$exception.source<br>
776: file=$exception.file<br>
777: lineno=$exception.lineno<br>
778: comment=$exception.comment<br>
779: }
1.22 paf 780: }
1.21 paf 781:
782: @locate_by_expr[]
783: $t[^table::create{a b
784: 1 nok
785: 2 ok
786: 3 nok
787: }]
788: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17 paf 789:
790: @method_junction_params[param]
791: ^if($param is junction){junction}{ne junction}
792:
793: @verifyCookie[value]
794: ^if($cookie:dummyvote eq $value){
795: $result(1)
796: }{
797: $cookie:dummyvote[$value]
798: $result(0)
799: }
1.16 paf 800:
801: @execlangs[]
1.20 paf 802: $f[^file::exec[test.pl]]
1.36 paf 803: err:$f.stderr<br>
1.16 paf 804: ^process{$f.text}
805: #$c[^t.columns[]]
806: #^c.menu{
807: #* $c.column<br>
808: #}
1.36 paf 809: c:$t.c<br>
1.16 paf 810:
811: @tobjeresult[]
812: ^table::create{a
813: 12}
1.15 paf 814:
815: @xmlprobs[]
816: $xmlDataType[^xdoc::load[program.xml]]
817: #<pre>^taint[^xmlDataType.string[]]
818: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
819: #=^xmlDataTypes._count[]=
820: =^xmlDataTypes.0.getAttribute[type-id]=
821:
822: @doubleprobs[]
823: $1(^math:radians(180))
824: $2($math:PI)
825: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
826: ^if($1==$2){y;n}
827: ^if(^math:radians(180)==$math:PI){y;n}
828:
829:
830: @divnamestop[]
831: $a(10)
832: ^eval($a\3)
833:
834: @arrayclone[]
835: $t[^table::create{a b
836: 1 11
837: 2 22
838: }]
839: $c[^table::create[$t]]
840: ^c.append{2 33}
841: ^t.count[]
842: ^c.count[]
843:
844: @operator_tricks[]
845: ^if(1){$a[^t[]]}
846: $a!
847: $a($b)
848: ^if(1){y}{n}
849: $MAIN:a(^t[] eq OK)
850: #$MAIN:a(1)
851: ^if($a){y}{n}
852: #^if(1){y}{n}
853: $form:if
854: $a[$.n[1]]
855: $a.if
856:
857: @xoutputrusattr[]
858: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
859: ^show_xdoc2[$d]
860:
861: @xdocset1[]
862: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
863: ^show_xdoc2[$d]
864:
865: @regexp3[]
866: $s[abcАБВ]
867: ^if(^s.match[][i]){y}{n}
868:
869:
870: @exec2[]
871: $a[^file::exec[bin/t.cmd]]
872: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
873:
874:
875: @tlock[]
876: ^file:lock[lockfile]{
877: code
878: }
879:
880: @xmloutattrwithoutvalue[]
881: #$ORIGINS(1)
882: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
883: $doc[^doc.transform[global.xsl]]
884: =^taint[html][^doc.string[$.method[html]]]=
885:
886:
887:
888: @precisionProblem[]
889: $a[123456789012345678901234567890]
890: $b(^a.double[])
891: ^b.format{%.20E}
892: <hr>
893: ^eval(2*2)
894:
895: @xpath[]
896: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
897: <document><block><p>привет</p></block></document>
898: }]
899: #^show_xdoc2[$xdoc]
900: $node[^xdoc.selectSingle[/document/block/p]]
901: ^if(def $node){
902: ^if($node is string){
903: $node
904: }{
905: ^if($node is hash){
906: ^node._count[]
907: }{
908: $node.nodeType
909: }
910: }
911: #$node.firstChild.nodeValue
912: }{
913: node not found
914: }
915:
916:
917: @ttablesetlang[]
918: $a-tab-b[a b
919: 1 2]
920:
921: $t[^table::set{$a-tab-b}]
922: =$t.a=
923: <hr>
924:
925: $t[^table::set[nameless]{^taint[$a-tab-b]}]
926: =$t.0=
927: <hr>
928:
929: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
930: =$t.a=
931:
932: #^t.append{1 2}
933:
934: @mail3[]
935: ^mail:send[
936: $.from[Александр Петросян <paf@design.ru>]
937: $.to[Александр Петросян <paf@design.ru>]
938: $.subject[проверка4]
939: $.body[
940: $.text[
941: $.content-type[$.value[text/plain] $.charset[windows-1251]]
942: $.body[проверка]
943: ]
944: $.attachment[
945: $.value[^file::load[text;index.html]]
946: $.file-name[привет всем.html]
947: ]
948: ]
949: ]
950:
951:
952: @ttime[]
953: $now[^date::now[]]
954: $now.hour:$now.minute
955:
956: @tupper[]
957: $t[abcABCабвАБВ]
958: $t<br>
959: ^t.upper[]
960:
961: @treplace[]
962: $copy-paste-clean[^table::set{a b
963: . _
964: , _
965: + _
966: & _
967: ? _
968: = _}]
969:
970: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
971: # почему-то этот replace роняет апач в 500 ошибку :(
972: #^cache_key.replace[$copy-paste-clean]
973: $test[abc]
974: ^test.save[$cache_key]saved<br>
975: $cache[^file:list[.;\.cache^$]]
976: ^file:delete[$cache_key]deleted($cache.name)<br>
977:
978:
979:
980: @xslt2[]
981: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
982: <document><block><p>привет</p></block></document>
983: }]
984: ^show_xdoc2[$xdoc]
985: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
986: <hr>
987:
988:
989: @tcache2[]
990: ^cache[$DB_HOME/keyключ](2){
991: ^math:random(100)
992: }
993:
994: @ttaintuntaint[]
995: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
996:
997: ]zz
998: <hr>
999: ^untaint[html]{1^taint[ ]2 3}
1000:
1001:
1002: @tappend2[]
1003: $t[^table::set{a b}]^t.append{1 2}$t.a
1004:
1005: @badvsnprintf[]
1006: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz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S_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
1012: ^connect[$SQL.connect-string]{
1013: ^void:sql{delete from paf}
1014: ^void:sql{insert into paf values (1, '$form:text')}
1015: $paf[^table::sql{select * from paf}]
1016: ^paf.menu{
1017: $paf.id: ^untaint{$paf.block}<hr>
1018:
1019: }
1020: <hr>
1021:
1022:
1023: ^rem{
1024: $news[^table::sql{select description from news}[$.limit(3)]]
1025: ^news.menu{
1026: ^untaint{$news.description}<hr>
1027:
1028: }
1029: <hr>
1030: }
1031:
1032: $tables[^table::sql{select table_name from user_tables}]
1033: ^tables.menu{
1034: $tables.table_name<br>
1035: }
1036:
1037: }
1038: <hr>
1039: $env:PATH
1040:
1041: @badconstructors[]
1042: $bred[^string::length[]]
1043: $bred[^response::clear[]]
1044: $bred[^int::int[]]
1045:
1046:
1047: @xloadwrongtable[]
1048: $constr[^xdoc::load[wrongtable.xml]]
1049: ^show_xdoc2[$constr]
1050:
1051: @xsetwrongtable[]
1052: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
1053: <block-list>^untaint[as-is]{$constructor}</block-list>}]
1054:
1055:
1056: @tablecolumnerror[]
1057: $t[^table::set{a}]
1058: $t.$a
1059:
1060: @roll[]
1061: #$date[^date::set(1970;1;2)]
1062: #^date.roll[month](-1)
1063: $date[^date::set(2038;1;1)]
1064: ^date.roll[month](+1)
1065: $date.year $date.month $date.day
1066:
1067: @cookie2[]
1068: #=$cookie:clientType[$.value[test]]=<br>
1069: =$cookie:clientType=<br>
1070:
1071:
1072: @tableset[]
1073: $a[^table::set{a
1074: 1
1075: 2}]
1076: ^eval(100\$a)
1077:
1078:
1079:
1080: @zzz[]
1081:
1082:
1083: $constructor[
1084: <block1 name="main_srvr" type="0" label="Основное тело" />
1085: <block2 name="main_srvr2" type="0" label="Основное тело" />
1086: ]
1087:
1088: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1089: <block-list>^untaint[as-is]{$constructor}</block-list>}]
1090:
1091: $children[$constr.documentElement.childNodes]
1092: ^if($children){
1093: ^for[i](1;^children._count[]){
1094: $node[$children.$i]
1095: $node.nodeName<br>
1096: }
1097: }
1098:
1099:
1100: @thashforeach3[]
1101: $h[
1102: $.a[1]
1103: $.b[2]
1104: ]
1105: $c[^table::set{a
1106: ^h.foreach[key;value]{$value
1107: }}]
1108: $c.a
1109:
1110: @thashforeach2[]
1111: $h[
1112: $.a[1]
1113: $.b[2]
1114: ]
1115: $c[
1116: ^h.foreach[key;value]{
1117: $.$key[$value]
1118: }
1119: ]
1120: $c.b
1121:
1122: @thashforeach[]
1123: $h[
1124: $.a[1]
1125: $.b[2]
1126: ]
1127: ^h.foreach[key;value]{
1128: $key=$value<br>
1129: }
1130:
1131: @thashdelete[]
1132: $h[$.a[1] $.b[2]]
1133: was:<br>
1134: count=^h._count[] <br>
1135: b='$h.b' <br>
1136:
1137: ^h.delete[b]
1138:
1139: now:<br>
1140: count=^h._count[] <br>
1141: b='$h.b'
1142:
1143: @sappend[]
1144: $test[123]
1145: ^test.save[test]
1146: ^test.save[append;test]
1147:
1148: @tappend[]
1149: $test[^table::set{a b
1150: a1 b1}]
1151: ^test.save[test]
1152: $test[^table::set{a b
1153: a2 b2}]
1154: ^test.save[append;test]
1155:
1156:
1157: @tform[]
1158: ^if(def $form:new_file){y}{n}
1159: <form method="post" enctype="multipart/form-data">
1160: <input type="file" name="new_file" />
1161: <input type=submit>
1162: </input>
1163:
1164: @formattest[]
1165: $size(15.124)
1166:
1167: ^size.format{%.2f}
1168:
1169: @filelist[]
1170: $html[^file:list[.;\.html^$]]
1171: ^html.menu{
1172: $html.name<br>
1173: }
1174: <hr>
1175:
1176: @безнадёжна_попытка_поправить_непоправимое[]
1177: $dom_from_disk[^xdoc::load[input.xml]]
1178: $dom_created_in_air[^xdoc::create[doc]]
1179: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
1180: ^show_xdoc2[$dom_created_in_air]
1181:
1182:
1183: @tcache[]
1184: #^hashfile:clear[cache]
1185: $code[^hashfile::open[$DB_HOME;cache]]
1186: ^code.cache[key](2){
1187: ^math:random(100)
1188: # ^code.delete[]
1189: }
1190:
1191: @thashfileexp[]
1192: $hf[^hashfile::open[$DB_HOME;hashfile]]
1193: $hf.paf[$.value[крут] $.expires(3)]
1194: paf=$hf.paf
1195: <hr>
1196: ^hf.foreach[key;value]{
1197: $key=$value<br>
1198: }
1199: <hr>
1200: $hash[^hf.hash[]]
1201: =$hash.paf=
1202: <hr>
1203:
1204: @tcounter[]
1205: ^tcounterone[$DB_HOME]
1206: other root:
1207: ^tcounterone[${DB_HOME}2]
1208: again, first:
1209: ^tcounterone[$DB_HOME]
1210:
1211: @tcounterone[DB_HOME]
1212: $counter[^hashfile::open[$DB_HOME;counter]]
1213: #^counter.clear[]
1214: ^counter.transaction{
1215: # $counter.value(10)
1216: $counter.value($counter.value+1)
1217: # ^counter.delete[value]
1218: $counter.value
1219: }
1220: <hr>
1221: ^rem{
1222: $hash[^counter.hash[]]
1223: =$hash.value=
1224: <hr>
1225: }
1226:
1227: @tablehash[]
1228: $productList[^table::set{id name
1229: 1 носки
1230: 2 валенки
1231: 3 ушанка
1232: }]
1233:
1234: #скажем, у первого дилера
1235: $firstPriceList[^table::set{id price
1236: 1 0.3
1237: 3 1000
1238: }]
1239:
1240: $firstPriceHash[^firstPriceList.hash[id]]
1241:
1242: ^productList.menu{
1243: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
1244: }
1245:
1246:
1247: @hashfile[]
1248: $hf[^hashfile::assign[hashfile]]
1249: #$hf.paf[крут5]
1250: paf=$hf.paf
1251:
1252: @formclass[]
1253: ^$form:CLASS.a=$form:CLASS.a
1254:
1255: @domdata[]
1256: ^if(1){
1257: # $a{^hren[]}
1258: }
1259: $a
1260: $xdoc[^xdoc::create[doc]]
1261: $doc[$xdoc.documentElement]
1262: $name[^doc.appendChild[^xdoc.createElement[name]]]
1263: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1264: ^untaint[as-is]{=$text.nodeValue=}
1265:
1266: @domedit[]
1267: ^domdata[]
1268: #$paf.nodeName<br>
1269: #$doc.documentElement.nodeName<br>
1270:
1271: ^show_xnode1[$xdoc.documentElement;0;1]
1272: <hr>
1273: ^show_xdoc2[$xdoc]
1274: <hr>
1275:
1276: @domxslt[]
1277: ^domdata[]
1278: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1279: <hr>
1280:
1281: @lsplit2[]
1282: $path[/optics/]
1283: $pathTable[^path.lsplit[/]]
1284: ^pathTable.menu{
1285: ^if(def $pathTable.piece){
1286: =$pathTable.piece=
1287: }
1288: }
1289:
1290:
1291: @faceesize[]
1292: $k(2)
1293: $pict[^image::load[paf.gif]]
1294: $small[^image::create($pict.width/$k;$pict.height/$k)]
1295: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1296: $response:body[^small.gif[]]
1297:
1298: @imageresize[]
1299: $k(2)
1300: $pict[^image::create(400*$k;200*$k)]
1301: $pict.line-width(2)
1302: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1303: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1304: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1305: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
1306: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
1307: $response:body[^pict.gif[]]
1308:
1309: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1310: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1311: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1312:
1313: #$response:body[^small.gif[]]
1314:
1315:
1316: @tintdefault[]
1317: #$abc[abc]
1318: $abc[33]
1319: ^abc.int[z]
1320: #^abc.int(123)
1321:
1322: @ifassignhash[]
1323: $h[^if(1){$.a(1);$.a(2)}]
1324: $h.a
1325:
1326: @ifpasshash[]
1327: $a[$.e[a]]
1328: $b[$.e[b]]
1329: ^ifpasshashdest[^if(1){$a;$b}]
1330: #$x[^if(1){$a}{$b}]
1331: #^ifpasshashdest[$x]
1332:
1333: @ifpasshashdest[p]
1334: $p.e
1335:
1336: @movedir[]
1337: ^file:move[a;deeper/a]
1338:
1339: @replace[]
1340: $a[12^;3]
1341: ^a.replace[^table::set{from to
1342: 2^; !
1343: }]
1344:
1345:
1346: @set[]
1347: ^setdata[]
1348: ^a.add[$b]
1349: add:$a.3<br>
1350:
1351: ^setdata[]
1352: ^a.sub[$b]
1353: sub2:$a.2<br>
1354: sub1:$a.1<br>
1355:
1356: ^setdata[]
1357: $c[^a.union[$b]]
1358: union3:$c.3<br>
1359: union2:$c.2<br>
1360:
1361: ^setdata[]
1362: $c[^a.intersection[$b]]
1363: intersection3:$c.3<br>
1364: intersection2:$c.2<br>
1365:
1366: ^setdata[]
1367: intersects:^if(^a.intersects[$b]){y;n}<br>
1368: intersects2:^if(^a.intersects[ ]){y;n}<br>
1369:
1370:
1371: <hr>
1372:
1373: @setdata[]
1374: $a[$.1[a1] $.2[a2]]
1375: $b[ $.2[b2] $.3[b3]]
1376:
1377:
1378: @hash[]
1379: $h[^hash::create[$._default[123]]]
1380: $h.paf[not kretin]
1381: $h.paf<br>
1382: =$h.that=<br>
1383:
1384: @methresult[]
1385: $result[^table::set{1}]
1386:
1387: @terror[]
1388: ^error[method z must be called with z]
1389:
1390: @syntax1[]
1391: #^a[^b]
1392:
1393: @syntax2[]
1394: #^a[
1395:
1396: @ssave[]
1397: $abc[abc]
1398: ^abc.save[abc]
1399:
1400: @calendar[]
1401: 2001;11:<br>
1402: $week_days[^date:calendar[rus](2001;11)]
1403: <pre>
1404: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
1405: </pre>
1406:
1407: @thash[]
1408: $table[^table::set{id name age
1409: 1 paf 278
1410: 2 пиф 234
1411: }]
1412: $hash[^table.hash[id;^table::set[nameless]{id
1413: name}]]
1414: $hash.2.id $hash.2.name $hash.2.age
1415:
1416: @tdef[]
1417: $s[0]
1418: if 0=^if($s){}{n}<br>
1419: if def 0=^if(def $s){y}{}<br>
1420: <hr>
1421:
1422: @ford[]
1423: ^for[i](0;5){$i}{($i)}
1424:
1425: @tif[]
1426: ^if[def]{y;n}
1427:
1428: @image[]
1429: $pict[^image::create(400;200)]
1430: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1431: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
1432: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1433: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
1434: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1435: $response:body[^pict.gif[]]
1436:
1437:
1438:
1439: @mail2[]
1440: ^mail:send[
1441: $.content-type[$.value[text/plain] $.charset[windows-1251]]
1442: $.from[Александр Петросян <paf@design.ru>]
1443: $.to[Александр Петросян <paf@design.ru>]
1444: $.subject[проверка]
1445: $.body[проверка]
1446: ]
1447:
1448: @cookie[]
1449: $env:HTTP_COOKIE<br>
1450:
1451: #$cookie:переменная[test тест ТЕСТ2]
1452: =$cookie:переменная=<br>
1453: #$cookie:переменная2[test тест ТЕСТ3]
1454: =$cookie:переменная2=<br>
1455: =$cookie:CLASS.переменная2=<br>
1456:
1457: @response[]
1458: #^if($form:reload){
1459: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
1460: #}
1461:
1462: @xslt[]
1463: ^xdata[]
1464: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
1465: ^show_xdoc2[$transformed]
1466:
1467: @regexp2[]
1468: $s[ select]
1469: $s[^s.match[^^\s*][]{!}]
1470: $s
1471:
1472: @header[]
1473: $response:refresh[
1474: $.value[0]
1475: $.url[http://design.ru?a=^taint[123]]
1476: ]
1477:
1478: @ttablerem[]
1479: $table[^table::load[a.cfg]]
1480: ^table.menu{$table.a}
1481:
1482: @tconnect[]
1483: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
1484: $tables[^table::sql{show tables}]
1485: #$cols[^tables.columns[]]
1486: #$cols.column
1487: ^tables.menu{
1488: $tables.[Tables_in_test]<br>
1489: }
1490: }
1491:
1492: @pcre[]
1493: $s[1 2]
1494: ^s.match[\s;ig]{!}
1495: #^s.match[\d;ig]{!}
1496:
1497:
1498: @regexp[]
1499: $s[abcАБВ]
1500: ^if(^s.match[б][i]){y}{n}
1501:
1502: @mail[]
1503: #$ORIGINS(1)
1504: ^mail:send[
1505: $.from[paf@design.ru]
1506: $.to[paf@design.ru]
1507: $.body[1
1508:
1509: 2
1510:
1511:
1512: 3]
1513: ]
1514:
1515: @exec[]
1516: $a[^file::exec[fc.exe;;a;b]]
1517: $a.status|$a.stderr<hr>
1518:
1519: @fori[][i]
1520: ^for[i](1;3){... =$i= ...}
1521:
1522: @xdata0[]
1523: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1524: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
1525: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1526: <people>
1527: <man id="1" имя="word слово">
1528: <name>P«^;AF B</name>
1529: </man>
1530: <man id="2">
1531: <name>ПИФ^taint[&]</name>
1532: </man>
1533: </people>
1534: }]
1535:
1536: @xdata[]
1537: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1538: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1539: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1540: <people>
1541: <man id="1" имя="word слово">
1542: <name>P«^;AF B</name>
1543: </man>
1544: <man id="2">
1545: <name>ПИФ^taint[&]</name>
1546: </man>
1547: </people>
1548: }}]
1549:
1550: @xml[]
1551: ^xdata[]
1552:
1553: ^show_xdoc2[$xdoc]<hr>
1554: #^show_xnode1[$xdoc]<hr>
1555: $people[^xdoc.select[*/man]]
1556: #^show1[]
1557: ^show_xnodes1[$people]<hr>
1558: #^people.0.owner.hren[]
1559:
1560: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1561:
1562: by id:
1563: ^show_xnode1[^xdoc.getElementById[1];0;1]
1564: <hr>
1565:
1566: @show1[array]
1567: ^for[i](0;^array._count[]-1){
1568: $x[$array.$i]
1569: $x.firstChild.nodeValue:
1570: $pattributes[$x.parentNode.attributes]
1571: ^if(^pattributes._count[]){
1572: $pattributes.id.name=$pattributes.id.nodeValue
1573: }
1574: <br>
1575: }
1576:
1577: @show_xnodes1[array][i]
1578: ^for[i](0;^array._count[]-1){
1579: ^show_xnode1[$array.$i;0;1]
1580: }
1581:
1582: @show_xnode1[x;level;single][l]
1583: ^if(def $x){
1584: ^for[l](0;$level-1){ ^; ^; ^; ^;}
1585: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1586: <^;$x.nodeName
1587: $pairs[$x.attributes]
1588: ^if(def $pairs){
1589: $names[^pairs._keys[]]
1590: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
1591: }
1592: >^;
1593: }{
1594: [$x.nodeType]
1595: }
1596:
1597: ^if(def $x.nodeValue){$x.nodeValue}<br>
1598: ^show_xnode1[$x.firstChild]($level+1)
1599: ^if(!$single){
1600: ^show_xnode1[$x.nextSibling]($level)
1601: }
1602:
1603: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1604: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
1605: }
1606: }
1607:
1608: @show_xdoc2[xdoc]
1609: ^xdoc.save[out/save.xml;
1610: # $.encoding[utf-8]
1611: $.method[xml]
1612: ]
1613: $file[^xdoc.file[
1614: $.encoding[utf-8]
1615: $.method[html]
1616: ]]
1617: ^file.save[text;out/save_file.html]
1618: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
1619: <pre>^taint[html][^xdoc.string[
1620: $.method[html]
1621: # $.encoding[utF-8]
1622: # $.omit-xml-declaration[yes]
1623: # $.standalone[no]
1624: # -$.doctype-public[-//W3C//DTD XHTML]
1625: # -$.doctype-system[/a/b/c/]
1626: # $.indent[yes]
1627: # $.media-type[text/paf]
1628: ]]
1629: </pre>
E-mail: