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