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