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

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

E-mail: