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