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