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