Annotation of parser3/src/www/htdocs/index.html, revision 1.452
1.399 parser 1: @main[]
1.452 ! paf 2: ^sappend[]
! 3: #^eval(10\3)<br>
1.450 paf 4: #^tform[]
1.448 paf 5: #^formattest[]
1.447 paf 6: #^filelist[]
1.443 paf 7: #^connect[mysql://user:pass@host]{ }
1.431 paf 8: #^безнадёжна_попытка_поправить_непоправимое[]
1.430 parser 9: #^tcache[]
1.428 parser 10: #^thashfileexp[]
1.451 paf 11: #^tcounter[]
1.423 parser 12: #^tablehash[]
1.443 paf 13: #j^hashfile[]
1.417 parser 14: #^formclass[]
1.415 parser 15: #^hren[]
1.446 paf 16: #^domedit[]
1.420 parser 17: #^domxslt[]
1.402 parser 18: #^lsplit2[]
1.401 parser 19: #^faceesize[]
1.445 paf 20: #^imageresize[]
1.399 parser 21: #^ifassignhash[]
22: #^tintdefault[]
23: #$response:status[404]
1.390 parser 24: #^ifpasshash[]
1.387 parser 25: #^movedir[]
26: #^replace[]
1.416 parser 27: #^set[]
1.385 parser 28: #^hash[]<hr>
1.384 parser 29: #$t[^methresult[]] ->$t
1.382 parser 30: #^terror[]
1.378 parser 31: #^ssave[]
1.377 parser 32: #^calendar[]
1.376 parser 33: #^thash[]
1.373 parser 34: #^tdef[]
1.375 parser 35: #^ford[]
1.371 parser 36: #^tif[]
1.383 parser 37: #^image[]
1.369 parser 38: #^mail2[]
1.413 parser 39: #^cookie[]
1.365 parser 40: #^response[]
1.364 parser 41: #^regexp2[]
42: #^ttablerem[]
43: #^pcre[]
44: #^regexp[]<hr>
45: #^mail[]
46: #^exec[]
47: #^fori[]
48: #^tconnect[]
1.406 parser 49: #^xslt[]
1.395 parser 50: #^xml[]
1.364 parser 51: #^header[]
52: OK
1.452 ! paf 53:
! 54: @sappend[]
! 55: $test[123]
! 56: ^test.save[test]
! 57: ^test.save[append;test]
! 58:
! 59:
1.448 paf 60:
61: @tform[]
1.449 paf 62: ^if(def $form:new_file){y}{n}
63: <form method="post" enctype="multipart/form-data">
64: <input type="file" name="new_file" />
1.448 paf 65: <input type=submit>
66: </input>
1.447 paf 67:
68: @formattest[]
69: $size(15.124)
70:
71: ^size.format{%.2f}
1.446 paf 72:
73: @filelist[]
74: $html[^file:list[.;\.html^$]]
75: ^html.menu{
76: $html.name<br>
77: }
78: <hr>
1.431 paf 79:
80: @безнадёжна_попытка_поправить_непоправимое[]
81: $dom_from_disk[^xdoc::load[input.xml]]
82: $dom_created_in_air[^xdoc::create[doc]]
83: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
84: ^show-xdoc2[$dom_created_in_air]
85:
1.426 parser 86:
1.428 parser 87: @tcache[]
88: #^hashfile:clear[cache]
89: $code[^hashfile::open[cache]]
1.430 parser 90: ^code.cache[key](2){
91: ^math:random(100)
92: # ^code.delete[]
1.428 parser 93: }
94:
95:
1.426 parser 96: @thashfileexp[]
97: $hf[^hashfile::open[hashfile]]
1.428 parser 98: $hf.paf[$.value[крут] $.expires(3)]
99: paf=$hf.paf
1.427 parser 100: <hr>
101: $hash[^hf.hash[]]
102: =$hash.paf=
103: <hr>
1.420 parser 104:
1.423 parser 105: @tcounter[]
1.440 paf 106: ^tcounterone[$DB_HOME]
107: #other root:
108: #^tcounterone[${DB_HOME}2]
1.437 paf 109: #again, first:
110: #^tcounterone[$DB_HOME]
1.432 paf 111:
112: @tcounterone[DB_HOME]
113: $counter[^hashfile::open[$DB_HOME;counter]]
1.440 paf 114: #^counter.clear[]
1.423 parser 115: ^counter.transaction{
116: # $counter.value(10)
117: $counter.value($counter.value+1)
118: # ^counter.delete[value]
119: $counter.value
120: }
1.424 parser 121: <hr>
1.432 paf 122: ^rem{
1.424 parser 123: $hash[^counter.hash[]]
1.425 parser 124: =$hash.value=
1.424 parser 125: <hr>
1.432 paf 126: }
1.423 parser 127:
128: @tablehash[]
129: $productList[^table::set{id name
130: 1 носки
131: 2 валенки
132: 3 ушанка
133: }]
134:
135: #скажем, у первого дилера
136: $firstPriceList[^table::set{id price
137: 1 0.3
138: 3 1000
139: }]
140:
141: $firstPriceHash[^firstPriceList.hash[id]]
142:
143: ^productList.menu{
144: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
145: }
146:
147:
1.420 parser 148: @hashfile[]
149: $hf[^hashfile::assign[hashfile]]
1.423 parser 150: #$hf.paf[крут5]
1.420 parser 151: paf=$hf.paf
1.402 parser 152:
1.417 parser 153: @formclass[]
154: ^$form:CLASS.a=$form:CLASS.a
155:
1.406 parser 156: @domdata[]
1.418 parser 157: ^if(1){
1.422 parser 158: # $a{^hren[]}
1.418 parser 159: }
1.419 parser 160: $a
1.408 parser 161: $xdoc[^xdoc::create[doc]]
162: $doc[$xdoc.documentElement]
1.435 paf 163: $name[^doc.appendChild[^xdoc.createElement{name}]]
164: $text[^name.appendChild[^xdoc.createTextNode{петросян ^;co}]]
165: ^untaint[as-is]{=$text.nodeValue=}
1.406 parser 166:
167: @domedit[]
168: ^domdata[]
1.404 parser 169: #$paf.nodeName<br>
170: #$doc.documentElement.nodeName<br>
171:
1.406 parser 172: ^show-xnode1[$xdoc.documentElement;0;1]
173: <hr>
174: ^show-xdoc2[$xdoc]
1.411 parser 175: <hr>
1.406 parser 176:
177: @domxslt[]
178: ^domdata[]
1.405 parser 179: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411 parser 180: <hr>
1.401 parser 181:
182: @lsplit2[]
183: $path[/optics/]
184: $pathTable[^path.lsplit[/]]
185: ^pathTable.menu{
186: ^if(def $pathTable.piece){
187: =$pathTable.piece=
188: }
189: }
190:
1.395 parser 191:
1.397 parser 192: @faceesize[]
193: $k(2)
194: $pict[^image::load[paf.gif]]
195: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398 parser 196: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397 parser 197: $response:body[^small.gif[]]
198:
1.395 parser 199: @imageresize[]
200: $k(2)
201: $pict[^image::create(400*$k;200*$k)]
202: $pict.line-width(2)
1.444 paf 203: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
204: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395 parser 205: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.444 paf 206: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
207: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
208: $response:body[^pict.gif[]]
1.395 parser 209:
1.443 paf 210: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1.396 parser 211: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.443 paf 212: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395 parser 213:
1.443 paf 214: #$response:body[^small.gif[]]
1.395 parser 215:
1.388 parser 216:
217: @tintdefault[]
218: #$abc[abc]
219: $abc[33]
220: ^abc.int[z]
221: #^abc.int(123)
1.390 parser 222:
223: @ifassignhash[]
224: $h[^if(1){$.a(1);$.a(2)}]
225: $h.a
1.387 parser 226:
227: @ifpasshash[]
228: $a[$.e[a]]
229: $b[$.e[b]]
1.389 parser 230: ^ifpasshashdest[^if(1){$a;$b}]
1.387 parser 231: #$x[^if(1){$a}{$b}]
232: #^ifpasshashdest[$x]
233:
234: @ifpasshashdest[p]
235: $p.e
236:
237: @movedir[]
238: ^file:move[a;deeper/a]
1.386 parser 239:
240: @replace[]
241: $a[12^;3]
242: ^a.replace[^table::set{from to
243: 2^; !
244: }]
245:
1.385 parser 246:
247: @set[]
248: ^setdata[]
249: ^a.add[$b]
250: add:$a.3<br>
251:
252: ^setdata[]
253: ^a.sub[$b]
254: sub2:$a.2<br>
255: sub1:$a.1<br>
256:
257: ^setdata[]
258: $c[^a.union[$b]]
259: union3:$c.3<br>
260: union2:$c.2<br>
261:
262: ^setdata[]
263: $c[^a.intersection[$b]]
264: intersection3:$c.3<br>
265: intersection2:$c.2<br>
266:
267: ^setdata[]
268: intersects:^if(^a.intersects[$b]){y;n}<br>
269: intersects2:^if(^a.intersects[ ]){y;n}<br>
270:
271:
272: <hr>
273:
274: @setdata[]
275: $a[$.1[a1] $.2[a2]]
276: $b[ $.2[b2] $.3[b3]]
277:
1.383 parser 278:
1.384 parser 279: @hash[]
280: $h[^hash::create[$._default[123]]]
281: $h.paf[not kretin]
282: $h.paf<br>
283: =$h.that=<br>
284:
285: @methresult[]
286: $result[^table::set{1}]
1.377 parser 287:
1.381 parser 288: @terror[]
289: ^error[method z must be called with z]
290:
1.380 parser 291: @syntax1[]
292: #^a[^b]
293:
294: @syntax2[]
1.381 parser 295: #^a[
1.379 parser 296:
1.377 parser 297: @ssave[]
298: $abc[abc]
299: ^abc.save[abc]
1.376 parser 300:
301: @calendar[]
302: 2001;11:<br>
303: $week_days[^date:calendar[rus](2001;11)]
304: <pre>
305: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
306: </pre>
1.372 parser 307:
1.375 parser 308: @thash[]
309: $table[^table::set{id name age
310: 1 paf 278
311: 2 пиф 234
312: }]
313: $hash[^table.hash[id;^table::set[nameless]{id
314: name}]]
315: $hash.2.id $hash.2.name $hash.2.age
316:
1.372 parser 317: @tdef[]
318: $s[0]
319: if 0=^if($s){}{n}<br>
320: if def 0=^if(def $s){y}{}<br>
321: <hr>
1.371 parser 322:
323: @ford[]
1.374 parser 324: ^for[i](0;5){$i}{($i)}
1.368 parser 325:
1.370 parser 326: @tif[]
327: ^if[def]{y;n}
328:
1.368 parser 329: @image[]
330: $pict[^image::create(400;200)]
1.379 parser 331: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
332: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
333: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
334: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
335: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368 parser 336: $response:body[^pict.gif[]]
337:
338:
1.366 parser 339:
1.369 parser 340: @mail2[]
1.367 parser 341: ^mail:send[
1.369 parser 342: $.content-type[$.value[text/plain] $.charset[windows-1251]]
343: $.from[Александр Петросян <paf@design.ru>]
1.367 parser 344: $.to[Александр Петросян <paf@design.ru>]
1.369 parser 345: $.subject[проверка]
346: $.body[проверка]
1.367 parser 347: ]
348:
1.366 parser 349: @cookie[]
1.367 parser 350: $env:HTTP_COOKIE<br>
351:
352: #$cookie:переменная[test тест ТЕСТ2]
353: =$cookie:переменная=<br>
354: #$cookie:переменная2[test тест ТЕСТ3]
355: =$cookie:переменная2=<br>
1.412 parser 356: =$cookie:CLASS.переменная2=<br>
1.365 parser 357:
358: @response[]
359: #^if($form:reload){
360: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
361: #}
1.364 parser 362:
363: @xslt[]
364: ^xdata[]
1.407 parser 365: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
366: ^show-xdoc2[$transformed]
1.364 parser 367:
368: @regexp2[]
369: $s[ select]
370: $s[^s.match[^^\s*][]{!}]
371: $s
372:
373: @header[]
374: $response:refresh[
375: $.value[0]
376: $.url[http://design.ru?a=^taint[123]]
377: ]
378:
379: @ttablerem[]
380: $table[^table::load[a.cfg]]
381: ^table.menu{$table.a}
382:
383: @tconnect[]
384: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
385: $tables[^table::sql{show tables}]
386: #$cols[^tables.columns[]]
387: #$cols.column
388: ^tables.menu{
389: $tables.[Tables_in_test]<br>
390: }
391: }
392:
393: @pcre[]
394: $s[1 2]
395: ^s.match[\s;ig]{!}
396: #^s.match[\d;ig]{!}
397:
398:
399: @regexp[]
400: $s[abcАБВ]
401: ^if(^s.match[б][i]){y}{n}
402:
403: @mail[]
404: #$ORIGINS(1)
405: ^mail:send[
406: $.from[paf@design.ru]
407: $.to[paf@design.ru]
408: $.body[1
409:
410: 2
411:
412:
413: 3]
414: ]
415:
416: @exec[]
1.370 parser 417: $a[^file::exec[fc.exe;;a;b]]
1.364 parser 418: $a.status|$a.stderr<hr>
419:
420: @fori[][i]
421: ^for[i](1;3){... =$i= ...}
422:
423: @xdata[]
424: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
425: $xdoc[^xdoc::load[input.xml]]
426:
427: @xml[]
428: ^xdata[]
429:
430: ^show-xdoc2[$xdoc]<hr>
431: #^show-xnode1[$xdoc]<hr>
432: $people[^xdoc.select[*/man]]
433: #^show1[]
434: ^show-xnodes1[$people]<hr>
435: #^people.0.owner.hren[]
436:
1.393 parser 437: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364 parser 438:
439: by id:
440: ^show-xnode1[^xdoc.getElementById[1];0;1]
441: <hr>
442:
443: @show1[array]
444: ^for[i](0;^array._count[]-1){
445: $x[$array.$i]
446: $x.firstChild.nodeValue:
447: $pattributes[$x.parentNode.attributes]
448: ^if(^pattributes._count[]){
449: $pattributes.id.name=$pattributes.id.nodeValue
450: }
451: <br>
452: }
453:
454: @show-xnodes1[array][i]
455: ^for[i](0;^array._count[]-1){
456: ^show-xnode1[$array.$i;0;1]
457: }
458:
459: @show-xnode1[x;level;single][l]
460: ^if(def $x){
461: ^for[l](0;$level-1){ ^; ^; ^; ^;}
462: ^if($x.nodeType == $xnode:ELEMENT_NODE){
463: <^;$x.nodeName
464: $pairs[$x.attributes]
465: ^if(def $pairs){
466: $names[^pairs._keys[]]
467: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
468: }
469: >^;
470: }{
471: [$x.nodeType]
472: }
473:
474: ^if(def $x.nodeValue){$x.nodeValue}<br>
475: ^show-xnode1[$x.firstChild]($level+1)
476: ^if(!$single){
477: ^show-xnode1[$x.nextSibling]($level)
478: }
479:
480: ^if($x.nodeType == $xnode:ELEMENT_NODE){
481: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
482: }
483: }
484:
485: @show-xdoc2[xdoc]
486: ^xdoc.save[save.xml;
487: # $.encoding[windows-1251]
488: $.method[xml]
489: ]
490: $file[^xdoc.file[
491: # $.encoding[windows-1251]
492: $.method[html]
493: ]]
494: ^file.save[text;save_file.html]
1.435 paf 495: <pre>taint[^xdoc.string[]]
1.364 parser 496: # $.encoding[windows-1251]
1.413 parser 497: # $.method[html]
1.364 parser 498: #]]
1.413 parser 499: </pre>
1.435 paf 500:
E-mail: