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