Annotation of parser3/www/htdocs/index.html, revision 1.63

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

E-mail: