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