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