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

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

E-mail: