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