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

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

E-mail: