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