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