Annotation of parser3/src/www/htdocs/index.html, revision 1.541
1.541 ! paf 1: @USE
! 2: t.p
1.510 paf 3: @auto[]
1.503 paf 4: $request:charset[windows-1251]
5: $response:charset[windows-1251]
1.514 paf 6: $response:content-type[$.value[text/html]$.charset[$response:charset]]
1.510 paf 7:
8: @main[]
1.540 paf 9: ^exec2[]
10: #^tlock[]
1.537 paf 11: #^xmloutattrwithoutvalue[]
1.535 paf 12: #^precisionProblem[]
1.521 paf 13: #^xpath[]
1.515 paf 14: #^ttablesetlang[]
1.513 paf 15: #^mail3[]
1.511 paf 16: #^ttime[]
1.506 paf 17: #^tupper[]
1.499 paf 18: #^treplace[]
1.539 paf 19: #^xslt2[]
1.507 paf 20: #^tcache2[]
1.489 paf 21: #$ORIGINS(1)
1.488 paf 22: #$t[^table::set{a b} ^table::set{c d}]
1.486 paf 23: #^ttaintuntaint[]
1.493 paf 24: #^tappend2[]
1.480 paf 25: #^badvsnprintf[]
1.479 paf 26: #^badoracequoting[]
1.477 paf 27: #^badconstructors[]
1.514 paf 28: #^xloadwrongtable[]
1.476 paf 29: #^xsetwrongtable[]
1.473 paf 30: #^if($form:test){y}{n}
1.472 paf 31: #^tablecolumnerror[]
32: #^roll[]
1.471 paf 33: #^cookie2[]
1.470 paf 34: #^tableset[]
1.469 paf 35: #^math:PI.format{%.30f}
1.462 paf 36: #^xchildren[]
37: #^thashforeach3[]
1.461 paf 38: #^thashforeach2[]
39: #^thashforeach[]
1.458 paf 40: #^thashdelete[]
1.456 paf 41: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
1.454 paf 42: #^tappend[]
1.453 paf 43: #^sappend[]
1.452 paf 44: #^eval(10\3)<br>
1.450 paf 45: #^tform[]
1.448 paf 46: #^formattest[]
1.447 paf 47: #^filelist[]
1.443 paf 48: #^connect[mysql://user:pass@host]{ }
1.431 paf 49: #^безнадёжна_попытка_поправить_непоправимое[]
1.538 paf 50: #^tcache[]
1.460 paf 51: #^thashfileexp[]
1.468 paf 52: #^tcounter[]
1.423 parser 53: #^tablehash[]
1.443 paf 54: #j^hashfile[]
1.417 parser 55: #^formclass[]
1.415 parser 56: #^hren[]
1.485 paf 57: #^domedit[]
1.475 paf 58: #^domxslt[]
1.402 parser 59: #^lsplit2[]
1.401 parser 60: #^faceesize[]
1.445 paf 61: #^imageresize[]
1.399 parser 62: #^ifassignhash[]
63: #^tintdefault[]
64: #$response:status[404]
1.390 parser 65: #^ifpasshash[]
1.387 parser 66: #^movedir[]
67: #^replace[]
1.416 parser 68: #^set[]
1.385 parser 69: #^hash[]<hr>
1.384 parser 70: #$t[^methresult[]] ->$t
1.382 parser 71: #^terror[]
1.378 parser 72: #^ssave[]
1.377 parser 73: #^calendar[]
1.376 parser 74: #^thash[]
1.373 parser 75: #^tdef[]
1.375 parser 76: #^ford[]
1.371 parser 77: #^tif[]
1.383 parser 78: #^image[]
1.369 parser 79: #^mail2[]
1.413 parser 80: #^cookie[]
1.365 parser 81: #^response[]
1.364 parser 82: #^regexp2[]
83: #^ttablerem[]
84: #^pcre[]
85: #^regexp[]<hr>
86: #^mail[]
87: #^exec[]
88: #^fori[]
1.468 paf 89: #^tconnect[]
1.509 paf 90: #^xslt[]
1.470 paf 91: #^xml[]
1.364 parser 92: #^header[]
1.477 paf 93: <hr>
1.364 parser 94: OK
1.540 paf 95:
96: @exec2[]
97: $a[^file::exec[bin/t.cmd]]
98: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
99:
1.539 paf 100:
101: @tlock[]
102: ^file:lock[lockfile]{
103: code
104: }
1.535 paf 105:
106: @xmloutattrwithoutvalue[]
107: #$ORIGINS(1)
1.536 paf 108: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
1.535 paf 109: $doc[^doc.transform[global.xsl]]
1.536 paf 110: =^taint[html][^doc.string[$.method[html]]]=
1.535 paf 111:
112:
113:
114: @precisionProblem[]
115: $a[123456789012345678901234567890]
116: $b(^a.double[])
117: ^b.format{%.20E}
118: <hr>
119: ^eval(2*2)
1.517 paf 120:
121: @xpath[]
122: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
123: <document><block><p>привет</p></block></document>
124: }]
125: #^show-xdoc2[$xdoc]
1.520 paf 126: $node[^xdoc.selectSingle[/document/block/p]]
1.519 paf 127: ^if(def $node){
1.520 paf 128: ^if($node is string){
129: $node
130: }{
131: ^if($node is hash){
132: ^node._count[]
133: }{
134: $node.nodeType
135: }
1.519 paf 136: }
1.518 paf 137: #$node.firstChild.nodeValue
1.519 paf 138: }{
139: node not found
140: }
1.517 paf 141:
1.514 paf 142:
143: @ttablesetlang[]
144: $a-tab-b[a b
145: 1 2]
146:
147: $t[^table::set{$a-tab-b}]
148: =$t.a=
149: <hr>
150:
151: $t[^table::set[nameless]{^taint[$a-tab-b]}]
152: =$t.0=
153: <hr>
154:
155: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
156: =$t.a=
157:
158: #^t.append{1 2}
1.511 paf 159:
160: @mail3[]
161: ^mail:send[
162: $.from[Александр Петросян <paf@design.ru>]
163: $.to[Александр Петросян <paf@design.ru>]
1.512 paf 164: $.subject[проверка4]
1.511 paf 165: $.body[
166: $.text[
167: $.content-type[$.value[text/plain] $.charset[windows-1251]]
168: $.body[проверка]
1.512 paf 169: ]
170: $.attachment[
171: $.value[^file::load[text;index.html]]
172: $.file-name[привет всем.html]
1.511 paf 173: ]
174: ]
175: ]
176:
1.504 paf 177:
1.510 paf 178: @ttime[]
179: $now[^date::now[]]
180: $now.hour:$now.minute
181:
1.504 paf 182: @tupper[]
183: $t[abcABCабвАБВ]
184: $t<br>
185: ^t.upper[]
1.497 paf 186:
187: @treplace[]
188: $copy-paste-clean[^table::set{a b
189: . _
190: , _
191: + _
192: & _
193: ? _
194: = _}]
195:
1.498 paf 196: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
1.497 paf 197: # почему-то этот replace роняет апач в 500 ошибку :(
1.498 paf 198: #^cache_key.replace[$copy-paste-clean]
199: $test[abc]
200: ^test.save[$cache_key]saved<br>
201: $cache[^file:list[.;\.cache^$]]
202: ^file:delete[$cache_key]deleted($cache.name)<br>
203:
1.497 paf 204:
205:
206: @xslt2[]
1.527 paf 207: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1.516 paf 208: <document><block><p>привет</p></block></document>
1.497 paf 209: }]
1.516 paf 210: ^show-xdoc2[$xdoc]
1.522 paf 211: ^show-xdoc2[^xdoc.transform[templates/_document.xslt]]
1.497 paf 212: <hr>
213:
1.495 paf 214:
1.496 paf 215: @tcache2[]
216: ^cache[$DB_HOME/keyключ](2){
217: ^math:random(100)
218: }
1.485 paf 219:
1.486 paf 220: @ttaintuntaint[]
221: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
222:
223: ]zz
224: <hr>
225: ^untaint[html]{1^taint[ ]2 3}
226:
227:
1.485 paf 228: @tappend2[]
229: $t[^table::set{a b}]^t.append{1 2}$t.a
1.477 paf 230:
1.479 paf 231: @badvsnprintf[]
232: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
233: }
234:
235:
1.477 paf 236: @badoracequoting[]
237: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
238: ^connect[$SQL.connect-string]{
1.478 paf 239: ^void:sql{delete from paf}
1.479 paf 240: ^void:sql{insert into paf values (1, '$form:text')}
1.478 paf 241: $paf[^table::sql{select * from paf}]
242: ^paf.menu{
1.479 paf 243: $paf.id: ^untaint{$paf.block}<hr>
1.478 paf 244:
1.477 paf 245: }
1.478 paf 246: <hr>
247:
1.477 paf 248:
1.478 paf 249: ^rem{
1.477 paf 250: $news[^table::sql{select description from news}[$.limit(3)]]
251: ^news.menu{
252: ^untaint{$news.description}<hr>
253:
254: }
1.478 paf 255: <hr>
256: }
257:
258: $tables[^table::sql{select table_name from user_tables}]
259: ^tables.menu{
260: $tables.table_name<br>
261: }
262:
1.477 paf 263: }
264: <hr>
265: $env:PATH
1.476 paf 266:
267: @badconstructors[]
268: $bred[^string::length[]]
269: $bred[^response::clear[]]
270: $bred[^int::int[]]
271:
1.475 paf 272:
273: @xloadwrongtable[]
274: $constr[^xdoc::load[wrongtable.xml]]
1.513 paf 275: ^show-xdoc2[$constr]
1.475 paf 276:
277: @xsetwrongtable[]
278: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
279: <block-list>^untaint[as-is]{$constructor}</block-list>}]
280:
1.471 paf 281:
1.472 paf 282: @tablecolumnerror[]
283: $t[^table::set{a}]
284: $t.$a
285:
1.471 paf 286: @roll[]
1.472 paf 287: #$date[^date::set(1970;1;2)]
288: #^date.roll[month](-1)
289: $date[^date::set(2038;1;1)]
1.471 paf 290: ^date.roll[month](+1)
291: $date.year $date.month $date.day
1.470 paf 292:
293: @cookie2[]
294: #=$cookie:clientType[$.value[test]]=<br>
295: =$cookie:clientType=<br>
296:
1.469 paf 297:
298: @tableset[]
299: $a[^table::set{a
300: 1
301: 2}]
302: ^eval(100\$a)
303:
304:
305:
306: @zzz[]
307:
1.462 paf 308:
309: $constructor[
310: <block1 name="main_srvr" type="0" label="Основное тело" />
311: <block2 name="main_srvr2" type="0" label="Основное тело" />
312: ]
313:
314: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
315: <block-list>^untaint[as-is]{$constructor}</block-list>}]
316:
317: $children[$constr.documentElement.childNodes]
318: ^if($children){
319: ^for[i](1;^children._count[]){
320: $node[$children.$i]
321: $node.nodeName<br>
322: }
323: }
324:
1.461 paf 325:
326: @thashforeach3[]
327: $h[
328: $.a[1]
329: $.b[2]
330: ]
331: $c[^table::set{a
332: ^h.foreach[key;value]{$value
333: }}]
334: $c.a
335:
336: @thashforeach2[]
337: $h[
338: $.a[1]
339: $.b[2]
340: ]
341: $c[
342: ^h.foreach[key;value]{
343: $.$key[$value]
344: }
345: ]
346: $c.b
1.458 paf 347:
348: @thashforeach[]
349: $h[
350: $.a[1]
351: $.b[2]
352: ]
353: ^h.foreach[key;value]{
354: $key=$value<br>
355: }
1.457 paf 356:
357: @thashdelete[]
358: $h[$.a[1] $.b[2]]
359: was:<br>
360: count=^h._count[] <br>
361: b='$h.b' <br>
362:
363: ^h.delete[b]
364:
365: now:<br>
366: count=^h._count[] <br>
367: b='$h.b'
1.452 paf 368:
369: @sappend[]
370: $test[123]
371: ^test.save[test]
372: ^test.save[append;test]
373:
1.453 paf 374: @tappend[]
375: $test[^table::set{a b
376: a1 b1}]
377: ^test.save[test]
378: $test[^table::set{a b
379: a2 b2}]
380: ^test.save[append;test]
1.452 paf 381:
1.448 paf 382:
383: @tform[]
1.449 paf 384: ^if(def $form:new_file){y}{n}
385: <form method="post" enctype="multipart/form-data">
386: <input type="file" name="new_file" />
1.448 paf 387: <input type=submit>
388: </input>
1.447 paf 389:
390: @formattest[]
391: $size(15.124)
392:
393: ^size.format{%.2f}
1.446 paf 394:
395: @filelist[]
396: $html[^file:list[.;\.html^$]]
397: ^html.menu{
398: $html.name<br>
399: }
400: <hr>
1.431 paf 401:
402: @безнадёжна_попытка_поправить_непоправимое[]
403: $dom_from_disk[^xdoc::load[input.xml]]
404: $dom_created_in_air[^xdoc::create[doc]]
405: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
406: ^show-xdoc2[$dom_created_in_air]
407:
1.426 parser 408:
1.428 parser 409: @tcache[]
410: #^hashfile:clear[cache]
1.459 paf 411: $code[^hashfile::open[$DB_HOME;cache]]
1.496 paf 412: ^code.cache[key](2){
1.430 parser 413: ^math:random(100)
414: # ^code.delete[]
1.496 paf 415: }
1.428 parser 416:
1.426 parser 417: @thashfileexp[]
1.459 paf 418: $hf[^hashfile::open[$DB_HOME;hashfile]]
1.428 parser 419: $hf.paf[$.value[крут] $.expires(3)]
420: paf=$hf.paf
1.459 paf 421: <hr>
422: ^hf.foreach[key;value]{
423: $key=$value<br>
424: }
1.427 parser 425: <hr>
426: $hash[^hf.hash[]]
427: =$hash.paf=
428: <hr>
1.420 parser 429:
1.423 parser 430: @tcounter[]
1.440 paf 431: ^tcounterone[$DB_HOME]
1.466 paf 432: other root:
433: ^tcounterone[${DB_HOME}2]
434: again, first:
435: ^tcounterone[$DB_HOME]
1.432 paf 436:
437: @tcounterone[DB_HOME]
438: $counter[^hashfile::open[$DB_HOME;counter]]
1.440 paf 439: #^counter.clear[]
1.423 parser 440: ^counter.transaction{
441: # $counter.value(10)
442: $counter.value($counter.value+1)
443: # ^counter.delete[value]
444: $counter.value
445: }
1.424 parser 446: <hr>
1.432 paf 447: ^rem{
1.424 parser 448: $hash[^counter.hash[]]
1.425 parser 449: =$hash.value=
1.424 parser 450: <hr>
1.432 paf 451: }
1.423 parser 452:
453: @tablehash[]
454: $productList[^table::set{id name
455: 1 носки
456: 2 валенки
457: 3 ушанка
458: }]
459:
460: #скажем, у первого дилера
461: $firstPriceList[^table::set{id price
462: 1 0.3
463: 3 1000
464: }]
465:
466: $firstPriceHash[^firstPriceList.hash[id]]
467:
468: ^productList.menu{
469: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
470: }
471:
472:
1.420 parser 473: @hashfile[]
474: $hf[^hashfile::assign[hashfile]]
1.423 parser 475: #$hf.paf[крут5]
1.420 parser 476: paf=$hf.paf
1.402 parser 477:
1.417 parser 478: @formclass[]
479: ^$form:CLASS.a=$form:CLASS.a
480:
1.406 parser 481: @domdata[]
1.418 parser 482: ^if(1){
1.422 parser 483: # $a{^hren[]}
1.418 parser 484: }
1.419 parser 485: $a
1.408 parser 486: $xdoc[^xdoc::create[doc]]
487: $doc[$xdoc.documentElement]
1.473 paf 488: $name[^doc.appendChild[^xdoc.createElement[name]]]
1.474 paf 489: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1.435 paf 490: ^untaint[as-is]{=$text.nodeValue=}
1.406 parser 491:
492: @domedit[]
493: ^domdata[]
1.404 parser 494: #$paf.nodeName<br>
495: #$doc.documentElement.nodeName<br>
496:
1.406 parser 497: ^show-xnode1[$xdoc.documentElement;0;1]
498: <hr>
499: ^show-xdoc2[$xdoc]
1.411 parser 500: <hr>
1.406 parser 501:
502: @domxslt[]
503: ^domdata[]
1.405 parser 504: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411 parser 505: <hr>
1.401 parser 506:
507: @lsplit2[]
508: $path[/optics/]
509: $pathTable[^path.lsplit[/]]
510: ^pathTable.menu{
511: ^if(def $pathTable.piece){
512: =$pathTable.piece=
513: }
514: }
515:
1.395 parser 516:
1.397 parser 517: @faceesize[]
518: $k(2)
519: $pict[^image::load[paf.gif]]
520: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398 parser 521: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397 parser 522: $response:body[^small.gif[]]
523:
1.395 parser 524: @imageresize[]
525: $k(2)
526: $pict[^image::create(400*$k;200*$k)]
527: $pict.line-width(2)
1.444 paf 528: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
529: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395 parser 530: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.444 paf 531: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
532: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
533: $response:body[^pict.gif[]]
1.395 parser 534:
1.443 paf 535: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1.396 parser 536: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.443 paf 537: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395 parser 538:
1.443 paf 539: #$response:body[^small.gif[]]
1.395 parser 540:
1.388 parser 541:
542: @tintdefault[]
543: #$abc[abc]
544: $abc[33]
545: ^abc.int[z]
546: #^abc.int(123)
1.390 parser 547:
548: @ifassignhash[]
549: $h[^if(1){$.a(1);$.a(2)}]
550: $h.a
1.387 parser 551:
552: @ifpasshash[]
553: $a[$.e[a]]
554: $b[$.e[b]]
1.389 parser 555: ^ifpasshashdest[^if(1){$a;$b}]
1.387 parser 556: #$x[^if(1){$a}{$b}]
557: #^ifpasshashdest[$x]
558:
559: @ifpasshashdest[p]
560: $p.e
561:
562: @movedir[]
563: ^file:move[a;deeper/a]
1.386 parser 564:
565: @replace[]
566: $a[12^;3]
567: ^a.replace[^table::set{from to
568: 2^; !
569: }]
570:
1.385 parser 571:
572: @set[]
573: ^setdata[]
574: ^a.add[$b]
575: add:$a.3<br>
576:
577: ^setdata[]
578: ^a.sub[$b]
579: sub2:$a.2<br>
580: sub1:$a.1<br>
581:
582: ^setdata[]
583: $c[^a.union[$b]]
584: union3:$c.3<br>
585: union2:$c.2<br>
586:
587: ^setdata[]
588: $c[^a.intersection[$b]]
589: intersection3:$c.3<br>
590: intersection2:$c.2<br>
591:
592: ^setdata[]
593: intersects:^if(^a.intersects[$b]){y;n}<br>
594: intersects2:^if(^a.intersects[ ]){y;n}<br>
595:
596:
597: <hr>
598:
599: @setdata[]
600: $a[$.1[a1] $.2[a2]]
601: $b[ $.2[b2] $.3[b3]]
602:
1.383 parser 603:
1.384 parser 604: @hash[]
605: $h[^hash::create[$._default[123]]]
606: $h.paf[not kretin]
607: $h.paf<br>
608: =$h.that=<br>
609:
610: @methresult[]
611: $result[^table::set{1}]
1.377 parser 612:
1.381 parser 613: @terror[]
614: ^error[method z must be called with z]
615:
1.380 parser 616: @syntax1[]
617: #^a[^b]
618:
619: @syntax2[]
1.381 parser 620: #^a[
1.379 parser 621:
1.377 parser 622: @ssave[]
623: $abc[abc]
624: ^abc.save[abc]
1.376 parser 625:
626: @calendar[]
627: 2001;11:<br>
628: $week_days[^date:calendar[rus](2001;11)]
629: <pre>
630: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
631: </pre>
1.372 parser 632:
1.375 parser 633: @thash[]
634: $table[^table::set{id name age
635: 1 paf 278
636: 2 пиф 234
637: }]
638: $hash[^table.hash[id;^table::set[nameless]{id
639: name}]]
640: $hash.2.id $hash.2.name $hash.2.age
641:
1.372 parser 642: @tdef[]
643: $s[0]
644: if 0=^if($s){}{n}<br>
645: if def 0=^if(def $s){y}{}<br>
646: <hr>
1.371 parser 647:
648: @ford[]
1.374 parser 649: ^for[i](0;5){$i}{($i)}
1.368 parser 650:
1.370 parser 651: @tif[]
652: ^if[def]{y;n}
653:
1.368 parser 654: @image[]
655: $pict[^image::create(400;200)]
1.379 parser 656: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
657: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
658: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
659: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
660: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368 parser 661: $response:body[^pict.gif[]]
662:
663:
1.366 parser 664:
1.369 parser 665: @mail2[]
1.367 parser 666: ^mail:send[
1.369 parser 667: $.content-type[$.value[text/plain] $.charset[windows-1251]]
668: $.from[Александр Петросян <paf@design.ru>]
1.367 parser 669: $.to[Александр Петросян <paf@design.ru>]
1.369 parser 670: $.subject[проверка]
671: $.body[проверка]
1.367 parser 672: ]
673:
1.366 parser 674: @cookie[]
1.367 parser 675: $env:HTTP_COOKIE<br>
676:
677: #$cookie:переменная[test тест ТЕСТ2]
678: =$cookie:переменная=<br>
679: #$cookie:переменная2[test тест ТЕСТ3]
680: =$cookie:переменная2=<br>
1.412 parser 681: =$cookie:CLASS.переменная2=<br>
1.365 parser 682:
683: @response[]
684: #^if($form:reload){
685: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
686: #}
1.364 parser 687:
688: @xslt[]
689: ^xdata[]
1.407 parser 690: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
691: ^show-xdoc2[$transformed]
1.364 parser 692:
693: @regexp2[]
694: $s[ select]
695: $s[^s.match[^^\s*][]{!}]
696: $s
697:
698: @header[]
699: $response:refresh[
700: $.value[0]
701: $.url[http://design.ru?a=^taint[123]]
702: ]
703:
704: @ttablerem[]
705: $table[^table::load[a.cfg]]
706: ^table.menu{$table.a}
707:
708: @tconnect[]
709: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
710: $tables[^table::sql{show tables}]
711: #$cols[^tables.columns[]]
712: #$cols.column
713: ^tables.menu{
714: $tables.[Tables_in_test]<br>
715: }
716: }
717:
718: @pcre[]
719: $s[1 2]
720: ^s.match[\s;ig]{!}
721: #^s.match[\d;ig]{!}
722:
723:
724: @regexp[]
725: $s[abcАБВ]
726: ^if(^s.match[б][i]){y}{n}
727:
728: @mail[]
729: #$ORIGINS(1)
730: ^mail:send[
731: $.from[paf@design.ru]
732: $.to[paf@design.ru]
733: $.body[1
734:
735: 2
736:
737:
738: 3]
739: ]
740:
741: @exec[]
1.370 parser 742: $a[^file::exec[fc.exe;;a;b]]
1.364 parser 743: $a.status|$a.stderr<hr>
744:
745: @fori[][i]
746: ^for[i](1;3){... =$i= ...}
747:
1.489 paf 748: @xdata0[]
1.364 parser 749: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.468 paf 750: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
751: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
752: <people>
753: <man id="1" имя="word слово">
754: <name>P«^;AF B</name>
755: </man>
756: <man id="2">
757: <name>ПИФ^taint[&]</name>
758: </man>
759: </people>
760: }]
1.489 paf 761:
762: @xdata[]
763: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.490 paf 764: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1.489 paf 765: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
766: <people>
767: <man id="1" имя="word слово">
768: <name>P«^;AF B</name>
769: </man>
770: <man id="2">
771: <name>ПИФ^taint[&]</name>
772: </man>
773: </people>
774: }}]
1.364 parser 775:
776: @xml[]
777: ^xdata[]
778:
779: ^show-xdoc2[$xdoc]<hr>
780: #^show-xnode1[$xdoc]<hr>
781: $people[^xdoc.select[*/man]]
782: #^show1[]
783: ^show-xnodes1[$people]<hr>
784: #^people.0.owner.hren[]
785:
1.393 parser 786: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364 parser 787:
788: by id:
789: ^show-xnode1[^xdoc.getElementById[1];0;1]
790: <hr>
791:
792: @show1[array]
793: ^for[i](0;^array._count[]-1){
794: $x[$array.$i]
795: $x.firstChild.nodeValue:
796: $pattributes[$x.parentNode.attributes]
797: ^if(^pattributes._count[]){
798: $pattributes.id.name=$pattributes.id.nodeValue
799: }
800: <br>
801: }
802:
803: @show-xnodes1[array][i]
804: ^for[i](0;^array._count[]-1){
805: ^show-xnode1[$array.$i;0;1]
806: }
807:
808: @show-xnode1[x;level;single][l]
809: ^if(def $x){
810: ^for[l](0;$level-1){ ^; ^; ^; ^;}
811: ^if($x.nodeType == $xnode:ELEMENT_NODE){
812: <^;$x.nodeName
813: $pairs[$x.attributes]
814: ^if(def $pairs){
815: $names[^pairs._keys[]]
816: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
817: }
818: >^;
819: }{
820: [$x.nodeType]
821: }
822:
823: ^if(def $x.nodeValue){$x.nodeValue}<br>
824: ^show-xnode1[$x.firstChild]($level+1)
825: ^if(!$single){
826: ^show-xnode1[$x.nextSibling]($level)
827: }
828:
829: ^if($x.nodeType == $xnode:ELEMENT_NODE){
830: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
831: }
832: }
833:
834: @show-xdoc2[xdoc]
1.473 paf 835: ^xdoc.save[out/save.xml;
1.525 paf 836: # $.encoding[utf-8]
1.364 parser 837: $.method[xml]
838: ]
839: $file[^xdoc.file[
1.525 paf 840: $.encoding[utf-8]
1.364 parser 841: $.method[html]
842: ]]
1.473 paf 843: ^file.save[text;out/save_file.html]
1.487 paf 844: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
845: <pre>^taint[html][^xdoc.string[
1.526 paf 846: $.method[html]
847: # $.encoding[utF-8]
1.487 paf 848: # $.omit-xml-declaration[yes]
1.523 paf 849: # $.standalone[no]
850: # -$.doctype-public[-//W3C//DTD XHTML]
851: # -$.doctype-system[/a/b/c/]
852: # $.indent[yes]
853: # $.media-type[text/paf]
1.486 paf 854: ]]
1.413 parser 855: </pre>
E-mail: