bright_id
stringlengths 11
257
| bright_doc
stringlengths 25
9.18M
| bright_split
stringclasses 8
values | scandi_id
stringlengths 3
7
| scandi_url
stringlengths 31
143
| scandi_title
stringlengths 1
79
| scandi_text
stringlengths 15
118k
| scandi_language
stringclasses 4
values | scandi_dist
float64 0.2
1.75
|
|---|---|---|---|---|---|---|---|---|
Pony/builtin-ReadElement-.txt
|
ReadElement[A: A]¶
[Source]
Used to show that a ReadSeq can return an element of a specific unmodified
type.
interface box ReadElement[A: A]
Public Functions¶
apply¶
[Source]
fun box apply(
i: USize val)
: A ?
Parameters¶
i: USize val
Returns¶
A ?
|
pony
|
4024726
|
https://sv.wikipedia.org/wiki/Asplenium%20fontanum
|
Asplenium fontanum
|
Asplenium fontanum är en svartbräkenväxtart. Asplenium fontanum ingår i släktet Asplenium och familjen Aspleniaceae.
Underarter
Arten delas in i följande underarter:
A. f. fontanum
A. f. pseudofontanum
Källor
Noter
Externa länkar
Kärlväxter
fontanum
|
swedish
| 1.152397
|
Pony/builtin-AsioEventID-.txt
|
AsioEventID¶
[Source]
type AsioEventID is
Pointer[AsioEvent val] tag
Type Alias For¶
Pointer[AsioEvent val] tag
|
pony
|
925234
|
https://da.wikipedia.org/wiki/TEDxAarhus
|
TEDxAarhus
|
TEDxAarhus er en konference, hvor talere præsenterer "idéer, der er værd at sprede." Konferencen opererer under koncept af, men uafhængigt af, hovedorganisationen TED og afholdes årligt i Århus. Lige som andre TEDx events har TEDxAarhus fået en licens fra TED til at afholde konferencen, hvor arrangørerne forpligter sig til at følge visse principper. I oktober 2016 afholdt TEDxAarhus et event med 12 talere i Hermans i Tivoli. I 2017 var der 11 talere , og i 2018 var der 9 talere på programmet.
Historie
Den første officielle TEDxAarhus-konference blev holdt den 1. oktober 2016 med Nanna Inie og René Lønne Ventzel som ledende arrangører. Men det var ikke det første TEDxevent i Århus. Året før blev der afholdt et mindre TEDx event kaldet TEDxVenelystblvd, ledet af Belen Jimenez Mena. Hun havde ansøgt om og fået en lille TED-licens, der gav hende tilladelse til at afholde en konference i byen for op til 100 deltagere. Denne begivenhed blev afholdt den 9. maj 2015, hvor 5 talere og 100 deltagere blev samlet i Navitas-bygningen (ved havnen) på Inge Lehmanns Gade 10 i Århus. Eftersom eventet foreløb tilfredsstillende i forhold til de krav, der blev stillet af TED, havde Aarhus lov til at ansøge om en udvidet licens, og denne blev givet. Det betyder, at TEDxAarhus nu kunne være vært for en begivenhed, der havde mere end 100 deltagere, og TedxVenelystBlvd ændrede navnet til TEDxAarhus.
Referencer
Eksterne henvisninger
Organisationer fra USA
|
danish
| 0.913192
|
Pony/promises-FulfillIdentity-.txt
|
FulfillIdentity[A: Any #share]¶
[Source]
An identity function for fulfilling promises.
class iso FulfillIdentity[A: Any #share]
Constructors¶
create¶
[Source]
new iso create()
: FulfillIdentity[A] iso^
Returns¶
FulfillIdentity[A] iso^
Public Functions¶
apply¶
[Source]
fun ref apply(
value: A)
: A
Parameters¶
value: A
Returns¶
A
|
pony
|
1093603
|
https://sv.wikipedia.org/wiki/Lista%20%C3%B6ver%20finl%C3%A4ndska%20adels%C3%A4tter
|
Lista över finländska adelsätter
|
Detta är en lista över ätter som introducerats på Finlands riddarhus:
(A) adlig; (F) friherrlig; (G) grevlig; (Furste) furstlig
A
(A) Adlercreutz
(A) Adlerstjerna
(A) Agricola
(A) von Alfthan
(F) von Alfthan
(A) Aminoff
(F) Aminoff
(G) Aminoff
(A) von Ammondt
(A) Antell
(A) Armfelt
(F) Armfelt
(G) Armfelt
(A) Arppe
B
(A) von Baumgarten
(A) von Becker
(A) Benzelstjerna
(A) Bergenheim
(F) Bergenheim
(A) Bergenstråle
(G) Berg
(A) Björkenheim
(A) af Björkesten
(A) af Björksten
(A) von Blom
(A) Blåfield
(A) von Boehm
(A) Boije af Gennäs
(F) Boije af Gennäs
(A) von Boisman
(A) von Bonsdorff
(F) von Bonsdorff
(A) von Born
(F) von Born
(A) Bosin
(A) Brakel
(A) Brand
(A) von Briskorn
(A) Brummer
(A) Brummer
(A) Bruncrona
(A) af Brunér
(A) Brunow
(A) Bruun
(F) Bruun
(A) von Burghausen
(A) Bäck i Finland
(A) von Böningh
C
(F) Carpelan
(F) Cedercreutz
(A) Cederholm
(F) Cederström
(A) von Cederwald
(A) Charpentier
(A) von Christierson
(A) Clementeoff
(A) von Collan
(A) Conradi
(G) Creutz
(G) Cronhjelm af Hakunge
(A) Cronstedt
(F) Cronstedt
D
(A) von Daehn
(A) de Besche
(A) de Carnall
(A) de Carnall
(A) De Geer
(G) de Geer Till Tervik
(A) de la Chapelle
(F) de la Chapelle
(A) de la Motte
E
(A) Edelfelt
(A) Edelheim
(A) Edelsköld
(A) Ehrenmalm
(A) Ehrenstolpe
(A) Ehrenström
(A) Ehrnrooth
(A) Ehrnrooth
(A) Ekbom
(A) Ekestubbe
(A) Eneberg
(A) af Enehjelm
(A) Eneskjöld
(A) von Essen
(A) Estlander
(A) Estlander
(A) Etholén
(A) Etholén
(A) von Etter
F
(A) Falckenheim
(A) Falck
(A) Fellman
(A) Feuerstern
(A) von Fieandt
(A) Finckenberg
(A) Fischer
(F) Fleming af Lieblitz
(A) Fock
(A) Forbes
(A) af Forselles
(F) af Forselles
(A) Forsman
(A) Fraser
(A) Fredensköld
(F) Freedricksz
(A) Freidenfelt
(A) von Frenckell
(F) von Friesendorff
(A) af Frosterus
(A) Furuhjelm
(A) Furumarck
G
(A) Gadolin
(A) af Gadolin
(A) von Gertten
(A) Glansentjerna
(A) Godenhjelm
(A) Granfelt
(A) Gripenberg
(F) Gripenberg
(A) Gripenwaldt
(A) Grotenfelt
(A) Grönhagen
(A) von Guvenius
(A) Gyldenstolpe
(F) Gyldenstolpe
(A) Gyllenbögel
(A) Gyllenhök
H
(A) von Haartman
(F) von Haartman
(A) Hackman
(A) von Hartmansdorff
(F) von Hauff
(A) von Hauswolff
(A) Hedenberg
(A) von Heideman
(A) von Hellens
(F) von Hellens
(A) af Hellen
(A) af Heurlin
(A) Hisinger
(F) Hisinger-Jägerskiöld
(F) Hjerta
(A) Hjulhammar
(A) Hjärne
(F) Hjärne
(A) af Hällström
(A) Hästesko af Målagård
I
(A) Idestam
(A) Indrenius
(F) Indrenius-Zalewski
J
(A) Jerlström
(A) Jordan
(A) von Julin
(A) Jägerhorn af Spurila
(A) Jägerhorn af Storby
(A) Jägerskiöld
(A) Järnefelt
K
(A) af Klercker
(F) af Klercker
(A) Klick
(F) Klinckowström
(A) Klingstedt
(A) Knorring
(F) von Knorring
(A) von Knorring
(A) von Konow
(A) von Kothen
(F) von Kothen
(A) Krabbe
(A) von Kræmer
(A) Kuhlefelt
(A) Kuhlman
(G) Kuscheleff-Besborodko
L
(A) Ladau
(A) Lagerborg
(A) Lagermarck
(A) Lagus
(F) Langenskiöld
(A) Langenskjöld
(F) Langhoff
(A) Lavonius
(A) Lillienberg
(A) Lilljebrunn
(A) Lindcrantz
(A) Lindelöf
(A) Linder
(F) Linder af Svartå
(A) af Lindfors
(A) Lode
(F) Lybecker
M
(F) Mannerheim
(G) Mannerheim
(A) Mannerstråle
(A) von Marquard
(A) Martinau
(A) Mechelin
(A) Mechelin
(A) af Meinander
(F) Mellin
(Furste) Menschikoff
(A) von Minckwitz
(A) Molander
(F) Molander
(A) Montgomerie
(A) Morian
(A) Munck af Fulkila
(F) Munck
(A) Munsterhjelm
(A) von Müller
(A) Möllersvärd
N
(A) von Nandelstadh
(A) Nassokin
(F) Nicolaij
(F) von Nolcken
(A) Nordenheim
(A) Nordenskjöld
(A) Nordenstam (nr. 161)
(A) Nordenswan
(A) Nordmann
(A) Norrmén
(A) von Nottbeck
(A) von Numers
(A) Nybom
(A) Nyborg
O
(A) Oker-Blom
(A) Olivecreutz
(A) Ollonberg
P
(A) Palmén
(F) Palmén
(A) Palmfelt
(A) af Petersen
(A) Pinello
(A) Pippingsköld
(A) Pipping
(A) Pistolekors
(A) von Platen
(A) Pomell
(A) von Post
(A) Procopé
(A) Prytz
Q
(A) von Qvanten
R
(F) Ramsay
(A) Ramsay
(A) von Rancken
(A) von Rehausen
(F) Rehbinder
(A) Reiher
(A) Rein
(A) Rennerfelt
(A) von Rettig
(A) Reuterskjöld
(A) Ridderborg
(A) Ridderstad
(A) Ridderstorm
(A) Riddersvärd
(A) Roediger
(A) von Rohr
(F) Rokassowskij
(A) Roos af Hjelmsäter
(A) Rosenbröijer
(F) Rosenkampff
(A) Rosenlew
(A) Rotkirch
(F) Rotkirch
S
(A) Sackleen
(F) Sackleen
(A) Sanmark
(A) Sass
(A) von Schantz
(A) Schatelowitz
(A) Schauman
(A) Schildt
(A) von Schoultz
(A) von Schrowe
(A) Schulman
(F) af Schultén
(A) af Schultén
(A) Schützercrantz
(A) Segercrantz
(A) Segerstråle
(F) Silfverhjelm
(A) Silfverswan
(A) Snellman
(A) Soisalon-Soininen
(A) Spåre
(F) Stackelberg
(A) Standertskjöld
(F) Standertskjöld
(F) Standertskjöld-Nordenstam
(A) Starck
(A) af Stenhof
(A) Steven
(G) Stewen-Steinheil
(A) von Sticht
(A) Stierncreutz
(F) Stjerncrantz
(A) Stjernschantz
(A) Stjernvall
(A) Ståhlhane
(A) Stålarm Tavast
(A) Stålhammar
(F) von Suchtelen
(G) von Suchtelen
(A) Svinhufvud af Qvalstad
(A) Sölfverarm
T
(A) Tandefelt
(F) Tandefelt
(A) Taube
(A) Tawaststjerna
(A) Tawast
(A) Teetgren
(A) af Tengström
(A) von Tesche
(A) Thesleff
(A) von Thomsen
(A) Tigerstedt
(A) Toll
(A) Toll
(A) Torwigge
(A) von Trapp
(A) Tudeer
(F) von Troil
(A) von Törne
(A) Törngren
(A) Törnqvist
U
(A) Uggla
(A) af Ursin
W
(A) Wadenstierna
(A) Wahlberg
(A) Wahren
(A) Walleen
(F) Walleen
(A) Wallensköld
(A) Wallenstjerna
(A) Wallenstråle
(A) Wasastjerna
(A) von Weissenberg
(A) von Wendt
(F) von Willbrand
(A) von Willebrand
(F) von Willebrand
(F) von Willebrand
(A) von Winther
(F) Wrede af Elimä
(A) von Wright
(A) von Wulffert
(A) von Wulffert
(A) Wuorenheimo
(A) Wärnhjelm
Y
(A) Yrjö-Koskinen
(F) Yrjö-Koskinen
Z
(G) Zakrewsky
(A) Zansen
Ö
(A) Örn
(A) Örnhjelm
Referenser
Lista
Listor med anknytning till Finlands historia
Adelsätter
|
swedish
| 1.194448
|
Pony/process-PipeError-.txt
|
PipeError¶
[Source]
primitive val PipeError
Constructors¶
create¶
[Source]
new val create()
: PipeError val^
Returns¶
PipeError val^
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
eq¶
[Source]
fun box eq(
that: PipeError val)
: Bool val
Parameters¶
that: PipeError val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: PipeError val)
: Bool val
Parameters¶
that: PipeError val
Returns¶
Bool val
|
pony
|
2140887
|
https://sv.wikipedia.org/wiki/Eobrolgus%20pontarpioides
|
Eobrolgus pontarpioides
|
Eobrolgus pontarpioides är en kräftdjursart som först beskrevs av Gurjanova 1953. Eobrolgus pontarpioides ingår i släktet Eobrolgus och familjen Phoxocephalidae. Inga underarter finns listade i Catalogue of Life.
Källor
Märlkräftor
pontarpioides
|
swedish
| 1.016841
|
Pony/pony_check-ASCIIAll-.txt
|
ASCIIAll¶
[Source]
Represents all ASCII characters,
excluding the NUL (\x00) character for its special treatment in C strings.
primitive val ASCIIAll
Constructors¶
create¶
[Source]
new val create()
: ASCIIAll val^
Returns¶
ASCIIAll val^
Public Functions¶
apply¶
[Source]
fun box apply()
: String val
Returns¶
String val
eq¶
[Source]
fun box eq(
that: ASCIIAll val)
: Bool val
Parameters¶
that: ASCIIAll val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ASCIIAll val)
: Bool val
Parameters¶
that: ASCIIAll val
Returns¶
Bool val
|
pony
|
2430379
|
https://sv.wikipedia.org/wiki/Ambassis%20agassizii
|
Ambassis agassizii
|
Ambassis agassizii är en fiskart som beskrevs av Steindachner, 1867. Ambassis agassizii ingår i släktet Ambassis och familjen Ambassidae. IUCN kategoriserar arten globalt som otillräckligt studerad. Inga underarter finns listade i Catalogue of Life.
Källor
Abborrartade fiskar
agassizii
|
swedish
| 1.236612
|
Pony/promises-RejectAlways-.txt
|
RejectAlways[A: Any #share]¶
[Source]
A reject that always raises an error.
class iso RejectAlways[A: Any #share]
Constructors¶
create¶
[Source]
new iso create()
: RejectAlways[A] iso^
Returns¶
RejectAlways[A] iso^
Public Functions¶
apply¶
[Source]
fun ref apply()
: A ?
Returns¶
A ?
|
pony
|
7796483
|
https://sv.wikipedia.org/wiki/AJS%20%28olika%20betydelser%29
|
AJS (olika betydelser)
|
AJS kan syfta på:
AJS – ett brittiskt varumärke på fordon och radioapparater
AJS – ursprunglig förkortning för ett arméförband i Kiruna, se Arméns jägarskola
AJS 37 – en version av Saab 37 Viggen
|
swedish
| 1.037997
|
Pony/files-FileRead-.txt
|
FileRead¶
[Source]
primitive val FileRead
Constructors¶
create¶
[Source]
new val create()
: FileRead val^
Returns¶
FileRead val^
Public Functions¶
value¶
[Source]
fun box value()
: U32 val
Returns¶
U32 val
eq¶
[Source]
fun box eq(
that: FileRead val)
: Bool val
Parameters¶
that: FileRead val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileRead val)
: Bool val
Parameters¶
that: FileRead val
Returns¶
Bool val
|
pony
|
835512
|
https://sv.wikipedia.org/wiki/Common%20Type%20System
|
Common Type System
|
Common Type System (CTS) är en standard som specificerar hur datatyper ter sig i ett datorminne. Målet är att låta program som är skrivna i olika programspråk lätt ska kunna utbyta information med varandra. I ett programspråk kan en typ beskrivas som en definition av en mängd med värden (till exempel heltal mellan 0 och 10), och de tillåtna operationerna som kan utföras med dessa värden.
Specifikationen för CTS är en del av Ecma standard 335, "Common Language Infrastructure (CLI) Partitions I to VI." CLI och CTS skapades av Microsoft, och Microsoft .NET framework är en implementation av standarden.
Typkategorier
CTS stödjer följande två typer:
Värdetyper
En värdetyp innehåller direkt sitt värde, och allokeras på stacken eller inuti en struktur. Värdetyper kan vara förimplementerade av runtime eller definierade av användaren. De primitiva typerna (int, char, bool osv.) och strukturer är värdetyper.
Referenstyper
En referenstyp innehåller referensen till värdets plats i minnet, och är allokerade på heapen. Variabler är som pekare och är inte bundna till något specifikt objekt. Klasser, gränssnitt, strängar, delegater, boxade värdetyper och arrayer är exempel på referenstyper.
Följande exempel visar skillnaderna mellan värdetyper och referenstyper.
Imports System
Class Class1
Public Value As Integer = 0
End Class 'Class1
Class Test
Shared Sub Main()
Dim val1 As Integer = 0
Dim val2 As Integer = val1
val2 = 123
Dim ref1 As New Class1()
Dim ref2 As Class1 = ref1
ref2.Value = 123
Console.WriteLine("Värden: {0}, {1}", val1, val2)
Console.WriteLine("Referenser: {0}, {1}", ref1.Value, ref2.Value)
End Sub 'Main
End Class 'Test
Utskriften från exemplet ovan
Värden: 0, 123
Referenser: 123, 123
Boxning
Konvertering av värdetyp till en referenstyp kallas boxning. Detta är möjligt då värdetyper och referenstyper båda ärver basklassen System.Object.
Int32 x = 10;
object o = x ; // Implicit boxning
Console.WriteLine("The Object o = {0}",o); // skriver ut 10
Men en Int32 kan också bli explicit boxad:
Int32 x = 10;
object o = (object) x; // Explicit boxning
Console.WriteLine("The object o = {0}",o); // skriver ut 10
På liknande sätt kan den bli konverterad tillbaka till en värdetyp.
Int32 x = 5;
object o = x; // Implicit boxning
x = o; // Implicit utboxning
Se även
Common Language Infrastructure
Källor
Artikel på engelskspråkiga Wikipedia
Externa länkar
Microsoft developer's guide describing the CTS
built-in types in the .NET Framework
.NET Framework
|
swedish
| 0.832662
|
Pony/src-builtin-float-.txt
|
float.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547use @"llvm.fabs.f32"[F32](x: F32)
use @"llvm.fabs.f64"[F64](x: F64)
use @"llvm.ceil.f32"[F32](x: F32)
use @"llvm.ceil.f64"[F64](x: F64)
use @"llvm.floor.f32"[F32](x: F32)
use @"llvm.floor.f64"[F64](x: F64)
use @"llvm.round.f32"[F32](x: F32)
use @"llvm.round.f64"[F64](x: F64)
use @"llvm.trunc.f32"[F32](x: F32)
use @"llvm.trunc.f64"[F64](x: F64)
use @"llvm.log.f32"[F32](x: F32)
use @"llvm.log.f64"[F64](x: F64)
use @"llvm.log2.f32"[F32](x: F32)
use @"llvm.log2.f64"[F64](x: F64)
use @"llvm.log10.f32"[F32](x: F32)
use @"llvm.log10.f64"[F64](x: F64)
use @logbf[F32](x: F32)
use @logb[F64](x: F64)
use @"llvm.pow.f32"[F32](x: F32, y: F32)
use @"llvm.pow.f64"[F64](x: F64, y: F64)
use @"llvm.powi.f32"[F32](x: F32, y: I32) if not windows
use @"llvm.powi.f64"[F64](x: F64, y: I32) if not windows
use @"llvm.sqrt.f32"[F32](x: F32)
use @"llvm.sqrt.f64"[F64](x: F64)
use @cbrtf[F32](x: F32)
use @cbrt[F64](x: F64)
use @"llvm.exp.f32"[F32](x: F32)
use @"llvm.exp.f64"[F64](x: F64)
use @"llvm.exp2.f32"[F32](x: F32)
use @"llvm.exp2.f64"[F64](x: F64)
use @"llvm.cos.f32"[F32](x: F32)
use @"llvm.cos.f64"[F64](x: F64)
use @"llvm.sin.f32"[F32](x: F32)
use @"llvm.sin.f64"[F64](x: F64)
use @tanf[F32](x: F32)
use @coshf[F32](x: F32)
use @sinhf[F32](x: F32)
use @tanhf[F32](x: F32)
use @acosf[F32](x: F32)
use @asinf[F32](x: F32)
use @atanf[F32](x: F32)
use @atan2f[F32](x: F32, y: F32)
use @acoshf[F32](x: F32)
use @asinhf[F32](x: F32)
use @atanhf[F32](x: F32)
use @tan[F64](x: F64)
use @cosh[F64](x: F64)
use @sinh[F64](x: F64)
use @tanh[F64](x: F64)
use @acos[F64](x: F64)
use @asin[F64](x: F64)
use @atan[F64](x: F64)
use @atan2[F64](x: F64, y: F64)
use @acosh[F64](x: F64)
use @asinh[F64](x: F64)
use @atanh[F64](x: F64)
use @"llvm.copysign.f32"[F32](x: F32, sign: F32)
use @"llvm.copysign.f64"[F64](x: F64, sign: F64)
use @frexp[F64](value: F64, exponent: Pointer[U32])
use @ldexpf[F32](value: F32, exponent: I32)
use @ldexp[F64](value: F64, exponent: I32)
primitive F32 is FloatingPoint[F32]
new create(value: F32 = 0) => value
new pi() => 3.14159265358979323846
new e() => 2.71828182845904523536
new _nan() => compile_intrinsic
new _inf(negative: Bool) => compile_intrinsic
new from_bits(i: U32) => compile_intrinsic
fun bits(): U32 => compile_intrinsic
new from[B: (Number & Real[B] val)](a: B) => a.f32()
new min_value() =>
"""
Minimum negative value representable.
"""
from_bits(0xFF7FFFFF)
new max_value() =>
"""
Maximum positive value representable.
"""
from_bits(0x7F7FFFFF)
new min_normalised() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
"""
from_bits(0x00800000)
new epsilon() =>
"""
Minimum positive value such that (1 + epsilon) != 1.
"""
from_bits(0x34000000)
fun tag radix(): U8 =>
"""
Exponent radix.
"""
2
fun tag precision2(): U8 =>
"""
Mantissa precision in bits.
"""
24
fun tag precision10(): U8 =>
"""
Mantissa precision in decimal digits.
"""
6
fun tag min_exp2(): I16 =>
"""
Minimum exponent value such that (2^exponent) - 1 is representable at full
precision (ie a normalised number).
"""
-125
fun tag min_exp10(): I16 =>
"""
Minimum exponent value such that (10^exponent) - 1 is representable at full
precision (ie a normalised number).
"""
-37
fun tag max_exp2(): I16 =>
"""
Maximum exponent value such that (2^exponent) - 1 is representable.
"""
128
fun tag max_exp10(): I16 =>
"""
Maximum exponent value such that (10^exponent) - 1 is representable.
"""
38
fun abs(): F32 => @"llvm.fabs.f32"(this)
fun ceil(): F32 => @"llvm.ceil.f32"(this)
fun floor(): F32 => @"llvm.floor.f32"(this)
fun round(): F32 => @"llvm.round.f32"(this)
fun trunc(): F32 => @"llvm.trunc.f32"(this)
fun min(y: F32): F32 => if this < y then this else y end
fun max(y: F32): F32 => if this > y then this else y end
fun fld(y: F32): F32 =>
(this / y).floor()
fun fld_unsafe(y: F32): F32 =>
(this /~ y).floor()
fun mod(y: F32): F32 =>
let r = this % y
if r == F32(0.0) then
r.copysign(y)
elseif (r > 0) xor (y > 0) then
r + y
else
r
end
fun mod_unsafe(y: F32): F32 =>
let r = this %~ y
if r == F32(0.0) then
r.copysign(y)
elseif (r > 0) xor (y > 0) then
r + y
else
r
end
fun finite(): Bool =>
"""
Check whether this number is finite, ie not +/-infinity and not NaN.
"""
// True if exponent is not all 1s
(bits() and 0x7F800000) != 0x7F800000
fun infinite(): Bool =>
"""
Check whether this number is +/-infinity
"""
// True if exponent is all 1s and mantissa is 0
((bits() and 0x7F800000) == 0x7F800000) and // exp
((bits() and 0x007FFFFF) == 0) // mantissa
fun nan(): Bool =>
"""
Check whether this number is NaN.
"""
// True if exponent is all 1s and mantissa is non-0
((bits() and 0x7F800000) == 0x7F800000) and // exp
((bits() and 0x007FFFFF) != 0) // mantissa
fun ldexp(x: F32, exponent: I32): F32 =>
@ldexpf(x, exponent)
fun frexp(): (F32, U32) =>
var exponent: U32 = 0
var mantissa = @frexp(f64(), addressof exponent)
(mantissa.f32(), exponent)
fun log(): F32 => @"llvm.log.f32"(this)
fun log2(): F32 => @"llvm.log2.f32"(this)
fun log10(): F32 => @"llvm.log10.f32"(this)
fun logb(): F32 => @logbf(this)
fun pow(y: F32): F32 => @"llvm.pow.f32"(this, y)
fun powi(y: I32): F32 =>
ifdef windows then
pow(y.f32())
else
@"llvm.powi.f32"(this, y)
end
fun sqrt(): F32 =>
if this < 0.0 then
_nan()
else
@"llvm.sqrt.f32"(this)
end
fun sqrt_unsafe(): F32 =>
"""
Unsafe operation.
If this is negative, the result is undefined.
"""
@"llvm.sqrt.f32"(this)
fun cbrt(): F32 => @cbrtf(this)
fun exp(): F32 => @"llvm.exp.f32"(this)
fun exp2(): F32 => @"llvm.exp2.f32"(this)
fun cos(): F32 => @"llvm.cos.f32"(this)
fun sin(): F32 => @"llvm.sin.f32"(this)
fun tan(): F32 => @tanf(this)
fun cosh(): F32 => @coshf(this)
fun sinh(): F32 => @sinhf(this)
fun tanh(): F32 => @tanhf(this)
fun acos(): F32 => @acosf(this)
fun asin(): F32 => @asinf(this)
fun atan(): F32 => @atanf(this)
fun atan2(y: F32): F32 => @atan2f(this, y)
fun acosh(): F32 => @acoshf(this)
fun asinh(): F32 => @asinhf(this)
fun atanh(): F32 => @atanhf(this)
fun copysign(sign: F32): F32 => @"llvm.copysign.f32"(this, sign)
fun hash(): USize => bits().hash()
fun hash64(): U64 => bits().hash64()
fun i128(): I128 => f64().i128()
fun u128(): U128 => f64().u128()
fun i128_unsafe(): I128 =>
"""
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
"""
f64_unsafe().i128_unsafe()
fun u128_unsafe(): U128 =>
"""
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
"""
f64_unsafe().u128_unsafe()
primitive F64 is FloatingPoint[F64]
new create(value: F64 = 0) => value
new pi() => 3.14159265358979323846
new e() => 2.71828182845904523536
new _nan() => compile_intrinsic
new _inf(negative: Bool) => compile_intrinsic
new from_bits(i: U64) => compile_intrinsic
fun bits(): U64 => compile_intrinsic
new from[B: (Number & Real[B] val)](a: B) => a.f64()
new min_value() =>
"""
Minimum negative value representable.
"""
from_bits(0xFFEF_FFFF_FFFF_FFFF)
new max_value() =>
"""
Maximum positive value representable.
"""
from_bits(0x7FEF_FFFF_FFFF_FFFF)
new min_normalised() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
"""
from_bits(0x0010_0000_0000_0000)
new epsilon() =>
"""
Minimum positive value such that (1 + epsilon) != 1.
"""
from_bits(0x3CB0_0000_0000_0000)
fun tag radix(): U8 =>
"""
Exponent radix.
"""
2
fun tag precision2(): U8 =>
"""
Mantissa precision in bits.
"""
53
fun tag precision10(): U8 =>
"""
Mantissa precision in decimal digits.
"""
15
fun tag min_exp2(): I16 =>
"""
Minimum exponent value such that (2^exponent) - 1 is representable at full
precision (ie a normalised number).
"""
-1021
fun tag min_exp10(): I16 =>
"""
Minimum exponent value such that (10^exponent) - 1 is representable at full
precision (ie a normalised number).
"""
-307
fun tag max_exp2(): I16 =>
"""
Maximum exponent value such that (2^exponent) - 1 is representable.
"""
1024
fun tag max_exp10(): I16 =>
"""
Maximum exponent value such that (10^exponent) - 1 is representable.
"""
308
fun abs(): F64 => @"llvm.fabs.f64"(this)
fun ceil(): F64 => @"llvm.ceil.f64"(this)
fun floor(): F64 => @"llvm.floor.f64"(this)
fun round(): F64 => @"llvm.round.f64"(this)
fun trunc(): F64 => @"llvm.trunc.f64"(this)
fun min(y: F64): F64 => if this < y then this else y end
fun max(y: F64): F64 => if this > y then this else y end
fun fld(y: F64): F64 =>
(this / y).floor()
fun fld_unsafe(y: F64): F64 =>
(this /~ y).floor()
fun mod(y: F64): F64 =>
let r = this.rem(y)
if r == F64(0.0) then
r.copysign(y)
elseif (r > 0) xor (y > 0) then
r + y
else
r
end
fun mod_unsafe(y: F64): F64 =>
let r = this %~ y
if r == F64(0.0) then
r.copysign(y)
elseif (r > 0) xor (y > 0) then
r + y
else
r
end
fun finite(): Bool =>
"""
Check whether this number is finite, ie not +/-infinity and not NaN.
"""
// True if exponent is not all 1s
(bits() and 0x7FF0_0000_0000_0000) != 0x7FF0_0000_0000_0000
fun infinite(): Bool =>
"""
Check whether this number is +/-infinity
"""
// True if exponent is all 1s and mantissa is 0
((bits() and 0x7FF0_0000_0000_0000) == 0x7FF0_0000_0000_0000) and // exp
((bits() and 0x000F_FFFF_FFFF_FFFF) == 0) // mantissa
fun nan(): Bool =>
"""
Check whether this number is NaN.
"""
// True if exponent is all 1s and mantissa is non-0
((bits() and 0x7FF0_0000_0000_0000) == 0x7FF0_0000_0000_0000) and // exp
((bits() and 0x000F_FFFF_FFFF_FFFF) != 0) // mantissa
fun ldexp(x: F64, exponent: I32): F64 =>
@ldexp(x, exponent)
fun frexp(): (F64, U32) =>
var exponent: U32 = 0
var mantissa = @frexp(this, addressof exponent)
(mantissa, exponent)
fun log(): F64 => @"llvm.log.f64"(this)
fun log2(): F64 => @"llvm.log2.f64"(this)
fun log10(): F64 => @"llvm.log10.f64"(this)
fun logb(): F64 => @logb(this)
fun pow(y: F64): F64 => @"llvm.pow.f64"(this, y)
fun powi(y: I32): F64 =>
ifdef windows then
pow(y.f64())
else
@"llvm.powi.f64"(this, y)
end
fun sqrt(): F64 =>
if this < 0.0 then
_nan()
else
@"llvm.sqrt.f64"(this)
end
fun sqrt_unsafe(): F64 =>
"""
Unsafe operation.
If this is negative, the result is undefined.
"""
@"llvm.sqrt.f64"(this)
fun cbrt(): F64 => @cbrt(this)
fun exp(): F64 => @"llvm.exp.f64"(this)
fun exp2(): F64 => @"llvm.exp2.f64"(this)
fun cos(): F64 => @"llvm.cos.f64"(this)
fun sin(): F64 => @"llvm.sin.f64"(this)
fun tan(): F64 => @tan(this)
fun cosh(): F64 => @cosh(this)
fun sinh(): F64 => @sinh(this)
fun tanh(): F64 => @tanh(this)
fun acos(): F64 => @acos(this)
fun asin(): F64 => @asin(this)
fun atan(): F64 => @atan(this)
fun atan2(y: F64): F64 => @atan2(this, y)
fun acosh(): F64 => @acosh(this)
fun asinh(): F64 => @asinh(this)
fun atanh(): F64 => @atanh(this)
fun copysign(sign: F64): F64 => @"llvm.copysign.f64"(this, sign)
fun hash(): USize => bits().hash()
fun hash64(): U64 => bits().hash64()
fun i128(): I128 =>
if this > I128.max_value().f64() then
return I128.max_value()
elseif this < I128.min_value().f64() then
return I128.min_value()
end
let bit = bits()
let high = (bit >> 32).u32()
let ex = ((high and 0x7FF00000) >> 20) - 1023
if ex < 0 then
return 0
end
let s = ((high and 0x80000000) >> 31).i128()
var r = ((bit and 0x000FFFFFFFFFFFFF) or 0x0010000000000000).i128()
let ex' = ex.u128()
if ex' > 52 then
r = r << (ex' - 52)
else
r = r >> (52 - ex')
end
(r xor s) - s
fun u128(): U128 =>
if this > U128.max_value().f64() then
return U128.max_value()
elseif this < U128.min_value().f64() then
return U128.min_value()
end
let bit = bits()
let high = (bit >> 32).u32()
let ex = ((high and 0x7FF00000) >> 20) - 1023
if (ex < 0) or ((high and 0x80000000) != 0) then
return 0
end
var r = ((bit and 0x000FFFFFFFFFFFFF) or 0x0010000000000000).u128()
let ex' = ex.u128()
if ex' > 52 then
r = r << (ex' - 52)
else
r = r >> (52 - ex')
end
r.u128()
fun i128_unsafe(): I128 =>
"""
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
"""
i128()
fun u128_unsafe(): U128 =>
"""
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
"""
u128()
type Float is (F32 | F64)
|
pony
|
2891677
|
https://sv.wikipedia.org/wiki/Phlogophora%20flavescens
|
Phlogophora flavescens
|
Phlogophora flavescens är en fjärilsart som beskrevs av Saundby 1963. Phlogophora flavescens ingår i släktet Phlogophora och familjen nattflyn. Inga underarter finns listade i Catalogue of Life.
Källor
Nattflyn
flavescens
|
swedish
| 1.228856
|
Pony/collections-MinHeapPriority-.txt
|
MinHeapPriority[A: Comparable[A] #read]¶
[Source]
primitive val MinHeapPriority[A: Comparable[A] #read] is
_BinaryHeapPriority[A] val
Implements¶
_BinaryHeapPriority[A] val
Constructors¶
create¶
[Source]
new val create()
: MinHeapPriority[A] val^
Returns¶
MinHeapPriority[A] val^
Public Functions¶
apply¶
[Source]
fun box apply(
x: A,
y: A)
: Bool val
Parameters¶
x: A
y: A
Returns¶
Bool val
eq¶
[Source]
fun box eq(
that: MinHeapPriority[A] val)
: Bool val
Parameters¶
that: MinHeapPriority[A] val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: MinHeapPriority[A] val)
: Bool val
Parameters¶
that: MinHeapPriority[A] val
Returns¶
Bool val
|
pony
|
1974418
|
https://sv.wikipedia.org/wiki/Ainigmaptilon%20virgularoides
|
Ainigmaptilon virgularoides
|
Ainigmaptilon virgularoides är en korallart som först beskrevs av Molander 1929. Ainigmaptilon virgularoides ingår i släktet Ainigmaptilon och familjen Primnoidae.
Artens utbredningsområde är Södra Ishavet. Inga underarter finns listade i Catalogue of Life.
Källor
Koralldjur
virgularoides
|
swedish
| 1.118252
|
Pony/debug-DebugErr-.txt
|
DebugErr¶
[Source]
primitive val DebugErr
Constructors¶
create¶
[Source]
new val create()
: DebugErr val^
Returns¶
DebugErr val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: DebugErr val)
: Bool val
Parameters¶
that: DebugErr val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: DebugErr val)
: Bool val
Parameters¶
that: DebugErr val
Returns¶
Bool val
|
pony
|
362160
|
https://nn.wikipedia.org/wiki/Filterboble
|
Filterboble
|
Ei filterboble er ein effekt som kan oppstå når folk brukar nettstader som tilbyr individuelt tilpassa innhald, og inneber at informasjon på internett vert filtrert og sortert vekk frå søk. Årsaka til at filterbobler kan oppstå, er at algoritmane som lagar søkeresultatlister og anbefaler nettstader, prøver å føreseia kva som vil ha størst sjanse for å gjera brukaren nøgd. Dette vert gjort ved å tilpassa innhaldet på nettsidene til kva sider brukaren har vitja før, og til kva for eit kjønn eller kva for ei aldersgruppe brukaren tilhøyrer. Filterbobler kan føra til at personar vert eksponert for informasjon som stadfestar syn dei allereie har, eller at ein ikkje vert kjent med andre syn enn det ein har frå før.
Filterbobler kan oppstå når søkjemotorar tilpassar trefflista basert på kva brukaren har klikka på tidlegare.
Omgrepet vart fyrst teke i bruk av forfattaren Eli Pariser, og gjort kjent gjennom boka The Filter Bubble.
Kjelder
Denne artikkelen bygger på «Filterboble» frå , den 31. mars 2019.
Litteratur
Pariser, Eli The Filter Bubble: What the Internet Is Hiding from You, Penguin Press ISBN 978-1-59420-300-8
Bakgrunnsstoff
Filterboblesimulator
Wall Street Journal Blue Feed, Red Feed - See Liberal Facebook and Conservative Facebook, Side by Side (filterboblesimulator fra USA)
Forsking
Exploring the Filter Bubble: The Effect of Using Recommender Systems on Content Diversity
Norske artiklar
Jan-Arve Overland og Ragna Marie Tørdal Vi lever i en filterboble
Marianne Hagelia Vi lever i en filterboble
Kritisk tenking
Internettfenomen
Sider utan gjennomgåtte omsetjingar
|
norwegian_nynorsk
| 1.170349
|
Pony/cli-OptionSpec-.txt
|
OptionSpec¶
[Source]
OptionSpec describes the specification of a named Option. They have a name,
descr(iption), a short-name, a typ(e), and a default value when they are not
required.
Options can be placed anywhere before or after commands, and can be thought
of as named arguments.
class val OptionSpec
Constructors¶
bool¶
[Source]
Creates an Option with a Bool typed value that can be used like
--opt or -O or --opt=true or -O=true
to yield an option value like
cmd.option("opt").bool() == true.
new val bool(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference,
default': (Bool val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
default': (Bool val | None val) = reference
Returns¶
OptionSpec val^
string¶
[Source]
Creates an Option with a String typed value that can be used like
--file=dir/filename or -F=dir/filename or -Fdir/filename
to yield an option value like
cmd.option("file").string() == "dir/filename".
new val string(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference,
default': (String val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
default': (String val | None val) = reference
Returns¶
OptionSpec val^
i64¶
[Source]
Creates an Option with an I64 typed value that can be used like
--count=42 -C=42
to yield an option value like
cmd.option("count").i64() == I64(42).
new val i64(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference,
default': (I64 val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
default': (I64 val | None val) = reference
Returns¶
OptionSpec val^
u64¶
[Source]
Creates an Option with an U64 typed value that can be used like
--count=47 -C=47
to yield an option value like
cmd.option("count").u64() == U64(47).
new val u64(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference,
default': (U64 val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
default': (U64 val | None val) = reference
Returns¶
OptionSpec val^
f64¶
[Source]
Creates an Option with a F64 typed value that can be used like
--ratio=1.039 or -R=1.039
to yield an option value like
cmd.option("ratio").f64() == F64(1.039).
new val f64(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference,
default': (F64 val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
default': (F64 val | None val) = reference
Returns¶
OptionSpec val^
string_seq¶
[Source]
Creates an Option with a ReadSeq[String] typed value that can be used like
--files=file1 --files=files2 --files=files2
to yield a sequence of three strings equivalent to
cmd.option("ratio").string_seq() (equiv) ["file1"; "file2"; "file3"].
new val string_seq(
name': String val,
descr': String val = "",
short': (U8 val | None val) = reference)
: OptionSpec val^
Parameters¶
name': String val
descr': String val = ""
short': (U8 val | None val) = reference
Returns¶
OptionSpec val^
Public Functions¶
name¶
[Source]
Returns the name of this option.
fun box name()
: String val
Returns¶
String val
descr¶
[Source]
Returns the description for this option.
fun box descr()
: String val
Returns¶
String val
required¶
[Source]
Returns true iff this option is required to be present in the command line.
fun box required()
: Bool val
Returns¶
Bool val
help_string¶
[Source]
Returns a formated help string for this option.
fun box help_string()
: String val
Returns¶
String val
deb_string¶
[Source]
fun box deb_string()
: String val
Returns¶
String val
|
pony
|
205617
|
https://no.wikipedia.org/wiki/MOD11
|
MOD11
|
MOD11 (Modulus11) er en kontrollsifferalgoritme som blant annet benyttes for å validere kontonumre i norske banker, organisasjonsnummer og det siste sifferet i norske fødselsnummer. (Norske fødselsnummer har to kontrollsifre, det nest siste er også et modulo 11-kontrollsiffer, men ved beregningen av dette benyttes det multiplikatorer i en annen og uregelmessig rekkefølge).
Bakgrunn
Kontrollsiffer benyttes for å oppdage feil ved inntasting av f.eks. KID, kontonumre og fødselsnumre. Det benyttes i all hovedsak to algoritmer for dette, MOD10 og MOD11. Disse kontrollsifrene kontrolleres maskinelt ved OCR-lesing i skranken hos banker. En del IT-systemer kontrollerer også disse kontrollsifre for å sikre at brukere ikke har tastet feil. Dette inkluderer nettbanker og lønnssystemer.
Dersom to eller flere siffer i det inntastede felt er feil, øker sjansen for at kontrollsifferet beregnes til det samme, og at feilen ikke oppdages. Den vil likevel ikke være mer enn om lag 9 % for MOD11 – og 10 % for MOD10. Dersom en tilfeldig tallrekke kontrolleres, er sannsynligheten om lag 9 % for at siste siffer stemmer med kontrollsiffer beregningen (MOD11 bruker også tegnet «-» som et kontrolltegn, så det blir elleve varianter).
Denne kontrollsifferalgoritmen er også designet til å oppdage ombytting av sifre. Det er noe økt sjanse for at brukere taster inn f.eks. en KID der to sifre har byttet plass. Derfor brukes et prinsipp med varierende vekttall for hvert siffer i algoritmen nedenfor. I modulus-10 kan det oppdages om to påfølgende siffer har byttet plass, men ikke første og siste i gruppe på tre. Modulus11 vil også oppdage det.
Beregning av kontrollsiffer med Modulus11
Et tenkt kontonummer er 1234.56.78903. Det siste sifferet i kontonummeret er et kontrollsiffer. I dette eksempelet er kontrollsifferet 3. Kontonummeret uten kontrollsiffer (og uten skilletegn) er 1234567890.
Hvert siffer i eksempelet over multipliseres med vekttallene 2,3,4,5,6,7,2,3,4,5 (eventuelt videre ,6,7,2,3 og så videre for tall med flere sifre), regnet fra høyre mot venstre.
0 × 2 = 0
9 × 3 = 27
8 × 4 = 32
7 × 5 = 35
6 × 6 = 36
5 × 7 = 35
4 x 2 = 8
3 x 3 = 9
2 x 4 = 8
1 x 5 = 5
Summen er 0 + 27 + 32 + 35 + 36 + 35 + 8 + 9 + 8 + 5 = 195.
Kontrollsifferet blir nå det tallet som må legges til summen for å få et tall som er delelig med 11.
Summen divideres med 11 og vi noterer «resten» som blir 8 i dette tilfellet. Denne resten trekkes fra 11 og vi får 3 som blir kontrollsifferet.
11 - 8 = kontrollsifferet 3
Komplett og gyldig kontonummer i dette eksempelet er derfor 1234.56.78903.
Dersom summen er delelig med 11 blir også resten 0 og kontrollsifferet 0. Dersom «resten» ved divisjonen blir 1 skal «kontrollsifferet» ha tallverdien 10, da benyttes isteden et minustegn (eller bindestrek) istedenfor kontrollsifferet. Imidlertid gjelder for kontonumre (og også for personnummer) at slike tall isteden skal forkastes slik at for de typene tall kan kontrollsiffer «-» aldri forekomme.
Implementasjoner i forskjellige programmeringspråk
C#
public static bool ValidateMod11(string bankAccountNumber)
{
var normalized = Regex.Replace(bankAccountNumber, @"[\s.]+", string.Empty);
if (normalized.Length != 11)
{
return false;
}
var weights = new[] { 5, 4, 3, 2, 7, 6, 5, 4, 3, 2 };
var sum = 0;
for (var i = 0; i < 10; i++)
{
sum += int.Parse(normalized[i].ToString()) * weights[i];
}
var remainder = sum % 11;
var controlDigit = int.Parse(normalized[10].ToString());
return controlDigit == (remainder == 0 ? 0 : 11 - remainder);
}
JavaScript
function validateKontonummerMod11(kontonummer) {
const weights = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
const kontonummerWithoutSpacesAndPeriods = kontonummer.replace(/[\s.]+/g, '');
if (kontonummerWithoutSpacesAndPeriods.length !== 11) {
return false;
} else {
const sjekksiffer = parseInt(kontonummerWithoutSpacesAndPeriods.charAt(10), 10);
const kontonummerUtenSjekksiffer = kontonummerWithoutSpacesAndPeriods.substring(0, 10);
let sum = 0;
for (let index = 0; index < 10; index++) {
sum += parseInt(kontonummerUtenSjekksiffer.charAt(index), 10) * weights[index];
}
const remainder = sum % 11;
return sjekksiffer === (remainder === 0 ? 0 : 11 - remainder);
}
}
Python
def kid_mod11_wiki(a):
cross = sum([int(val)*[2,3,4,5,6,7][idx%6] for idx,val in enumerate(list(str(a))[::-1])])
return "%s%s" % (a,cross % 11 == 10 and '-' or 11-(cross % 11))
Java
public class KontonummerValidator {
public static boolean gyldigKontonummer(String kontonr) {
// Fjern whitespace og punktum fra kontonummer (enkelte liker å formatere kontonummer med 1234.56.78903)
kontonr = StringUtils.remove(kontonr, ' ');
kontonr = StringUtils.remove(kontonr, '.');
// Skal inneholde 11 siffer og kun tall
if (kontonr.length() != 11 || !StringUtils.isNumeric(kontonr)) {
return false;
}
int sisteSiffer = Character.getNumericValue(kontonr.charAt(kontonr.length() - 1));
return getCheckDigit(kontonr) == sisteSiffer;
}
private static int getCheckDigit(String number) {
int lastIndex = number.length() - 1;
int sum = 0;
for (int i = 0; i < lastIndex; i++) {
sum += Character.getNumericValue(number.charAt(i)) * getWeightNumber(i);
}
int remainder = sum % 11;
return getCheckDigitFromRemainder(remainder);
}
private static int getWeightNumber(int i) {
return 7 - (i + 2) % 6;
}
private static int getCheckDigitFromRemainder(int remainder) {
switch (remainder) {
case 0:
return 0;
default:
return 11 - remainder;
}
}
}
Kotlin
fun validMod11(cid: String): Boolean {
val controlDigit = cid[cid.length - 1].toString()
val controlSumNumbers = listOf(
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7
)
val number = cid.subSequence(0, cid.length - 1).reversed().toString()
var sum = 0
for(i in number.indices) {
sum += number[i].toString().toInt() * controlSumNumbers[i]
}
val output = when (val sumResult = 11 - sum % 11) {
11 -> "0"
10 -> "-"
else -> sumResult.toString()
}
return output == controlDigit
}
Se også
MOD10
Referanser
Programmering
|
norwegian_bokmål
| 0.863193
|
Pony/random-MT-.txt
|
MT¶
[Source]
A Mersenne Twister. This is a non-cryptographic random number generator. This
should only be used for legacy applications that require a Mersenne Twister,
otherwise use Rand.
class ref MT is
Random ref
Implements¶
Random ref
Constructors¶
create¶
[Source]
Create with the specified seed. Returned values are deterministic for a
given seed.
new ref create(
x: U64 val = 5489,
y: U64 val = 0)
: MT ref^
Parameters¶
x: U64 val = 5489
y: U64 val = 0
Returns¶
MT ref^
Public Functions¶
next¶
[Source]
A random integer in [0, 2^64)
fun ref next()
: U64 val
Returns¶
U64 val
has_next¶
fun tag has_next()
: Bool val
Returns¶
Bool val
u8¶
fun ref u8()
: U8 val
Returns¶
U8 val
u16¶
fun ref u16()
: U16 val
Returns¶
U16 val
u32¶
fun ref u32()
: U32 val
Returns¶
U32 val
u64¶
fun ref u64()
: U64 val
Returns¶
U64 val
u128¶
fun ref u128()
: U128 val
Returns¶
U128 val
ulong¶
fun ref ulong()
: ULong val
Returns¶
ULong val
usize¶
fun ref usize()
: USize val
Returns¶
USize val
i8¶
fun ref i8()
: I8 val
Returns¶
I8 val
i16¶
fun ref i16()
: I16 val
Returns¶
I16 val
i32¶
fun ref i32()
: I32 val
Returns¶
I32 val
i64¶
fun ref i64()
: I64 val
Returns¶
I64 val
i128¶
fun ref i128()
: I128 val
Returns¶
I128 val
ilong¶
fun ref ilong()
: ILong val
Returns¶
ILong val
isize¶
fun ref isize()
: ISize val
Returns¶
ISize val
int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
fun ref int[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
real¶
fun ref real()
: F64 val
Returns¶
F64 val
shuffle[A: A]¶
fun ref shuffle[A: A](
array: Array[A] ref)
: None val
Parameters¶
array: Array[A] ref
Returns¶
None val
|
pony
|
443033
|
https://sv.wikipedia.org/wiki/Gammal
|
Gammal
|
Se även ålderdom.
Gammal är ett runsvenskt mansnamn, som återfinns i flera svenska vikingatida runinskrifter, från främst Uppland (U 56, U 144, U 163, U 207, U 409, U 952, U 1070) , men också från Södermanland (Sö 359) och Öland (Öl 37), samt möjligen i en 1100-tals inskrift i Penningtons kyrka, Cumbria, England.
Det har använts ända till våra dagar, men är numera väldigt ovanligt.
Källor
Samnordisk runtextdatabas
Mansnamn
|
swedish
| 1.045208
|
Pony/collections-HashSet-.txt
|
HashSet[A: A, H: HashFunction[A!] val]¶
[Source]
A set, built on top of a HashMap. This is implemented as map of an alias of
a type to itself
class ref HashSet[A: A, H: HashFunction[A!] val] is
Comparable[HashSet[A, H] box] ref
Implements¶
Comparable[HashSet[A, H] box] ref
Constructors¶
create¶
[Source]
Defaults to a prealloc of 8.
new ref create(
prealloc: USize val = 8)
: HashSet[A, H] ref^
Parameters¶
prealloc: USize val = 8
Returns¶
HashSet[A, H] ref^
Public Functions¶
size¶
[Source]
The number of items in the set.
fun box size()
: USize val
Returns¶
USize val
space¶
[Source]
The available space in the set.
fun box space()
: USize val
Returns¶
USize val
apply¶
[Source]
Return the value if its in the set, otherwise raise an error.
fun box apply(
value: box->A!)
: this->A ?
Parameters¶
value: box->A!
Returns¶
this->A ?
contains¶
[Source]
Checks whether the set contains the value.
fun box contains(
value: box->A!)
: Bool val
Parameters¶
value: box->A!
Returns¶
Bool val
clear¶
[Source]
Remove all elements from the set.
fun ref clear()
: None val
Returns¶
None val
set¶
[Source]
Add a value to the set.
fun ref set(
value: A)
: None val
Parameters¶
value: A
Returns¶
None val
unset¶
[Source]
Remove a value from the set.
fun ref unset(
value: box->A!)
: None val
Parameters¶
value: box->A!
Returns¶
None val
extract¶
[Source]
Remove a value from the set and return it. Raises an error if the value
wasn't in the set.
fun ref extract(
value: box->A!)
: A^ ?
Parameters¶
value: box->A!
Returns¶
A^ ?
union¶
[Source]
Add everything in that to the set.
fun ref union(
that: Iterator[A^] ref)
: None val
Parameters¶
that: Iterator[A^] ref
Returns¶
None val
intersect[optional K: HashFunction[box->A!] val]¶
[Source]
Remove everything that isn't in that.
fun ref intersect[optional K: HashFunction[box->A!] val](
that: HashSet[box->A!, K] ref)
: None val
Parameters¶
that: HashSet[box->A!, K] ref
Returns¶
None val
difference¶
[Source]
Remove elements in this which are also in that. Add elements in that which
are not in this.
fun ref difference(
that: Iterator[A^] ref)
: None val
Parameters¶
that: Iterator[A^] ref
Returns¶
None val
remove¶
[Source]
Remove everything that is in that.
fun ref remove(
that: Iterator[box->A!] ref)
: None val
Parameters¶
that: Iterator[box->A!] ref
Returns¶
None val
add[optional K: HashFunction[this->A!] val]¶
[Source]
Add a value to the set.
fun box add[optional K: HashFunction[this->A!] val](
value: this->A!)
: HashSet[this->A!, K] ref^
Parameters¶
value: this->A!
Returns¶
HashSet[this->A!, K] ref^
sub[optional K: HashFunction[this->A!] val]¶
[Source]
Remove a value from the set.
fun box sub[optional K: HashFunction[this->A!] val](
value: box->this->A!)
: HashSet[this->A!, K] ref^
Parameters¶
value: box->this->A!
Returns¶
HashSet[this->A!, K] ref^
op_or[optional K: HashFunction[this->A!] val]¶
[Source]
Create a set with the elements of both this and that.
fun box op_or[optional K: HashFunction[this->A!] val](
that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^
Parameters¶
that: this->HashSet[A, H] ref
Returns¶
HashSet[this->A!, K] ref^
op_and[optional K: HashFunction[this->A!] val]¶
[Source]
Create a set with the elements that are in both this and that.
fun box op_and[optional K: HashFunction[this->A!] val](
that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^
Parameters¶
that: this->HashSet[A, H] ref
Returns¶
HashSet[this->A!, K] ref^
op_xor[optional K: HashFunction[this->A!] val]¶
[Source]
Create a set with the elements that are in either set but not both.
fun box op_xor[optional K: HashFunction[this->A!] val](
that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^
Parameters¶
that: this->HashSet[A, H] ref
Returns¶
HashSet[this->A!, K] ref^
without[optional K: HashFunction[this->A!] val]¶
[Source]
Create a set with the elements of this that are not in that.
fun box without[optional K: HashFunction[this->A!] val](
that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^
Parameters¶
that: this->HashSet[A, H] ref
Returns¶
HashSet[this->A!, K] ref^
clone[optional K: HashFunction[this->A!] val]¶
[Source]
Create a clone. The element type may be different due to aliasing and
viewpoint adaptation.
fun box clone[optional K: HashFunction[this->A!] val]()
: HashSet[this->A!, K] ref^
Returns¶
HashSet[this->A!, K] ref^
eq¶
[Source]
Returns true if the sets contain the same elements.
fun box eq(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
ne¶
[Source]
Returns false if the sets contain the same elements.
fun box ne(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
lt¶
[Source]
Returns true if every element in this is also in that, and this has fewer
elements than that.
fun box lt(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
le¶
[Source]
Returns true if every element in this is also in that.
fun box le(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
gt¶
[Source]
Returns true if every element in that is also in this, and this has more
elements than that.
fun box gt(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
ge¶
[Source]
Returns true if every element in that is also in this.
fun box ge(
that: HashSet[A, H] box)
: Bool val
Parameters¶
that: HashSet[A, H] box
Returns¶
Bool val
next_index¶
[Source]
Given an index, return the next index that has a populated value. Raise an
error if there is no next populated index.
fun box next_index(
prev: USize val = call)
: USize val ?
Parameters¶
prev: USize val = call
Returns¶
USize val ?
index¶
[Source]
Returns the value at a given index. Raise an error if the index is not
populated.
fun box index(
i: USize val)
: this->A ?
Parameters¶
i: USize val
Returns¶
this->A ?
values¶
[Source]
Return an iterator over the values.
fun box values()
: SetValues[A, H, this->HashSet[A, H] ref] ref^
Returns¶
SetValues[A, H, this->HashSet[A, H] ref] ref^
compare¶
[Source]
fun box compare(
that: HashSet[A, H] box)
: (Less val | Equal val | Greater val)
Parameters¶
that: HashSet[A, H] box
Returns¶
(Less val | Equal val | Greater val)
|
pony
|
4880656
|
https://sv.wikipedia.org/wiki/Lista%20%C3%B6ver%20hypersnabba%20stj%C3%A4rnor
|
Lista över hypersnabba stjärnor
|
Listan över hypersnabba stjärnor (HVS, HyperVelocity Star) är en lista över kända och bekräftade HVS-stjärnor 2014. En vanlig stjärna kan röra sig med hastigheter på ungefär 100 km/s. En hypersnabb stjärna kan ha hastigheter på upp emot 1000 km/s, vilket betyder att de kan ha hastigheter som överstiger flykthastigheten för galaxen.
Vid utgången av 2014 var ungefär 20 hypersnabba stjärnor kända. Astronomerna räknar med att det finns ungefär 1000 hypersnabba stjärnor i Vintergatan, vilket gör dem till en mycket ovanlig grupp av stjärnor, med tanke på att Vintergatan innehåller ungefär 100 miljarder stjärnor.
Lista över HVS-stjärnor
HVS-1 SDSS J090744.99+024506.8 eller LAMOST-HVS1
HVS-2 SDSS J093320.86+441705.4
HVS-3 HE 0437-5439 eller GSC2 S01132011256
HVS-4 SDSS J091301.00+305120.0
HVS-5 SDSS J091759.42+672238.7
HVS-6 SDSS J110557.45+093439.5
HVS-7 SDSS J113312.12+010824.9
HVS-8 SDSS J094214.04+200322.1
HVS-9 SDSS J102137.08-005234.8
HVS-10 SDSS J120337.85+180250.4
HVS-11 Objekt-ID:587728949047460025
HVS-12 Objekt-ID:587726033851515031
HVS-13 Objekt-ID:588848899905290419
HVS-14 Objekt-ID:587732577236484229
HVS-15 Objekt-ID:587724650864771241
HVS-16 Objekt-ID:587742954934698122
Referenser
|
swedish
| 0.959101
|
Pony/files-FileOK-.txt
|
FileOK¶
[Source]
primitive val FileOK
Constructors¶
create¶
[Source]
new val create()
: FileOK val^
Returns¶
FileOK val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: FileOK val)
: Bool val
Parameters¶
that: FileOK val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileOK val)
: Bool val
Parameters¶
that: FileOK val
Returns¶
Bool val
|
pony
|
3268743
|
https://sv.wikipedia.org/wiki/Poecilanthrax%20sackenii
|
Poecilanthrax sackenii
|
Poecilanthrax sackenii är en tvåvingeart som först beskrevs av Daniel William Coquillett 1887. Poecilanthrax sackenii ingår i släktet Poecilanthrax och familjen svävflugor. Inga underarter finns listade i Catalogue of Life.
Källor
Svävflugor
sackenii
|
swedish
| 1.183679
|
Pony/time-TimerNotify-.txt
|
TimerNotify¶
[Source]
Notifications for timer.
interface ref TimerNotify
Public Functions¶
apply¶
[Source]
Called with the the number of times the timer has fired since this was last
called. Usually, the value of count will be 1. If it is not 1, it means
that the timer isn't firing on schedule.
For example, if your timer is set to fire every 10 milliseconds, and
count is 2, that means it has been between 20-29 milliseconds since the
last time your timer fired. Non 1 values for a timer are rare and indicate
a system under heavy load.
Return true to reschedule the timer (if it has an interval), or
false to cancel the timer (even if it has an interval).
fun ref apply(
timer: Timer ref,
count: U64 val)
: Bool val
Parameters¶
timer: Timer ref
count: U64 val
Returns¶
Bool val
cancel¶
[Source]
Called if the timer is cancelled. This is also called if the notifier
returns false from its apply method.
fun ref cancel(
timer: Timer ref)
: None val
Parameters¶
timer: Timer ref
Returns¶
None val
|
pony
|
25887
|
https://da.wikipedia.org/wiki/Time
|
Time
|
Time er en enhed for tid på 3600 sekunder eller 3,6 kilosekunder.
Den internationale forkortelse for time er "h" (for latin hora). Ifølge Retskrivningsordbogen kan også "t." bruges som forkortelse for time, men hvis man gør det, er der fare for forveksling med "t" uden punktum som er den autoriserede forkortelse for ton.
Et døgn består af 24 timer.
En time består af 4 kvarter eller 60 minutter.
Oprindeligt blev dagen inddelt i 12 timer fra solopgang til solnedgang, hvilket gjorde at en time var længere om sommeren end om vinteren.
Et klokkeslæt angives ofte enten som antal timer og minutter (14:35) eller timer, minutter og sekunder (14:35:20).
Tidsenheder
|
danish
| 0.635954
|
Pony/src-cli-command_help-.txt
|
command_help.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193use "buffered"
primitive Help
fun general(cs: CommandSpec box): CommandHelp =>
"""
Creates a command help that can print a general program help message.
"""
CommandHelp._create(None, cs)
fun for_command(cs: CommandSpec box, argv: Array[String] box)
: (CommandHelp | SyntaxError)
=>
"""
Creates a command help for a specific command that can print a detailed
help message.
"""
_parse(cs, CommandHelp._create(None, cs), argv)
fun _parse(cs: CommandSpec box, ch: CommandHelp, argv: Array[String] box)
: (CommandHelp | SyntaxError)
=>
if argv.size() > 0 then
try
let cname = argv(0)?
if cs.commands().contains(cname) then
match cs.commands()(cname)?
| let ccs: CommandSpec box =>
let cch = CommandHelp._create(ch, ccs)
return _parse(ccs, cch, argv.slice(1))
end
end
return SyntaxError(cname, "unknown command")
end
end
ch
class box CommandHelp
"""
CommandHelp encapsulates the information needed to generate a user help
message for a given CommandSpec, optionally with a specific command
identified to print help about. Use `Help.general()` or `Help.for_command()`
to create a CommandHelp instance.
"""
let _parent: (CommandHelp box | None)
let _spec: CommandSpec box
new _create(parent': (CommandHelp box | None), spec': CommandSpec box) =>
_parent = parent'
_spec = spec'
fun fullname(): String =>
match _parent
| let p: CommandHelp => p.fullname() + " " + _spec.name()
else
_spec.name()
end
fun string(): String => fullname()
fun help_string(): String =>
"""
Renders the help message as a String.
"""
let w: Writer = Writer
_write_help(w)
let str = recover trn String(w.size()) end
for bytes in w.done().values() do str.append(bytes) end
str
fun print_help(os: OutStream) =>
"""
Prints the help message to an OutStream.
"""
let w: Writer = Writer
_write_help(w)
os.writev(w.done())
fun _write_help(w: Writer) =>
_write_usage(w)
if _spec.descr().size() > 0 then
w.write("\n")
w.write(_spec.descr() + "\n")
end
let options = _all_options()
if options.size() > 0 then
w.write("\nOptions:\n")
_write_options(w, options)
end
if _spec.commands().size() > 0 then
w.write("\nCommands:\n")
_write_commands(w)
end
let args = _spec.args()
if args.size() > 0 then
w.write("\nArgs:\n")
_write_args(w, args)
end
fun _write_usage(w: Writer) =>
w.write("usage: " + fullname())
if _any_options() then
w.write(" [<options>]")
end
if _spec.commands().size() > 0 then
w.write(" <command>")
end
if _spec.args().size() > 0 then
for a in _spec.args().values() do
w.write(" " + a.help_string())
end
else
w.write(" [<args> ...]")
end
w.write("\n")
fun _write_options(w: Writer, options: Array[OptionSpec box] box) =>
let cols = Array[(USize,String,String)]()
for o in options.values() do
cols.push((2, o.help_string(), o.descr()))
end
_Columns.write(w, cols)
fun _write_commands(w: Writer) =>
let cols = Array[(USize,String,String)]()
_list_commands(_spec, cols, 1)
_Columns.write(w, cols)
fun _list_commands(
cs: CommandSpec box,
cols: Array[(USize,String,String)],
level: USize)
=>
for c in cs.commands().values() do
cols.push((level*2, c.help_string(), c.descr()))
_list_commands(c, cols, level + 1)
end
fun _write_args(w: Writer, args: Array[ArgSpec] box) =>
let cols = Array[(USize,String,String)]()
for a in args.values() do
cols.push((2, a.help_string(), a.descr()))
end
_Columns.write(w, cols)
fun _any_options(): Bool =>
if _spec.options().size() > 0 then
true
else
match _parent
| let p: CommandHelp => p._any_options()
else
false
end
end
fun _all_options(): Array[OptionSpec box] =>
let options = Array[OptionSpec box]()
_all_options_fill(options)
options
fun _all_options_fill(options: Array[OptionSpec box]) =>
match _parent
| let p: CommandHelp => p._all_options_fill(options)
end
for o in _spec.options().values() do
options.push(o)
end
primitive _Columns
fun indent(w: Writer, n: USize) =>
var i = n
while i > 0 do
w.write(" ")
i = i - 1
end
fun write(w: Writer, cols: Array[(USize,String,String)]) =>
var widest: USize = 0
for c in cols.values() do
(let c0, let c1, _) = c
let c1s = c0 + c1.size()
if c1s > widest then
widest = c1s
end
end
for c in cols.values() do
(let c0, let c1, let c2) = c
indent(w, 1 + c0)
w.write(c1)
indent(w, (widest - c1.size()) + 2)
w.write(c2 + "\n")
end
|
pony
|
3312801
|
https://sv.wikipedia.org/wiki/Ogcodes%20clavatus
|
Ogcodes clavatus
|
Ogcodes clavatus är en tvåvingeart som beskrevs av Becker 1909. Ogcodes clavatus ingår i släktet Ogcodes och familjen kulflugor. Inga underarter finns listade i Catalogue of Life.
Källor
Kulflugor
clavatus
|
swedish
| 1.297444
|
Pony/time--index-.txt
|
Time Package¶
The Time Package provides classes and methods for timing operations,
dealing with dates and times, and scheduling tasks.
Public Types¶
primitive Nanos
class PosixDate
primitive Time
class Timer
interface TimerNotify
actor Timers
|
pony
|
445247
|
https://sv.wikipedia.org/wiki/Sam%20Fisher
|
Sam Fisher
|
Samuel Leo Fisher, också känd som Sam Fisher, är en rollfigur i Splinter Cell-serien som består av 6 böcker och 6 spel.
Bakgrund
Sam är en agent från National Security Agency. Han utför uppdragen i det tysta, och arbetar nästan alltid helt ensam, förutom den radiokontakt han får från sina kollegor, (mest noterbar Irving Lambert) på NSA. När Sam går ut på uppdrag är han ofta högteknologiskt utrustad, med till exempel fiktiva versioner av automatkarbinen FN F2000 och pistolen FN Five-seven samt utrustning som både ger mörker- och värmeseende (och även elektromagnetiskt seende senare i spelserien).
Sam har även en dotter, Sarah Fisher, samt en fru, Megan, som dog tidigare. Sams röst i spelen gjordes fram till 2013 av Michael Ironside och senare av Eric Johnson.
Medverkande
Spel
Tom Clancy's Splinter Cell (2002)
Tom Clancy's Splinter Cell: Pandora Tomorrow (2004)
Tom Clancy's Splinter Cell: Chaos Theory (2005)
Tom Clancy's Splinter Cell: Double Agent (2006)
Tom Clancy's Splinter Cell: Conviction (2009)
Tom Clancy's Splinter Cell: Blacklist (2013)
Romaner
Tom Clancy's Splinter Cell (2004) av David Michaels
Tom Clancy's Splinter Cell: Operation Barracuda (2005) av David Michaels
Tom Clancy's Splinter Cell: Checkmate (2006) av David Michaels
Tom Clancy's Splinter Cell: Fallout (2007) av David Michaels
Tom Clancy's Splinter Cell: Conviction (2009) av David Michaels
Tom Clancy's Splinter Cell: Endgame (2009) av David Michaels
I andra medier
En filmatisering av spelserien är planerad, Tom Hardy kommer att spela Sam Fisher.
Källor
Externa länkar
Sam Fisher på Splinter Cell Wiki
Huvudpersoner i datorspel
Splinter Cell
Fiktiva militärer
Fiktiva hemliga agenter och spioner
Fiktiva figurer från Maryland
Tom Clancy
Fiktiva figurer introducerade 2002
Fiktiva män i datorspel
|
swedish
| 1.276624
|
Pony/builtin-Float-.txt
|
Float¶
[Source]
type Float is
(F32 val | F64 val)
Type Alias For¶
(F32 val | F64 val)
|
pony
|
1443592
|
https://no.wikipedia.org/wiki/Friidrett%20under%20Paralympiske%20sommerleker%202016%20%E2%80%93%20Spyd%20menn
|
Friidrett under Paralympiske sommerleker 2016 – Spyd menn
|
Resultater
F40/F41
11.09.2016
F42/F43/F44
09.09.2016
F46
13.09.2016
F53/F54
09.09.2016
F56/F57
12.09.2016
Eksterne lenker
Offisiell resultatside F40/F41
Offisiell resultatside F42/F43/F44
Offisiell resultatside F46
Offisiell resultatside F53/F54
Offisiell resultatside F56/F57
S
Spydkast
|
norwegian_bokmål
| 0.634236
|
Pony/src-builtin-do_not_optimise-.txt
|
do_not_optimise.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19primitive DoNotOptimise
"""
Contains functions preventing some compiler optimisations, namely dead code
removal. This is useful for benchmarking purposes.
"""
fun apply[A](obj: A) =>
"""
Prevent the compiler from optimising out obj and any computation it is
derived from. This doesn't prevent constant propagation.
"""
compile_intrinsic
fun observe() =>
"""
Prevent the compiler from optimising out writes to an object marked by
the apply function.
"""
compile_intrinsic
|
pony
|
1523733
|
https://sv.wikipedia.org/wiki/Unixskal
|
Unixskal
|
Ett Unixskal är en kommandoradstolk, eller skal, som erbjuder ett traditionellt användargränssnitt för Unix och Unix-liknande operativsystem. Användaren styr operationen av datorn genom att skriva in kommandon som skall utföras, eller skapa ett skript som utför en räcka sådana kommandon, ofta med olika kontrollstrukturer (if-then-else, for-loop etc.).
Se även
Skalprogram
Bourne shell
tcsh
bash
Unixskal
|
swedish
| 1.271
|
Pony/2_primitives.txt
|
# Primitives
A __primitive__ is similar to a __class__, but there are two critical differences:
1. A __primitive__ has no fields.
2. There is only one instance of a user-defined __primitive__.
Having no fields means primitives are never mutable. Having a single instance means that if your code calls a constructor on a __primitive__ type, it always gets the same result back (except for built-in "machine word" primitives, covered below).
## What can you use a __primitive__ for?
There are three main uses of primitives (four, if you count built-in "machine word" primitives).
1. As a "marker value". For example, Pony often uses the __primitive__ `None` to indicate that something has "no value". Of course, it _does_ have a value, so that you can check what it is, and the value is the single instance of `None`.
2. As an "enumeration" type. By having a __union__ of __primitive__ types, you can have a type-safe enumeration. We'll cover __union__ types later.
3. As a "collection of functions". Since primitives can have functions, you can group functions together in a primitive type. You can see this in the standard library, where path handling functions are grouped in the __primitive__ `Path`, for example.
```pony
// 2 "marker values"
primitive OpenedDoor
primitive ClosedDoor
// An "enumeration" type
type DoorState is (OpenedDoor | ClosedDoor)
// A collection of functions
primitive BasicMath
fun add(a: U64, b: U64): U64 =>
a + b
fun multiply(a: U64, b: U64): U64 =>
a * b
actor Main
new create(env: Env) =>
let doorState : DoorState = ClosedDoor
let isDoorOpen : Bool = match doorState
| OpenedDoor => true
| ClosedDoor => false
end
env.out.print("Is door open? " + isDoorOpen.string())
env.out.print("2 + 3 = " + BasicMath.add(2,3).string())
```
Primitives are quite powerful, particularly as enumerations. Unlike enumerations in other languages, each "value" in the enumeration is a complete type, which makes attaching data and functionality to enumeration values easy.
## Built-in primitive types
The `primitive` keyword is also used to introduce certain built-in "machine word" types. Other than having a value associated with them, these work like user-defined primitives. These are:
* `Bool`. This is a 1-bit value that is either `true` or `false`.
* `ISize`, `ILong`, `I8`, `I16`, `I32`, `I64`, `I128`. Signed integers of various widths.
* `USize`, `ULong`, `U8`, `U16`, `U32`, `U64`, `U128`. Unsigned integers of various widths.
* `F32`, `F64`. Floating point numbers of various widths.
`ISize`/`USize` correspond to the bit width of the native type `size_t`, which varies by platform. `ILong`/`ULong` similarly correspond to the bit width of the native type `long`, which also varies by platform. The bit width of a native `int` is the same across all the platforms that Pony supports, and you can use `I32`/`U32` for this.
## Primitive initialisation and finalisation
Primitives can have two special functions, `_init` and `_final`. `_init` is called before any actor starts. `_final` is called after all actors have terminated. The two functions take no parameter. The `_init` and `_final` functions for different primitives always run sequentially.
A common use case for this is initialising and cleaning up C libraries without risking untimely use by an actor.
|
pony
|
13776
|
https://da.wikipedia.org/wiki/Standard%20ML
|
Standard ML
|
Standard ML (SML) er et funktionsorienteret programmeringssprog som understøtter moduler, statisk typetjek og typeinferens. Sproget er populært til udvikling af compilere, forskning omkring programmeringssprog og udvikling af systemer til automatisk bevisførelse.
SML er en moderne dialekt af ML som blev brugt i bevisførelsesystemet LCF. Sproget udmærker sig blandt programmeringssprog med en formel specifikation som indeholder en operationel semantik (The Definition of Standard ML fra 1990, revideret i 1997), hvilket betyder at alle operationer i sproget har en formelt defineret betydning.
Sproget
Et Standard ML-program består af en række erklæringer som indeholder udtryk som enten er funktioner, værdier eller sammensatte udtryk som kan reduceres. Standard ML er et funktionsorienteret programmeringssprog med nogle imperative træk. Den primære abstraktion som benyttes er altså funktioner. For eksempel kan fakultetsfunktionen beskrives rekursivt således:
fun fakultet n =
if n = 0 then 1 else n * fakultet (n-1)
En Standard ML-compiler kan således udlede at fakultet må være en funktion som tager et heltal som argument og returnerer et heltal (typen int → int), helt uden at disse typer angives eksplicit. Typeinferensen foregår ved hjælp af Hindley-Milner-algoritmen og gør at programmer i praksis kan udtrykkes kortere.
Samme funktion kan udtrykkes ved hjælp af mønstergenkendelse som vist i følgende eksempel:
fun fakultet 0 = 1
| fakultet n = n * fakultet (n-1)
Mønstergenkendelsen fungerer således at man ikke betragter funktionsargumentet som navnet på én parameter, men et generelt mønster som skal passe med inputværdien. Mønstre prøves fra det øverste mønster og ned, så rækkefølgen har en betydning. Hvis mønstre har variable komponenter (for eksempel n), bliver disse bundet så man kan henvise til dem i den funktionskrop som hører til mønsteret (adskilt med tegnet =).
Typer
De primitive indbyggede typer i Standard ML er: int, real, char, string, bool. Hertil findes en række prædefinerede algebraiske typer og nogle indbyggede, sammensatte typer: tupler og lister. Tupler kan indeholde en fast mængde af værdier med forskellige typer, mens lister kan indeholde vilkårligt mange værdier af én type. For eksempel:
val land = ("Danmark", 5564219, "Der er et yndigt land...")
val sorteret = [1,1,2,3,5,8,13,21,34,55,89]
Foruden en række indbyggede typer, kan man lave synonymer (også kaldet aliaser) til eksisterende typer. For eksempel kan man definere et koordinat som to kommatal, eller en omkreds som et kommatal. Tegnet * i typerne nedenfor er udtryk for den indbyggede sammensatte tupel-type:
type koordinat = real * real
type omkreds = real
Efterfølgende kan man angive typen koordinat i stedet for real * real. Her er ikke tale om en konvertering af værdier.
Foruden synonymer til eksisterende typer er det også muligt at lave nye algebraiske typer. Det er nyttigt til at modellere en række ting. For eksempel kan man beskrive geometriske former i planet:
datatype form = Cirkel of koordinat * omkreds
| Rektangel of koordinat * koordinat
| Trekant of koordinat * koordinat * koordinat
Eller binære træer:
datatype tree = Leaf
| Node of trae * int * trae
Eller køretøjer:
type hjul = int
type gear = int
type tophastighed = int
type hestekraefter = int
datatype koretoj = Bil of tophastighed * hestekraefter
| Tank of tophastighed * hestekraefter
| Cykel of hjul * gear
Det er efterfølgende muligt at konstruere funktioner som behandler disse typer ved hjælp af mønstergenkendelse:
fun antal_elementer Leaf = 0
| antal_elementer (Node (venstre, n, hojre)) =
1 + antal_elementer(venstre) + antal_elementer(hojre)
Det er værd at bemærke at algebraiske datatyper kan være rekursivt definerede, og funktioner som arbejder på disse er derfor ofte også rekursive. Det er også interessant at bemærke hvordan mønstergenkendelse og typeinferens fungerer: Alle tomme træer bliver grebet af første mønster mens ikke-tomme træer bliver matchet således at deres obligatoriske tre parametre (et venstre-træ, en værdi og et højre-træ) får navne som kan bruges i funktionskroppen.
fun miljovenlig (Cykel _) = true
| miljovenlig (_) = false
Man kan også udelade dele af en struktur ved at give dem det særlige variabelnavn _.
Højereordensfunktioner
Funktioner i Standard ML har såkaldt førsteklassestatus, hvilket vil sige at alle funktioner kan betragtes som værdier på lige fod med almindelige værdier som sandhedsværdier, tal, lister og tekst. En konsekvens ved dette er at funktioner kan tage andre funktioner som argument. Det er også muligt at erklære en funktion som ikke har et navn, men blot er en værdi (en såkaldt closure, lambda-udtryk eller anonym funktion).
Følgende er et eksempel som definerer plus som en funktion der tager en 2-tuple som input og returnerer summen af dens første- og andenkomponent:
val plus = (fn (x,y) => x+y)
En funktion kaldes "af højere orden" hvis den tager imod funktioner som argument eller returnerer funktioner som værdi. En strengere definition kræver at begge er tilfældet. Følgende er et eksempel på en funktion, K, som tager et argument x som input og returnerer en funktion, som tager et argument y som input, smider y væk og returnerer x; funktionen er skrevet på tre måder som alle er ækvivalente og gyldige:
fun K x y = x
fun K x = (fn y => x)
val K = (fn x => (fn y => x))
Følgende funktion, fikspunkt, tager imod en funktion f og en startværdi x og begynder at regne f(x), f(f(x)), f(f(f(x))) osv. indtil den finder et punkt hvor det ikke gør nogen forskel om man tilføjer en ekstra anvendelse af funktionen:
fun fikspunkt (f, x) =
if f x = f (f x)
then x
else fikspunkt (f, f x)
Man kan sige at K og fikspunkt er højereordensfunktioner.
Undtagelser
Standard ML understøtter undtagelser ved brugen af to nøgleord: raise og handle. Man kan desuden definere sine egne undtagelser ved exception, der har en syntaks meget lignende den for abstrakte datatyper. Der findes en række indbyggede undtagelser: Empty, Div, Fail, Domain m.fl.
fun max [] = raise Empty
| max [x] = x
| max (x::y::xs) =
if x > y
then max (x::xs)
else max (y::xs)
Moduler
Afsnit mangler.
Implementeringer
MLTon er en optimerende compiler til hele programmer. Den producerer meget effektiv kode sammenlignet med andre Standard ML-compilere.
Standard ML of New Jersey (forkortet SML/NJ) er en compiler med tilhørende værktøjer, biblioteker og interaktiv fortolker.
Poly/ML er en compiler som producerer effektiv kode og understøtter hardware med flere kerner (igennem POSIX-tråde).
Moscow ML er en compiler baseret på CAML Light-runtime-miljøet og understøtter moduler såvel som en stor del af SML Basis-biblioteket.
HaMLet er en SML-fortolker som forsøger at være en tilgængelig og præcis referenceimplementation.
ML Kit tilføjer en spildopsamler og regionsbaseret hukommelseshåndtering, sigtet mod realtidsapplikationer.
SML.NET oversætter til Microsofts Common Language Runtime (CLR) og har udvidelser som muliggør linkning til andre .NET-kode.
SML2c er en batch-compiler og oversætter kun erklæringer på modulniveau (dvs. signaturer, strukturer og funktorer) til C. Den er baseret på SML/NJ 0.67, men understøtter ikke SML/NJ's debugging og profiling. Programmer som kun består af moduler, og som virker i SML/NJ, kan oversættes med sml2c uden ændringer.
Poplog-systemet implementerer en version af Standard ML samtidigt med Common Lisp og Prolog og tillader sammenblandingen af disse sprog.
SML# er en konservativ udvidelse til Standard ML som tilføjer polymorfi på record-typer og evnen til at arbejde sammen med C-kode.
Alice: en fortolker til Standard ML som tilføjer doven evaluering, samtidighed (trådprogrammering og distribuerede beregninger via RPC) og constraintprogrammering.
Disse systemer er alle open source og frit tilgængelige. De fleste er implementeret i Standard ML. Der findes ikke længere kommercielle Standard ML-implementeringer, men et firma kaldet Harlequin producerede engang en kommerciel IDE og compiler til Standard ML under navnet MLWorks. Firmaet eksisterer ikke længere.
Se også
Funktionsprogrammering
Rekursion
Haskell (programmeringssprog)
OCaml (programmeringssprog)
Noter
Eksterne henvisninger
StandardML.dk
Programmeringssprog
|
danish
| 0.674769
|
Pony/pony_check-PropertyParams-.txt
|
PropertyParams¶
[Source]
Parameters to control Property Execution.
seed: the seed for the source of Randomness
num_samples: the number of samples to produce from the property generator
max_shrink_rounds: the maximum rounds of shrinking to perform
max_generator_retries: the maximum number of retries to do if a generator fails to generate a sample
timeout: the timeout for the PonyTest runner, in nanoseconds
async: if true the property is expected to finish asynchronously by calling
PropertyHelper.complete(...)
class val PropertyParams is
Stringable box
Implements¶
Stringable box
Constructors¶
create¶
[Source]
new val create(
num_samples': USize val = 100,
seed': U64 val = call,
max_shrink_rounds': USize val = 10,
max_generator_retries': USize val = 5,
timeout': U64 val = 60000000000,
async': Bool val = false)
: PropertyParams val^
Parameters¶
num_samples': USize val = 100
seed': U64 val = call
max_shrink_rounds': USize val = 10
max_generator_retries': USize val = 5
timeout': U64 val = 60000000000
async': Bool val = false
Returns¶
PropertyParams val^
Public fields¶
let seed: U64 val¶
[Source]
let num_samples: USize val¶
[Source]
let max_shrink_rounds: USize val¶
[Source]
let max_generator_retries: USize val¶
[Source]
let timeout: U64 val¶
[Source]
let async: Bool val¶
[Source]
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
|
pony
|
205617
|
https://no.wikipedia.org/wiki/MOD11
|
MOD11
|
MOD11 (Modulus11) er en kontrollsifferalgoritme som blant annet benyttes for å validere kontonumre i norske banker, organisasjonsnummer og det siste sifferet i norske fødselsnummer. (Norske fødselsnummer har to kontrollsifre, det nest siste er også et modulo 11-kontrollsiffer, men ved beregningen av dette benyttes det multiplikatorer i en annen og uregelmessig rekkefølge).
Bakgrunn
Kontrollsiffer benyttes for å oppdage feil ved inntasting av f.eks. KID, kontonumre og fødselsnumre. Det benyttes i all hovedsak to algoritmer for dette, MOD10 og MOD11. Disse kontrollsifrene kontrolleres maskinelt ved OCR-lesing i skranken hos banker. En del IT-systemer kontrollerer også disse kontrollsifre for å sikre at brukere ikke har tastet feil. Dette inkluderer nettbanker og lønnssystemer.
Dersom to eller flere siffer i det inntastede felt er feil, øker sjansen for at kontrollsifferet beregnes til det samme, og at feilen ikke oppdages. Den vil likevel ikke være mer enn om lag 9 % for MOD11 – og 10 % for MOD10. Dersom en tilfeldig tallrekke kontrolleres, er sannsynligheten om lag 9 % for at siste siffer stemmer med kontrollsiffer beregningen (MOD11 bruker også tegnet «-» som et kontrolltegn, så det blir elleve varianter).
Denne kontrollsifferalgoritmen er også designet til å oppdage ombytting av sifre. Det er noe økt sjanse for at brukere taster inn f.eks. en KID der to sifre har byttet plass. Derfor brukes et prinsipp med varierende vekttall for hvert siffer i algoritmen nedenfor. I modulus-10 kan det oppdages om to påfølgende siffer har byttet plass, men ikke første og siste i gruppe på tre. Modulus11 vil også oppdage det.
Beregning av kontrollsiffer med Modulus11
Et tenkt kontonummer er 1234.56.78903. Det siste sifferet i kontonummeret er et kontrollsiffer. I dette eksempelet er kontrollsifferet 3. Kontonummeret uten kontrollsiffer (og uten skilletegn) er 1234567890.
Hvert siffer i eksempelet over multipliseres med vekttallene 2,3,4,5,6,7,2,3,4,5 (eventuelt videre ,6,7,2,3 og så videre for tall med flere sifre), regnet fra høyre mot venstre.
0 × 2 = 0
9 × 3 = 27
8 × 4 = 32
7 × 5 = 35
6 × 6 = 36
5 × 7 = 35
4 x 2 = 8
3 x 3 = 9
2 x 4 = 8
1 x 5 = 5
Summen er 0 + 27 + 32 + 35 + 36 + 35 + 8 + 9 + 8 + 5 = 195.
Kontrollsifferet blir nå det tallet som må legges til summen for å få et tall som er delelig med 11.
Summen divideres med 11 og vi noterer «resten» som blir 8 i dette tilfellet. Denne resten trekkes fra 11 og vi får 3 som blir kontrollsifferet.
11 - 8 = kontrollsifferet 3
Komplett og gyldig kontonummer i dette eksempelet er derfor 1234.56.78903.
Dersom summen er delelig med 11 blir også resten 0 og kontrollsifferet 0. Dersom «resten» ved divisjonen blir 1 skal «kontrollsifferet» ha tallverdien 10, da benyttes isteden et minustegn (eller bindestrek) istedenfor kontrollsifferet. Imidlertid gjelder for kontonumre (og også for personnummer) at slike tall isteden skal forkastes slik at for de typene tall kan kontrollsiffer «-» aldri forekomme.
Implementasjoner i forskjellige programmeringspråk
C#
public static bool ValidateMod11(string bankAccountNumber)
{
var normalized = Regex.Replace(bankAccountNumber, @"[\s.]+", string.Empty);
if (normalized.Length != 11)
{
return false;
}
var weights = new[] { 5, 4, 3, 2, 7, 6, 5, 4, 3, 2 };
var sum = 0;
for (var i = 0; i < 10; i++)
{
sum += int.Parse(normalized[i].ToString()) * weights[i];
}
var remainder = sum % 11;
var controlDigit = int.Parse(normalized[10].ToString());
return controlDigit == (remainder == 0 ? 0 : 11 - remainder);
}
JavaScript
function validateKontonummerMod11(kontonummer) {
const weights = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
const kontonummerWithoutSpacesAndPeriods = kontonummer.replace(/[\s.]+/g, '');
if (kontonummerWithoutSpacesAndPeriods.length !== 11) {
return false;
} else {
const sjekksiffer = parseInt(kontonummerWithoutSpacesAndPeriods.charAt(10), 10);
const kontonummerUtenSjekksiffer = kontonummerWithoutSpacesAndPeriods.substring(0, 10);
let sum = 0;
for (let index = 0; index < 10; index++) {
sum += parseInt(kontonummerUtenSjekksiffer.charAt(index), 10) * weights[index];
}
const remainder = sum % 11;
return sjekksiffer === (remainder === 0 ? 0 : 11 - remainder);
}
}
Python
def kid_mod11_wiki(a):
cross = sum([int(val)*[2,3,4,5,6,7][idx%6] for idx,val in enumerate(list(str(a))[::-1])])
return "%s%s" % (a,cross % 11 == 10 and '-' or 11-(cross % 11))
Java
public class KontonummerValidator {
public static boolean gyldigKontonummer(String kontonr) {
// Fjern whitespace og punktum fra kontonummer (enkelte liker å formatere kontonummer med 1234.56.78903)
kontonr = StringUtils.remove(kontonr, ' ');
kontonr = StringUtils.remove(kontonr, '.');
// Skal inneholde 11 siffer og kun tall
if (kontonr.length() != 11 || !StringUtils.isNumeric(kontonr)) {
return false;
}
int sisteSiffer = Character.getNumericValue(kontonr.charAt(kontonr.length() - 1));
return getCheckDigit(kontonr) == sisteSiffer;
}
private static int getCheckDigit(String number) {
int lastIndex = number.length() - 1;
int sum = 0;
for (int i = 0; i < lastIndex; i++) {
sum += Character.getNumericValue(number.charAt(i)) * getWeightNumber(i);
}
int remainder = sum % 11;
return getCheckDigitFromRemainder(remainder);
}
private static int getWeightNumber(int i) {
return 7 - (i + 2) % 6;
}
private static int getCheckDigitFromRemainder(int remainder) {
switch (remainder) {
case 0:
return 0;
default:
return 11 - remainder;
}
}
}
Kotlin
fun validMod11(cid: String): Boolean {
val controlDigit = cid[cid.length - 1].toString()
val controlSumNumbers = listOf(
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7,
2, 3, 4, 5, 6, 7
)
val number = cid.subSequence(0, cid.length - 1).reversed().toString()
var sum = 0
for(i in number.indices) {
sum += number[i].toString().toInt() * controlSumNumbers[i]
}
val output = when (val sumResult = 11 - sum % 11) {
11 -> "0"
10 -> "-"
else -> sumResult.toString()
}
return output == controlDigit
}
Se også
MOD10
Referanser
Programmering
|
norwegian_bokmål
| 0.863193
|
Pony/src-time-posix_date-.txt
|
posix_date.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59use @ponyint_gmtime[None](date: PosixDate, sec: I64, nsec: I64)
use @ponyint_timegm[I64](date: PosixDate tag)
use @ponyint_formattime[Pointer[U8]](date: PosixDate tag, fmt: Pointer[U8] tag) ?
class PosixDate
"""
Represents a proleptic Gregorian date and time, without specifying a
time zone. The day of month, month, day of week, and day of year are all
indexed from 1, i.e. January is 1, Monday is 1.
"""
var nsec: I32 = 0
var sec: I32 = 0
var min: I32 = 0
var hour: I32 = 0
var day_of_month: I32 = 1
var month: I32 = 1
var year: I32 = 1970
var day_of_week: I32 = 4
var day_of_year: I32 = 1
new create(seconds: I64 = 0, nanoseconds: I64 = 0) =>
"""
Create a date from a POSIX time. Negative arguments will be changed to zero.
"""
@ponyint_gmtime(this,
_negative_to_zero(seconds),
_negative_to_zero(nanoseconds))
fun time(): I64 =>
"""
Return a POSIX time. Treats the date as UTC.
"""
@ponyint_timegm(this)
fun ref normal() =>
"""
Normalise all the fields of the date. For example, if the hour is 24, it is
set to 0 and the day is advanced. This allows fields to be changed naively,
eg. adding 1000 to hours to advance the time by 1000 hours, and then
normalising the date.
"""
@ponyint_gmtime(this, time(), nsec.i64())
fun format(fmt: String): String ? =>
"""
Format the time as for strftime.
Will return an empty string if the format string is "%p" or "%P".
"""
recover
String.from_cstring(@ponyint_formattime(this, fmt.cstring())?)
end
fun _negative_to_zero(value: I64): I64 =>
if value > 0 then
value
else
0
end
|
pony
|
3796772
|
https://sv.wikipedia.org/wiki/Portugal%20i%20olympiska%20sommarspelen%201992
|
Portugal i olympiska sommarspelen 1992
|
Portugal deltog i de olympiska sommarspelen 1992 med en trupp bestående av 90 deltagare, men ingen av landets deltagare erövrade någon medalj.
Badminton
Herrsingel
Ricardo Fernandes
32-delsfinal — R. Liljequist (FIN) (→ förlorade med 15-3, 15-11 – gick inte vidare)
Fernando Silva
32-delsfinal — Peter Axelsson (SWE) (→ förlorade med 15-7, 15-8 – gick inte vidare)
Herrdubbel
Fernando Silva och Ricardo Fernandes
32-delsfinal — Benny Lee och Thomas Reidy (USA) (→ förlorade med 15-1, 15-10 – gick inte vidare)
Brottning
Weltervikt, grekisk-romersk stil
Paulo Martins
Elimineringsrunda B — 2 förluster, 1.0 tekniska poäng (→ 8:e, gick inte vidare)
Omgång 1 — Dobri Ivanov (BUL) (→ förlorade med 6-1; +1.0 tekniska poäng)
Omgång 2 — Qingkun Wei (CHN) (→ förlorade med 16-0; +0 tekniska poäng)
Bågskytte
Damernas individuella
Ana Sousa
Kvalomgång — 1288 poäng (→ 22:a plats)
{|class=wikitable style="text-align:center;"
!70m!!60m!!50m!!30m!!Totalt
|-
|297||334||321||336||1288
|}
Elimineringsomgång — 98 poäng (→ 26:a plats)
Sextondelsfinal — Xiangjun Ma (CHN) (→ förlorade med 101:98, gick inte vidare)
Friidrott
Herrarnas 800 meter
António Abrantes
Omgång 1 (heat 7) — 1:50,89 (→ 5:e plats, gick inte vidare)
Herrarnas 1 500 meter
Mário Silva
Omgång 1 (heat 2) — 3:38,57 (→ 3rd)
Semifinal (heat 2) — 3:38,09 (→ 9:e plats, gick inte vidare)
Herrarnas 5 000 meter
Carlos Monteiro
Semifinal (heat 4) — 14:00,53 (→ 10:e plats, gick inte vidare)
Domingos Castro
Semifinal (heat 3) — 13:24:57 (→ 5:e plats, gick vidare som andra snabbaste förloraren)
Final — 13:38,09 (→ 11:e plats)
Raimundo Santos
Semifinal (heat 2) — 13:48,06 (→ 7:e plats, gick inte vidare)
Herrarnas 10 000 meter
Domingos Castro
Omgång 1 (heat 1) —fullföljde inte
Fernando Couto
Omgång 1 (heat 2) — 29:20,06 (→ 15:e plats, gick inte vidare)
Herrarnas maraton
António Pinto → fullföljde inte
Dionísio Castro → fullföljde inte
Joaquim Pinheiro → fullföljde inte
Herrarnas 20 kilometer gång
José Urbano — diskvalificerad
Herrarnas 50 kilometer gång
José Magalhães — 4:20:21 (→ 28:e plats)
José Pinto — diskvalificerad
José Urbano — 4:16:31 (→ 25:e plats)
Herrarnas 400 meter häck
Pedro Rodrigues
Omgång 1 (heat 3) — 49,46 (→ 5:e plats, gick inte vidare)
Herrarnas 3 000 meter hinder
João Junqueira
Omgång 1 (heat 3) — 8:35,68 (→ 8:e plats, gick vidare som 3:e snabbaste förloraren)
Semifinal (heat 1) — 8:39,17 (→ 10:e plats, gick inte vidare)
Herrarnas 4 x 100 meter stafett
Luís Barroso, Luís Cunha, Pedro Agostinho och Pedro Curvelo
Omgång 1 (heat 2) — 40,30 (→ 5:e plats, gick inte vidare)
Herrarnas 4 x 400 meter stafett
Álvaro Silva, José Mendes, Pedro Curvelo och Pedro Rodrigues
Omgång 1 (heat 1) — 3:10,11 (→ 7:e plats, gick inte vidare)
Herrarnas stavhopp
Nuno Fernandes
Kvalomgång (heat 2) — 5,00 (→ 15:e plats, gick inte vidare)
{| class="wikitable" style="text-align:center;"
!4,80!!5,00!!5,20!!5,30!!5,40!!5,50!!5,55!!5,60!!Resultat
|-
|XXO||XO||XXX||||||||||||5,00
|}
Damernas 100 meter
Lucrécia Jardim
Omgång 1 (heat 6) — 11,58 (→ 4:e plats)
Omgång 2 (heat 1) — 11,66 (→ 7:e plats, gick inte vidare)
Damernas 200 meter
Lucrécia Jardim
Omgång 1 (heat 1) — 23,26 (→ 3rd)
Omgång 2 (heat 2) — 23,09 (→ 5:e plats, gick inte vidare)
Damernas 800 meter
Carla Sacramento
Omgång 1 (heat 2) — 2:00,57 (→ 3:e plats, gick vidare som femte snabbaste förloraren)
Semifinal (heat 2) — 2:02,85 (→ 6:e plats, gick inte vidare)
Damernas 1 500 meter
Carla Sacramento
Omgång 1 (heat 1) — 4:10,01 (→ 5:e plats)
Semifinal (heat 2) — 4:05,54 (→ 9:e plats, gick inte vidare)
Damernas 3 000 meter
Fernanda Ribeiro
Omgång 1 (heat 2) — 9:07,69 (9:e plats, gick inte vidare)
Damernas 10 000 meter
Albertina Dias
Omgång 1 (heat 2) — 32:15,05 (→ 6:e plats)
Final — 32:0,393 (→ 13:e plats)
Conceição Ferreira
Omgång 1 (heat 1) — 32:31,95 (→ 9:e plats, gick vidare som snabbaste förloraren)
Final — fullföljde inte
Fernanda Marques
Omgång 1 (heat 2) — 32:38,16 (→ 8:e plats)
Final — fullföljde inte
Damernas maraton
Aurora Cunha → fullföljde inte
Manuela Machado → 2:38:22 (→ 7:e plats)
Damernas 10 kilometer gång
Isilda Gonçalves — 50:23 (→ 34:e plats)
Susana Feitor — diskvalificerad
Damernas 400 meter häck
Marta Moreira
Omgång 1 (heat 2) — 58,24 (→ 6:e plats, gick inte vidare)
Damernas 4 x 400 meter stafett
Eduarda Coelho, Elsa Amaral, Lucrécia Jardim och Marta Moreira
Omgång 1 (heat 2) — 3:29,38 (→ 4:e plats, gick vidare som andra snabbaste förloraren)
Final — 3:36,85 (→ 8:e plats)
Damernas diskuskastning
Teresa Machado
Kvalomgång — 4,98 (→ 14:e plats, gick inte vidare)
Fäktning
Herrarnas värja
José Bandeira
Kvalomgång (pool 4) — 6 matcher, 1 vinster (→ 6:e plats, 61:e plats totalt, gick inte vidare)
Rui Frazão
Kvalomgång (pool 10) — 6 matcher, 1 vinster (→ 7:e plats, 60:e plats totalt, gick inte vidare)
Herrarnas florett
José Guimarães
Kvalomgång (pool 2) — 6 matcher, 1 vinster (→ 7:e plats, 52:e plats totalt, gick inte vidare)
Herrarnas sabel
Luís Silva
Kvalomgång (pool 4) — 5 matcher, 0 vinster (→ 6:e plats, 40:e plats totalt, gick inte vidare)
Gymnastik
Damernas individuella mångkamp, rytmisk
Clara Piçarra — startade inte (→ 43:e plats)
Judo
Herrarnas extra lättvikt
Rui Ludovino
Inledande omgångar A
32-delsfinal — Pina Garcia (DOM) (→ vann med yuko)
Sextondelsfinal — Dashgombyn Battulga (MGL) (→ förlorade med ippon, gick inte vidare)
Herrarnas halv lättvikt
Augusto Almeida
Inledande omgångar B
32-delsfinal — V. Cespedes (PAR) (→ vann med ippon)
Sextondelsfinal — R. Sampaio (BRA) (→ förlorade med ippon, gick inte vidare)
Återkval B
32-delsfinal — Bye
Sextondelsfinal — Sang-Moon Kim (KOR) (→ förlorade med ippon, gick inte vidare)
Herrarnas lättvikt
Rui Domingues
Inledande omgångar A
32-delsfinal — Bye
Sextondelsfinal — C. Shi (CHN) (→ förlorade med waza-ari, gick inte vidare)
Herrarnas halv mellanvikt
Inledande omgångar B
António Matias
32-delsfinal — Bye
Sextondelsfinal — Anton Summer (AUT) (→ förlorade med double waza-ari (=ippon), gick inte vidare)
Herrarnas mellanvikt
Pedro Cristóvão
Inledande omgångar B
32-delsfinal — Bye
Sextondelsfinal — D. Kistler (SUI) (→ förlorade med koka, gick inte vidare)
Damernas halv lättvikt
Paula Saldanha — 7th
Inledande omgångar B
32-delsfinal — Bye
Sextondelsfinal — R. Dechinmaa (MGL) (→ vann med ippon)
Åttondelsfinal — Lyne Poirier (CAN) (→ vann med koka)
Kvartsfinal — Jessica Gal (NED) (→ förlorade med ippon)
Återkval B
32-delsfinal — Bye
Sextondelsfinal — Bye
Åttondelsfinal — Maktsoutova (EUN) (→ vann med yuko)
Kvartsfinal — A. Giungi (ITA) (→ förlorade med yusei-gachi, gick inte vidare)
Damernas lättvikt
Filipa Cavalleri
Inledande omgångar B
32-delsfinal — Bye
Sextondelsfinal — Z. Blagojevic (IOP) (→ vann med yar?)
Åttondelsfinal — P. Pinitwong (THA) (→ vann med yusei-gachi)
Kvartsfinal — Flagothier (BEL) (→ förlorade med yuko)
Återkval B
32-delsfinal — Bye
Sextondelsfinal — Bye
Åttondelsfinal — Kate Donahoo (USA) (→ förlorade med waza-ari, gick inte vidare)
Damernas halv tungvikt
Sandra Godinho
Inledande omgångar A
32-delsfinal — Bye
Sextondelsfinal — Werbrouck (BEL) (→ förlorade med yuko, gick inte vidare)
Kanotsport
Herrarnas K-1 500 m
José Garcia
Omgång 1 (heat 2) — 1:42,96 (→ 3:e plats)
Återkval 2 — 1:41,84 (→ 3:e plats)
Semifinal (heat 2) — 1:45,88 (→ 9:e plats, gick inte vidare)
Herrarnas K-1 1000 m
José Garcia
Omgång 1 (heat 4) — 3:46,82 (→ 4:e plats)
Återkval 2 — 3:34,92 (→ 1:e plats)
Semifinal (heat 2) — 3:37,34 (→ 3:e plats)
Final — 3:41,60 (→ 6:e plats)
Herrarnas K-2 500 m
Joaquim Queirós och José Ferreira da Silva
Omgång 1 (heat 2) — 1:37,73 (→ 6:e plats)
Återkval 2 — 1:33,57 (→ 2:e plats)
Semifinal (heat 2) — 1:32,33 (→ 7:e plats, gick inte vidare)
Herrarnas K-2 1000 m
Joaquim Queirós och José Ferreira da Silva
Omgång 1 (heat 1) — 3:22,46 (→ 3:e plats)
Återkval 2 — 3:18,42 (→ 4:e plats)
Semifinal (heat 2) — 3:00,90 (→ 7:e plats, gick inte vidare)
Herrarnas K-4 1000 m
António Brinco, António Monteiro, Belmiro Penetra och Rui Fernandes
Omgång 1 (heat 1) — 3:02,38 (→ 5:e plats)
Återkval — ?
Semifinal — ?
Modern femkamp
Herrarnas individuella tävling
Manuel Barroso — 4719 poäng (→ 53:e plats)
{|class=wikitable style="text-align:center;"
!rowspan=3|Gren
!colspan=2|Fäktning
!colspan=2|Simning
!colspan=3|Skytte
!colspan=2|Löpning
!colspan=2|Ridning
|-
!Vinster!!Straff
!Tid!!Heat
!Träffar!!Straff!!Heat
!Tid!!Straff
!Tid!!Straff
|-
|19||–
|3:23,2||2
|159||60||1
|12:26,0||–
|1:58,7||–
|-
!Poäng (Placering)
|colspan=2|541 (62:a)
|colspan=2|1248 (25:a)
|colspan=3|595 (65:e)
|colspan=2|1327 (1:a)
|colspan=2|1008 (26:e)
|-
!GenerelltPoäng (Placering)
|colspan=2|541 (62:a)
|colspan=2|1799 (59:e)
|colspan=3|2384 (33:e)
|colspan=2|3711 (?)
|colspan=2|4719 (53:e)
|}
Ridsport
Individuell fälttävlan
António Braz — –238,60 poäng (→ 58:e plats)
{| class="wikitable" style="text-align:center;"
!Gren!!Dressyr!!Terräng!!Hoppning
|-
!Poäng (Placering)
|–85,00 (75:e plats)||–143,60 (57:e plats)||–10,00 (24:e plats)
|-
!GenerelltPoäng (Placering)
|–85,00 (75:e plats)||–228,60 (59:e plats)||–238.60 (58:e plats)
|}
António Ramos — –186,70 poäng (46:e plats)
{| class="wikitable" style="text-align:center;"
!Gren!!Dressyr!!Terräng!!Hoppning
|-
!Poäng (Placering)
|–72,40 (61:a plats)||–102,80 (47:e plats)||–11,50 (41:e plats)
|-
!GenerelltPoäng (Placering)
|–72,40 (61:a plats)||–175,20 (48:e plats)||–186,70 (46:e plats)
|}
Bernardo Rodrigues — eliminerad
{| class="wikitable" style="text-align:center;"
!Gren!!Dressyr!!Terräng!!Hoppning
|-
!Poäng (Placering)
|–69,80 (54:e plats)||eliminerad||—
|-
!GenerelltPoäng (Placering)
|–69,80 (54:e plats)||eliminerad||—
|}
Vasco Ramires
{| class="wikitable" style="text-align:center;"
!Gren!!Dressyr!!Terräng!!Hoppning
|-
!Poäng (Placering)
|–91,40 (79:e plats)||–82,40 (39:e plats)||0,00 (1:a plats)
|-
!GenerelltPoäng (Placering)
|–91,40 (79:e plats)||–173,80 (47:e plats)||–173,80 (41:a plats)
|}
Lagtävling i fälttävlan
António Braz, António Ramos och Bernardo Rodrigues — –599.10 pts (→ 15:e plats)
{| class="wikitable" style="text-align:center;"
!Gren!!Dressyr!!Terräng!!Hoppning
|-
!Poäng (Placering)
|–248,80 (?)||–328,80 (?)||–21,50 (?)
|-
!GenerelltPoäng (Placering)
|–248,80 (?)||–577,60 (?)||–599,10 (15:e plats)
|}
Individuell hoppning
Jorge Mathias — startade inte
Lagtävling i hoppning
Jorge Mathias — startade inte
Rodd
Herrarnas dubbelsculler
Daniel Alves och João Santos
Omgång 1 (heat 3) — 6:54,55 (→ 5:a)
Återkval 4 — 6:46,14 (→ 4:a)
Semifinal C — 6:32,01 (→ 4:a)
Final D — 6:42,00 (→ 1:a, 18:e totalt)
Segling
Herrarnas lechner
João Rodrigues — 233 poäng (→ 23:e plats)
{|class=wikitable style="text-align:center;"
!Lopp!!1!!2!!3!!4!!5!!6!!7!!8!!9!!10!!rowspan=2|Totalt!!rowspan=2|Netto
|-
!Placering
|25:e||10:e||18:e||20:e||22:e||21:a||24:e||23:e||28:e||18:e
|-
!Poäng
|31||16||24||24||28||27||30||29||33||24||266||233
|}
Herrarnas 470
Eduardo Seruca och Victor Hugo Rocha (styrman) — 148 poäng (→ 24:e plats)
{|class=wikitable style="text-align:center;"
!Lopp!!1!!2!!3!!4!!5!!6!!7!!rowspan=2|Totalt!!rowspan=2|Netto
|-
!Placering
|23:e||27:e||20:e||26:e||5:e||21:e||18:e
|-
!Poäng
|29||33||26||32||10||27||24||181||148
|}
Soling
António Tanger Correia (styrman), Luís Miguel Santos och Ricardo Batista — 116 poäng (→ 21:a plats)
{|class=wikitable style="text-align:center;"
!Lopp!!1!!2!!3!!4!!5!!6!!rowspan=2|Totalt!!rowspan=2|Netto
|-
!Placering
|21:a||21:a||16:e||18:e||16:e||15:e
|-
!Poäng
|27||27||22||24||22||21||143||148
|}
Starbåt
Fernando Pinto Coelho Bello (styrman) och Francisco Pinheiro de Melo — 101 poäng (→ 12:e plats)
{|class=wikitable style="text-align:center;"
!Lopp!!1!!2!!3!!4!!5!!6!!7!!rowspan=2|Totalt!!rowspan=2|Netto
|-
!Placering
|1:e||9:e||Felstart||19:e||8:e||21:a||14:e
|-
!Poäng
|0||15||33||25||14||27||20||134||101
|}
Skytte
Tennis
Herrsingel
Bernardo Mota
Omgång 1 — Goran Ivanišević (CRO) (→ förlorade med 2-6, 2-6, 7-6, 6-4, 3-6 – gick inte vidare)
Herrdubbel
Emanuel Couto och Bernardo Mota
Omgång 1 — Guy Forget och Henri Leconte (FRA) (→ förlorade med 1-6, 3-6, 1-6 – gick inte vidare)
Referenser
1992 i Portugal
Nationer i olympiska sommarspelen 1992
1992
|
swedish
| 0.875617
|
Pony/src-pony_test-unit_test-.txt
|
unit_test.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57trait UnitTest
"""
Each unit test class must provide this trait. Simple tests only need to
define the name() and apply() functions. The remaining functions specify
additional test options.
"""
fun name(): String
"""
Report the test name, which is used when printing test results and on the
command line to select tests to run.
"""
fun exclusion_group(): String =>
"""
Report the test exclusion group, returning an empty string for none.
The default body returns an empty string.
"""
""
fun ref apply(h: TestHelper) ?
"""
Run the test.
Raising an error is interpreted as a test failure.
"""
fun ref timed_out(h: TestHelper) =>
"""
Tear down a possibly hanging test.
Called when the timeout specified by to long_test() expires.
There is no need for this function to call complete(false).
tear_down() will still be called after this completes.
The default is to do nothing.
"""
None
fun ref set_up(h: TestHelper) ? =>
"""
Set up the testing environment before a test method is called.
Default is to do nothing.
"""
None
fun ref tear_down(h: TestHelper) =>
"""
Tidy up after the test has completed.
Called for each run test, whether that test passed, succeeded or timed out.
The default is to do nothing.
"""
None
fun label(): String =>
"""
Report the test label, returning an empty string for none.
It can be later use to filter tests which we want to run, by labels.
"""
""
|
pony
|
220976
|
https://sv.wikipedia.org/wiki/DARAM
|
DARAM
|
DARAM eller Dual-Access RAM är ett datorminne som kan utföra två accesser per cykel, till skillnad från SARAM som enbart kan utföra en access per cykel. Denna typ av minne ger alltså möjlighet för två läsningar, två skrivningar, alternativt en skriv- och en läsaccess till minnet samtidigt.
Det används till exempel i vissa av Texas Instruments (TI) processorer.
Akronymer
Datorminnen
|
swedish
| 1.537726
|
Pony/src-pony_bench-pony_bench-.txt
|
pony_bench.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164"""
PonyBench provides a microbenchmarking framework. It is designed to measure
the runtime of synchronous and asynchronous operations.
## Example Program
The following is a complete program with multiple trivial benchmarks followed
by their output.
```pony
use "time"
use "pony_bench"
actor Main is BenchmarkList
new create(env: Env) =>
PonyBench(env, this)
fun tag benchmarks(bench: PonyBench) =>
bench(_Nothing)
bench(_Fib(5))
bench(_Fib(10))
bench(_Fib(20))
bench(_Timer(10_000))
class iso _Nothing is MicroBenchmark
// Benchmark absolutely nothing.
fun name(): String => "Nothing"
fun apply() =>
// prevent compiler from optimizing out this operation
DoNotOptimise[None](None)
DoNotOptimise.observe()
class iso _Fib is MicroBenchmark
// Benchmark non-tail-recursive fibonacci
let _n: U64
new iso create(n: U64) =>
_n = n
fun name(): String =>
"_Fib(" + _n.string() + ")"
fun apply() =>
DoNotOptimise[U64](_fib(_n))
DoNotOptimise.observe()
fun _fib(n: U64): U64 =>
if n < 2 then 1
else _fib(n - 1) + _fib(n - 2)
end
class iso _Timer is AsyncMicroBenchmark
// Asynchronous benchmark of timer.
let _ts: Timers = Timers
let _ns: U64
new iso create(ns: U64) =>
_ns = ns
fun name(): String =>
"_Timer (" + _ns.string() + " ns)"
fun apply(c: AsyncBenchContinue) =>
_ts(Timer(
object iso is TimerNotify
fun apply(timer: Timer, count: U64 = 0): Bool =>
// signal completion of async benchmark iteration when timer fires
c.complete()
false
end,
_ns))
```
By default, the results are printed to stdout like so:
```
Benchmark results will have their mean and median adjusted for overhead.
You may disable this with --noadjust.
Benchmark mean median deviation iterations
Nothing 1 ns 1 ns ±0.87% 3000000
_Fib(5) 12 ns 12 ns ±1.02% 2000000
_Fib(10) 185 ns 184 ns ±1.03% 1000000
_Fib(20) 23943 ns 23898 ns ±1.11% 10000
_Timer (10000ns) 10360 ns 10238 ns ±3.25% 10000
```
The `--noadjust` option outputs results of the overhead measured prior to each
benchmark run followed by the unadjusted benchmark result. An example of the
output of this program with `--noadjust` is as follows:
```
Benchmark mean median deviation iterations
Benchmark Overhead 604 ns 603 ns ±0.58% 300000
Nothing 553 ns 553 ns ±0.30% 300000
Benchmark Overhead 555 ns 555 ns ±0.51% 300000
_Fib(5) 574 ns 574 ns ±0.43% 300000
Benchmark Overhead 554 ns 556 ns ±0.48% 300000
_Fib(10) 822 ns 821 ns ±0.39% 200000
Benchmark Overhead 554 ns 553 ns ±0.65% 300000
_Fib(20) 30470 ns 30304 ns ±1.55% 5000
Benchmark Overhead 552 ns 552 ns ±0.39% 300000
_Timer (10000 ns) 10780 ns 10800 ns ±3.60% 10000
```
It is recommended that a PonyBench program is compiled with the `--runtimebc`
option, if possible, and run with the `--ponynoyield` option.
"""
// TODO more examples in tutorial
actor PonyBench
let _env: Env
let _output_manager: _OutputManager
embed _bench_q: Array[(Benchmark, Bool)] = Array[(Benchmark, Bool)]
var _running: Bool = false
new create(env: Env, list: BenchmarkList) =>
_env = consume env
ifdef debug then
_env.err.print("***WARNING*** Benchmark was built as DEBUG. Timings may be affected.")
end
_output_manager =
if _env.args.contains("-csv", {(a, b) => a == b })
then _CSVOutput(_env)
else _TerminalOutput(_env)
end
list.benchmarks(this)
be apply(bench: Benchmark) =>
match consume bench
| let b: MicroBenchmark =>
_bench_q.push((b.overhead(), true))
_bench_q.push((consume b, false))
| let b: AsyncMicroBenchmark =>
_bench_q.push((b.overhead(), true))
_bench_q.push((consume b, false))
end
if not _running then
_running = true
_next_benchmark()
end
be _next_benchmark() =>
if _bench_q.size() > 0 then
try
match _bench_q.shift()?
| (let b: MicroBenchmark, let overhead: Bool) =>
_RunSync(this, consume b, overhead)
| (let b: AsyncMicroBenchmark, let overhead: Bool) =>
_RunAsync(this, consume b, overhead)
end
end
else
_running = false
end
be _complete(results: _Results) =>
_output_manager(consume results)
_next_benchmark()
be _fail(name: String) =>
_env.err.print("Failed benchmark: " + name)
_env.exitcode(1)
|
pony
|
656522
|
https://da.wikipedia.org/wiki/Danmark%20ved%20sommer-PL%202012
|
Danmark ved sommer-PL 2012
|
Danmark deltog med 28 atleter i otte sportsgrene ved sommer-PL i London 29. august til 9. september. Det danske PL-holds chef de mission var Michael Møllgaard Nielsen.
Medaljer
Atletik
Olympic Stadium
Mikael Krarup Andersen T11
nr. 6 i 1500 m på 4:16,12 min.
nr. 7 i 5000 m på 16:11,47 min.
Jackie Christiansen F44
nr. 1 i kuglestød med 18,16 m .
Jacob Dahl F54
nr. 12 i kuglestød med 9,0 m
nr. 14 i spydkast med 17,73 m.
Ronni Jensen F37
nr. 10 i diskoskast med 42,51 m.
Daniel Wagner Jørgensen F42/T42
nr. 3 i længdespring med 6,11 m .
nr. 7 i 200 m på 26,46 sek.
nr. 9 i 100 m på 13,21 sek.
Marianne Maibøll T54
nr. 13 i 400 m kørestolsrace på 1:02,35 min.
nr. 16 i 800 m kørestolsrace på 2:06,88 min.
nr. 11 i 100 m kørestolsrace på 19,07 sek.
Klassificering
T (Track) bruges om løb, F (inField) bruges om spring og kast. Blinde har koden 11, gående spastikere med halvsidig lammelse har 37, ét ben amputeret over knæet er 42, ét ben amputeret under knæet er 44, og kørestolsbrugere med normale arme, men med lammelser fra brystet er 54.
Bordtennis
ExCeL
Peter Grud Rosenmeier
nr. 3 i single, klasse 6 .
Klassificering
Klasse 1-5 er for siddende spillere, klasse 6-10 er for stående. Klasse 6-spillere har alvorlige handicap på både arme og ben, klasse 10-spillere har oftest kun et handicap i den arm, de ikke spiller med.
Cykelsport
Brands Hatch – landevejsløb
Thomas Gerlach H3 (håndcykling).
nr. 6 i 16 km enkeltstart på 28:10,82 min.
nr. 7 i 64 km landevejsløb på 2:03:49 timer.
Alan Schmidt T1 (tricykling).
nr. 17 i 8 km enkeltstart på 18:45,77 min.
24 km landevejsløb DNF.
Klassificering
Cykelryttere med handicap, der stadig tillader brug af 'almindelige' cykler, klassificeres C1-C5. Cykelryttere med balanceproblemer fx spastikere er T1-T2, og bruger tricykler. Cykelryttere, der ikke kan bruge benene, er H1-H4, og bruger hånddrevne cykler. Til sidst anvendes klassificeringen B om cykelryttere med synshandicap. De bruger tandemcykler med en seende tandempilot. Jo lavere tal, jo mere besværet er cykelrytteren af sit handicap
Goalball
Copper Box
Damelandsholdet
Karina Jørgensen
Maria Larsen
Mette Præstegaard Nissen
Kamilla Bradt Ryding
Elisabeth Weichel
Damelandsholdet sluttede PL på en tiendeplads.
Ridesport
Greenwich Park.
Annika Lykke Dalskov grade III, med Aros A'Fenris.
nr. 3 i mesterskabsklasse, hold med 72,889 procent.
nr. 3 i individuel mesterskabsklasse med 71,233 procent .
nr. 3 i kür med 76,950 procent .
Line Thorning Jørgensen grade IV, med Di Caprio.
nr. 5 i mesterskabsklasse, hold med 66,406 procent.
nr. 5 i individuel mesterskabsklasse med 70,258 procent.
nr. 4 i kür med 76,800 procent.
Caroline Cecilie Nielsen grade II, med Leon.
nr. 10 i mesterskabsklasse, hold med 66,190 procent.
nr. 10 i individuel mesterskabsklasse med 69,048 procent.
nr. 13 i kür med 64,850 procent.
Liselotte Scharff Rosenhart grade Ia, med Priors Lady Rawage.
nr. 7 i mesterskabsklasse, hold med 68,765 procent.
nr. 5 i individuel mesterskabsklasse med 70,000 procent.
nr. 13 i kür med 65,100 procent.
Susanne Jensby Sunesen grade III, med Thy's Que Faire.
nr. 5 i mesterskabsklasse, hold med 71,333 procent.
nr. 4 i individuel mesterskabsklasse med 69,700 procent.
nr. 5 i kür med 73,550 procent.
Klassificering
Equestrian Riding grade Ia har enten meget dårlig kropsbalance og/eller nedsat funktion af alle fire lemmer. Grade IV har kun nedsat funktion på et eller to lemmer, evt. nedsat syn
.
Sejlsport
Weymouth og Portland, Dorset
Jens Als Andersen – 2.4 mR.
Aflyst på grund af manglende vind. Samlet resultat efter 10 sejladser tæller.
Skydning
Royal Artillery Barracks
SH1 (Skytter med normal styrke og funktion i arme og hænder, men skyder evt. fra kørestol)
Berit Kirstine Gejl R3/R6
nr. 31 med 595 point i 60 skud liggende, 10 m luftgevær.
nr. 46 med 567 point i English Match (60 skud liggende 50m – kaliber 22).
SH2 (Skytter med nedsat styrke og /eller funktion i arme og hænder. Riflens vægt støttes af et stativ)
Jonas Legaard Andersen R5
nr. 9 med 600 point i 60 skud liggende, 10 m luftgevær.
Svømning
Aquatics Centre
Lasse Winther Andersen SM10/S10
nr. 14 i 200 m indiv. medley på 2:25,36 min.
nr. 16 i 50 m fri på 26,19 sek.
nr. 11 i 100 m butterfly på 1:00,01 min.
nr. 14 i 100 m ryg på 1:06,41 min.
nr. 17 i 100 m fri på 56,99 sek.
nr. 10 i 4x100 m medley på 4:43,18 min.
Mikkel Hollbaum Asmussen S8/SB7
100 m butterfly – DNS.
nr. 10 i 100 m bryst på 1:30,37 min.
nr. 8 i 100 m ryg på 1:12,09 min.
nr. 10 i 4x100 m medley på 4:43,18 min.
Jonas Larsen S5/SM4
nr. 13 i 50 m fri på 40,48 sek.
nr. 9 i 200 m fri på 3:15,56 min.
nr. 6 i 150 m indiv. medley på 2:46,15 min.
nr. 7 i 50 m ryg på 42,93 sek.
nr. 9 i 100 m fri på 1:28,49 min.
Niels Korfitz Mortensen S8/SM8
nr. 15 i 100 m butterfly på 1:08,75 min.
nr. 14 i 50 m fri på 29,24 sek.
nr. 6 i 100 m ryg på 1:11,56 min.
nr. 13 i 200 m indiv. medley på 2:39,92 min.
nr. 11 i 100 m fri på 1:04,36 min.
nr. 10 i 4x100 m medley på 4:43,18 min.
Amalie Østergaard Vinther S8/SM8
nr. 13 i 100 m butterfly på 1:23,74 min.
nr. 9 i 400 m fri på 5:28,03 min.
nr. 12 i 50 m fri på 33,10 sek.
nr. 10 i 200 m indiv. medley på 3:15,24 min.
nr. 7 i 100 m fri på 1:11,30 min.
Kasper Zysek S9
nr. 7 i 400 m fri på 4:23,13 min.
nr. 10 i 4x100 m medley på 4:43,18 min.
Klassificering
Fysiske handicap klassificeres S1-S10, S1 er mest besværet af sit handicap, S10 er mindst. Synshandicap går fra S11 (blind) til S13 (svagtseende). Brystsvømning og individuel medley kræver særlige klasser, fx SB8 og SM10. En svømmer kan sagtens være klassificeret både S6, SB4 og SM5 på samme tid.
Referencer
Eksterne henvisninger
paralympic.dk
Lande ved sommer-PL 2012
2012
|
danish
| 0.75829
|
Pony/format-PrefixSign-.txt
|
PrefixSign¶
[Source]
primitive val PrefixSign is
PrefixSpec val
Implements¶
PrefixSpec val
Constructors¶
create¶
[Source]
new val create()
: PrefixSign val^
Returns¶
PrefixSign val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: PrefixSign val)
: Bool val
Parameters¶
that: PrefixSign val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: PrefixSign val)
: Bool val
Parameters¶
that: PrefixSign val
Returns¶
Bool val
|
pony
|
91622
|
https://no.wikipedia.org/wiki/Regul%C3%A6rt%20uttrykk
|
Regulært uttrykk
|
Et regulært uttrykk brukes innen programmering og er en streng som beskriver et sett av strenger – et mønster – som følger gitte syntaksregler. Regulære uttrykk utviklet seg fra teorien om regulære språk. Regulære uttrykk brukes i mange tekstbehandlere og verktøy for å søke etter og manipulere tekst basert på gitte mønstre. I tillegg er det en rekke programmeringsspråk som støtter regulære uttrykk. Språkene C#, Java, JavaScript, Perl, PHP, Python og Ruby understøtter regulære uttrykk, med noe variasjon i hva som implementeres mellom språkene.
Språket Perl ble utviklet med regulære uttrykk som en sentral komponent i språket, og mange andre språk har lånt fra Perl ved å implementere støtte for biblioteket PCRE (Perl-compliant Regular Expressions). JavaScript mangler "lookbehind"-støtte, men dette kan komme med i en fremtidig versjon av JavaScript (EcmaScript 2016), da det er lagt inn forslag for å legge til slik funksjonalitet. I tillegg mangler JavaScript en god del attråverdig syntaktisk sukker man finner i Perl som gjør det enklere å jobbe med kode som gjør utstrakt bruk av regulære uttrykk, men mesteparten av dette kan nå enkelt tilføyes etter behov ved å benytte biblioteket XRegExp.
Eksempel på regulært uttrykk i JavaScript
I dette eksemplet benyttes et regulært uttrykk i programmeringsspråket JavaScript for å fjerne emneknagger fra en tekststreng. Funksjonen som benyttes heter replace og bytter ut alle forekomster av et mønster med et nytt mønster i en tekststreng. JavaScript angir regulære uttrykk mellom to skråstreker (/ /), og parametere, som endrer visse egenskaper ved uttrykket, kan angis rett etter den avsluttende skråstreken.
/**************************************************************************
Variabelen 'tekst' inneholder en tekst med emneknagger (#).
Vi ønsker ved hjelp av et regulært uttrykk å fjerne alle emneknagger fra
teksten.
***************************************************************************/
var tekst = "#Regulære uttrykk er utrolig #kult!";
/***********************************************************************
* /#(\S)/g = det regulære uttrykket
*
* Argument 1
* / .. / = definerer det regulære uttrykket
* # = alle ord vi ønsker å endre starter med en slik emneknagg
* ( .. ) = definerer den delen av strengen vi ønsker å ta vare på
* \S = hvilken som helst sekvens av tegn som ikke er mellomrom
* g = gjennomfør endringen på alle forekomster av uttrykket (g = "global")
*
* Argument 2
* $1 = henter ut verdien fra parentesene ( ) definert over
*************************************************************************/
tekst = tekst.replace(/#(\S)/g, "$1");
/** "Regulære uttrykk er utrolig kult!" skrives til konsollen **/
console.log(tekst);
Referanser
Programmering
Programmeringselementer
Teoretisk informatikk
Formelle språk
|
norwegian_bokmål
| 0.901801
|
Pony/src-net-tcp_connection_notify-.txt
|
tcp_connection_notify.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136interface TCPConnectionNotify
"""
Notifications for TCP connections.
For an example of using this class please see the documentation for the
`TCPConnection` and `TCPListener` actors.
"""
fun ref accepted(conn: TCPConnection ref) =>
"""
Called when a TCPConnection is accepted by a TCPListener.
"""
None
fun ref proxy_via(host: String, service: String): (String, String) =>
"""
Called before before attempting to connect to the destination server
In order to connect via proxy, return the host & service for the proxy
server.
An implementation of this function might look like:
```pony
let _proxy_host = "some-proxy.example.com"
let _proxy_service = "80"
var _destination_host: ( None | String )
var _destination_service: ( None | String )
fun ref proxy_via(host: String, service: String): (String, String) =>
_destination_host = host
_destination_service = service
( _proxy_host, _proxy_service )
```
"""
(host, service)
fun ref connecting(conn: TCPConnection ref, count: U32) =>
"""
Called if name resolution succeeded for a TCPConnection and we are now
waiting for a connection to the server to succeed. The count is the number
of connections we're trying. The notifier will be informed each time the
count changes, until a connection is made or connect_failed() is called.
"""
None
fun ref connected(conn: TCPConnection ref) =>
"""
Called when we have successfully connected to the server.
"""
None
fun ref connect_failed(conn: TCPConnection ref)
"""
Called when we have failed to connect to all possible addresses for the
server. At this point, the connection will never be established.
It is expected to implement proper error handling. You need to opt in to
ignoring errors, which can be implemented like this:
```pony
fun ref connect_failed(conn: TCPConnection ref) =>
None
```
"""
fun ref auth_failed(conn: TCPConnection ref) =>
"""
A raw TCPConnection has no authentication mechanism. However, when
protocols are wrapped in other protocols, this can be used to report an
authentication failure in a lower level protocol (e.g. SSL).
"""
None
fun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>
"""
Called when data is sent on the connection. This gives the notifier an
opportunity to modify sent data before it is written. To swallow data,
return an empty string.
"""
data
fun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>
"""
Called when multiple chunks of data are sent to the connection in a single
call. This gives the notifier an opportunity to modify the sent data chunks
before they are written. To swallow the send, return an empty
Array[String].
"""
data
fun ref received(
conn: TCPConnection ref,
data: Array[U8] iso,
times: USize)
: Bool
=>
"""
Called when new data is received on the connection. Return true if you
want to continue receiving messages without yielding until you read
max_size on the TCPConnection. Return false to cause the TCPConnection
to yield now.
Includes the number of times during the current behavior, that received has
been called. This allows the notifier to end reads on a regular basis.
"""
true
fun ref expect(conn: TCPConnection ref, qty: USize): USize =>
"""
Called when the connection has been told to expect a certain quantity of
bytes. This allows nested notifiers to change the expected quantity, which
allows a lower level protocol to handle any framing (e.g. SSL).
"""
qty
fun ref closed(conn: TCPConnection ref) =>
"""
Called when the connection is closed.
"""
None
fun ref throttled(conn: TCPConnection ref) =>
"""
Called when the connection starts experiencing TCP backpressure. You should
respond to this by pausing additional calls to `write` and `writev` until
you are informed that pressure has been released. Failure to respond to
the `throttled` notification will result in outgoing data queuing in the
connection and increasing memory usage.
"""
None
fun ref unthrottled(conn: TCPConnection ref) =>
"""
Called when the connection stops experiencing TCP backpressure. Upon
receiving this notification, you should feel free to start making calls to
`write` and `writev` again.
"""
None
|
pony
|
18198
|
https://no.wikipedia.org/wiki/TCP
|
TCP
|
Transmission Control Protocol (TCP) er en nettverksprotokoll for forbindelsesorientert, pålitelig overføring av informasjon, og opererer på transportlaget i OSI-modellen for datanett.
I protokollsettet for Internett opererer TCP mellom Internett-protokollen (under) og en applikasjon (over). Applikasjonene trenger som oftest en pålitelig tilkobling mellom endepunktene, noe Internett-protokollen ikke tilbyr alene.
Applikasjonene sender strømmer av 8-biters tegn for å bli sendt gjennom nettverket, og TCP-protokollen deler denne strømmen opp i pakker med en bestemt størrelse (vanligvis bestemt av nettverket som datamaskinen er koblet til). TCP sender så pakkene videre til Internett-protokollen som sørger for at de blir sendt til TCP-modulen i den andre enden av forbindelsen. TCP passer på at ingen pakker forsvinner ved å gi hvert tegn i strømmen et sekvensnummer, som også blir brukt for å forsikre at pakkene blir levert i riktig rekkefølge hos mottakeren.
TCP-modulen i mottakerenden sender så tilbake en kvittering for tegn som er blitt mottatt. Hvis kvitteringen ikke er mottatt innen et visst tidspunkt, vil et tidsavbrudd oppstå. Da vil sender anta at pakken er tapt, og pakken må sendes på nytt. TCP sjekker også at datastrømmen ikke er skadd ved å bruke en sjekksum. Sjekksummen blir beregnet av senderen, og kontrollert hos mottaker, for hver pakke.
Virkemåte
TCP forbindelser har tre faser: opprettelsen av en forbindelse, dataoverføringen og tilslutt avslutningen av forbindelsen. Et treveis håndtrykk blir brukt for å opprette en forbindelse. Et fireveis håndtrykk blir brukt for å avslutte en forbindelse. I opprettelsesfasen av en forbindelse vil parametre som sekvensnummer bli initialisert for å oppnå riktig rekkefølge på pakkene og robusthet.
Opprettelse av en forbindelse (treveis håndtrykk)
Selv om det er mulig for to endepunkter å åpne en forbindelse mellom hverandre samtidig, så vil dette typisk
skje ved at ene enden åpner en socket og venter passivt på at noen skal koble seg til. Dette blir ofte
kalt passiv åpning og er typisk for tjener-enden av en forbindelse. Klientsiden av en forbindelse utfører
en aktiv åpning ved å sende et TCP segment med SYN-flagget satt til tjeneren som en del av treveishåndtrykket.
Tjenersiden skal da besvare en gyldig SYN-forespørsel med SYN/ACK. Til slutt så skal klientsiden av forbindelsen
svare tjeneren med et ACK som fullfører treveishåndtrykket og opprettelsen av en forbindelse.
Dataoverføring
I dataoverføringsfasen har TCP noen mekanismer som avgjør grad av robusthet og pålitelighet.
Et sekvensnummer brukes for å ordne segmentene i riktig rekkefølge, og for å detektere dupliserte data. Sjekksummer
brukes for å detektere feil i segmentene. Kvitteringer og tidsavbrudd brukes for å detektere feil og for å tilpasse
TCP ved tap av segmenter eller ved forsinkelse.
I opprettelsesfasen utveksles innledende sekvensnummer mellom de to endepunktene. Disse sekvensnummerne blir brukt
til å identifisere hvert enkelt tegn i strømmen av tegn. Det er alltid et par av sekvensnummer i hvert TCP-segment. Disse blir referert til som henholdsvis sekvensnummeret og kvitteringsnummeret. En TCP-sender refererer til sitt eget sekvensnummer som sekvensnummer og mottakers sekvensnummer som kvitteringsnummer. For å opprettholde pålitlighet, kvitterer en mottaker et TCP-segment ved å indikere at alle tegn fram til et gitt tegn i den kontinuerlige tegnstrømmen er mottatt. En utvidelse av TCP, kalt SACK (Selective Acknowledgements), tillater en TCP-mottaker å kvittere for blokker av tegn som ikke er i rekkefølge.
Dette gjør at hvis et enkelt tegn i strømmen går tapt så kan TCP kvittere for tegn før dette, og dermed unngå at alle disse tegna må sendes på nytt.
Gjennom bruken av sekvens- og kvitteringsnummer kan TCP levere segmenter i korrekt rekkefølge til mottakerapplikasjonen. Sekvens- og kvitteringsnummer er 32-biters positive heltall som vil rulle rundt til 0 ved det neste tegnet i strømmen etter 232-1.
En 16-bit sjekksum som består av ener-komplementet til ener-komplement summen av innholdet i hodet og datadelen fra
TCP-segmentet blir kalkulert av senderen og inkludert i segmentet når det sendes.
TCP-mottakeren kalkulerer sjekksummen av TCP-hodet og datadelen som er mottatt, og hvis denne ikke avviker fra
sjekksummen senderen kalkulerte så antas segmentet å være intakt og uten feil.
TCP-sjekksummen er ganske svak i forhold til moderne standarder. Datalinklag med stor sannsynlighet for bitfeil,
krever gjerne bedre evne til å korrigere og påvise feil. Hvis TCP skulle bli konstruert på nytt i dag ville mest
sannsynlig en 32-bit syklisk redundanssjekk (CRC) spesifisert som en feilsjekk blitt brukt i stedet for sjekksummen. Den svake sjekksummen er delvis kompensert for ved bruken av CRC eller bedre integritetssjekk
på datalink-laget, under både TCP og IP, slik som for eksempel i en PPP- eller Ethernet-ramme. Imidlertid betyr
ikke dette at 16 bit-sjekksummen til TCP er redundant. Undersøkelser av internettrafikk har vist at programvare-
og maskinvarefeil som introduserer feil i pakker mellom CRC-beskytta hopp er vanlige, og at TCP-sjekksummen
fanger opp de fleste av slike enkle feil. Dette er et eksempel på ende-til-ende-prinsippet.
Kvitteringer for tegn som er sendt, eller fravær av kvitteringer, blir brukt av sendere for å implisitt lære om
tilstanden på nettverket mellom TCP-avsender og -mottaker. Dette sammen med tidtakere gjør at TCP-sendere og -mottakere kan endre oppførselen til flyten av tegn. Dette kalles vanligvis flytkontroll, metningskontroll og/eller metningsunngåelse. TCP bruker et antall mekanismer for å oppnå både robusthet og høy ytelse.
Disse mekanismene inkluderer bruken av et sliding window, slow-start algoritmen, congestion avoidance algoritmen, fast retransmit og fast recovery algoritmene, og så videre. Utvidelser av TCP for å pålitelig kunne håndtere tap, minimalisere feil, håndtere metning og ha en høy overføringshastighet i nettverk med svært høy kapasitet
er områder det forskes på og utvikles standarder for.
Avslutning av en forbindelse (4-veis håndtrykk)
I denne fasen benyttes et 4-veis håndtrykk. Hver ende av forbindelsen avslutter uavhengig av hverandre.
For hvert endepunkt som lukker forbindelsen kreves et par med FIN og ACK segmenter.
TCP-porter
TCP bruker portnummer for å identifisere sender- og mottakerapplikasjoner. Applikasjonen på hver side
av en TCP-forbindelse får tildelt et 16-bit unsigned portnummer. Porter er kategorisert i 3 grunnleggende kategorier: kjente, registrerte, og dynamiske/private. De kjente portene er tildelt av
Internet Assigned Numbers Authority (IANA) og er typisk brukt av systemnivå
eller rotprosesser. Velkjente applikasjoner som kjører som tjenere og venter passivt på tilkoblinger fra
klienter bruker typisk disse portene. Noen eksempler på slike er: FTP (21), Telnet (23), SMTP (25) og HTTP (80).
Registrerte porter blir typisk brukt av brukerapplikasjoner som midlertidige kildeporter når
tjenere kontaktes, men disse portene kan også identifisere kjente tjenester registrert av en tredjepart.
Dynamiske/private porter kan også bruke av sluttbrukerapplikasjoner, men blir ikke så ofte brukt på den måten.
Dynamiske/private porter har ingen mening utenfor en bestemt TCP-forbindelse. TCP-portnummeret lagres i
et felt på 16-bit i TCP-hodet, og 65535 porter er dermed tilgjengelige.
Utviklingen av TCP
TCP er en kompleks protokoll og fortsatt under utvikling. Selv om betydelige utvidelser har blitt gjort og foreslått siden TCP ble dokumentert i RFC 793 i 1981, har den grunnleggende funksjonaliteten få endringer.
RFC 1122, Host Requirements for Internet Hosts, oppklarte noen implementasjonskrav for TCP protokollen. RFC 2581, TCP Congestion Control som er en av de viktigste TCP relaterte RFCene i de senere år
beskriver oppdaterte algoritmer for å unngå urimelig metning. I 2001 ble RFC 3168 publisert som beskriver
explicit congestion notification (ECN) som er en mekanisme for å varsle om metning i nettverket. I dag brukes
TCP til tilnærmet 95 % av all Internett trafikk. Vanlige applikasjoner som bruker TCP er blant annet HTTP/HTTPS
(world wide web), SMTP/POP3/IMAP (e-post) og FTP (filoverføring). Den vidstrakte bruken vitner om at de
opprinnelige utviklerne gjorde en svært god jobb.
Alternativer til TCP
TCP er imidlertid ikke like godt egnet til alle applikasjoner. Derfor har nyere transportlags-protokoller blitt utviklet for å takle noen av svakhetene. For eksempel trenger sanntidsapplikasjoner ofte ikke, og vil
lide av TCP's pålitelige leveringsmekanismer. I slike applikasjoner er det ofte bedre å ha litt tap, feil eller
metning enn å prøve å tilpasse seg. Noen eksempler på slike applikasjoner er sanntids-strømmer av multimedia
(som Internett-radio), sanntidsspill og IP-telefoni. Slike applikasjoner kan velge å bruke
andre transportlagsprotokoller som for eksempel User Datagram Protocol (UDP), Stream Control Transmission Protocol SCTP), eller Datagram Congestion Control Protocol (DCCP)
Litteratur
W. Richard Stevens, TCP/IP Illustrated, Volume 1 : The Protocols, ISBN 0-201-63346-9
Eksterne lenker
RFC793 (Spesifikasjonen)
IANA Port Assignments
Sally Floyd's homepage
John Kristoff's Overview of TCP (Fundamental concepts behind TCP and how it is used to transport data between two endpoints)
When The CRC and TCP Checksum Disagree
Introduction to TCP/IP – with some pictures
The basics of Transmission Control Protocol
Tcp/Ip port numbers. Information for Unix based system administrators
TCP, Transmission Control Protocol
Datanett
Internett-protokoller
|
norwegian_bokmål
| 0.620225
|
Pony/collections-HashFunction-.txt
|
HashFunction[A: A]¶
[Source]
A pluggable hash function.
interface val HashFunction[A: A]
Constructors¶
create¶
[Source]
Data structures create instances internally. Use a primitive if possible.
new val create()
: HashFunction[A] val^
Returns¶
HashFunction[A] val^
Public Functions¶
hash¶
[Source]
Calculate the hash of some type. This is an alias of the type parameter to
allow data structures to hash things without consuming them.
fun box hash(
x: box->A!)
: USize val
Parameters¶
x: box->A!
Returns¶
USize val
eq¶
[Source]
Determine equality between two keys with the same hash. This is done with
viewpoint adapted aliases to allow data structures to determine equality
in a box fun without consuming keys.
fun box eq(
x: box->A!,
y: box->A!)
: Bool val
Parameters¶
x: box->A!
y: box->A!
Returns¶
Bool val
|
pony
|
2290667
|
https://sv.wikipedia.org/wiki/Hyloxalus%20elachyhistus
|
Hyloxalus elachyhistus
|
Hyloxalus elachyhistus är en groddjursart som först beskrevs av Edwards 1971. Hyloxalus elachyhistus ingår i släktet Hyloxalus och familjen pilgiftsgrodor. IUCN kategoriserar arten globalt som starkt hotad. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Pilgiftsgrodor
elachyhistus
|
swedish
| 1.45202
|
Pony/serialise--index-.txt
|
Serialise package¶
This package provides support for serialising and deserialising arbitrary data
structures.
The API is designed to require capability tokens, as otherwise serialising
would leak the bit patterns of all private information in a type if the
resulting Array[U8] could be examined.
Deserialisation is fundamentally unsafe currently: there isn't yet a
verification pass to check that the resulting object graph maintains a
well-formed heap or that individual objects maintain any expected local
invariants. However, if only "trusted" data (i.e. data produced by Pony
serialisation from the same binary) is deserialised, it will always maintain a
well-formed heap and all object invariants.
Note that serialised data is not usable between different Pony binaries. This is
due to the use of type identifiers rather than a heavy-weight self-describing
serialisation schema. This also means it isn't safe to deserialise something
serialised by the same program compiled for a different platform.
The Serialise.signature method is provided
for the purposes of comparing communicating Pony binaries to determine if they
are the same. Confirming this before deserialising data can help mitigate the
risk of accidental serialisation across different Pony binaries, but does not on
its own address the security issues of accepting data from untrusted sources.
Public Types¶
primitive DeserialiseAuth
primitive InputSerialisedAuth
primitive OutputSerialisedAuth
primitive Serialise
primitive SerialiseAuth
class Serialised
|
pony
|
1927170
|
https://sv.wikipedia.org/wiki/Cyprogenia%20stegaria
|
Cyprogenia stegaria
|
Cyprogenia stegaria är en musselart som först beskrevs av Rafinesque 1820. Cyprogenia stegaria ingår i släktet Cyprogenia och familjen målarmusslor. IUCN kategoriserar arten globalt som akut hotad. Inga underarter finns listade i Catalogue of Life.
Källor
Målarmusslor
stegaria
|
swedish
| 1.2973
|
Pony/builtin-F64-.txt
|
F64¶
[Source]
primitive val F64 is
FloatingPoint[F64 val] val
Implements¶
FloatingPoint[F64 val] val
Constructors¶
create¶
[Source]
new val create(
value: F64 val = 0)
: F64 val^
Parameters¶
value: F64 val = 0
Returns¶
F64 val^
pi¶
[Source]
new val pi()
: F64 val^
Returns¶
F64 val^
e¶
[Source]
new val e()
: F64 val^
Returns¶
F64 val^
from_bits¶
[Source]
new val from_bits(
i: U64 val)
: F64 val^
Parameters¶
i: U64 val
Returns¶
F64 val^
from[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]¶
[Source]
new val from[B: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[B] val)](
a: B)
: F64 val^
Parameters¶
a: B
Returns¶
F64 val^
min_value¶
[Source]
Minimum negative value representable.
new val min_value()
: F64 val^
Returns¶
F64 val^
max_value¶
[Source]
Maximum positive value representable.
new val max_value()
: F64 val^
Returns¶
F64 val^
min_normalised¶
[Source]
Minimum positive value representable at full precision (ie a normalised
number).
new val min_normalised()
: F64 val^
Returns¶
F64 val^
epsilon¶
[Source]
Minimum positive value such that (1 + epsilon) != 1.
new val epsilon()
: F64 val^
Returns¶
F64 val^
Public Functions¶
bits¶
[Source]
fun box bits()
: U64 val
Returns¶
U64 val
radix¶
[Source]
Exponent radix.
fun tag radix()
: U8 val
Returns¶
U8 val
precision2¶
[Source]
Mantissa precision in bits.
fun tag precision2()
: U8 val
Returns¶
U8 val
precision10¶
[Source]
Mantissa precision in decimal digits.
fun tag precision10()
: U8 val
Returns¶
U8 val
min_exp2¶
[Source]
Minimum exponent value such that (2^exponent) - 1 is representable at full
precision (ie a normalised number).
fun tag min_exp2()
: I16 val
Returns¶
I16 val
min_exp10¶
[Source]
Minimum exponent value such that (10^exponent) - 1 is representable at full
precision (ie a normalised number).
fun tag min_exp10()
: I16 val
Returns¶
I16 val
max_exp2¶
[Source]
Maximum exponent value such that (2^exponent) - 1 is representable.
fun tag max_exp2()
: I16 val
Returns¶
I16 val
max_exp10¶
[Source]
Maximum exponent value such that (10^exponent) - 1 is representable.
fun tag max_exp10()
: I16 val
Returns¶
I16 val
abs¶
[Source]
fun box abs()
: F64 val
Returns¶
F64 val
ceil¶
[Source]
fun box ceil()
: F64 val
Returns¶
F64 val
floor¶
[Source]
fun box floor()
: F64 val
Returns¶
F64 val
round¶
[Source]
fun box round()
: F64 val
Returns¶
F64 val
trunc¶
[Source]
fun box trunc()
: F64 val
Returns¶
F64 val
min¶
[Source]
fun box min(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
max¶
[Source]
fun box max(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
fld¶
[Source]
fun box fld(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
mod¶
[Source]
fun box mod(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
finite¶
[Source]
Check whether this number is finite, ie not +/-infinity and not NaN.
fun box finite()
: Bool val
Returns¶
Bool val
infinite¶
[Source]
Check whether this number is +/-infinity
fun box infinite()
: Bool val
Returns¶
Bool val
nan¶
[Source]
Check whether this number is NaN.
fun box nan()
: Bool val
Returns¶
Bool val
ldexp¶
[Source]
fun box ldexp(
x: F64 val,
exponent: I32 val)
: F64 val
Parameters¶
x: F64 val
exponent: I32 val
Returns¶
F64 val
frexp¶
[Source]
fun box frexp()
: (F64 val , U32 val)
Returns¶
(F64 val , U32 val)
log¶
[Source]
fun box log()
: F64 val
Returns¶
F64 val
log2¶
[Source]
fun box log2()
: F64 val
Returns¶
F64 val
log10¶
[Source]
fun box log10()
: F64 val
Returns¶
F64 val
logb¶
[Source]
fun box logb()
: F64 val
Returns¶
F64 val
pow¶
[Source]
fun box pow(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
powi¶
[Source]
fun box powi(
y: I32 val)
: F64 val
Parameters¶
y: I32 val
Returns¶
F64 val
sqrt¶
[Source]
fun box sqrt()
: F64 val
Returns¶
F64 val
sqrt_unsafe¶
[Source]
Unsafe operation.
If this is negative, the result is undefined.
fun box sqrt_unsafe()
: F64 val
Returns¶
F64 val
cbrt¶
[Source]
fun box cbrt()
: F64 val
Returns¶
F64 val
exp¶
[Source]
fun box exp()
: F64 val
Returns¶
F64 val
exp2¶
[Source]
fun box exp2()
: F64 val
Returns¶
F64 val
cos¶
[Source]
fun box cos()
: F64 val
Returns¶
F64 val
sin¶
[Source]
fun box sin()
: F64 val
Returns¶
F64 val
tan¶
[Source]
fun box tan()
: F64 val
Returns¶
F64 val
cosh¶
[Source]
fun box cosh()
: F64 val
Returns¶
F64 val
sinh¶
[Source]
fun box sinh()
: F64 val
Returns¶
F64 val
tanh¶
[Source]
fun box tanh()
: F64 val
Returns¶
F64 val
acos¶
[Source]
fun box acos()
: F64 val
Returns¶
F64 val
asin¶
[Source]
fun box asin()
: F64 val
Returns¶
F64 val
atan¶
[Source]
fun box atan()
: F64 val
Returns¶
F64 val
atan2¶
[Source]
fun box atan2(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
acosh¶
[Source]
fun box acosh()
: F64 val
Returns¶
F64 val
asinh¶
[Source]
fun box asinh()
: F64 val
Returns¶
F64 val
atanh¶
[Source]
fun box atanh()
: F64 val
Returns¶
F64 val
copysign¶
[Source]
fun box copysign(
sign: F64 val)
: F64 val
Parameters¶
sign: F64 val
Returns¶
F64 val
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
i128_unsafe¶
[Source]
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
u128_unsafe¶
[Source]
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
add_unsafe¶
fun box add_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
sub_unsafe¶
fun box sub_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
mul_unsafe¶
fun box mul_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
div_unsafe¶
fun box div_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
divrem_unsafe¶
fun box divrem_unsafe(
y: F64 val)
: (F64 val , F64 val)
Parameters¶
y: F64 val
Returns¶
(F64 val , F64 val)
rem_unsafe¶
fun box rem_unsafe(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
neg_unsafe¶
fun box neg_unsafe()
: F64 val
Returns¶
F64 val
eq_unsafe¶
fun box eq_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
ne_unsafe¶
fun box ne_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
lt_unsafe¶
fun box lt_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
le_unsafe¶
fun box le_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
ge_unsafe¶
fun box ge_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
gt_unsafe¶
fun box gt_unsafe(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
string¶
fun box string()
: String iso^
Returns¶
String iso^
add¶
fun box add(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
sub¶
fun box sub(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
mul¶
fun box mul(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
div¶
fun box div(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
divrem¶
fun box divrem(
y: F64 val)
: (F64 val , F64 val)
Parameters¶
y: F64 val
Returns¶
(F64 val , F64 val)
rem¶
fun box rem(
y: F64 val)
: F64 val
Parameters¶
y: F64 val
Returns¶
F64 val
neg¶
fun box neg()
: F64 val
Returns¶
F64 val
eq¶
fun box eq(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
ne¶
fun box ne(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
lt¶
fun box lt(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
le¶
fun box le(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
ge¶
fun box ge(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
gt¶
fun box gt(
y: F64 val)
: Bool val
Parameters¶
y: F64 val
Returns¶
Bool val
i8¶
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
fun box i64()
: I64 val
Returns¶
I64 val
ilong¶
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
fun box u64()
: U64 val
Returns¶
U64 val
ulong¶
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
fun box usize()
: USize val
Returns¶
USize val
f32¶
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
ilong_unsafe¶
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
ulong_unsafe¶
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: F64 val)
: (Less val | Equal val | Greater val)
Parameters¶
that: F64 val
Returns¶
(Less val | Equal val | Greater val)
|
pony
|
1711108
|
https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%201111
|
Vitenskapsåret 1111
|
Vitenskapsåret 1111 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 1111.
Hendelser
Fødsler
Dødsfall
19. desember − Abu Hamid Ghazali (født 1058), arabisk økonomisk filosof.
|
norwegian_bokmål
| 1.392364
|
Pony/src-format-prefix_spec-.txt
|
prefix_spec.pony
1
2
3
4
5
6
7
8
9
10
11trait val PrefixSpec
primitive PrefixDefault is PrefixSpec
primitive PrefixSpace is PrefixSpec
primitive PrefixSign is PrefixSpec
type PrefixNumber is
( PrefixDefault
| PrefixSpace
| PrefixSign )
|
pony
|
72814
|
https://no.wikipedia.org/wiki/Piksel
|
Piksel
|
En piksel (en sammenføyning av det engelske picture element, «bildeelement») er en av de mange små punkter som tilsammen utgjør en representasjon av et bilde på en datamaskin. Vanligvis er punktene så små og så mange at når de skrives ut på papir eller vises på en dataskjerm ser de ut som et jevnt bilde. Fargen og intensiteten på hvert punkt kan variere.
Megapiksel
En megapiksel er 1 million piksler, og begrepet brukes ikke bare om antallet piksler i et bilde, men også for å uttrykke antall sensorer i et digitalkamera eller antallet visningselementer på en skjerm. For eksempel, et kamera med 2048×1536 sensorelementer sier man vanligvis har «3,1 megapikseler» (2048 × 1536 = 3 145 728).
Standard skjermoppløsninger
Standard skjermoppløsninger inkluderer:
VGA 0,3 megapiksler = 640×480
SVGA 0,5 megapiksler = 800×600
XGA 0,8 megapiksler = 1024×768 (også kalt XVGA)
SXGA 1,3 megapiksler = 1280×1024
SXGA+ 1,4 megapiksler = 1400×1050
UXGA 1,9 megapiksler = 1600×1200
WUXGA 2,3 megapiksler = 1920×1200
QXGA 3,1 megapiksler = 2048×1536
WQXGA 4,1 megapiksler = 2560×1600
QSXGA 5,2 megapiksler = 2560×2048
WQSXGA 6,6 megapiksler = 3200×2048
QUXGA 7,7 megapiksler = 3200×2400
WQUXGA 9,2 megapiksler = 3840×2400
Brukergrensesnitt
Dataterminologi
Datagrafikk
|
norwegian_bokmål
| 1.158162
|
Pony/debug-Debug-.txt
|
Debug¶
[Source]
This is a debug only print utility.
primitive val Debug
Constructors¶
create¶
[Source]
new val create()
: Debug val^
Returns¶
Debug val^
Public Functions¶
apply¶
[Source]
If platform is debug configured, print either a single stringable or a
sequence of stringables. The default separator is ", ", and the default
output stream is stdout.
fun box apply(
msg: (Stringable box | ReadSeq[Stringable box] box),
sep: String val = ", ",
stream: (DebugOut val | DebugErr val) = reference)
: None val
Parameters¶
msg: (Stringable box | ReadSeq[Stringable box] box)
sep: String val = ", "
stream: (DebugOut val | DebugErr val) = reference
Returns¶
None val
out¶
[Source]
If platform is debug configured, print message to standard output
fun box out(
msg: Stringable box = "")
: None val
Parameters¶
msg: Stringable box = ""
Returns¶
None val
err¶
[Source]
If platform is debug configured, print message to standard error
fun box err(
msg: Stringable box = "")
: None val
Parameters¶
msg: Stringable box = ""
Returns¶
None val
eq¶
[Source]
fun box eq(
that: Debug val)
: Bool val
Parameters¶
that: Debug val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: Debug val)
: Bool val
Parameters¶
that: Debug val
Returns¶
Bool val
|
pony
|
1425331
|
https://sv.wikipedia.org/wiki/Debug
|
Debug
|
debug är ett kommando i DOS, MS-DOS, OS/2 och Microsoft Windows (endast x86 versioner, inte x64) vilket programmet debug.exe (eller DEBUG.COM i äldre DOS-versioner) använder sig av. Debug kan användas som en assembler, Disassemblator, eller program för hexadecimal dump som tillåter användaren att interaktivt undersöka datorminnets innehåll (i assembler, hexadecimal eller ASCII), göra ändringar, och selektivt exekvera COM-fil, EXE och andra typer av filer. Det har också flera kommandon som används för att nå en viss disksektor, minnesmappad I/O port och minnesadresser. MS-DOS Debug är skriven för 16-bitars processer och är därför begränsad till 16-bitars datorprogram. FreeDOS Debug har en "DEBUGX"-version som också stödjer 32-bitars DPMI-programs.
Bakgrund
Traditionellt har alla datorer och operativsystem inkluderat en underhållsfunktion, som används för att undersöka om ett program arbetar korrekt. Debug skrevs av Tim Paterson för att tjäna detta syfte för QDOS. När Paterson började arbeta för Microsoft i början av 1980-talet tog han programmet med sig. Debug var en del av DOS 1.00 och har varit inkluderat i MS-DOS och Microsoft Windows. MS-DOS Debug har flera begränsningar:
Det kan bara läsa 16-bit register och inte 32-bit (extended) register.
När kommandot "n" används för att namnge filer lagras filnamnet offset DS:5D till DS:67 vilket betyder att programmet endast kan spara filer i FAT 8.3 filnamnsformat.
MS-DOS Debug kan bara läsa konventionellt minne, vilket är de första 640 kB i en IBM PC.
Kloner av Debug för 32-bitar, som FreeDOS Debug, har skrivits.
Syntax
debug [[Drive:][Path] FileName [parameters]]
När Debug körs utan någon parameter visas Debug-prompten, "-". Användaren kan då ange ett av flera kommandon med en eller två bokstäver, inklusive "a" för att gå in i assembler mode, "d" för att gör en hexadecimal dump, "t" för att spåra (trace) och "u" för att disassemblera (unassemble) ett program i minnet.
Debug kan också användas som "debug script" interpretator med följande syntax.
debug < FileName
En script-fil kan innehålla Debug-kommandon och assemblerinstruktioner. Denna metod kan användas för att skapa eller editera binärfiler från batchfiler.
Se även
Lista på DOS-kommandon
Edlin är ett annat DOS-verktyg som har skrivits av Tim Paterson.
SoftICE är en modern avlusare som har ärvt sin syntax från Debug
debug tutorial: http://www.armory.com/~rstevew/Public/Tutor/Debug/debug-manual.html
Referenser
Noter
Externa länkar
A Guide to DEBUG
Information about the debug command
Computer Debug Routines / Machine Code
, FreeDOS Debug
Programspråk
MS-DOS
|
swedish
| 0.839882
|
Pony/files-FileLines-.txt
|
FileLines¶
[Source]
Iterate over the lines in a file.
Returns lines without trailing line breaks.
Advances the file cursor to the end of each line returned from next.
This class buffers the file contents to accumulate full lines. If the file
does not contain linebreaks, the whole file content is read and buffered, which
might exceed memory resources. Take care.
class ref FileLines is
Iterator[String iso^] ref
Implements¶
Iterator[String iso^] ref
Constructors¶
create¶
[Source]
Create a FileLines instance on a given file.
This instance returns lines from the position of the given file
at the time this constructor is called. Later manipulation of the file position
is not accounted for. As a result iterating with this class will always return the full
file content without gaps or repeated lines.
min_read_size determines the minimum amount of bytes to read from the file
in one go. This class keeps track of the line lengths in the current file
and uses the length of the last line as amount of bytes to read next, but it
will never read less than min_read_size.
new ref create(
file: File ref,
min_read_size: USize val = 256)
: FileLines ref^
Parameters¶
file: File ref
min_read_size: USize val = 256
Returns¶
FileLines ref^
Public Functions¶
has_next¶
[Source]
fun ref has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
Returns the next line in the file.
fun ref next()
: String iso^ ?
Returns¶
String iso^ ?
|
pony
|
399261
|
https://da.wikipedia.org/wiki/Tekstfil
|
Tekstfil
|
En tekstfil (med tekstfilformat; kortere tekstformat) kan være flere forskellige filformater (fx US-ASCII og unicode (fx UTF-8)). En fil med filendelsen ".txt" signalerer at filen er en tekstfil. (På et generisk beskrivelsesniveau er der grundlæggende to slags computerfilformater: Tekstfiler og binærfiler.)
Tekstfiler er i modsætning til andre typer computerfiler karakteristisk ved, at indholdet er menneskeligt læsbart og samtidigt ikke indeholder nogen skjulte formatteringskoder sådan som f.eks. en fil skabt med et tekstbehandlingsprogram. De eneste koder, der forekommer, som ikke er umiddelbart synlige, er koder til markering af linieslut, linieskift, tabulering, slutmarkering og lignende helt fundamentale ting. Disse koder ignoreres i forbindelse med maskinel fortolkning af indholdet.
Den simple form gør formatet velegnet til inspektion og udvikling samt til lagring af informationer, der skal kunne læses i og redigeres i af enhvert basalt editor-program, herunder Window's Notepad. Desuden gør simpelheden formatet velegnet til udveksling af data mellem forskellige systemer
Nogle af de vigtigste "usynlige" formateringskoder, der kan forekomme i tekstfiler (ASCII) er følgende:
Dec Oct Hex Bin HTML
008 010 008 0001000  BS backspace
009 011 009 0001001 	 HT Horizontal Tab (vandret tabulering)
010 012 00A 0001010 LF Line Feed (ny linje)
011 013 00B 0001011  VT Vertical Tab (lodret tabulering)
012 014 00C 0001100  FF Form Feed
013 015 00D 0001101 CR Carriage Return (retur)
Signalering af "ny linje"
Signalering af "ny linje" har ikke et standardtegn eller standardtegnssammensætning. I tekstfiler benyttes følgende, som typisk afhænger at anvendt styresystem, og anvendt teksteditorkonfiguration/filvalg:
indlejret signalering af "ny linje" (engelsk newline eller end of line) - nogle eksempler:
Unix og unix-lignende (incl. MacOS(X)(>=10)) - består af styretegnet: \n eller ASCII-linefeed (LF)
Microsoft Windows, DOS - består af styretegnet: \r efterfulgt af \n - eller ASCII-carriage-return (CR) efterfulgt ASCII-linefeed (LF)
Mac Classic Mac OS(<10) - består af styretegnet: \r eller ASCII-carriage-return (CR)
Ovenstående har historisk været og er i dag en stor udfordring, når man skal arbejde sammen på tværs af styresystemer og skal udveksle tekstfiler (fx kildekode) med andre som arbejder på andre styresystemer. Man bør som en del af dataintegriteten rydde op i "ny linje"-signaleringen. Gør man ikke det, kan der ske besynderlige ting, når andre skal editere (i bedste fald vises mystiske grafiksymboler) - og oversætte kildekode. Mange oversættere kan ikke behandle "forkerte" "ny linje"-signaleringer.
Nogle anvendelseseksempler (langt fra komplet liste)
Systemfiler af betydning for computerens eller visse computerprogrammers organisering og opsætning.
Initieringsfiler (med filtypebetegnelsen .ini)
Logfiler
Batchfiler og lignende kommandofiler vedrørende udførelse af DOS-programmer eller igangsætning af compilering af computerprogrammer.
Fortolkede formater
HTML-filer eller XHTML-filer (med en af filtypeendelserne .html, .htm eller .xhtml)
Javascript-kode (med filtypeendelsen .js – hvis ikke integreret i HTML-dokumenter)
ASP-kode og ASPX-kode (med en af filtypeendelserne .asp eller .aspx)
PHP-kode (med filtypeendelsen .php)
XML-kode (med filtypebetegnelse .xml)
VRML-kode (med filtypebetegnelsen .wrl)
include-filer af forskellig art (med filtypebetegnelsen .inc)
Fortolket programkode, f.eks. skrevet i Basic eller COMAL
Ressourcefiler
Cascading Style Sheets (med filtypeebetegnelsen .css – hvis ikke integreret i HTML-dokumenter)
Kommaseparerede databasefiler
Kommaseparerede tabeller beregnet på indlæsning i regneark
Kildefiler i forbindelse med systemudvikling og programmering af f.eks.
Javaprogrammer og Java-applets
Programmer skrevet i C, C# og C++
Programmer skrevet i assembler-kode
I forbindelse med programmering compileres kildekoden af en compiler til enten ren maskinkode (C og C++) eller til en komprimeret abstrakt bytekode (Java), der i modsætning til ren maskinkode er platformsuafhængig. Det man almindeligvis forstår ved software er sådan maskinlæsbar og dermed lynhurtigt eksekverbar kode.
Af de fortolkede tekstformater er XML-formatet (Expanable Markup Language) interessant ved at være så fleksibelt, at det kan benyttes til mange forskellige former for opbevaring og transmission af data, herunder bl.a. vektorgrafik.
Se også
Teksteditor
Notepad - standard Microsoft Windows teksteditor
Fodnoter
Filformater
|
danish
| 0.57322
|
Pony/src-builtin-platform-.txt
|
platform.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25primitive Platform
fun bsd(): Bool => freebsd() or dragonfly() or openbsd()
fun freebsd(): Bool => compile_intrinsic
fun dragonfly(): Bool => compile_intrinsic
fun openbsd(): Bool => compile_intrinsic
fun linux(): Bool => compile_intrinsic
fun osx(): Bool => compile_intrinsic
fun posix(): Bool => bsd() or linux() or osx()
fun windows(): Bool => compile_intrinsic
fun x86(): Bool => compile_intrinsic
fun arm(): Bool => compile_intrinsic
fun riscv(): Bool => compile_intrinsic
fun lp64(): Bool => compile_intrinsic
fun llp64(): Bool => compile_intrinsic
fun ilp32(): Bool => compile_intrinsic
fun bigendian(): Bool => compile_intrinsic
fun littleendian(): Bool => compile_intrinsic
fun native128(): Bool => compile_intrinsic
fun debug(): Bool => compile_intrinsic
fun runtimestats(): Bool => compile_intrinsic
fun runtimestatsmessages(): Bool => compile_intrinsic
|
pony
|
636077
|
https://no.wikipedia.org/wiki/Britain%E2%80%99s%20Got%20Talent%202009
|
Britain’s Got Talent 2009
|
Sesong 3 av Britain's Got Talent begynte på TV (i Storbritannia, ITV) 11. april 2009 og finalen ble avholdt 30. mai 2009. Anthony McPartlin og Declan Donnelly er fortsatt programledere og Piers Morgan, Amanda Holden og Simon Cowell er tilbake i dommerpanelet. Vinnere av Britain's Got Talent 2009 ble hiphopdansegruppen Diversity som vant med 24,9% av stemmene, på 2.-plass kom sangeren Susan Boyle med 20,2% av stemmene, på 3.-plass kom saksofonisten Julian Smith med 16,4% av stemmene, på 4.-plass kom folkedanserne Stavros Flatley med 16,3% av stemmene, på 5.-plass kom streetdanseren Aidan Davis med 6,5% av stemmene, på 6.-plass kom sangeren Hollie Steel med 3,9% av stemmene, på 7.-plass kom sangeren Shaheen Jafargholi med 3,8% av stemmene, på 8.-plass kom hiphopdansegruppen Flawless med 3,6% av stemmene, på 9.-plass kom sangeren Shaun Smith med 3,4% av stemmene og på 10.-plass kom sangduoen 2 Grand med 1% av stemmene.
Semifinalister
Sendinger
{|class="wikitable"
|-
!colspan="7"|
Semifinale 1
|-
!rowspan="2"|Nr.
!rowspan="2"|Plass
!rowspan="2"|Artist
!rowspan="2"|Talent
!colspan="3"|X-er og dommernes valg
|-
!width="70"|Simon
!width="70"|Amanda
!width="70"|Piers
|-
|bgcolor="lightgreen"|1
|bgcolor="lightgreen"|2.-plass (vant dommerstemmene)36,2%
|bgcolor="orange"|Diversity
|bgcolor="lightgreen"|Hiphopdansegruppe
|style="background-color:#CFC;text-align:center"|
|
|style="background-color:#grey"|
|-
|2
|Ukjent
|bgcolor="pink"|Sue Son
|Elektrisk fiolinist
|
|
|
|-
|3
|Ukjent
|bgcolor="cyan"|Darth Jackson
|Darth Vader/Michael Jackson-imitator
|style="background-color:red;text-align:center"|X
|
|
|-
|bgcolor="lightblue"|4
|bgcolor="lightblue"|3.-plass (tapte dommerstemmene)
|bgcolor="pink"|Natalie Okri
|bgcolor="lightblue"|Sanger
|
|style="background-color:#CFC;text-align:center"|
|
|-
|5
|Ukjent
|bgcolor="pink"|Julia Naidenko
|Magedanser
|
|style="background-color:red;text-align:center"|X
|
|-
|6
|Ukjent
|bgcolor="cyan"|Nick Hell
|Freakshow/stuntmann
|style="background-color:red;text-align:center"|X
|style="background-color:red;text-align:center"|X
|style="background-color:red;text-align:center"|X
|-
|7
|Ukjent
|bgcolor="yellow"|Faces of Disco
|Fjesdansere
|style="background-color:red;text-align:center"|X
|
|style="background-color:red;text-align:center"|X
|-
|bgcolor="gold"|8
|bgcolor="gold"|1.-plass (vant publikumsstemmene)52,1%
|bgcolor="pink"|Susan Boyle
|bgcolor="gold"|Sanger
|
|
|
|-
!colspan="7"|
Semifinale 2
|-
|1
|Ukjent
|bgcolor="cyan"|DJ Talent
|Rapper
|
|
|
|-
|2
|Ukjent
|bgcolor="cyan"|Merlin Cadogan
|Stuntmann
|
|
|
|-
|3
|Ukjent
|bgcolor="cyan"|Jamie Pugh
|Sanger
|
|style="background-color:red;text-align:center"|X
|
|-
|4
|Ukjent
|bgcolor="orange"|Hot Honeyz
|Popdansegruppe
|style="background-color:red;text-align:center"|X
|
|style="background-color:red;text-align:center"|X
|-
|5
|Ukjent
|bgcolor="cyan"|Peter Coghlan
|Drag-artist
|style="background-color:red;text-align:center"|X
|style="background-color:red;text-align:center"|X
|
|-
|bgcolor="lightblue"|6
|bgcolor="lightblue"|3.-plass (tapte dommerstemmene)
|bgcolor="cyan"|Gareth Oliver
|bgcolor="lightblue"|Buktaler/sanger
|style="background-color:red;text-align:center"|X
|
|style="background-color:#CFC;text-align:center"|
|-
|bgcolor="lightgreen"|7
|bgcolor="lightgreen"|2.-plass (vant dommerstemmene)37,1%
|bgcolor="cyan"|Shaun Smith
|bgcolor="lightgreen"|Sanger
|style="background-color:#CFC;text-align:center"|
|style="background-color:#CFC;text-align:center"|
|
|-
|bgcolor="gold"|8
|bgcolor="gold"|1.-plass (vant publikumsstemmene)38,7%
|bgcolor="orange"|Flawless
|bgcolor="gold"|Hiphopdansegruppe
|
|
|
|-
!colspan="7"|
Semifinale 3
|-
|1
|Ukjent
|bgcolor="yellow"|Harmony
|Popsangere
|
|
|
|-
|2
|Ukjent
|bgcolor="cyan"|Kay Oresanya
|Saksofonlyd med munnen
|style="background-color:red;text-align:center"|X
|
|
|-
|3
|Ukjent
|bgcolor="yellow"|Ben og Becky
|Selskapsdanspar
|
|
|
|-
|bgcolor="lightgreen"|4
|bgcolor="lightgreen"|2.-plass (vant dommerstemmene)26,3%
|bgcolor="cyan"|Shaheen Jafargholi
|bgcolor="lightgreen"|Sanger
|
|style="background-color:#CFC;text-align:center"|
|style="background-color:#CFC;text-align:center"|
|-
|5
|Ukjent
|bgcolor="orange"|The Barrow Boys
|Trillebordansere
|style="background-color:red;text-align:center"|X
|
|style="background-color:red;text-align:center"|X
|-
|bgcolor="lightblue"|6|bgcolor="lightblue"|3.-plass (tapte dommerstemmene)|bgcolor="orange"|MD Showgroup|bgcolor="lightblue"|Dansegruppe|style="background-color:#CFC;text-align:center"|
|
|
|-
|7|Ukjent|bgcolor="pink"|Floral Highnotes|Operasanger|style="background-color:red;text-align:center"|X|
|
|-
|bgcolor="gold"|8|bgcolor="gold"|1.-plass (vant publikumsstemmene)50,4%
|bgcolor="yellow"|Stavros Flatley|bgcolor="gold"|Folkedansere|
|
|
|-
!colspan="7"|
Semifinale 4
|-
|1|Ukjent|bgcolor="orange"|Sugar Free|Dansegruppe|
|
|
|-
|2|Ukjent|bgcolor="yellow"|Jackie Prescott og Tippy Toes|Hundedansere|
|
|style="background-color:red;text-align:center"|X|-
|bgcolor="lightblue"|3|bgcolor="lightblue"|3.-plass (tapte dommerstemmene)|bgcolor="cyan"|Callum Francis|bgcolor="lightblue"|Musikalsanger|
|
|style="background-color:#CFC;text-align:center"|
|-
|4|Ukjent|bgcolor="cyan"|Fred Bowers|Breakdancer|
|
|
|-
|5|Ukjent|bgcolor="orange"|Brit Chix|Rockeband|style="background-color:red;text-align:center"|X|style="background-color:red;text-align:center"|X|style="background-color:red;text-align:center"|X|-
|bgcolor="gold"|6|bgcolor="gold"|1.-plass (vant publikumsstemmene)56,7%
|bgcolor="cyan"|Julian Smith|bgcolor="gold"|Saxofonist|
|
|
|-
|bgcolor="lightgreen"|7|bgcolor="lightgreen"|2.-plass (vant dommerstemmene)24,6%
|bgcolor="yellow"|2 Grand|bgcolor="lightgreen"|Sangduo|style="background-color:#CFC;text-align:center"|
|style="background-color:#CFC;text-align:center"|
|
|-
|8|Ukjent|bgcolor="pink"|Fabia Cerra|Burlesquedanser|
|
|
|-
!colspan="7"|
Semifinale 5
|-
|1|Ukjent|bgcolor="orange"|The Dreambears|Tøysedansere|style="background-color:red;text-align:center"|X|
|
|-
|2|Ukjent|bgcolor="orange"|Good Evans|Syngende familie|
|
|style="background-color:red;text-align:center"|X|-
|3|Ukjent|bgcolor="cyan"|Luke Clements|Sjonglør|style="background-color:red;text-align:center"|X|style="background-color:red;text-align:center"|X|style="background-color:red;text-align:center"|X|-
|bgcolor="lightgreen"|4 & 7*|bgcolor="lightgreen"|2.-plass (vant dommerstemmene)24,0%
|bgcolor="pink"|Hollie Steel|bgcolor="lightgreen"|Sanger|style="background-color:#CFC;text-align:center"|
|style="background-color:#CFC;text-align:center"|
|style="background-color:#CFC;text-align:center"|
|-
|5|Ukjent|bgcolor="cyan"|Martin «Gos» Matcham|Sanger og gitarist|style="background-color:red;text-align:center"|X|
|
|-
|bgcolor="gold"|6|bgcolor="gold"|1.-plass (vant publikumsstemmene)60,5%
|bgcolor="cyan"|Aidan Davis|bgcolor="gold"|Streetdancer|
|
|
|-
|8|Ukjent|bgcolor="orange"|DCD Seniors|Dansegruppe|
|
|
|-
|bgcolor="lightblue"|9|bgcolor="lightblue"|3.-plass (tapte dommerstemmene)|bgcolor="cyan"|Greg Pritchard|bgcolor="lightblue"|Sanger|style="background-color:red;text-align:center"|X|
|
|-
!colspan="7"|
Finale
|-
|bgcolor="gold"|9|bgcolor="gold"|1.-plass (vinnere av Britain's Got Talent 2009)24,9%
|bgcolor="orange"|Diversity|bgcolor="gold"|Hiphopdansegruppe|bgcolor="gold"|
|bgcolor="gold"|
|bgcolor="gold"|
|-
|bgcolor="lightgreen"|8|bgcolor="lightgreen"|2.-plass20,2%
|bgcolor="pink"|Susan Boyle|bgcolor="lightgreen"|Sanger|bgcolor="lightgreen"|
|bgcolor="lightgreen"|
|bgcolor="lightgreen"|
|-
|bgcolor="lightblue"|10|bgcolor="lightblue"|3.-plass16,4%
|bgcolor="cyan"|Julian Smith|bgcolor="lightblue"|Saxofonist|bgcolor="lightblue"|
|bgcolor="lightblue"|
|bgcolor="lightblue"|
|-
|6|4.-plass16,3%
|bgcolor="yellow"|Stavros Flatley|Folkedansere|
|
|
|-
|3|5.-plass6,5%
|bgcolor="cyan"|Aidan Davis|Streetdanser|
|
|
|-
|5|6.-plass3,9%
|bgcolor="pink"|Hollie Steel|Sanger|
|
|
|-
|2|7.-plass3,8%
|bgcolor="cyan"|Shaheen Jafargholi|Sanger|
|
|
|-
|1|8.-plass3,6%
|bgcolor="orange"|Flawless|Hiphopdansegruppe|
|
|
|-
|7|9.-plass3,4%
|bgcolor="cyan"|Shaun Smith|Sanger|
|
|
|-
|4|10.-plass1%
|bgcolor="yellow"|2 Grand|Sangduo|
|
|
|}
*Første gang Hollie Steel''' fremførte, ble hun nervøs og falt i tårer. Hun klarte ikke å fremføre resten av nummeret, men hun fikk en ny sjanse til å fremføre nummeret sitt. Etter fremførelsen, kom hun på 2.-plass der dommerne skulle velge mellom henne og sangeren Greg Pritchard''. Alle tre dommerne stemte på Hollie Steel, så dermed kom hun til finalen.
Se også
Britain's Got Talent
Britain's Got Talent 2007
Britain's Got Talent 2008
2009
|
norwegian_bokmål
| 1.274666
|
Pony/random-XorOshiro128Plus-.txt
|
XorOshiro128Plus¶
[Source]
This is an implementation of xoroshiro128+, as detailed at:
http://xoroshiro.di.unimi.it
This is currently the default Rand implementation.
class ref XorOshiro128Plus is
Random ref
Implements¶
Random ref
Constructors¶
from_u64¶
[Source]
Use seed x to seed a SplitMix64 and use this to
initialize the 128 bits of state.
new ref from_u64(
x: U64 val = 5489)
: XorOshiro128Plus ref^
Parameters¶
x: U64 val = 5489
Returns¶
XorOshiro128Plus ref^
create¶
[Source]
Create with the specified seed. Returned values are deterministic for a
given seed.
new ref create(
x: U64 val = 5489,
y: U64 val = 0)
: XorOshiro128Plus ref^
Parameters¶
x: U64 val = 5489
y: U64 val = 0
Returns¶
XorOshiro128Plus ref^
Public Functions¶
next¶
[Source]
A random integer in [0, 2^64)
fun ref next()
: U64 val
Returns¶
U64 val
has_next¶
[Source]
fun tag has_next()
: Bool val
Returns¶
Bool val
u8¶
[Source]
fun ref u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun ref u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun ref u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun ref u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun ref u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun ref ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun ref usize()
: USize val
Returns¶
USize val
i8¶
[Source]
fun ref i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun ref i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun ref i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun ref i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun ref i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun ref ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun ref isize()
: ISize val
Returns¶
ISize val
int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
real¶
[Source]
fun ref real()
: F64 val
Returns¶
F64 val
shuffle[A: A]¶
[Source]
fun ref shuffle[A: A](
array: Array[A] ref)
: None val
Parameters¶
array: Array[A] ref
Returns¶
None val
|
pony
|
443033
|
https://sv.wikipedia.org/wiki/Gammal
|
Gammal
|
Se även ålderdom.
Gammal är ett runsvenskt mansnamn, som återfinns i flera svenska vikingatida runinskrifter, från främst Uppland (U 56, U 144, U 163, U 207, U 409, U 952, U 1070) , men också från Södermanland (Sö 359) och Öland (Öl 37), samt möjligen i en 1100-tals inskrift i Penningtons kyrka, Cumbria, England.
Det har använts ända till våra dagar, men är numera väldigt ovanligt.
Källor
Samnordisk runtextdatabas
Mansnamn
|
swedish
| 1.045208
|
Pony/format-FormatExp-.txt
|
FormatExp¶
[Source]
primitive val FormatExp is
FormatSpec val
Implements¶
FormatSpec val
Constructors¶
create¶
[Source]
new val create()
: FormatExp val^
Returns¶
FormatExp val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: FormatExp val)
: Bool val
Parameters¶
that: FormatExp val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FormatExp val)
: Bool val
Parameters¶
that: FormatExp val
Returns¶
Bool val
|
pony
|
6501
|
https://da.wikipedia.org/wiki/Lukket%20filformat
|
Lukket filformat
|
Et lukket filformat er et filformat, hvis beskrivelse ikke er frit tilgængelig. Eksempler på lukkede formater er Windows-formater som: Word (.doc), Excel (.xls) og PowerPoint (.ppt) samt RealAudioMedia (.ra eller .ram).
Filformater
|
danish
| 0.842297
|
Pony/src-pony_bench-_runner-.txt
|
_runner.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161use "time"
use @pony_ctx[Pointer[None]]()
use @pony_triggergc[None](ctx: Pointer[None])
trait tag _Runner
be apply()
actor _RunSync is _Runner
let _ponybench: PonyBench
embed _aggregator: _Aggregator
let _name: String
let _bench: MicroBenchmark
new create(
ponybench: PonyBench,
benchmark: MicroBenchmark,
overhead: Bool)
=>
_ponybench = ponybench
_aggregator = _Aggregator(_ponybench, this, benchmark.config(), overhead)
_name = benchmark.name()
_bench = consume benchmark
apply()
be apply() =>
try
_bench.before()?
_gc_next_behavior()
_run_iteration()
else
_fail()
end
be _run_iteration(n: U64 = 0, a: U64 = 0) =>
if n == _aggregator.iterations then
_complete(a)
else
try
_bench.before_iteration()?
let s =
ifdef x86 then
Time.perf_begin()
else
Time.nanos()
end
_bench()?
let e =
ifdef x86 then
Time.perf_end()
else
Time.nanos()
end
_bench.after_iteration()?
_run_iteration(n + 1, a + (e - s))
else
_fail()
end
end
be _complete(t: U64) =>
try
_bench.after()?
_aggregator.complete(_name, t)
else
_fail()
end
be _fail() =>
_ponybench._fail(_name)
fun ref _gc_next_behavior() =>
@pony_triggergc(@pony_ctx())
actor _RunAsync is _Runner
let _ponybench: PonyBench
embed _aggregator: _Aggregator
let _name: String
let _bench: AsyncMicroBenchmark ref
var _start_time: U64 = 0
var _n: U64 = 0
var _a: U64 = 0
embed _before_cont: AsyncBenchContinue =
AsyncBenchContinue._create(this, recover this~_before_done_cont() end)
embed _before_iteration_cont: AsyncBenchContinue =
AsyncBenchContinue._create(this, recover this~_before_iteration_done_cont() end)
embed _iteration_cont: AsyncBenchContinue =
AsyncBenchContinue._create(this, recover this~_iteration_done_cont() end)
embed _after_iteration_cont: AsyncBenchContinue =
AsyncBenchContinue._create(this, recover this~_after_iteration_done_cont() end)
embed _after_cont: AsyncBenchContinue =
AsyncBenchContinue._create(this, recover this~_after_done_cont() end)
new create(
ponybench: PonyBench,
benchmark: AsyncMicroBenchmark,
overhead: Bool)
=>
_ponybench = ponybench
_aggregator = _Aggregator(_ponybench, this, benchmark.config(), overhead)
_name = benchmark.name()
_bench = consume benchmark
apply()
be apply() =>
_bench.before(_before_cont)
be _before_done_cont(e: U64) =>
_n = 0
_a = 0
_start_time = 0
_bench.before_iteration(_before_iteration_cont)
be _before_iteration_done_cont(e: U64) =>
_run_iteration()
be _run_iteration() =>
try
_n = _n + 1
_gc_next_behavior()
_start_time = Time.nanos()
_bench(_iteration_cont)?
else
_fail()
end
be _iteration_done_cont(e: U64) =>
_a = _a + (e - _start_time)
_bench.after_iteration(_after_iteration_cont)
be _after_iteration_done_cont(e: U64) =>
if _n == _aggregator.iterations then
_bench.after(_after_cont)
else
_bench.before_iteration(_before_iteration_cont)
end
be _after_done_cont(e: U64) =>
_aggregator.complete(_name, _a)
be _fail() =>
_ponybench._fail(_name)
fun ref _gc_next_behavior() =>
@pony_triggergc(@pony_ctx())
class val AsyncBenchContinue
let _run_async: _RunAsync
let _f: {(U64)} val
new val _create(run_async: _RunAsync, f: {(U64)} val) =>
_run_async = run_async
_f = f
fun complete() =>
let e = Time.nanos()
_f(e)
fun fail() =>
_run_async._fail()
|
pony
|
40315
|
https://da.wikipedia.org/wiki/Adelskalenderen%20p%C3%A5%20sk%C3%B8jter
|
Adelskalenderen på skøjter
|
Adelskalenderen er i hurtigløb på skøjter en central og objektiv rangering af skøjteløbere baseret på personlige rekorder. Rangeringen følger det samme princip, som bruges i 'allroundmesterskab' på skøjter som består af 500, 1.000, 1.500 og 5.000 meter for kvinder og 500, 1.500, 5.000 og 10.000 meter for mænd. Rangeringen generes efter tiderne, hvor skøjteløberen med den laveste pointsum rangeres på 1. pladsen. Tiden på hver distance regnes om til sekunder og deles på antallet af 500 meter ,distansen består af. FEs.empelvisdeles tiden på 5.000 meter med 10 ,da en 5.000 meter er 10 gangerså langt som en 500 meter. En tid på 5.000 meter på 6 minutter og 35,67 sekunder vil gi vepointsummen 39,567 efter følgende udregning: ((6*60)+35,67)/10 = 39,567. Pointsummen for en skøjteløber på adelskalenderen bliver summen af tidspoint for de fire distancer, som indgår i adelskalenderen. Dersom en tid på en distance giver tidspoints med mere end 3tredecimaler ,rundes det ned til nærmeste tusinddel ,før tidspointene på hver distance lægges sammen til skøjteløberens samlede pointsum.
En nærmere redegørelse kan læses i opslagsværket "Norge på Terskelen" (Direkteforlaget, Oslo 2000, side 62-63), hvorfra følgende citat stammer:
"Adelskalenderen mente noen at gikk i glemmeboken i Norge etter at adelen i 1816 frasa seg sine privilegier (som Stortinget deretter opphevet i 1821), men Rocambole var ikke død! For i 1950-årene gjenoppstod kalenderen som navn på den fortløbende justérbare oversikt over verdens beste skøjteløberes personlige rekorder på de fire klassiske distanser – 500, 1.500, 5.000 og 10.000 meter – alt omregnet i sammenlagtpoeng basert på anvendte sekunder i gjennomsnitt per 500 m av hver distanse. Etter ethvert skøjteløb kunne enhver nordmann med avis eller rejseradio, ved hjelp af enkel hoderegning, selv oppjustere adelskalenderen. Dette gjorde adelskalenderen til den mest demokratiske kalenderen i verden."
Adelskalenderen på skøjter er en unik disciplin inden for idrætten og er fortsat en liges å objektiv oversigt, efter at hundredelene blev indført, bare mere præcis. For enkelte løbere er den bedst mulig tid på enkeltdistancerne endda vigtigere end den bedste mulige pointsum på adelskalenderen som følge af indførelsen af VM på enkeltdistanser fra det første enkeltdistance-VM på Hamar, Norge, 1996. Hurtigløb på skøjter er selve idrætstatistikkens højborg, ikke mindst takket være adelskalenderen.
Adelskalenderen for kvinder
Pr. 30. juni 2005 :
Rnk Navn Land NR Født 500m 1500m 3.000m 5.000m poeng år
1 KLASSEN Cindy CAN (1) 120879 38.30 1.53.87 3.58.97 6.55.89 157.673 2005
2 FRIESINGER Anni GER (1) 110177 38.60 1.54.02 3.59.39 6.58.39 158.343 2002
3 PECHSTEIN Claudia GER (2) 220272 39.85 1.54.83 3.57.70 6.46.91 158.433 2004
4 BARYSJEVA Varvara RUS (1) 240377 38.86 1.55.22 4.05.73 6.56.97 159.918 2002
5 RODRIGUEZ Jennifer USA (1) 080676 37.94 1.55.26 4.04.99 7.07.93 159.984 2005
5 GROENEWOLD Renate NED (1) 081076 39.48 1.55.68 3.58.94 7.01.21 159.984 2005
7 TABATA Maki JPN (1) 091174 39.18 1.54.76 4.01.01 7.05.49 160.150 2002
8 NIEMANN Gunda GER (3) 070566 40.34 1.55.62 4.00.26 6.52.44 160.167 2001
9 de JONG Tonny NED (2) 190774 39.36 1.56.02 4.00.49 7.01.17 160.231 2002
10 de LOOR Barbara NED (3) 260574 39.79 1.55.83 4.04.56 7.07.49 161.909 2005
11 GROVES Krisy CAN (2) 041276 39.97 1.57.76 4.05.61 6.57.61 161.919 2005
12 CRAMER Wieteke NED (4) 130681 39.40 1.57.64 4.05.55 7.05.94 162.132 2004
13 HUNYADY Emese AUT (1) 040366 38.87 1.56.51 4.06.55 7.15.23 162.320 2002
14 WÜST Ireen NED (5) 010486 39.29 1.56.69 4.07.71 7.09.23 162.394 2005
15 HUGHES Clara CAN (3) 270972 41.33 1.58.25 4.03.14 6.53.53 162.622 2005
16 ANSCHÜTZ Daniela GER (4) 201174 39.70 1.57.49 4.07.33 7.07.70 162.854 2005
17 THOMAS Annamarie NED (6) 150971 38.97 1.55.50 4.11.45 7.16.97 163.075 2002
18 SONG Li CHN (1) 100381 39.06 1.55.79 4.07.01 7.23.15 163.139 2001
19 VIS Marja NED (7) 150177 39.86 1.57.30 4.06.25 7.13.54 163.355 2002
20 NEMOTO Nami JPN (2) 240375 40.66 1.58.56 4.06.44 7.08.60 164.113 2005
21 RANEY Catherine USA (2) 200680 41.05 1.58.51 4.06.07 7.06.89 164.253 2005
22 ANKONÉ Fréderique NED (8) 071281 40.53 1.58.33 4.09.53 7.07.26 164.287 2005
23 OVERLAND Cindy CAN (4) 190276 39.78 1.57.67 4.11.24 7.14.31 164.307 2002
24 PROKASJEVA Ljudmila KAZ (1) 230169 41.06 1.58.64 4.05.01 7.09.42 164.383 2001
25 KLEINSMAN Moniek NED (9) 031182 40.41 1.59.51 4.07.60 7.08.77 164.389 2005
26 van GOOZEN Helen NED (10) 251280 40.89 1.59.28 4.06.40 7.06.84 164.400 2005
27 SEO Eriko JPN (3) 120379 40.52 1.58.46 4.08.52 7.09.95 164.421 2002
28 ISHINO Eriko JPN (4) 011285 40.28 1.58.79 4.09.26 7.11.27 164.546 2005
29 SMIT Gretha NED (11) 200176 42.18 2.02.02 4.05.25 6.49.22 164.650 2004
30 BAK Eun-Bi KOR (1) 140979 40.02 1.59.54 4.09.91 7.13.60 164.877 2000
31 JAKSJINA Valentina RUS (2) 060274 41.11 1.59.28 4.08.93 7.08.42 165.200 2002
32 TRAPETZNIKOVA Tatjana RUS (3) 031273 40.36 1.58.43 4.08.49 7.20.19 165.270 2002
33 SUNDSTROM Becky USA (3) 100576 38.49 1.57.28 4.14.60 7.33.80 165.396 2003
34 LAMB Maria USA (4) 040186 40.35 1.58.88 4.10.50 7.17.00 165.426 2005
35 POLOZKOVA Natalja RUS (4) 020472 40.02 1.56.25 4.08.60 7.32.92 165.495 2001
36 SIMPSON Kerry CAN (5) 061181 39.08 1.57.57 4.13.49 7.31.21 165.639 2003
37 TARASOVA Olga RUS (5) 280271 40.34 1.58.83 4.12.27 7.17.31 165.726 2005
38 BASJANOVA Svetlana RUS (6) 011272 40.77 1.59.46 4.12.02 7.13.12 165.905 2000
39 HOLZER Kristine USA (5) 210374 41.52 1.58.24 4.09.85 7.13.55 165.929 2005
40 WÓJCICKA Katarzyna POL (1) 010180 40.17 1.59.91 4.10.97 7.19.82 165.950 2005
41 de VRIES Elma NED (12) 200383 40.06 1.58.93 4.09.66 7.27.90 166.103 2004
42 't HART Sandra NED (13) 300874 40.00 1.58.95 4.14.31 7.20.70 166.105 2005
43 RISLING Tara CAN (6) 270781 40.49 2.00.11 4.11.83 7.16.94 166.191 2005
44 WANG Fei CHN (2) 200884 39.81 1.59.83 4.13.85 7.21.40 166.201 2005
45 VYSOKOVA Svetlana RUS (7) 120572 40.50 2.01.82 4.11.37 7.12.02 166.203 2005
46 WIJSMAN Marieke NED (14) 090575 38.31 2.00.03 4.17.22 7.30.33 166.223 2002
47 KALEX Katrin GER (5) 140279 40.46 2.00.89 4.11.41 7.17.22 166.379 2005
48 MAYR Nicola ITA (1) 060478 39.85 1.59.89 4.14.41 7.22.20 166.434 2005
49 GAO Yang CHN (3) 021280 40.11 1.59.51 4.12.39 7.24.61 166.472 2005
50 SLOT Nicole CAN (7) 130469 41.44 1.58.70 4.10.61 7.17.21 166.495 2002
Nordiske løbere blandt 112 løbere under 170 tidspoint
52 TØNSBERG Annette NOR (1) 020470 40.24 2.00.10 4.12.92 7.21.57 166.583 1999
76 HAUGLI Maren NOR (2) 030385 41.21 2.02.02 4.15.44 7.15.33 167.989 2005
86 BJELKEVIK Hedvig NOR (3) 180481 40.12 2.02.26 4.16.03 7.33.17 168.861 2004
89 BJELKEVIK Annette NOR (4) 120578 40.00 2.00.66 4.16.74 7.39.68 168.978 2005
107 TVETER Anne Therese NOR (5) 050576 41.93 2.04.88 4.14.25 7.19.04 169.835 2001
Adelskalenderen for mænd pr. 30. juni 2005
:
Nr Navn Land NR Født 500m 1500m 5.000m 10.000m poeng år
1 UYTDEHAAGE Jochem NED (1) 090776 36.40 1.44.57 6.14.66 12.58.92 147.668 (2005)
2 HEDRICK Chad USA (1) 170477 36.37 1.45.07 6.19.40 13.03.99 148.532 (2005)
3 DAVIS Shani USA (2) 130882 35.43 1.43.33 6.24.00 13.25.51 148.548 (2005)
4 PARRA Derek USA (3) 150370 35.88 1.43.95 6.17.98 13.33.44 149.000 (2002)
5 ROMME Gianni NED (2) 120273 36.97 1.47.88 6.14.70 13.03.40 149.570 (2005)
6 SJEPEL Dmitrij RUS (1) 080878 36.13 1.45.98 6.21.85 13.23.83 149.832 (2002)
7 BOUTIETTE K. C. USA (4) 110470 36.09 1.46.78 6.22.97 13.21.06 150.033 (2004)
8 RITSMA Rintje NED (3) 130470 35.90 1.45.86 6.25.55 13.28.19 150.150 (2002)
9 FABRIS Enrico ITA (1) 051081 36.71 1.46.65 6.18.34 13.22.99 150.243 (2005)
10 VERHEIJEN Carl NED (4) 260575 37.14 1.47.42 6.18.12 13.10.54 150.285 (2005)
11 MOLICKI Dustin CAN (1) 130875 36.19 1.46.00 6.26.29 13.34.58 150.881 (2002)
12 KRAMER Sven NED (5) 230486 37.02 1.48.23 6.24.29 13.09.65 151.007 (2005)
13 de JONG Bob NED (6) 131176 37.86 1.48.22 6.18.16 13.05.44 151.021 (2005)
14 TUITERT Mark NED (7) 040480 35.93 1.46.28 6.27.63 13.38.91 151.064 (2005)
15 WENNEMARS Erben NED (8) 011175 34.68 1.44.45 6.34.62 14.04.52 151.184 (2005)
16 JANMAAT Sicco NED (9) 221178 36.97 1.47.46 6.22.88 13.26.55 151.405 (2005)
17 SAJUTIN Vadim RUS (2) 311270 37.67 1.46.99 6.23.47 13.17.83 151.571 (2002)
18 SIGHEL Roberto ITA (2) 170267 36.93 1.47.47 6.25.11 13.26.19 151.573 (2002)
19 SHIRAHATA Keiji JPN (1) 081073 37.18 1.47.78 6.26.04 13.19.92 151.706 (2002)
20 POSTMA Ids NED (10) 281273 35.99 1.45.41 6.32.92 13.45.91 151.713 (2002)
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
22 PRINSEN Tom NED (11) 090982 37.09 1.47.70 6.26.29 13.22.88 151.763 (2004)
23 ELM Steven CAN (2) 120875 36.29 1.46.89 6.29.86 13.42.70 152.041 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
25 CHEEK Joey USA (5) 220679 34.66 1.44.98 6.42.57 14.13.81 152.600 (2003)
26 VELDKAMP Bart BEL (1) 221167 37.55 1.49.00 6.23.64 13.27.48 152.621 (2002)
27 SKOBREV Ivan RUS (3) 030283 36.63 1.48.75 6.30.52 13.36.14 152.739 (2005)
28 CALLIS Chris USA (6) 081179 35.71 1.45.84 6.36.29 14.04.02 152.820 (2003)
29 MARSHALL Kevin CAN (3) 120173 36.11 1.46.75 6.34.37 13.54.11 152.835 (2002)
30 NOAKE Hiroyuki JPN (2) 240874 35.61 1.46.34 6.33.49 14.08.96 152.853 (2001)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
33 LALENKOV Jevgenij RUS (4) 160281 35.78 1.45.97 6.38.36 14.01.03 152.990 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
35 BREUER Christian GER (1) 031176 35.57 1.47.50 6.35.22 14.01.80 153.015 (2002)
36 SOLINGER Yuri NED (12) 190879 36.24 1.46.50 6.32.62 14.01.14 153.059 (2005)
37 van de RIJST Ralf NED (13) 160377 36.69 1.47.29 6.31.85 13.49.91 153.133 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
39 HERSMAN Martin NED (14) 260274 36.38 1.46.76 6.31.62 14.01.42 153.199 (2002)
40 KIBALKO Aleksandr RUS (5) 251073 35.64 1.46.42 6.32.56 14.16.63 153.200 (2004)
41 WARSYLEWICZ Justin CAN (4) 191185 37.13 1.47.64 6.27.68 13.49.27 153.241 (2005)
42 DANKERS Arne CAN (5) 010680 37.96 1.47.83 6.24.05 13.39.92 153.304 (2005)
43 HIRAKO Hiroki JPN (3) 060882 37.67 1.49.17 6.30.46 13.27.88 153.500 (2002)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
45 KNOLL Mark CAN (6) 260776 37.00 1.48.54 6.30.63 13.47.96 153.641 (2003)
46 MEIJER Jarno NED (15) 141178 37.27 1.47.27 6.32.32 13.48.20 153.668 (2003)
47 MIYAZAKI Kesato JPN (4) 040481 37.53 1.48.92 6.32.81 13.31.24 153.679 (2005)
48 BEULENKAMP Jelmer NED (16) 161177 36.98 1.47.57 6.32.19 13.53.86 153.748 (2002)
49 TREVENA Jondon USA (7) 100772 36.84 1.48.56 6.30.15 13.55.60 153.821 (2002)
50 TSYBENKO Sergej KAZ (1) 091273 36.35 1.46.40 6.32.92 14.14.54 153.835 (2002)
Nordiske løbere blandt 594 løbere under 165 tidspoint
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
56 BJØRGE Stian NOR (7) 310776 37.88 1.49.15 6.28.77 13.38.75 154.077 (2001)
62 BØKKO Håvard NOR (8) 020287 37.00 1.50.75 6.31.91 13.46.08 154.411 (2005)
76 ROSENDAHL Vesa FIN (1) 051275 37.08 1.48.02 6.39.87 13.59.91 155.068 (2005)
78 KOSS Johann Olav NOR (9) 291068 37.98 1.51.29 6.34.96 13.30.55 155.099 (1994)
82 ERVIK Arild Nebb NOR (10) 040278 37.72 1.49.51 6.32.11 13.54.24 155.146 (2005)
83 FALK Sebastian SWE (2) 050677 37.81 1.50.45 6.29.50 13.51.75 155.163 (2005)
95 STORELID Kjell NOR (11) 241070 38.86 1.52.19 6.30.05 13.27.24 155.623 (2002)
98 BORGERSEN Reidar NOR (12) 100480 39.09 1.52.01 6.32.37 13.20.77 155.701 (2003)
120 VALTONEN Jarmo FIN (2) 110781 36.76 1.50.40 6.45.25 14.10.19 156.594 (2005)
130 HEREIDE Remi NOR (13) 250373 39.91 1.52.64 6.28.98 13.31.14 156.911 (2000)
139 TVENGE Ørjan NOR (14) 030374 38.72 1.51.96 6.39.06 13.45.59 157.225 (2001)
147 BAKKE Andreas Snare NOR (15) 100375 38.5 1.53.10 6.35.51 13.51.26 157.314 (2002)
158 ROSENDAHL Risto FIN (3) 231179 35.58 1.47.89 6.53.79 14.51.39 157.491 (2005)
163 GUSTAFSON Tomas SWE (3) 281259 38.10 1.53.22 6.44.51 13.48.20 157.701 (1991)
166 CHRISTIANSEN Henrik NOR (16) 100283 38.10 1.50.93 6.44.20 14.06.85 157.838 (2005)
169 ZACHRISSON Eric SWE (4) 080980 35.62 1.48.71 6.52.60 14.56.12 157.922 (2005)
177 SLINNING Olav NOR (17) 210583 38.82 1.51.41 6.42.3 13.59.54 158.163 (2005)
189 KRISTENSEN Preben NOR (18) 040383 38.84 1.54.44 6.41.00 13.50.36 158.604 (2005)
197 GRAVEM Øyvind NOR (19) 240878 38.40 1.52.33 6.45.1 14.11.59 158.932 (2004)
200 BAKKE Tor Snare NOR (20) 201179 37.70 1.52.03 6.50.14 14.18.82 158.998 (2004)
212 JOHANSEN Steinar NOR (21) 270272 38.28 1.52.88 6.45.11 14.17.93 159.313 (1998)
216 BRANDT Robert FIN (4) 211082 38.86 1.54.43 6.44.96 13.57.55 159.376 (2005)
220 KARLSTAD Geir NOR (22) 070763 39.41 1.55.24 6.43.59 13.48.29 159.596 (1992)
229 GRAVEM Pål NOR (23) 040875 36.01 1.47.35 6.57.33 15.28.11 159.931 (2002)
234 POUTALA Mika FIN (5) 200683 35.53 1.51.42 6.55.56 15.16.59 160.055 (2005)
240 HAUGLI Sverre NOR (24) 021082 38.68 1.53.10 6.48.61 14.18.51 160.166 (2005)
243 NYQUIST Halvar NOR (25) 141279 38.8 1.55.08 6.46.58 14.08.39 160.237 (2004)
252 NORDVIK Frode NOR (26) 270274 38.50 1.52.69 6.46.70 14.32.91 160.378 (1998)
258 DALEN Stian NOR (27) 031176 37.92 1.51.77 6.55.13 14.35.89 160.483 (2003)
260 SCHÖN Jonas SWE (5) 020469 38.9 1.54.92 6.48.05 14.10.15 160.518 (1996)
261 BÅRDSEN Edvin NOR (28) 231180 38.0 1.53.48 6.56.0 14.22.08 160.530 (2004)
265 FALK-LARSSEN Rolf NOR (29) 210260 37.88 1.54.26 6.50.93 14.30.34 160.576 (1988)
271 HASSEL Stefan SWE (6) 110876 37.51 1.54.31 6.55.63 14.31.48 160.750 (2001)
284 VITÉN Daniel SWE (7) 031176 37.78 1.51.50 6.50.99 14.57.93 160.941 (2000)
289 STILLERUD Arnt Olaf NOR (30) 031073 38.71 1.53.92 6.54.37 14.21.34 161.187 (2001)
323 ERIKSON Joel SWE (8) 160984 37.62 1.54.09 7.00.00 14.40.52 161.676 (2004)
331 PETTERSEN Sigurd NOR (31) 020679 38.38 1.54.26 6.57.42 14.32.18 161.817 (2003)
335 KARLBERG Joakim SWE (9) 180364 39.08 1.55.34 6.55.31 14.16.63 161.888 (1988)
359 KOLNES Kent NOR (32) 130678 39.43 1.54.43 6.53.78 14.27.71 162.336 (2001)
364 NIITTYLÄ Pertti FIN (6) 160156 38.90 1.56.48 6.53.28 14.26.57 162.382 (1988)
372 BENGTSSON Per SWE (10) 310567 39.6 1.56.97 6.48.87 14.22.15 162.584 (1993)
383 SPIDSBERG Gisle NOR (33) 180572 38.05 1.51.73 7.08.0 14.52.3 162.708 (1998)
384 NYLAND Bjørn NOR (34) 081062 38.2 1.56.08 6.58.31 14.39.72 162.710 (1987)
393 NIEMINEN Mikko FIN (7) 140870 40.12 1.55.19 6.56.03 14.15.28 162.883 (1998)
402 VÅRVIK Atle NOR (35) 121265 39.3 1.58.7 6.53.02 14.16.89 163.012 (1994)
406 STORHOLT Jan Egil NOR (36) 130249 38.07 1.55.18 7.01.16 14.49.26 163.042 (1978)
428 LANGEGÅRD Odd Øistein NOR (37) 220480 38.97 1.55.07 7.00.21 14.38.39 163.266 (2002)
441 JOHANNESSEN Kent Robin NOR (38) 180380 38.88 1.54.88 6.56.39 14.51.77 163.400 (2001)
448 STENSHJEMMET Kay Arne NOR (39) 090853 38.2 1.56.18 6.56.9 14.57.30 163.481 (1981)
475 MAGNUSSEN Tor Arve NOR (40) 180484 38.1 1.55.02 6.56.85 15.13.54 163.802 (2005)
482 STORDAL Rune NOR (41) 080479 36.63 1.47.84 7.26.85 15.32.7 163.896 (2005)
499 JANACEK Adam USA (42) 180480 38.26 1.55.29 7.03.45 14.59.92 164.031 (1983)
503 TVETER Thor Olav NOR (43) 250272 38.8 1.56.3 6.58.66 14.52.75 164.069 (1994)
509 TVERRÅEN Tarjei NOR (44) 060378 37.5 1.54.49 7.07.86 15.13.57 164.127 (2005)
533 JÄRVINEN Timo FIN (8) 081166 40.23 1.57.91 6.55.21 14.25.93 164.350 (1994)
534 MAGNUSSON Hans SWE (11) 050760 38.25 1.54.38 7.09.52 15.00.72 164.364 (1987)
559 HILLE Per Thomas NOR (45) 140772 39.8 1.57.86 6.56.9 14.36.5 164.601 (1995)
561 STORDAL Morten NOR (46) 111280 36.45 1.49.38 7.19.05 15.55.88 164.609 (2005)
585 SYVERTSEN Frode NOR (47) 140163 39.46 1.58.37 7.03.35 14.32.08 164.855 (1988)
591 BENGTSSON Claes SWE (12) 121059 38.47 1.55.16 7.11.59 14.58.38 164.934 (1988)
Forklaring til tabellen: Placering på adelskalenderen i verden – Navn – Land – (Placering på adelskalenderen i eget land) – Fødselsdato – Personlig rekord på 500 meter – Personlig rekord på
1.500 meter – Personlig rekord på 5.000 meter – Personlig rekord på 10.000 meter – Tidspoint på adelskalenderen – (Sæson for sidste personlige rekord). At der står år 2005 for Arild Nebb Ervik på den 152. plads er, fordi han har sat personlig rekord i 2004/2005-sæsonen, som formelt er fra og med den 1. juli 2004 til og med den 30. juni 2005.
Udvikling i toppen af adelskalenderen
Tabellen viser lederen af adelskalenderen ved slutningen af alle sæsoner fra 1893 til 2005:
År Navn Land Født 500m 1500m 5.000m 10.000m poeng
1893: ERICSSON Rudolf SWE 061172 50.2 2.41.6 9.15.8 19.42.6 218.776
1894: EDEN Jaap NED 191073 50.4 2.35.0 8.37.6 19.12.4 211.446
1895: EDEN Jaap NED 191073 48.2 2.25.4 8.37.6 17.56.0 202.226
1900: ØSTLUND Peder NOR 070572 45.2 2.22.6 8.51.8 17.50.6 199.443
1909: MATHISEN Oscar NOR 041088 45.6 2.20.8 8.40.2 18.01.8 198.643
1910: MATHISEN Oscar NOR 041088 44.8 2.20.6 8.40.2 18.01.8 197.776
1912: MATHISEN Oscar NOR 041088 44.2 2.20.6 8.40.2 17.46.3 196.401
1913: MATHISEN Oscar NOR 041088 44.0 2.20.6 8.38.6 17.22.6 194.856
1914: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.6 17.22.6 192.990
1916: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.3 17.22.6 192.960
1920: MATHISEN Oscar NOR 041088 43.3 2.17.4 8.36.3 17.22.6 192.860
1929: MATHISEN Oscar NOR 041088 43.0 2.17.4 8.36.3 17.22.6 192.560
1930: BALLANGRUD Ivar NOR 070304 43.8 2.19.1 8.21.6 17.22.6 192.456
1935: BALLANGRUD Ivar NOR 070304 43.4 2.19.1 8.21.6 17.22.6 192.056
1936: BALLANGRUD Ivar NOR 070304 43.4 2.17.4 8.17.2 17.22.6 191.050
1937: STAKSRUD Michael NOR 020608 42.8 2.14.9 8.19.9 17.23.2 189.916
1939: BALLANGRUD Ivar NOR 070304 42.7 2.14.0 8.17.2 17.14.4 188.806
1942: SEYFFARTH Åke SWE 151219 43.2 2.14.2 8.13.7 17.07.5 188.678
1952: ANDERSEN Hjalmar NOR 120323 43.7 2.16.4 8.07.3 16.32.6 187.526
1954: MAMONOV Nikolaj URS ....23 42.2 2.17.4 8.03.7 16.52.2 186.980
1955: SJILKOV Boris URS 280627 42.8 2.10.4 7.45.6 16.50.2 183.336
1959: JÄRVINEN Juhanni FIN 090535 41.2 2.06.3 8.11.1 16.47.2 182.770
1960: JOHANNESEN Knut NOR 061133 42.3 2.12.2 7.53.1 15.46.6 181.006
1963: NILSSON Jonny SWE 090243 43.0 2.10.1 7.34.3 15.33.0 178.446
1964: MOE Per Ivar NOR 111144 41.6 2.09.5 7.38.6 15.47.8 178.016
1965: MATUSEVITSJ Eduard URS 161137 41.0 2.07.3 7.35.1 16.06.2 177.253
1966: SCHENK Ard NED 160944 41.0 2.05.3 7.35.2 16.02.8 176.426
1967: VERKERK Kees NED 281042 42.0 2.03.9 7.26.6 15.35.2 174.720
1968: VERKERK Kees NED 281042 40.4 2.02.6 7.19.9 15.28.7 171.691
1969: VERKERK Kees NED 281042 40.4 2.02.0 7.13.2 15.03.6 169.566
1970: VERKERK Kees NED 281042 40.4 2.01.9 7.13.2 15.03.6 169.533
1971: SCHENK Ard NED 160944 38.9 1.58.7 7.12.0 14.55.9 166.461
1972: SCHENK Ard NED 160944 38.9 1.58.7 7.09.8 14.55.9 166.241
1976: van HELDEN Hans NED 270448 39.03 1.55.61 7.07.82 14.59.09 165.302
1977: MARTSJUK Sergej URS 130452 38.45 1.56.4 6.58.88 14.39.56 163.116
1978: BELOV Vladimir URS 090454 37.90 1.56.70 6.59.8 14.42.1 162.885
1979: HEIDEN Eric USA 140658 37.80 1.55.68 6.59.15 14.43.11 162.430
1980: HEIDEN Eric USA 140658 37.63 1.54.79 6.59.15 14.28.13 161.214
1983: SJASJERIN Viktor URS 230762 37.63 1.54.36 6.55.43 14.25.29 160.557
1984: SJASJERIN Viktor URS 230762 37.59 1.53.70 6.49.15 14.25.29 159.669
1987: GULJAJEV Nikolaj URS 010166 37.24 1.52.70 6.51.28 14.28.45 159.356
1988: FLAIM Eric USA 090367 36.98 1.52.12 6.47.09 14.05.57 157.340
1992: KOSS Johann Olav NOR 291068 38.17 1.52.62 6.41.73 13.43.54 157.060
1993: KOSS Johann Olav NOR 291068 38.17 1.52.53 6.36.57 13.43.54 156.514
1994: KOSS Johann Olav NOR 291068 37.98 1.51.29 6.34.96 13.30.55 155.099
1998: RITSMA Rintje NED 130470 37.17 1.47.57 6.25.55 13.28.19 151.990
1999: RITSMA Rintje NED 130470 35.90 1.47.57 6.25.55 13.28.19 150.720
2001: UYTDEHAAGE Jochem NED 090776 36.54 1.46.32 6.20.82 13.23.02 150.213
2002: UYTDEHAAGE Jochem NED 090776 36.54 1.44.57 6.14.66 12.58.92 147.808
2005: UYTDEHAAGE Jochem NED 090776 36.40 1.44.57 6.14.66 12.58.92 147.668
Noter
Hurtigløb på skøjter
|
danish
| 0.83876
|
Pony/builtin-U128-.txt
|
U128¶
[Source]
primitive val U128 is
UnsignedInteger[U128 val] val
Implements¶
UnsignedInteger[U128 val] val
Constructors¶
create¶
[Source]
new val create(
value: U128 val)
: U128 val^
Parameters¶
value: U128 val
Returns¶
U128 val^
from[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]¶
[Source]
new val from[A: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[A] val)](
a: A)
: U128 val^
Parameters¶
a: A
Returns¶
U128 val^
min_value¶
[Source]
new val min_value()
: U128 val^
Returns¶
U128 val^
max_value¶
[Source]
new val max_value()
: U128 val^
Returns¶
U128 val^
Public Functions¶
next_pow2¶
[Source]
fun box next_pow2()
: U128 val
Returns¶
U128 val
abs¶
[Source]
fun box abs()
: U128 val
Returns¶
U128 val
bit_reverse¶
[Source]
fun box bit_reverse()
: U128 val
Returns¶
U128 val
bswap¶
[Source]
fun box bswap()
: U128 val
Returns¶
U128 val
popcount¶
[Source]
fun box popcount()
: U128 val
Returns¶
U128 val
clz¶
[Source]
fun box clz()
: U128 val
Returns¶
U128 val
ctz¶
[Source]
fun box ctz()
: U128 val
Returns¶
U128 val
clz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box clz_unsafe()
: U128 val
Returns¶
U128 val
ctz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box ctz_unsafe()
: U128 val
Returns¶
U128 val
bitwidth¶
[Source]
fun box bitwidth()
: U128 val
Returns¶
U128 val
bytewidth¶
[Source]
fun box bytewidth()
: USize val
Returns¶
USize val
min¶
[Source]
fun box min(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
max¶
[Source]
fun box max(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
mul¶
[Source]
fun box mul(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
divrem¶
[Source]
fun box divrem(
y: U128 val)
: (U128 val , U128 val)
Parameters¶
y: U128 val
Returns¶
(U128 val , U128 val)
div¶
[Source]
fun box div(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
rem¶
[Source]
fun box rem(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
mul_unsafe¶
[Source]
Unsafe operation.
If the operation overflows, the result is undefined.
fun box mul_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
divrem_unsafe¶
[Source]
Unsafe operation.
If y is 0, the result is undefined.
If the operation overflows, the result is undefined.
fun box divrem_unsafe(
y: U128 val)
: (U128 val , U128 val)
Parameters¶
y: U128 val
Returns¶
(U128 val , U128 val)
div_unsafe¶
[Source]
Unsafe operation.
If y is 0, the result is undefined.
If the operation overflows, the result is undefined.
fun box div_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
rem_unsafe¶
[Source]
Unsafe operation.
If y is 0, the result is undefined.
If the operation overflows, the result is undefined.
fun box rem_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
f32_unsafe¶
[Source]
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
addc¶
[Source]
fun box addc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
subc¶
[Source]
fun box subc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
mulc¶
[Source]
fun box mulc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
divc¶
[Source]
fun box divc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
remc¶
[Source]
fun box remc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
add_partial¶
[Source]
fun box add_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
sub_partial¶
[Source]
fun box sub_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
mul_partial¶
[Source]
fun box mul_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
div_partial¶
[Source]
fun box div_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
rem_partial¶
[Source]
fun box rem_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
divrem_partial¶
[Source]
fun box divrem_partial(
y: U128 val)
: (U128 val , U128 val) ?
Parameters¶
y: U128 val
Returns¶
(U128 val , U128 val) ?
shl¶
[Source]
fun box shl(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
shr¶
[Source]
fun box shr(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
fld¶
[Source]
fun box fld(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
fldc¶
[Source]
fun box fldc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
fld_partial¶
[Source]
fun box fld_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
mod¶
[Source]
fun box mod(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
modc¶
[Source]
fun box modc(
y: U128 val)
: (U128 val , Bool val)
Parameters¶
y: U128 val
Returns¶
(U128 val , Bool val)
mod_partial¶
[Source]
fun box mod_partial(
y: U128 val)
: U128 val ?
Parameters¶
y: U128 val
Returns¶
U128 val ?
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
shl_unsafe¶
[Source]
fun box shl_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
shr_unsafe¶
[Source]
fun box shr_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
rotl¶
[Source]
fun box rotl(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
rotr¶
[Source]
fun box rotr(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
add_unsafe¶
[Source]
fun box add_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
sub_unsafe¶
[Source]
fun box sub_unsafe(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
neg_unsafe¶
[Source]
fun box neg_unsafe()
: U128 val
Returns¶
U128 val
op_and¶
[Source]
fun box op_and(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
op_or¶
[Source]
fun box op_or(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
op_xor¶
[Source]
fun box op_xor(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
op_not¶
[Source]
fun box op_not()
: U128 val
Returns¶
U128 val
add¶
[Source]
fun box add(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
sub¶
[Source]
fun box sub(
y: U128 val)
: U128 val
Parameters¶
y: U128 val
Returns¶
U128 val
neg¶
[Source]
fun box neg()
: U128 val
Returns¶
U128 val
eq¶
[Source]
fun box eq(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
le¶
[Source]
fun box le(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: U128 val)
: Bool val
Parameters¶
y: U128 val
Returns¶
Bool val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
compare¶
[Source]
fun box compare(
that: U128 val)
: (Less val | Equal val | Greater val)
Parameters¶
that: U128 val
Returns¶
(Less val | Equal val | Greater val)
|
pony
|
689585
|
https://no.wikipedia.org/wiki/UFC%2064
|
UFC 64
|
UFC 64: Unstoppable var et MMA-arrangement i regi av UFC i Las Vegas, Nevada, USA 14. oktober 2006. Hovedkampen var en tittelkamp i mellomvekt mellom tittelholder Rich Franklin og Anderson Silva som det var forventet mye av. Silva gjorde sin UFC debut kun måneder tidligere da han vant over Chris Leben under UFC Ultimate Fight Night 5. Arrangementet inneholdt også en kamp mellom Shean Sherk og Kenny Florian om den ledige lettvekt tittelen som ikke hadde vært tatt i bruk siden Jens Pulver forlot UFC i mars 2002. UFC holdt en firemanns turnering som endte i en finale mellom BJ Penn og Caol Uno. Dette ble uavgjort og i lys av dette suspenderte så UFC sin lettvekt divisjon.
Resultater
Innledende kamper
Lettvekt: Kurt Pellegrino vs. Junior Assuncao
Pellegrino vant med submission (rear naked choke) 2:04 i 1. runde.
Lettvekt: Clay Guida vs. Justin James
Guida vant med submission (rear naked choke) 4:42 i 2. runde. Denne innledende kampen ble vist under direktesendingen.
Mellomvekt: Yushin Okami vs. Kalib Starnes
Okami vant med TKO (slag) 1:40 i 3. runde.
Main card
Lettvekt: Spencer Fisher vs. Dan Lauzon
Fisher vant med TKO (slag) 4:38 i 1. runde.
Tungvekt: Carmelo Marrero vs. Cheick Kongo
Marrero vant med delt avgjørelse. (29-28, 28-29, 29-28)
Weltervekt: Jon Fitch vs. Kuniyoshi Hironaka
Fitch vant med enstemmig avgjørelse. (30-27, 30-27, 30-25)
Lettvekt tittelkamp: Sean Sherk vs. Kenny Florian
Sherk vant med enstemmig avgjørelse og tok den ledige UFC lettvekt tittelen. (49-46, 49-46, 50-45) Sherk ble den andre UFC lettvekt tittelholderen i historien og den første siden 2002 som holdt tittelen.
Mellomvekt tittelkamp: Rich Franklin (c) vs. Anderson Silva
Silva vant med TKO (slag) 2:59 i 1. runde og ble den nye UFC mellomvekt tittelholderen.
UFC-arrangementer
Sport i 2006
Sportsarrangementer i USA
Sport i Nevada
Las Vegas
|
norwegian_bokmål
| 1.212554
|
Pony/src-pony_check-property_runner-.txt
|
property_runner.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452use "debug"
use "collections"
class val _Shrink is Equatable[_Round]
"""
An execution of a property during the shrinking process.
"""
let _round: USize
new val create(round': USize) =>
_round = round'
fun round(): USize => _round
fun inc(): _Round =>
_Shrink.create(this._round + 1)
fun eq(other: box->_Round): Bool =>
match other
| let s: _Shrink => s._round == this._round
else
false
end
fun string(): String iso^ =>
("shrink(" + this._round.string() + ")").string()
class val _Run is Equatable[_Round]
"""
An execution of a property during test mode. i.e. normal execution
to find a sample for which the property does not hold.
"""
let _round: USize
new val create(round': USize) =>
_round = round'
fun round(): USize => _round
fun inc(): _Round =>
_Run.create(this._round + 1)
fun eq(other: box->_Round): Bool =>
match other
| let s: _Run => s._round == this._round
else
false
end
fun string(): String iso^ =>
("run(" + this._round.string() + ")").string()
type _Round is (_Shrink | _Run)
"""Represents a single execution of a property."""
interface val PropertyLogger
fun log(msg: String, verbose: Bool = false)
interface val PropertyResultNotify
fun fail(msg: String)
"""
Called when a Property has failed (did not hold for a sample)
or when execution raised an error.
Does not necessarily denote completeness of the property execution,
see `complete(success: Bool)` for that purpose.
"""
fun complete(success: Bool)
"""
Called when the Property execution is complete
signalling whether it was successful or not.
"""
actor PropertyRunner[T]
"""
Actor executing a Property1 implementation
in a way that allows garbage collection between single
property executions, because it uses recursive behaviours
for looping.
"""
let _prop1: Property1[T]
let _params: PropertyParams
let _rnd: Randomness
let _notify: PropertyResultNotify
let _gen: Generator[T]
let _logger: PropertyLogger
let _env: Env
// state changed during runtime
var _current_round: _Round = _Run.create(0)
"""
The number and kind of the round currently executed.
Keep track of which runs/shrinks we expect to be notified about.
"""
let _expected_actions: Set[String] = Set[String]
"""
List of expected actions for this round.
Will be cleared after each round.
"""
let _disposables: Array[DisposableActor] = Array[DisposableActor]
"""
Disosable actors that are disposed of after every round.
"""
var _shrinker: Iterator[T^] = _EmptyIterator[T^]
var _sample_repr: String = ""
var _pass: Bool = true
new create(
p1: Property1[T] iso,
params: PropertyParams,
notify: PropertyResultNotify,
logger: PropertyLogger,
env: Env
) =>
_env = env
_prop1 = consume p1
_params = params
_logger = logger
_notify = notify
_rnd = Randomness(_params.seed)
_gen = _prop1.gen()
// RUNNING PROPERTIES //
be complete_run(round: _Round, success: Bool) =>
"""
Complete a property run.
This behaviour is called from the PropertyHelper
or from the actor itself.
"""
// verify that this is an expected call
if this._current_round != round then
_logger.log("unexpected " + if success then "finish" else "fail" end + " msg for " + round.string() +
". expecting " + this._current_round.string(), true)
return
end
_pass = success // in case of sync property - signal failure
if not success then
// found a bad example, try to shrink it
if not _shrinker.has_next() then
_logger.log("no shrinks available")
fail(_sample_repr, 0)
else
// prepare next round
_prepare_next_round()
// set rounds to shrinking
this._current_round = _Shrink.create(0) // reset rounds for shrinking
// start shrinking process
do_shrink(_sample_repr)
end
else
// property holds, recurse
_prepare_next_round()
run()
end
fun ref _prepare_next_round() =>
this._current_round = this._current_round.inc()
this._expected_actions.clear()
for disposable in Poperator[DisposableActor](this._disposables) do
disposable.dispose()
end
fun ref _generate_with_retry(max_retries: USize): ValueAndShrink[T] ? =>
var tries: USize = 0
repeat
try
return _gen.generate_and_shrink(_rnd)?
else
tries = tries + 1
end
until (tries > max_retries) end
error
be run() =>
if this._current_round.round() >= _params.num_samples then
complete() // all samples have been successful
return
end
// prepare property run
(var sample, _shrinker) =
try
_generate_with_retry(_params.max_generator_retries)?
else
// break out if we were not able to generate a sample
_notify.fail(
"Unable to generate samples from the given iterator, tried " +
_params.max_generator_retries.string() + " times." +
" (round: " + this._current_round.string() + ")")
_notify.complete(false)
return
end
// create a string representation before consuming ``sample`` with property
(sample, _sample_repr) = _Stringify.apply[T](consume sample)
let run_notify = recover val this~complete_run() end
let helper = PropertyHelper(_env, this, run_notify, this._current_round, _params.string())
_pass = true // will be set to false by fail calls
try
_prop1.property(consume sample, helper)?
else
fail(_sample_repr, 0 where err=true)
return
end
// dispatch to another behavior
// as complete_run might have set _pass already through a call to
// complete_run
_run_finished(this._current_round)
be _run_finished(round: _Round) =>
if not _params.async and _pass then
// otherwise complete_run has already been called
complete_run(round, true)
end
// SHRINKING //
be complete_shrink(failed_repr: String, last_repr: String, shrink_round: _Round, success: Bool) =>
// verify that this is an expected call
if this._current_round != shrink_round then
_logger.log("unexpected " + if success then "complete" else "fail" end + " msg for " + shrink_round.string() +
". Currently at " + _current_round.string(), true)
return
end
_pass = success // in case of sync property - signal failure
if success then
// we have a sample that did not fail and thus can stop shrinking
fail(failed_repr, shrink_round.round())
else
// we have a failing shrink sample, recurse
_prepare_next_round()
do_shrink(last_repr)
end
be do_shrink(failed_repr: String) =>
// shrink iters can be infinite, so we need to limit
// the examples we consider during shrinking
let round_num = this._current_round.round()
if round_num == _params.max_shrink_rounds then
fail(failed_repr, round_num)
return
end
(let shrink, let current_repr) =
try
_Stringify.apply[T](_shrinker.next()?)
else
// no more shrink samples, report previous failed example
fail(failed_repr, round_num)
return
end
// callback for asynchronous shrinking or aborting on error case
let run_notify =
recover val
this~complete_shrink(failed_repr, current_repr)
end
let helper = PropertyHelper(
_env,
this,
run_notify,
this._current_round,
_params.string()
)
_pass = true // will be set to false by fail calls
try
_prop1.property(consume shrink, helper)?
else
fail(current_repr, round_num where err=true)
return
end
// dispatch to another behaviour
// to ensure _complete_shrink has been called already
_shrink_finished(failed_repr, current_repr, this._current_round)
be _shrink_finished(
failed_repr: String,
current_repr: String,
shrink_round: _Round)
=>
if not _params.async and _pass then
// directly complete the shrink run
complete_shrink(failed_repr, current_repr, shrink_round, true)
end
// interface towards PropertyHelper
be expect_action(name: String, round: _Round) =>
if round != this._current_round then
_logger.log("unexpected expect action \"" + name + "\" call for " + round.string() +
". Currently at " + this._current_round.string(), true)
return
end
_logger.log("Action expected: " + name)
_expected_actions.set(name)
be complete_action(name: String, round: _Round, ph: PropertyHelper) =>
if round != this._current_round then
_logger.log("unexpected complete action \"" + name + "\" msg for " + round.string() +
". Currently at " + this._current_round.string(), true)
return
end
_logger.log("Action completed: " + name)
_finish_action(name, true, round, ph)
be fail_action(name: String, round: _Round, ph: PropertyHelper) =>
if round != this._current_round then
_logger.log("unexpected fail action \"" + name + "\" msg for " + round.string() +
". Currently at " + this._current_round.string(), true)
return
end
_logger.log("Action failed: " + name)
_finish_action(name, false, round, ph)
fun ref _finish_action(name: String, success: Bool, round: _Round, ph: PropertyHelper) =>
try
_expected_actions.extract(name)?
// call back into the helper to invoke the current run_notify
// that we don't have access to otherwise
if not success then
ph.complete(false)
elseif _expected_actions.size() == 0 then
ph.complete(true)
end
else
_logger.log("Action '" + name + "' finished unexpectedly at " + round.string() + ". ignoring.")
end
be dispose_when_done(disposable: DisposableActor, round: _Round) =>
"""
Let us not have older rounds interfere with newer ones,
thus dispose directly.
"""
if round != this._current_round then
_logger.log("Unexpected dispose_when_done for " + round.string() +
". Currently at " + this._current_round.string(), true)
_logger.log("Disposing right now...", true)
disposable.dispose()
return
end
_disposables.push(disposable)
be dispose() =>
_dispose()
fun ref _dispose() =>
for disposable in Poperator[DisposableActor](_disposables) do
disposable.dispose()
end
be log(msg: String, verbose: Bool = false) =>
_logger.log(msg, verbose)
// end interface towards PropertyHelper
fun ref complete() =>
"""
Complete the Property execution successfully.
"""
_notify.complete(true)
fun ref fail(repr: String, rounds: USize = 0, err: Bool = false) =>
"""
Complete the Property execution
while signalling failure to the `PropertyResultNotify`.
"""
if err then
_report_error(repr, rounds)
else
_report_failed(repr, rounds)
end
_notify.complete(false)
fun _report_error(sample_repr: String,
shrink_rounds: USize = 0,
loc: SourceLoc = __loc) =>
"""
Report an error that happened during property evaluation
and signal failure to the `PropertyResultNotify`.
"""
_notify.fail(
"Property errored for sample "
+ sample_repr
+ " (after "
+ shrink_rounds.string()
+ " shrinks)"
)
fun _report_failed(sample_repr: String,
shrink_rounds: USize = 0,
loc: SourceLoc = __loc) =>
"""
Report a failed property and signal failure to the `PropertyResultNotify`.
"""
_notify.fail(
"Property failed for sample "
+ sample_repr
+ " (after "
+ shrink_rounds.string()
+ " shrinks)"
)
class _EmptyIterator[T]
fun ref has_next(): Bool => false
fun ref next(): T^ ? => error
primitive _Stringify
fun apply[T](t: T): (T^, String) =>
"""turn anything into a string"""
let digest = (digestof t)
let s =
match t
| let str: Stringable =>
str.string()
| let rs: ReadSeq[Stringable] =>
"[" + " ".join(rs.values()) + "]"
| (let s1: Stringable, let s2: Stringable) =>
"(" + s1.string() + ", " + s2.string() + ")"
| (let s1: Stringable, let s2: ReadSeq[Stringable]) =>
"(" + s1.string() + ", [" + " ".join(s2.values()) + "])"
| (let s1: ReadSeq[Stringable], let s2: Stringable) =>
"([" + " ".join(s1.values()) + "], " + s2.string() + ")"
| (let s1: ReadSeq[Stringable], let s2: ReadSeq[Stringable]) =>
"([" + " ".join(s1.values()) + "], [" + " ".join(s2.values()) + "])"
| (let s1: Stringable, let s2: Stringable, let s3: Stringable) =>
"(" + s1.string() + ", " + s2.string() + ", " + s3.string() + ")"
| ((let s1: Stringable, let s2: Stringable), let s3: Stringable) =>
"((" + s1.string() + ", " + s2.string() + "), " + s3.string() + ")"
| (let s1: Stringable, (let s2: Stringable, let s3: Stringable)) =>
"(" + s1.string() + ", (" + s2.string() + ", " + s3.string() + "))"
else
"<identity:" + digest.string() + ">"
end
(consume t, consume s)
|
pony
|
2084159
|
https://no.wikipedia.org/wiki/Lyrikk%C3%A5ret%201907
|
Lyrikkåret 1907
|
Lyrikkåret 1907 er en oversikt over utgivelser, hendelser, prisvinnere og avdøde personer med tilknytning til lyrikk i 1907.
Fødsler
|-
|rowspan=2|Novenber || 18. || Halldis Moren Vesaas || || lyriker, barne- og ungdomsbokforfatter,oversetter og kulturarbeider ||align=center|87 ||align=center|1995 ||
|}
Dødsfall
|-
|November ||28. || Stanisław Wyspiański || || dramatiker, dikter, maler og arkitekt ||align=center|38 ||align=center|1869 ||
|}
Referanser
|
norwegian_bokmål
| 1.433453
|
Pony/promises-Promise-.txt
|
Promise[A: Any #share]¶
[Source]
A promise to eventually produce a result of type A. This promise can either
be fulfilled or rejected.
Any number of promises can be chained after this one.
actor tag Promise[A: Any #share]
Constructors¶
create¶
[Source]
new tag create()
: Promise[A] tag^
Returns¶
Promise[A] tag^
Public Behaviours¶
apply¶
[Source]
Fulfill the promise.
be apply(
value: A)
Parameters¶
value: A
reject¶
[Source]
Reject the promise.
be reject()
Public Functions¶
next[B: Any #share]¶
[Source]
Chain a promise after this one.
When this promise is fulfilled, the result of type A is passed to the
fulfill function, generating in an intermediate result of type B. This
is then used to fulfill the next promise in the chain.
If there is no fulfill function, or if the fulfill function raises an
error, then the next promise in the chain will be rejected.
If this promise is rejected, this step's reject function is called with no
input, generating an intermediate result of type B which is used to
fulfill the next promise in the chain.
If there is no reject function, of if the reject function raises an error,
then the next promise in the chain will be rejected.
fun tag next[B: Any #share](
fulfill: Fulfill[A, B] iso,
rejected: Reject[B] iso = qualify)
: Promise[B] tag
Parameters¶
fulfill: Fulfill[A, B] iso
rejected: Reject[B] iso = qualify
Returns¶
Promise[B] tag
flatten_next[B: Any #share]¶
[Source]
Chain a promise after this one and unwrap the promise returned from this
one.
flatten_next is a companion to next. It operates in an identical
fashion except for the type of the fulfilled promise. Whereas next takes
a function that returns a type B, flatten_next takes a function that
returns Promise[B].
Why is flatten_next valuable given that next could take a B that is of
a type like Promise[String]? Let's start with some code to demonstrate the
problem that arises when returning Promise[Promise[B]] from next.
Let's say we have a library for accessing the GitHub REST API:
class GitHub
new create(personal_access_token: String)
fun get_repo(repo: String): Promise[Repository]
class Repository
fun get_issue(number: I64): Promise[Issue]
class Issue
fun title(): String
And we want to use this promise based API to look up the title of an issue.
Without flatten_next, we could attempt to do the following using next:
actor Main
new create(env: Env) =>
let repo: Promise[Repository] =
GitHub("my token").get_repo("ponylang/ponyc")
//
// do something with the repo once the promise is fulfilled
// in our case, get the issue
//
let issue = Promise[Promise[Issue]] =
repo.next[Promise[Issue]](FetchIssue~apply(1))
// once we get the issue, print the title
issue.next[None](PrintIssueTitle~apply(env.out))
primitive FetchIssue
fun apply(number: I64, repo: Repository): Promise[Issue] =>
repo.get_issue(number)
primitive PrintIssueTitle
fun apply(out: OutStream, issue: Promise[Issue]) =>
// O NO! We can't print the title
// We don't have an issue, we have a promise for an issue
Take a look at what happens in the example, when we get to
PrintIssueTitle, we can't print anything because we "don't have anything".
In order to print the issue title, we need an Issue not a
Promise[Issue].
We could solve this by doing something like this:
primitive PrintIssueTitle
fun apply(out: OutStream, issue: Promise[Issue]) =>
issue.next[None](ActuallyPrintIssueTitle~apply(out))
primitive ActuallyPrintIssueTitle
fun apply(out: OutStream, issue: Issue) =>
out.print(issue.title())
That will work, however, it is kind of awful. When looking at:
let repo: Promise[Repoository] =
GitHub("my token").get_repo("ponylang/ponyc")
let issue = Promise[Promise[Issue]] =
repo.next[Promise[Issue]](FetchIssue~apply(1))
issue.next[None](PrintIssueTitle~apply(env.out))
it can be hard to follow what is going on. We can only tell what is
happening because we gave PrintIssueTitle a very misleading name; it
doesn't print an issue title.
flatten_next addresses the problem of "we want the Issue, not the
intermediate Promise". flatten_next takes an intermediate promise and
unwraps it into the fulfilled type. You get to write your promise chain
without having to worry about intermediate promises.
Updated to use flatten_next, our API example becomes:
actor Main
new create(env: Env) =>
let repo: Promise[Repository] =
GitHub("my token").get_repo("ponylang/ponyc")
let issue = Promise[Issue] =
repo.flatten_next[Issue](FetchIssue~apply(1))
issue.next[None](PrintIssueTitle~apply(env.out))
primitive FetchIssue
fun apply(number: I64, repo: Repository): Promise[Issue] =>
repo.get_issue(number)
primitive PrintIssueTitle
fun apply(out: OutStream, issue: Issue) =>
out.print(issue.title())
Our promise Issue, is no longer a Promise[Promise[Issue]]. By using
flatten_next, we have a much more manageable Promise[Issue] instead.
Other than unwrapping promises for you, flatten_next otherwise acts the
same as next so all the same rules apply to fulfillment and rejection.
fun tag flatten_next[B: Any #share](
fulfill: Fulfill[A, Promise[B] tag] iso,
rejected: Reject[Promise[B] tag] iso = qualify)
: Promise[B] tag
Parameters¶
fulfill: Fulfill[A, Promise[B] tag] iso
rejected: Reject[Promise[B] tag] iso = qualify
Returns¶
Promise[B] tag
add[optional B: Any #share]¶
[Source]
Add two promises into one promise that returns the result of both when
they are fulfilled. If either of the promises is rejected then the new
promise is also rejected.
fun tag add[optional B: Any #share](
p: Promise[B] tag)
: Promise[(A , B)] tag
Parameters¶
p: Promise[B] tag
Returns¶
Promise[(A , B)] tag
join¶
[Source]
Create a promise that is fulfilled when the receiver and all promises in
the given iterator are fulfilled. If the receiver or any promise in the
sequence is rejected then the new promise is also rejected.
Join p1 and p2 with an existing promise, p3.
use "promises"
actor Main
new create(env: Env) =>
let p1 = Promise[String val]
let p2 = Promise[String val]
let p3 = Promise[String val]
p3.join([p1; p2].values())
.next[None]({(a: Array[String val] val) =>
for s in a.values() do
env.out.print(s)
end
})
p2("second")
p3("third")
p1("first")
fun tag join(
ps: Iterator[Promise[A] tag] ref)
: Promise[Array[A] val] tag
Parameters¶
ps: Iterator[Promise[A] tag] ref
Returns¶
Promise[Array[A] val] tag
select¶
[Source]
Return a promise that is fulfilled when either promise is fulfilled,
resulting in a tuple of its value and the other promise.
fun tag select(
p: Promise[A] tag)
: Promise[(A , Promise[A] tag)] tag
Parameters¶
p: Promise[A] tag
Returns¶
Promise[(A , Promise[A] tag)] tag
timeout¶
[Source]
Reject the promise after the given expiration in nanoseconds.
fun tag timeout(
expiration: U64 val)
: None val
Parameters¶
expiration: U64 val
Returns¶
None val
|
pony
|
2941380
|
https://sv.wikipedia.org/wiki/Problepsis%20similinotata
|
Problepsis similinotata
|
Problepsis similinotata är en fjärilsart som beskrevs av Louis Beethoven Prout 1917. Problepsis similinotata ingår i släktet Problepsis och familjen mätare. Inga underarter finns listade i Catalogue of Life.
Källor
Mätare
similinotata
|
swedish
| 1.343652
|
Pony/1_hello-world.txt
|
# Hello World -- Your First Pony Program
Now that you've successfully installed the Pony compiler, let's start programming! Our first program will be a very traditional one. We're going to print "Hello, world!". First, create a directory called `helloworld`:
```bash
mkdir helloworld
cd helloworld
```
__Does the name of the directory matter?__ Yes, it does. It's the name of your program! By default when your program is compiled, the resulting executable binary will have the same name as the directory your program lives in. You can also set the name using the --bin-name or -b options on the command line.
## The code
Then, create a file in that directory called `main.pony`.
__Does the name of the file matter?__ Not to the compiler, no. Pony doesn't care about filenames other than that they end in `.pony`. But it might matter to you! By giving files good names, it can be easier to find the code you're looking for later.
In your file, put the following code:
```pony
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
```
## Compiling the program
Now compile it:
```bash
$ ponyc
Building .
Building builtin
Generating
Optimising
Writing ./helloworld.o
Linking ./helloworld
```
(If you're using Docker, you'd write something like `$ docker run -v Some_Absolute_Path/helloworld:/src/main ponylang/ponyc`, depending of course on what the absolute path to your `helloworld` directory is.)
Look at that! It built the current directory, `.`, plus the stuff that is built into Pony, `builtin`, it generated some code, optimised it, created an object file (don't worry if you don't know what that is), and linked it into an executable with whatever libraries were needed. If you're a C/C++ programmer, that will all make sense to you, otherwise, it probably won't, but that's ok, you can ignore it.
__Wait, it linked too?__ Yes. You won't need a build system (like `make`) for Pony. It handles that for you (including handling the order of dependencies when you link to C libraries, but we'll get to that later).
## Running the program
Now we can run the program:
```bash
$ ./helloworld
Hello, world!
```
Congratulations, you've written your first Pony program! Next, we'll explain what some of that code does.
|
pony
|
67307
|
https://sv.wikipedia.org/wiki/Lightweight%20Directory%20Access%20Protocol
|
Lightweight Directory Access Protocol
|
Lightweight Directory Access Protocol (LDAP) definierar ett protokoll och en datamodell för kommunikation med en katalogtjänst. LDAP skapades av Tim Howes, Steve Kille och Wengyik Yeong.
Översikt
LDAP används för att utföra snabba och effektiva sökningar på katalogservrar. Standarden, som LDAP baseras på (X.500), använder OSI-modellen som protokoll-modell medan LDAP använder TCP/IP. Innan LDAP-servrar började komma, använde LDAP-klienter en LDAP-gateway, som gjorde om LDAP-trafiken till X.500-trafik. Protokollet X.500 har dock förändrats och kan nu användas direkt över TCP/IP. X.500 använder Directory Access Protocol (DAP) för att komma åt X.500-katalogtjänster. LDAP var till en början ett lättviktigt alternativ för att ge åtkomst till X.500-katalogtjänster, men har på senare tid expanderat och blivit lika komplex som X.500.
En klient kopplar upp mot en LDAP-server via TCP-porten 389 (standard). Ett alternativ för att få säker anslutning är att koppla upp via en SSL-tunnel (port 636). Detta sätt utfasades i.o.m. att LDAPv2 officiellt gick i pension (2003). Det nya sättet är att använda LDAPv3 Transport Layer Security (TLS) (operationen Start TLS). Klienten skickar förfrågningarna till servern asynkront medan servern skickar sina svar i turordning.
Dessa operationer kan en klient göra förfrågningar om:
Start TLS - använder LDAPv3 Transport Layer Security (TLS) för en säker anslutning
Bind - autentisera och specificera LDAP-protokollversion
Search - söka och/eller hämta katalogposter
Compare - testa om en angiven post innehåller ett visst värde
Add - lägg till en ny post
Delete - ta bort en post
Modify - ändra i en post
Modify Distinguished Name (DN) - flytta eller byt namn på en post
Abandon - avbryt en tidigare förfrågan
Extended Operation - generiska operationer används för att definiera andra operationer
Unbind - stäng ner anslutningen (har inget med 'Bind' att göra)
Servern skickar svar på dessa förfrågningar men kan också skicka ett "Unsolicited Notifications". Meddelandet är inte ett svar på en förfrågan utan skickas till exempel innan anslutningen gör timeout.
Katalogstruktur
Protokollet ger åtkomst till LDAP-kataloger (även X.500-kataloger):
En katalog är en DIT (Directory Information Tree), uppbyggt av katalogobjekt
Ett katalogobjekt består av ett antal attribut (en mängd)
Varje attribut har ett namn och ett eller flera värden
Om ett attribut saknar värde så finns inte attributet överhuvudtaget för objektet
Varje katalogobjekt har en unik identifierare (Distinguished Name - DN)
(Kataloguppgifter kan byta katalog. För att tillförlitligt kunna identifiera uppgifterna, kan en UUID användas)
Exempel från LDAP (på engelska), som representeras i LDAP Data Interchange Format (LDIF):
dn: cn=John Doe,dc=example,dc=com
cn: John Doe
givenName: John
sn: Doe
telephoneNumber: +1 888 555 6789
telephoneNumber: +1 888 555 1232
mail: [email protected]
manager: cn=Barbara Doe,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
dn avser namnet på kataloguppgiften och är inte ett attribut.
cn=John Doe är uppgiftens RDN
dc=example, dc=com är föräldrarnas DN
Attributen består av namn som är lätta att förstå. Till exempel dn står för Distinguished Name (unikt namn), mail står för e-mail och sn står för surname (efternamn).
Operationer
När klienten skickar en förfrågan, skickas ett meddelandeid med som servern skickar med tillbaka. Servern skickar även med en resultatkod som indikerar om det gått bra, blivit något fel eller något annat specialfall inträffat.
StartTLS
Operationen StartTLS upprättar en säker anslutning via TLS-protokollet. Detta erbjuder datasekretess och/eller dataintegritet.
Bind (autentisera)
Servern autentiserar klienten med operationen Bind. Anslutningen bör vara skyddad med TLS, då det finns enkla autentiseringar som skickar DN och lösenord i klartext. Förutom autentisering sätts LDAP-protokollversionen.
Operationen Bind måste vara först i sessionen om LDAPv2 används. Detta behövs inte i LDAPv3.
Search and Compare
Operationerna sök och jämför används för att söka och läsa poster.
baseObject:
Den DN (Distinguished Name) där sökningen ska starta.
scope:
BaseObject (sök bara efter namngivna posten), singleLevel (poster direkt under roten DN), eller wholeSubtree (hela subträdet med början vid roten DN).
filter:
Hur varje post ska undersökas.
derefAliases:
Om och hur aliasposter ska följas (poster som hänvisar till andra poster).
attributes:
Vilka attribut som ska skickas tillbaka i resultatposterna.
sizeLimit, timeLimit:
Maximala antalet poster och maximala söktiden.
typesOnly:
Skicka tillbaka attributtyperna, inte deras värden
Update Data
Till denna parameter hör Lägg till (add), Ta bort (delete) och Ändra (modify). För att kunna utföra dessa operationer så måste DN vara specificerat.
Extended operations
Denna operation används för definiera nya operationer. Hit hör Cancel, Password, Modify och StartTLS.
Abandon
Operationen skickas tillsammans med ett meddelande-id. Servern avbryter operationen (som har meddelande-id), om den vill. Abandon skickar inget svar tillbaka. Operationen Cancel har definierats att göra samma sak som Abandon och även skicka tillbaka ett svar.
Unbind
Används för att stänga ner en anslutning. Inget svar skickas tillbaka.
Användning
LDAP används inom bl.a. tre områden av program:
För slutanvändare: E-postklienter (till exempel Outlook, Thunderbird)
För specialister/administratörer: Försäljarspecifika verktyg/program (till exempel JXplorer)
Serverprodukter: Mail-servrar, webbservrar (till exempel Apache James, Apache HTTP Server)
Referenser
Externa länkar
RFC2251 - Protokollspecifikation för LDAP.
LDAP Wiki
Internetprotokoll
|
swedish
| 0.718031
|
Pony/files-FileMode-.txt
|
FileMode¶
[Source]
This stores a UNIX-style mode broken out into a Bool for each bit. For other
operating systems, the mapping will be approximate. For example, on Windows,
if the file is readable all the read Bools will be set, and if the file is
writeable, all the write Bools will be set.
The default mode is read/write for the owner, read-only for everyone else.
class ref FileMode
Constructors¶
create¶
[Source]
new iso create()
: FileMode iso^
Returns¶
FileMode iso^
Public fields¶
var setuid: Bool val¶
[Source]
true if the SETUID bit is set.
var setgid: Bool val¶
[Source]
true if the SETGID bit is set.
var sticky: Bool val¶
[Source]
true if the sticky bit is set.
var owner_read: Bool val¶
[Source]
true if the owning user can read the file.
var owner_write: Bool val¶
[Source]
true if the owning user can write to the file.
var owner_exec: Bool val¶
[Source]
true if the owning user can execute the file.
var group_read: Bool val¶
[Source]
true if members of the owning group can read the file.
var group_write: Bool val¶
[Source]
true if members of the owning group can write to the file.
var group_exec: Bool val¶
[Source]
true if members of the owning group can execute the file.
var any_read: Bool val¶
[Source]
true if every user can read the file.
var any_write: Bool val¶
[Source]
true if every user can write to the file.
var any_exec: Bool val¶
[Source]
`true if every user can execute the file.
Public Functions¶
exec¶
[Source]
Set the executable flag for everyone.
fun ref exec()
: None val
Returns¶
None val
shared¶
[Source]
Set the write flag for everyone to the same as owner_write.
fun ref shared()
: None val
Returns¶
None val
group¶
[Source]
Clear all of the any-user flags.
fun ref group()
: None val
Returns¶
None val
private¶
[Source]
Clear all of the group and any-user flags.
fun ref private()
: None val
Returns¶
None val
u32¶
[Source]
Get the OS specific integer for a file mode. On Windows, if any read flag
is set, the path is made readable, and if any write flag is set, the path
is made writeable.
fun box u32()
: U32 val
Returns¶
U32 val
|
pony
|
117735
|
https://da.wikipedia.org/wiki/NDoc
|
NDoc
|
NDoc er et dokumentationsværktøj rettet mod .NET-udviklingsplatformen. NDoc fungerer i høj grad som JavaDoc gør for Java. NDoc muliggør dokumentation for udviklere imellem, og benyttes derfor primært til at give en stringent specifikation af en mængde kodes funktionalitet og grænseflade. NDoc benytter eksterne XML filer som input og sammenholder disse med oversatte assemblies for at give et fuldstændigt billede af den udviklede kode. Opdelingen af kode og dokumentation gør det muligt at skrive (eller flot gennemlæse) dokumentation uden mulighed for at indføre fejl i selve kildekoden. Endvidere er det muligt at skrive, redigere og klargøre dokumentation i forskellige formater uden at skulle oversætte kildekoden på ny.
Brug af værktøjet
NDoc scanner en eller flere .NET assemblies via reflection for at finde informationer som klasser, namespaces etc. Disse informationer sammenholdes med selve dokumentationen som bliver gemt i et specielt XML format. NDoc giver brugeren mulighed for at skjule informationer i dokumentationen selvom de er blevet dokumenterede af en programmør. Derved er det muligt for f.eks. et firma at vedligeholde en fuldstændig dokumentation til intern brug og dele en mere begrænset version til eventuelle kunder og samarbejdspartnere.
XML format
Dette er ikke en fuldstændig gennemgang af de dokumentationsmuligheder NDoc giver, men blot en kort introduktion til tankegangen bag. Følgende er et eksempel på dokumentation i C#, det er dog også muligt at benytte NDoc i andre .NET sprog.
/// <summary>Min klasse.. Printer Hello Wiki</summary>
/// <remarks>Jeg har ingen bemærkninger</remarks>
class MinKlasse {
/// <param name="args">Argument til main. Bliver dog ikke brugt til noget</param>
/// <returns>Et tal der altid er 1</returns>
public static int Main(string[] args) {
System.Console.WriteLine("Hello Wiki");
return 1;
}
}
Som det fremgår af eksemplet benyttes /// til at markere at linje skal læses af NDoc. Det er også muligt at holde selve dokumentationen ude af kildekoden ved at lave eksterne referencer:
/// <include file='mydoc.xml' path='Dokumentation/Klasser[@name="MinKlasse"]/*' />
class MinKlasse {
public static int Main(string[] args) {
System.Console.WriteLine("Hello Wiki");
return 1;
}
}
Med en dertilhørerende dokumentations xml fil:
Min klasse.. Printer Hello Wiki
Jeg har ingen bemærkninger
Generering af XML filer
Idet kommentarer i koden bliver fjernet under oversættelse til assemblies er det nødvendigt at hente alle NDoc linjerne fra kildekoden ud i en ekstern xml fil ved eller før kildekoden bliver oversat. Dette kan gøres ved out'' parameteren på Microsoft C# oversætter eller ved brug af VBCommenter for VB.NET. Rettelser til dokumentation bør ikke foretages i den genererede XML fil da disse vil blive overskrevet ved næste oversættelse af kildekoden.
Generering af dokumentation
Det er muligt både at benytte NDoc på kommandolinjen og som en grafisk klient. For større projekter vil det ofte være praktisk at automatisere dokumentationen ved brug af NDoc via kommandolinjen. Visse output formater (se næste afsnit) kræver specielle andre programmer som skal hentes og installeres.
Output formater
NDoc kan generere dokumentationen i flere forskellige formater:
JavaDoc: JavaDoc er Suns dokumentationsmetode og består af et frameset i HTML.
LaTeX: Generering af Latex, der derefter kan oversættes til DVI, postscript eller PDF.
LinearHTML: Simpel HTML struktur.
MSDN:
MSDN 2003:
VS.NET 2003:
XML''':
Eksterne links
NDoc Code Documentation Generator for .NET
Udviklingsværktøjer
Windows-software
|
danish
| 0.913861
|
Pony/builtin-UnsignedInteger-.txt
|
UnsignedInteger[A: UnsignedInteger[A] val]¶
[Source]
trait val UnsignedInteger[A: UnsignedInteger[A] val] is
Integer[A] val
Implements¶
Integer[A] val
Constructors¶
create¶
[Source]
new val create(
value: A)
: Real[A] val^
Parameters¶
value: A
Returns¶
Real[A] val^
from[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]¶
[Source]
new val from[B: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[B] val)](
a: B)
: Real[A] val^
Parameters¶
a: B
Returns¶
Real[A] val^
min_value¶
[Source]
new val min_value()
: Real[A] val^
Returns¶
Real[A] val^
max_value¶
[Source]
new val max_value()
: Real[A] val^
Returns¶
Real[A] val^
Public Functions¶
abs¶
[Source]
fun box abs()
: A
Returns¶
A
shl¶
[Source]
fun box shl(
y: A)
: A
Parameters¶
y: A
Returns¶
A
shr¶
[Source]
fun box shr(
y: A)
: A
Parameters¶
y: A
Returns¶
A
fld¶
[Source]
fun box fld(
y: A)
: A
Parameters¶
y: A
Returns¶
A
fldc¶
[Source]
fun box fldc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
fld_partial¶
[Source]
fun box fld_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
mod¶
[Source]
fun box mod(
y: A)
: A
Parameters¶
y: A
Returns¶
A
modc¶
[Source]
fun box modc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
mod_partial¶
[Source]
fun box mod_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
shl_unsafe¶
[Source]
Unsafe operation.
If non-zero bits are shifted-out, the result is undefined.
fun box shl_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
shr_unsafe¶
[Source]
Unsafe operation.
If non-zero bits are shifted-out, the result is undefined.
fun box shr_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
rotl¶
[Source]
fun box rotl(
y: A)
: A
Parameters¶
y: A
Returns¶
A
rotr¶
[Source]
fun box rotr(
y: A)
: A
Parameters¶
y: A
Returns¶
A
popcount¶
[Source]
fun box popcount()
: A
Returns¶
A
clz¶
[Source]
fun box clz()
: A
Returns¶
A
ctz¶
[Source]
fun box ctz()
: A
Returns¶
A
clz_unsafe¶
[Source]
Count leading zeroes.
Unsafe operation.
If this is 0, the result is undefined.
fun box clz_unsafe()
: A
Returns¶
A
ctz_unsafe¶
[Source]
Count trailing zeroes.
Unsafe operation.
If this is 0, the result is undefined.
fun box ctz_unsafe()
: A
Returns¶
A
bitwidth¶
[Source]
fun box bitwidth()
: A
Returns¶
A
bytewidth¶
[Source]
fun box bytewidth()
: USize val
Returns¶
USize val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
add_unsafe¶
[Source]
fun box add_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
sub_unsafe¶
[Source]
fun box sub_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
mul_unsafe¶
[Source]
fun box mul_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
div_unsafe¶
[Source]
fun box div_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
divrem_unsafe¶
[Source]
fun box divrem_unsafe(
y: A)
: (A , A)
Parameters¶
y: A
Returns¶
(A , A)
rem_unsafe¶
[Source]
fun box rem_unsafe(
y: A)
: A
Parameters¶
y: A
Returns¶
A
add_partial¶
[Source]
fun box add_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
sub_partial¶
[Source]
fun box sub_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
mul_partial¶
[Source]
fun box mul_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
div_partial¶
[Source]
fun box div_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
rem_partial¶
[Source]
fun box rem_partial(
y: A)
: A ?
Parameters¶
y: A
Returns¶
A ?
divrem_partial¶
[Source]
fun box divrem_partial(
y: A)
: (A , A) ?
Parameters¶
y: A
Returns¶
(A , A) ?
neg_unsafe¶
[Source]
fun box neg_unsafe()
: A
Returns¶
A
addc¶
[Source]
fun box addc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
subc¶
[Source]
fun box subc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
mulc¶
[Source]
fun box mulc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
divc¶
[Source]
fun box divc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
remc¶
[Source]
fun box remc(
y: A)
: (A , Bool val)
Parameters¶
y: A
Returns¶
(A , Bool val)
op_and¶
[Source]
fun box op_and(
y: A)
: A
Parameters¶
y: A
Returns¶
A
op_or¶
[Source]
fun box op_or(
y: A)
: A
Parameters¶
y: A
Returns¶
A
op_xor¶
[Source]
fun box op_xor(
y: A)
: A
Parameters¶
y: A
Returns¶
A
op_not¶
[Source]
fun box op_not()
: A
Returns¶
A
bit_reverse¶
[Source]
fun box bit_reverse()
: A
Returns¶
A
bswap¶
[Source]
fun box bswap()
: A
Returns¶
A
add¶
[Source]
fun box add(
y: A)
: A
Parameters¶
y: A
Returns¶
A
sub¶
[Source]
fun box sub(
y: A)
: A
Parameters¶
y: A
Returns¶
A
mul¶
[Source]
fun box mul(
y: A)
: A
Parameters¶
y: A
Returns¶
A
div¶
[Source]
fun box div(
y: A)
: A
Parameters¶
y: A
Returns¶
A
divrem¶
[Source]
fun box divrem(
y: A)
: (A , A)
Parameters¶
y: A
Returns¶
(A , A)
rem¶
[Source]
fun box rem(
y: A)
: A
Parameters¶
y: A
Returns¶
A
neg¶
[Source]
fun box neg()
: A
Returns¶
A
eq¶
[Source]
fun box eq(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
le¶
[Source]
fun box le(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
min¶
[Source]
fun box min(
y: A)
: A
Parameters¶
y: A
Returns¶
A
max¶
[Source]
fun box max(
y: A)
: A
Parameters¶
y: A
Returns¶
A
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
[Source]
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: box->A)
: (Less val | Equal val | Greater val)
Parameters¶
that: box->A
Returns¶
(Less val | Equal val | Greater val)
|
pony
|
3531912
|
https://sv.wikipedia.org/wiki/Aspilota%20eumandibulata
|
Aspilota eumandibulata
|
Aspilota eumandibulata är en stekelart som beskrevs av Fischer 1976. Aspilota eumandibulata ingår i släktet Aspilota och familjen bracksteklar. Inga underarter finns listade.
Källor
Bracksteklar
eumandibulata
|
swedish
| 1.283385
|
Pony/builtin-Unsigned-.txt
|
Unsigned¶
[Source]
type Unsigned is
(U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)
Type Alias For¶
(U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)
|
pony
|
228333
|
https://no.wikipedia.org/wiki/UU
|
UU
|
UU, Uu, uU og uu kan vise til
Uppsala universitet
Universell utforming
Utarmet uran
|
norwegian_bokmål
| 0.660757
|
Pony/files-FileCreate-.txt
|
FileCreate¶
[Source]
primitive val FileCreate
Constructors¶
create¶
[Source]
new val create()
: FileCreate val^
Returns¶
FileCreate val^
Public Functions¶
value¶
[Source]
fun box value()
: U32 val
Returns¶
U32 val
eq¶
[Source]
fun box eq(
that: FileCreate val)
: Bool val
Parameters¶
that: FileCreate val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileCreate val)
: Bool val
Parameters¶
that: FileCreate val
Returns¶
Bool val
|
pony
|
3312731
|
https://sv.wikipedia.org/wiki/Ogcodes%20rufoabdominalis
|
Ogcodes rufoabdominalis
|
Ogcodes rufoabdominalis är en tvåvingeart som beskrevs av Cole 1919. Ogcodes rufoabdominalis ingår i släktet Ogcodes och familjen kulflugor.
Artens utbredningsområde är Utah. Inga underarter finns listade i Catalogue of Life.
Källor
Kulflugor
rufoabdominalis
|
swedish
| 1.230649
|
Pony/pony_check-ASCIINUL-.txt
|
ASCIINUL¶
[Source]
primitive val ASCIINUL
Constructors¶
create¶
[Source]
new val create()
: ASCIINUL val^
Returns¶
ASCIINUL val^
Public Functions¶
apply¶
[Source]
fun box apply()
: String val
Returns¶
String val
eq¶
[Source]
fun box eq(
that: ASCIINUL val)
: Bool val
Parameters¶
that: ASCIINUL val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ASCIINUL val)
: Bool val
Parameters¶
that: ASCIINUL val
Returns¶
Bool val
|
pony
|
2478571
|
https://sv.wikipedia.org/wiki/Vuill.%20%28auktor%29
|
Vuill. (auktor)
|
Vuill. kan som auktorsförkortning betyda:
Jean Paul Vuillemin
Paul Vuillemin
Robotskapade auktorsförkortningar
|
swedish
| 1.222193
|
Pony/pony_check-Property3UnitTest-.txt
|
Property3UnitTest[T1: T1, T2: T2, T3: T3]¶
[Source]
class iso Property3UnitTest[T1: T1, T2: T2, T3: T3] is
UnitTest ref
Implements¶
UnitTest ref
Constructors¶
create¶
[Source]
new iso create(
p3: Property3[T1, T2, T3] iso,
name': (String val | None val) = reference)
: Property3UnitTest[T1, T2, T3] iso^
Parameters¶
p3: Property3[T1, T2, T3] iso
name': (String val | None val) = reference
Returns¶
Property3UnitTest[T1, T2, T3] iso^
Public Functions¶
name¶
[Source]
fun box name()
: String val
Returns¶
String val
apply¶
[Source]
fun ref apply(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
exclusion_group¶
fun box exclusion_group()
: String val
Returns¶
String val
timed_out¶
fun ref timed_out(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
set_up¶
fun ref set_up(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
tear_down¶
fun ref tear_down(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
label¶
fun box label()
: String val
Returns¶
String val
|
pony
|
698272
|
https://no.wikipedia.org/wiki/Operation%20Hardtack
|
Operation Hardtack
|
Operation Hardtack I & II var en serie på 72 atomprøvesprengninger utført av USA i 1958. Hardtack I ble utført i Stillehavet ved Bikiniatollene Enewetakatollen og Johnston Atoll.
Hardtack II ble utført senere det samme året ved Nevada Test Site samtidig som USA utførte den hemmelige Operation Argus over det sørlige Atlanterhavet i. september. Hardtack II bestod utelukkende av atmosfæriske og underjordiske tester med lav sprengkraft, og 17 ett-punkts sikkerhetstester (designtester for å kontrollere at fisjon ikke finner sted dersom bare deler av høyeksplosivladningen detonerer).
Det faktum at USA planla stans i prøvesprengningene, gjorde at amerikanske våpenlaboratorier intensiverte den teknologiske forskningen og utprøvingen av nye designløsninger. Etter avslutningen av Hardtack II, kunngjorde USA et ensidig stans i prøvesprengningene, noe som Sovjetunionen sluttet seg til i september 1961. I september 1961 gjenopptok Sovjetunionen prøøvesprengningen, og USA fulgte etter med Operation Nougat. Hardtack var etterfølgeren til Operation Plumbbob.
Alle Hardtack I testene ble detonert fra lektere, og alle Hardtack II testene var underjordiske, med mindre annet er oppgitt:
Hardtack I prøvesprengninger
Hardtack II prøvesprengninger
Noter
Referanser
Chuck Hansen, U. S. Nuclear Weapons: The Secret History (Arlington: AeroFax 1988) ISBN 0517567407
Eksterne lenker
Operation HARDTACK Military Effects Studies Part I: Basic Effects Structures and Materiel (1958), Department of Defense dokumentarfilm, Lookout Mountain Laboratory USAF.
Operation HARDTACK Military Effects Studies Part II: Underwater Tests (1958), Department of Defense dokumentarfilm, Lookout Mountain Laboratory USAF.
Operation HARDTACK Military Effects Studies Part III: High Altitude Tests (1958), Department of Defense dokumentarfilm, Lookout Mountain Laboratory USAF.
Hardtack
USAs historie
|
norwegian_bokmål
| 1.145903
|
Pony/builtin-ArrayKeys-.txt
|
ArrayKeys[A: A, B: Array[A] #read]¶
[Source]
class ref ArrayKeys[A: A, B: Array[A] #read] is
Iterator[USize val] ref
Implements¶
Iterator[USize val] ref
Constructors¶
create¶
[Source]
new ref create(
array: B)
: ArrayKeys[A, B] ref^
Parameters¶
array: B
Returns¶
ArrayKeys[A, B] ref^
Public Functions¶
has_next¶
[Source]
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
fun ref next()
: USize val
Returns¶
USize val
|
pony
|
3354333
|
https://sv.wikipedia.org/wiki/Atylotus%20basicallus
|
Atylotus basicallus
|
Atylotus basicallus är en tvåvingeart som först beskrevs av Szilady 1926. Atylotus basicallus ingår i släktet Atylotus och familjen bromsar.
Artens utbredningsområde är Iran. Inga underarter finns listade i Catalogue of Life.
Källor
Bromsar
basicallus
|
swedish
| 1.21486
|
Pony/src-cli-env_vars-.txt
|
env_vars.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38use "collections"
primitive EnvVars
fun apply(
envs: (Array[String] box | None),
prefix: String = "",
squash: Bool = false):
Map[String, String] val
=>
"""
Turns an array of strings that look like environment variables, ie.
key=value, into a map of string to string. Can optionally filter for
keys matching a 'prefix', and will squash resulting keys to lowercase
iff 'squash' is true.
So:
`<PREFIX><KEY>=<VALUE>`
becomes:
`{KEY, VALUE}` or `{key, VALUE}`
"""
let envsmap = recover Map[String, String]() end
match envs
| let envsarr: Array[String] box =>
let prelen = prefix.size().isize()
for e in envsarr.values() do
let eqpos = try e.find("=")? else ISize.max_value() end
let ek: String val = e.substring(0, eqpos)
let ev: String val = e.substring(eqpos + 1)
if (prelen == 0) or ek.at(prefix, 0) then
if squash then
envsmap.update(ek.substring(prelen).lower(), ev)
else
envsmap.update(ek.substring(prelen), ev)
end
end
end
end
envsmap
|
pony
|
1768681
|
https://sv.wikipedia.org/wiki/Vitkransad%20spindling
|
Vitkransad spindling
|
Vitkransad spindling (Cortinarius claricolor) är en svampart som först beskrevs av Elias Fries, och fick sitt nu gällande namn av Elias Fries 1838. Vitkransad spindling ingår i släktet Cortinarius och familjen spindlingar. Arten är reproducerande i Sverige. Inga underarter finns listade i Catalogue of Life.
Källor
Spindlingar
|
swedish
| 1.355883
|
Pony/pony_check-Property4UnitTest-.txt
|
Property4UnitTest[T1: T1, T2: T2, T3: T3, T4: T4]¶
[Source]
class iso Property4UnitTest[T1: T1, T2: T2, T3: T3, T4: T4] is
UnitTest ref
Implements¶
UnitTest ref
Constructors¶
create¶
[Source]
new iso create(
p4: Property4[T1, T2, T3, T4] iso,
name': (String val | None val) = reference)
: Property4UnitTest[T1, T2, T3, T4] iso^
Parameters¶
p4: Property4[T1, T2, T3, T4] iso
name': (String val | None val) = reference
Returns¶
Property4UnitTest[T1, T2, T3, T4] iso^
Public Functions¶
name¶
[Source]
fun box name()
: String val
Returns¶
String val
apply¶
[Source]
fun ref apply(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
exclusion_group¶
fun box exclusion_group()
: String val
Returns¶
String val
timed_out¶
fun ref timed_out(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
set_up¶
fun ref set_up(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
tear_down¶
fun ref tear_down(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
label¶
fun box label()
: String val
Returns¶
String val
|
pony
|
8257062
|
https://sv.wikipedia.org/wiki/TGV%20001
|
TGV 001
|
TGV-001 (Train Grande Vitesse 001) var en höghastighetståg i Frankrike. Tåget var den första prototypen av TGV som började att testas 1972. TGV - 001 var ett experimentellt gasturbin-elektriskt lok-som byggdes av Alstom.
Experimenttåget var en del i ett stort forskningsprogram på höghastighetståg. Programmet gäller många tekniska aspekter men framför allt dragkraft, fordonsdesign, bromssystem, aerodynamik och signalering.
I början skulle två tåg byggas men bara ett producerades.
Bevarande
T 001 : Bischheim
T 002 : Belfort.
Se även
SNCF
Externa länkar
45 år av TGV
Snabbtåg
Franska motorvagnar
|
swedish
| 1.056355
|
Pony/format-FormatFix-.txt
|
FormatFix¶
[Source]
primitive val FormatFix is
FormatSpec val
Implements¶
FormatSpec val
Constructors¶
create¶
[Source]
new val create()
: FormatFix val^
Returns¶
FormatFix val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: FormatFix val)
: Bool val
Parameters¶
that: FormatFix val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FormatFix val)
: Bool val
Parameters¶
that: FormatFix val
Returns¶
Bool val
|
pony
|
1254576
|
https://sv.wikipedia.org/wiki/Utf%C3%B6rbart%20och%20l%C3%A4nkbart%20format
|
Utförbart och länkbart format
|
Körbart och länkbart format ("Executable and Linkable Format", ELF, tidigare kallat Extensible Linking Format), är ett öppet standardfilformat för körbara filer, objektkod, delade bibliotek och dump av kärnan i systemprogrammet.
Formatet ELF publicerades först i specifikationen för applikationsbinära gränssnitt i System V och senare i verktygsgränssnittsstandarden TIS. Det blev snabbt accepterat hos andra leverantörer av Unix-system. 1999 blev det valt som det standardiserade filformatet för Unix och Unixliknande system på x86 av 86open-projektet.
Till skillnad från många andra proprietära och därmed begränsade filformat, så är ELF väldigt flexibelt och utökningsbart, och det är obundet till processor eller arkitektur. Detta har möjliggjort att det blivit valt som standardformat i många olika operativsystem på många plattformar.
Filformatet används också som ett generellt objekt- och körbarhetsformat för binära kodsegment som används för inbyggda processorsystem som till exempel Atmels AVR-serie.
Referenser
Filformat
|
swedish
| 0.784608
|
Pony/src-builtin-disposable_actor-.txt
|
disposable_actor.pony
1
2
3
4
5interface tag DisposableActor
"""
An interface used to asynchronously dispose of an actor.
"""
be dispose()
|
pony
|
3689778
|
https://sv.wikipedia.org/wiki/Apoderus
|
Apoderus
|
Apoderus är ett släkte av skalbaggar som beskrevs av Olivier 1807. Apoderus ingår i familjen rullvivlar.
Dottertaxa till Apoderus, i alfabetisk ordning
Apoderus abdominalis
Apoderus adonis
Apoderus affinis
Apoderus alenensis
Apoderus alluaudi
Apoderus alni
Apoderus angulipennis
Apoderus anser
Apoderus anxius
Apoderus apicalis
Apoderus arboretum
Apoderus ardea
Apoderus armatus
Apoderus arrowi
Apoderus asperipennis
Apoderus assamensis
Apoderus ater
Apoderus aterrimus
Apoderus atricollis
Apoderus atricolor
Apoderus atronitens
Apoderus atropterus
Apoderus atrovittatus
Apoderus australasiae
Apoderus avellanae
Apoderus badeni
Apoderus balteatus
Apoderus balteus
Apoderus basalis
Apoderus benguetensis
Apoderus bicallosicollis
Apoderus bicolor
Apoderus biguttatus
Apoderus bihumeratus
Apoderus bimaculatus
Apoderus bintamensis
Apoderus bipunctulata
Apoderus bistrimaculatus
Apoderus bistriolatus
Apoderus blandus
Apoderus brachialis
Apoderus burgeoni
Apoderus callosicollis
Apoderus camelus
Apoderus cantonensis
Apoderus carbonicolor
Apoderus cardinalis
Apoderus carneolus
Apoderus carnicus
Apoderus castaneus
Apoderus centralis
Apoderus cerberus
Apoderus chinensis
Apoderus cinchonae
Apoderus cinctipectoralis
Apoderus cinctipennis
Apoderus cinnabarinus
Apoderus clavatus
Apoderus clivicollis
Apoderus coeruleatus
Apoderus coeruleipennis
Apoderus collaris
Apoderus collarti
Apoderus coloratus
Apoderus concinnus
Apoderus concolor
Apoderus confluens
Apoderus conradti
Apoderus constans
Apoderus corporaali
Apoderus coryli
Apoderus crenatus
Apoderus cribropunctatus
Apoderus crucifer
Apoderus cruentatus
Apoderus cyaenus
Apoderus cyaneovirens
Apoderus cyaneus
Apoderus cyanopterus
Apoderus cygneus
Apoderus dauricus
Apoderus decolor
Apoderus denigrata
Apoderus denigratus
Apoderus dentipes
Apoderus derridis
Apoderus dimidiatus
Apoderus discalis
Apoderus discoideus
Apoderus discostictus
Apoderus discrepans
Apoderus dispar
Apoderus diversenotatus
Apoderus dohrni
Apoderus donckieri
Apoderus doriae
Apoderus dorsalis
Apoderus drescheri
Apoderus dromas
Apoderus dubia
Apoderus dubius
Apoderus ducorpsi
Apoderus dumosus
Apoderus echinatus
Apoderus elevatus
Apoderus enoplus
Apoderus erythrogaster
Apoderus erythropterus
Apoderus erythrurus
Apoderus excellens
Apoderus excisus
Apoderus excoriatoruber
Apoderus excoriato-ruber
Apoderus extensus
Apoderus fabricii
Apoderus fallax
Apoderus ferrarii
Apoderus ferrum-equinum
Apoderus festivus
Apoderus fida
Apoderus fidus
Apoderus filicollis
Apoderus fiorii
Apoderus flaviceps
Apoderus flavicornis
Apoderus flavimanus
Apoderus flavipes
Apoderus flaviventris
Apoderus flavonotatus
Apoderus flavotinctus
Apoderus flavotorosus
Apoderus flavotuberosus
Apoderus formosanus
Apoderus foveipennis
Apoderus frater
Apoderus frontalis
Apoderus funebris
Apoderus fuscicornis
Apoderus fuscipennis
Apoderus geminus
Apoderus gemmatus
Apoderus gemmosus
Apoderus geniculatus
Apoderus gentilis
Apoderus gibbicollis
Apoderus giraffa
Apoderus gracilis
Apoderus haemorrhoidalis
Apoderus hanoiensis
Apoderus helferi
Apoderus hieroglyphicus
Apoderus hiratai
Apoderus holoxanthus
Apoderus homalinus
Apoderus horridulus
Apoderus horridus
Apoderus humeralis
Apoderus humerosus
Apoderus hystrix
Apoderus imitata
Apoderus imperfecta
Apoderus inaequalis
Apoderus incana
Apoderus indicus
Apoderus insularis
Apoderus intermedius
Apoderus interstitialis
Apoderus javanicus
Apoderus jekeli
Apoderus kamtschatica
Apoderus kamtschaticus
Apoderus krugeri
Apoderus kuatunana
Apoderus lagenoderoides
Apoderus lameyi
Apoderus languidus
Apoderus laosensis
Apoderus lateralis
Apoderus latipennis
Apoderus ledyardi
Apoderus lepidulus
Apoderus limbatus
Apoderus lineatus
Apoderus longiceps
Apoderus longicollis
Apoderus longicornis
Apoderus ludyi
Apoderus luteibasis
Apoderus luteobilineatus
Apoderus luteoplicatus
Apoderus macropus
Apoderus madegassus
Apoderus malabarensis
Apoderus manaliensis
Apoderus maurus
Apoderus melanopterus
Apoderus melanostictus
Apoderus miniatus
Apoderus minimus
Apoderus minutissimus
Apoderus mixtus
Apoderus modesta
Apoderus montanus
Apoderus morio
Apoderus multicolor
Apoderus mushanus
Apoderus necopinus
Apoderus nelligrinus
Apoderus nietneri
Apoderus niger
Apoderus nigricollis
Apoderus nigricornis
Apoderus nigrifrons
Apoderus nigrimaculatus
Apoderus nigrinipes
Apoderus nigripennis
Apoderus nigripes
Apoderus nigriventris
Apoderus nigroaeneus
Apoderus nigroapicatus
Apoderus nigroflavus
Apoderus nigromarginatus
Apoderus nigrotibialis
Apoderus nirifrons
Apoderus nitens
Apoderus notatus
Apoderus numeralis
Apoderus okamotonis
Apoderus olivieri
Apoderus olor
Apoderus olsufievi
Apoderus opacus
Apoderus palawanensis
Apoderus palliatus
Apoderus pallidipes
Apoderus pallidulus
Apoderus palliolatus
Apoderus panganicus
Apoderus papei
Apoderus pardalis
Apoderus pauperulus
Apoderus pectoralis
Apoderus pedestris
Apoderus perrieri
Apoderus piceus
Apoderus picinus
Apoderus picticornis
Apoderus politus
Apoderus porri
Apoderus potanini
Apoderus praecellens
Apoderus puguensis
Apoderus pulchellus
Apoderus pullus
Apoderus pusillus
Apoderus pygidialis
Apoderus quadrillum
Apoderus quadrimaculatus
Apoderus quadripunctatus
Apoderus rhodesianus
Apoderus roelofsi
Apoderus roepkei
Apoderus rothkirchi
Apoderus rubicundus
Apoderus rubidus
Apoderus rubricollis
Apoderus rubripes
Apoderus rubriventris
Apoderus rubrocoxalis
Apoderus rubrodorsatus
Apoderus rubroterminatus
Apoderus rufescens
Apoderus ruficeps
Apoderus ruficollis
Apoderus rufithorax
Apoderus rufiventris
Apoderus rufoapicalis
Apoderus rufobasalis
Apoderus rufus
Apoderus rugicollis
Apoderus rugosus
Apoderus sanguineus
Apoderus sapporensis
Apoderus satelles
Apoderus scabrosus
Apoderus schultzei
Apoderus scitulus
Apoderus scutellaris
Apoderus seclusus
Apoderus sejugatus
Apoderus sejunctus
Apoderus semiannulatus
Apoderus seminiger
Apoderus semipallens
Apoderus semiruber
Apoderus semirufus
Apoderus septemdumatus
Apoderus sexguttatus
Apoderus sexspinosus
Apoderus sharpi
Apoderus shawi
Apoderus shimauchiensis
Apoderus signatus
Apoderus simulans
Apoderus sinicus
Apoderus sissu
Apoderus sjoestedti
Apoderus spadiceus
Apoderus spiculatus
Apoderus spiculosus
Apoderus spinidorsis
Apoderus spinifer
Apoderus spiniferus
Apoderus spinipes
Apoderus spinosus
Apoderus staudingeri
Apoderus striatipennis
Apoderus subcinctus
Apoderus subdimidiatus
Apoderus subfasciatus
Apoderus subfoveolatus
Apoderus submaculatus
Apoderus submarginatus
Apoderus subopaca
Apoderus subornatus
Apoderus subvariolaris
Apoderus subviridis
Apoderus sulcicollis
Apoderus superans
Apoderus superbus
Apoderus sylvaticus
Apoderus tentator
Apoderus tenuissimus
Apoderus tessmanni
Apoderus theresae
Apoderus thibetana
Apoderus tigrinus
Apoderus tolerans
Apoderus tonkinensis
Apoderus tranquebaricus
Apoderus trinotatus
Apoderus tuberculimerus
Apoderus umbrata
Apoderus undatus
Apoderus unicolor
Apoderus uniformis
Apoderus usambicus
Apoderus wallacei
Apoderus vanvolxemi
Apoderus varians
Apoderus varipes
Apoderus verrucosus
Apoderus westermanni
Apoderus vitreus
Apoderus vitticeps
Apoderus xanthocyclus
Bildgalleri
Källor
Externa länkar
Rullvivlar
Apoderus
|
swedish
| 1.501442
|
Pony/src-pony_check-for_all-.txt
|
for_all.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109use "pony_test"
class ForAll[T]
let _gen: Generator[T] val
let _helper: TestHelper
new create(gen': Generator[T] val, testHelper: TestHelper) =>
_gen = gen'
_helper = testHelper
fun ref apply(prop: {(T, PropertyHelper) ?} val) ? =>
"""execute"""
Property1UnitTest[T](
object iso is Property1[T]
fun name(): String => ""
fun gen(): Generator[T] => _gen
fun ref property(arg1: T, h: PropertyHelper) ? =>
prop(consume arg1, h)?
end
).apply(_helper)?
class ForAll2[T1, T2]
let _gen1: Generator[T1] val
let _gen2: Generator[T2] val
let _helper: TestHelper
new create(
gen1': Generator[T1] val,
gen2': Generator[T2] val,
h: TestHelper)
=>
_gen1 = gen1'
_gen2 = gen2'
_helper = h
fun ref apply(prop: {(T1, T2, PropertyHelper) ?} val) ? =>
Property2UnitTest[T1, T2](
object iso is Property2[T1, T2]
fun name(): String => ""
fun gen1(): Generator[T1] => _gen1
fun gen2(): Generator[T2] => _gen2
fun ref property2(arg1: T1, arg2: T2, h: PropertyHelper) ? =>
prop(consume arg1, consume arg2, h)?
end
).apply(_helper)?
class ForAll3[T1, T2, T3]
let _gen1: Generator[T1] val
let _gen2: Generator[T2] val
let _gen3: Generator[T3] val
let _helper: TestHelper
new create(
gen1': Generator[T1] val,
gen2': Generator[T2] val,
gen3': Generator[T3] val,
h: TestHelper)
=>
_gen1 = gen1'
_gen2 = gen2'
_gen3 = gen3'
_helper = h
fun ref apply(prop: {(T1, T2, T3, PropertyHelper) ?} val) ? =>
Property3UnitTest[T1, T2, T3](
object iso is Property3[T1, T2, T3]
fun name(): String => ""
fun gen1(): Generator[T1] => _gen1
fun gen2(): Generator[T2] => _gen2
fun gen3(): Generator[T3] => _gen3
fun ref property3(arg1: T1, arg2: T2, arg3: T3, h: PropertyHelper) ? =>
prop(consume arg1, consume arg2, consume arg3, h)?
end
).apply(_helper)?
class ForAll4[T1, T2, T3, T4]
let _gen1: Generator[T1] val
let _gen2: Generator[T2] val
let _gen3: Generator[T3] val
let _gen4: Generator[T4] val
let _helper: TestHelper
new create(
gen1': Generator[T1] val,
gen2': Generator[T2] val,
gen3': Generator[T3] val,
gen4': Generator[T4] val,
h: TestHelper)
=>
_gen1 = gen1'
_gen2 = gen2'
_gen3 = gen3'
_gen4 = gen4'
_helper = h
fun ref apply(prop: {(T1, T2, T3, T4, PropertyHelper) ?} val) ? =>
Property4UnitTest[T1, T2, T3, T4](
object iso is Property4[T1, T2, T3, T4]
fun name(): String => ""
fun gen1(): Generator[T1] => _gen1
fun gen2(): Generator[T2] => _gen2
fun gen3(): Generator[T3] => _gen3
fun gen4(): Generator[T4] => _gen4
fun ref property4(arg1: T1, arg2: T2, arg3: T3, arg4: T4, h: PropertyHelper) ? =>
prop(consume arg1, consume arg2, consume arg3, consume arg4, h)?
end
).apply(_helper)?
|
pony
|
2288093
|
https://sv.wikipedia.org/wiki/Hyperolius%20tuberilinguis
|
Hyperolius tuberilinguis
|
Hyperolius tuberilinguis är en groddjursart som beskrevs av Smith 1849. Hyperolius tuberilinguis ingår i släktet Hyperolius och familjen gräsgrodor. IUCN kategoriserar arten globalt som livskraftig. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Gräsgrodor
tuberilinguis
|
swedish
| 1.236328
|
Pony/side-effect-ordering-in-function-call-expressions.txt
|
# Function Call Side Effects
Consider the following code:
```pony
class Foo
fun fn(x: U64) => None
actor Main
new create(env: Env) =>
var x: U64 = 0
try foo()?.fn(x = 42) end
env.out.print(x.string())
fun foo(): Foo ? => error
```
What do you think it will print? Probably `0` right? Or maybe you realized this code is in the gotchas section so it must be `42`. If you went with `42`, you'd be right. Why?
Expressions for arguments in function calls are evaluated before the expression for the function receiver. The use of assignment expressions like `x = 42` is quite rare so we don't think many folks will be bitten by this. However, it's definitely something you want to be aware of. Also remember that if `fn` were to be called, it would be called with `0` (the result of the assignment expression).
|
pony
|
230558
|
https://no.wikipedia.org/wiki/Grumman%20F-11%20Tiger
|
Grumman F-11 Tiger
|
Grumman F-11 Tiger var et enseters hangarskip-basert jagerfly som var i operativ tjeneste hos US Navy på 1950- og 60-tallet.
Historie og utvikling
F-11 var et konsept fra Grumman som ble påbegynt i 1952, og var et forsøk på å modernisere F9F-6/7 ved å bedre de aerodynamiske egenskapene i det transsoniske området, og i tillegg oppnå supersonisk hastighet. Innen 1953 var det gamle designet blitt så endret at det bar liten likhet med forgjengeren. Den nye vingen hadde heldekkende slats på forkanten av vingene og var også utstyrt med flaps på bakre del av vingen. Spoilere ble brukt istedenfor vanlige balanseror. For å kunne lagres på hangarskip kan vingene foldes inn nedover. Siden det var forventet at flyet skulle kunne oppnå supersonisk hastighet ble høyderoret bygget slik at hele roret var bevegelig. Flyet ble konstruert for Wright J65 turbojet-motoren, noe som var en Armstrong Siddeley Sapphire-motor bygget på lisens.
Den amerikanske marinen var tilstrekkelig imponert over konstruksjonen til å bestille 2 prototyper. Typebetegnelsen på prototypene var XF9F-8 til tross for at det var en svært annerledes konstruksjon fra F9F. For å gjøre det enda mer forvirrende ble typebetegnelsen endret til XF9F-9, slik at XF9F-8-betegnelsen kunne brukes av et annet prosjekt som gikk ut på å videreutvikle F9F Cougar, dog i langt mindre grad. Siden J65-motoren med etterbrenner ennå ikke var klar, fløy den første prototypen første gang 30. juli 1954 med en motor uten etterbrenner. Til tross for dette oppnådde flyet nesten en hastighet på Mach 1 under jomfruturen. Den andre prototypen var utstyrt med en J65 med etterbrenner, og ble det andre supersoniske flyet til den amerikanske marinen, etter Douglas F4D Skyray. I april 1955 fikk flyet den nye typebetegnelsen F11F-1. Betegnelsen ble i 1962 endret til F-11A.
Operativ historie
Utprøving av hangarflyoperasjoner begynte 4. april 1956, da en F-11 Tiger landet på og tok av igjen fra det amerikanske hangarskipet USS Forrestal. F-11 var i operativ drift på følgende hangarskip: USS Ranger, USS Intrepid, USS Bon Homme Richard, USS Forrestal og USS Saratoga. Karrieren til F-11 varte kun i 4 år, siden ytelsen var underlegen Vought F-8 Crusader. I tillegg viste J65-motoren seg å være upålitelig. På grunn av dette kansellerte den amerikanske marinen alle ordre for F11F-1P, som var en rekognoseringsvariant, og kun 199 eksemplarer av jageren F-11A (F11F-1) ble bygget. Flyet var innen 1961 tatt ut av tjeneste fra hangarskip. Flytypen ble forøvrig brukt til opplæringsformål fram til slutten av 1960-tallet. Flyelever fikk utførte avansert jetfly-trening i F-9 Cougar, og ved slutten av utdanningen fikk de en liten smakebit på supersonisk flyging før de ble overført til operativ tjeneste.
Selv om den operative karrieren til F-11 Tiger var kort, brukte Blue Angels flyet fra 1957 til 1969, da Tiger ble erstattet med McDonnell Douglas F-4 Phantom II.
Varianter
I tillegg til F-11A (F11F-1) jageren kom Grumman med et forslag til en mer avansert variant av flytypen med betegnelsen F11F-1F Super Tiger. Dette konseptet var et resultat av en studie for å tilpasse General Electric J79 motoren til F-11. Marinen var tilstrekkelig interessert i konseptet til at de autoriserte en modifikasjon på 2 produksjonsfly, noe som ga dem større luftinntak og YJ79-GE-3 turbojet-motorer. Denne modifiserte varianten gikk under typebetegnelsen F11F-2. Flyet tok til vingene første gang 25. mai 1956, og oppnådde da en hastighet på Mach 1,44 under en av flyturene. Etter noen flere modifikasjoner, som inkluderte et forlenget flyskrog og installasjon av en kraftigere J79-motor, oppnådde flyet den imponerende hastigheten Mach 2,04 i en høyde av 24 466 m (80 250 fot). Dessverre kom denne økte ytelsen på bekostning av vekt, og marinen følte at den nye F11F-2 varianten var for tung til bruk fra hangarskip og bestilte derfor ingen produksjonseksemplarer av typen. F11F-2 fikk endret typebetegnelsen til F11F-1F, noe som indikerte en produksjonsvariant F11F-1, men med en annen motor. Grumman forsøkte med dette å appellere til eksportkunder, slik som de tyske, japanske og canadiske luftforsvar, som viste stor interesse, men som til slutt bestemte seg for Lockheed F-104 Starfighter.
YF9F-9: Prototype.
F-11F-1: Enseters jager-variant for US Navy. Flyet fikk senere betegnelsen F-11A.
Trivia
F-11 Tiger er berømt for å være det første fly til å skyte seg selv ned. 21. september 1956, under en testavfyring av 20 mm kanonen, avfyrte piloten Tom Attridge 2 salver halvveis gjennom et svakt stup. Ettersom hastigheten og banen på granatene endret seg og farten ble mindre, ble de til slutt tatt igjen av flyet, noe som medførte at flyet ble skadet og Attridge ble tvunget til å krasjlande. Piloten overlevde.
Spesifikasjoner (F-11A)
Referanser
Eksterne lenker
Grumman F11F / F-11 Tiger
Jagerfly fra USA
Enmotors jetdrevne luftfartøy
Grumman-luftfartøy
|
norwegian_bokmål
| 1.227749
|
Pony/process-ExecveError-.txt
|
ExecveError¶
[Source]
primitive val ExecveError
Constructors¶
create¶
[Source]
new val create()
: ExecveError val^
Returns¶
ExecveError val^
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
eq¶
[Source]
fun box eq(
that: ExecveError val)
: Bool val
Parameters¶
that: ExecveError val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ExecveError val)
: Bool val
Parameters¶
that: ExecveError val
Returns¶
Bool val
|
pony
|
2052025
|
https://sv.wikipedia.org/wiki/Eranno%20ehlersi
|
Eranno ehlersi
|
Eranno ehlersi är en ringmaskart som först beskrevs av MacIntosh 1885. Eranno ehlersi ingår i släktet Eranno och familjen Lumbrineridae. Inga underarter finns listade i Catalogue of Life.
Källor
Havsborstmaskar
ehlersi
|
swedish
| 0.974995
|
Pony/process-ProcessNotify-.txt
|
ProcessNotify¶
[Source]
Notifications for Process connections.
interface ref ProcessNotify
Public Functions¶
created¶
[Source]
ProcessMonitor calls this when it is created.
fun ref created(
process: ProcessMonitor ref)
: None val
Parameters¶
process: ProcessMonitor ref
Returns¶
None val
stdout¶
[Source]
ProcessMonitor calls this when new data is received on STDOUT of the
forked process
fun ref stdout(
process: ProcessMonitor ref,
data: Array[U8 val] iso)
: None val
Parameters¶
process: ProcessMonitor ref
data: Array[U8 val] iso
Returns¶
None val
stderr¶
[Source]
ProcessMonitor calls this when new data is received on STDERR of the
forked process
fun ref stderr(
process: ProcessMonitor ref,
data: Array[U8 val] iso)
: None val
Parameters¶
process: ProcessMonitor ref
data: Array[U8 val] iso
Returns¶
None val
failed¶
[Source]
ProcessMonitor calls this if we run into errors communicating with the
forked process.
fun ref failed(
process: ProcessMonitor ref,
err: ProcessError val)
: None val
Parameters¶
process: ProcessMonitor ref
err: ProcessError val
Returns¶
None val
expect¶
[Source]
Called when the process monitor has been told to expect a certain quantity
of bytes. This allows nested notifiers to change the expected quantity,
which allows a lower level protocol to handle any framing.
fun ref expect(
process: ProcessMonitor ref,
qty: USize val)
: USize val
Parameters¶
process: ProcessMonitor ref
qty: USize val
Returns¶
USize val
dispose¶
[Source]
Called when ProcessMonitor terminates to cleanup ProcessNotify if a child
process was in fact started. dispose will not be called if a child process
was never started. The notify will know that a process was started and to
expect a dispose call by having received a created call.
dispose includes the exit status of the child process. If the process
finished, then child_exit_status will be an instance of Exited.
The childs exit code can be retrieved from the Exited instance by using
Exited.exit_code().
On Posix systems, if the process has been killed by a signal (e.g. through
the kill command), child_exit_status will be an instance of
Signaled with the signal number that terminated the
process available via Signaled.signal().
fun ref dispose(
process: ProcessMonitor ref,
child_exit_status: (Exited val | Signaled val))
: None val
Parameters¶
process: ProcessMonitor ref
child_exit_status: (Exited val | Signaled val)
Returns¶
None val
|
pony
|
1351505
|
https://no.wikipedia.org/wiki/Init
|
Init
|
init er i Unix og Unix-lignende operativsystemer den første prosessen som startes under oppstart av datamaskinen. Det er en daemon som kjører inntil systemet slås av. Den er den direkte eller indirekte foreldreprosessen til andre prosesser og adopterer automatisk alle foreldreløse prosesser. Init startes av operativsystemkjernen ved å bruke et hardkodet filnavn; en kjernepanikk inntreffer hvis kjernen er ute av stand til å starte den. Init tildeles vanligvis prosessidentifikator 1.
I UNIX System III og UNIX System V var funksjonaliteten til init forskjellig fra forsknings-Unix og dens BSD derivater. Bruken i de fleste Linux-distribusjoner har tradisjonelt benyttet den tradisjonelle init. En nylig variant på Linux-systemer er systemd, som stort sett er kompatibelt med System V. Slackware bruker BSD-stil oppstart, mens andre som Gentoo har deres egne versjoner.
Flere erstatninger av init-implementasjonen har blitt laget, og prøver å oppheve begrensninger i standardversjonene. De inkluderer launchd, Service Management Facility, systemd og Upstart. I de senere år har systemd blitt tatt i bruk av alle større Linux-distribusjoner.
Eksempel: Init-script i Fedora
Red Hat erstattet SysVinit med systemd i Fedora versjon 15 og i Red Hat Enterprise Linux versjon 7. Her er et eksempel på SysVinit-script for eldre versjoner.
#!/bin/sh
#
# <daemonname> <summary>
#
# chkconfig: <default runlevel(s)> <start> <stop>
# description: <description, split multiple lines with \
# a backslash>
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description:
# Description:
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exec="/path/to/<daemonname>"
prog="<service name>"
config="<path to major config file>"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
# if not running, start it up here, usually something like "daemon $exec"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
# stop it here, often "killproc $prog"
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?
Referanser
Unix
Unix-varianter
|
norwegian_bokmål
| 0.696063
|
Pony/net-DNSAuth-.txt
|
DNSAuth¶
[Source]
primitive val DNSAuth
Constructors¶
create¶
[Source]
new val create(
from: (AmbientAuth val | NetAuth val))
: DNSAuth val^
Parameters¶
from: (AmbientAuth val | NetAuth val)
Returns¶
DNSAuth val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: DNSAuth val)
: Bool val
Parameters¶
that: DNSAuth val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: DNSAuth val)
: Bool val
Parameters¶
that: DNSAuth val
Returns¶
Bool val
|
pony
|
1713458
|
https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%201324
|
Vitenskapsåret 1324
|
Vitenskapsåret 1324 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 1324.
Hendelser
24. april − Universitetet i Oxford får kongelig lisens til å opprette et nytt fakultet, Oriel College.
Marsilius av Padova fullfører verket «Defensor pacis», der han argumenterer for demokrati, og mot Kirkestatens verdslige makt.
Fødsler
Dødsfall
8. eller 9. januar − Marco Polo (født 1254), italiensk oppdagelsesreisende.
Referanser
|
norwegian_bokmål
| 1.305382
|
Pony/pony_check-PropertyRunner-.txt
|
PropertyRunner[T: T]¶
[Source]
Actor executing a Property1 implementation
in a way that allows garbage collection between single
property executions, because it uses recursive behaviours
for looping.
actor tag PropertyRunner[T: T]
Constructors¶
create¶
[Source]
new tag create(
p1: Property1[T] iso,
params: PropertyParams val,
notify: PropertyResultNotify val,
logger: PropertyLogger val,
env: Env val)
: PropertyRunner[T] tag^
Parameters¶
p1: Property1[T] iso
params: PropertyParams val
notify: PropertyResultNotify val
logger: PropertyLogger val
env: Env val
Returns¶
PropertyRunner[T] tag^
Public Behaviours¶
complete_run¶
[Source]
Complete a property run.
This behaviour is called from the PropertyHelper
or from the actor itself.
be complete_run(
round: (_Shrink val | _Run val),
success: Bool val)
Parameters¶
round: (_Shrink val | _Run val)
success: Bool val
run¶
[Source]
be run()
complete_shrink¶
[Source]
be complete_shrink(
failed_repr: String val,
last_repr: String val,
shrink_round: (_Shrink val | _Run val),
success: Bool val)
Parameters¶
failed_repr: String val
last_repr: String val
shrink_round: (_Shrink val | _Run val)
success: Bool val
do_shrink¶
[Source]
be do_shrink(
failed_repr: String val)
Parameters¶
failed_repr: String val
expect_action¶
[Source]
be expect_action(
name: String val,
round: (_Shrink val | _Run val))
Parameters¶
name: String val
round: (_Shrink val | _Run val)
complete_action¶
[Source]
be complete_action(
name: String val,
round: (_Shrink val | _Run val),
ph: PropertyHelper val)
Parameters¶
name: String val
round: (_Shrink val | _Run val)
ph: PropertyHelper val
fail_action¶
[Source]
be fail_action(
name: String val,
round: (_Shrink val | _Run val),
ph: PropertyHelper val)
Parameters¶
name: String val
round: (_Shrink val | _Run val)
ph: PropertyHelper val
dispose_when_done¶
[Source]
Let us not have older rounds interfere with newer ones,
thus dispose directly.
be dispose_when_done(
disposable: DisposableActor tag,
round: (_Shrink val | _Run val))
Parameters¶
disposable: DisposableActor tag
round: (_Shrink val | _Run val)
dispose¶
[Source]
be dispose()
log¶
[Source]
be log(
msg: String val,
verbose: Bool val = false)
Parameters¶
msg: String val
verbose: Bool val = false
Public Functions¶
complete¶
[Source]
Complete the Property execution successfully.
fun ref complete()
: None val
Returns¶
None val
fail¶
[Source]
Complete the Property execution
while signalling failure to the PropertyResultNotify.
fun ref fail(
repr: String val,
rounds: USize val = 0,
err: Bool val = false)
: None val
Parameters¶
repr: String val
rounds: USize val = 0
err: Bool val = false
Returns¶
None val
|
pony
|
788615
|
https://sv.wikipedia.org/wiki/Projektilbildande%20RSV
|
Projektilbildande RSV
|
Projektilbildande RSV (riktad sprängverkan), militärförkortning: RSV-4 (, kort EFP, "explosivt formad projektil"), är en speciell typ av riktad sprängverkan utformad för att penetrera pansar på korta avstånd. Sådan består av en inåtgående metallplatta framför en riktad sprängladdning, vilken verkar genom att spränga ihop metallplattan till en projektil med enorm projektilhastighet på korta avstånd, resulterande i mycket hög genomslagsförmåga inom ram.
RSV-4 utvecklades för första gången under andra världskriget. Idag används de vanligen hos takslående ammunition, såsom Bofors BONUS och Saab Bofors Dynamics NLAW.
Engelska namn
Explosively formed projectile (explosivt formad projektil)
Explosively formed penetrator (Explosivt formad penetrator)
Self-forging warhead (självformande stridsdel)
Self-forging fragment (självformande skärva)
Se även
Strålbildande RSV (RSV-3)
Referenser
Noter
Tryckta verk
Pansarvärnsvapen
Sprängämnen
|
swedish
| 1.03014
|
Pony/whitespace.txt
|
# Whitespace
Whitespace (e.g. spaces, tabs, newlines, etc.) in Pony isn't significant.
Well, it mostly isn't significant.
## Mostly insignificant whitespace
Pony reads a bit like Python, which is a _whitespace significant_ language. That is, the amount of indentation on a line means something in Python. In Pony, the amount of indentation is meaningless.
That means Pony programmers can format their code in whatever way suits them.
There are three exceptions:
1. A `-` at the beginning of a line starts a new expression (unary negation), whereas a `-` in the middle of an expression is a binary operator (subtraction).
2. A `(` at the beginning of a line starts a new expression (a tuple), whereas a `(` in the middle of an expression is a method call.
3. A `[` at the beginning of a line starts a new expression (an array literal), whereas a `[` in the middle of an expression is generic formal parameters.
That stuff may seem a little esoteric right now, but we'll explain it all later. The `-` part should make sense though.
```pony
a - b
```
That means "subtract b from a".
```pony
a
-b
```
That means "first do a, then, in a new expression, do a unary negation of b".
## Semicolons
In Pony, you don't end an expression with a `;`, unlike C, C++, Java, C#, etc. In fact, you don't need to end it at all! The compiler knows when an expression has finished, like Python or Ruby.
However, sometimes it's convenient to put more than one expression on the same line. When you want to do that, you __must__ separate them with a `;`.
__Why? Can't the compiler tell an expression has finished?__ Yes, it can. The compiler doesn't really need the `;`. However, it turns out the programmer does! By requiring a `;` between expressions on the same line, the compiler can catch some pretty common syntax errors for you.
## Docstrings
Including documentation in your code makes you awesome. If you do it, everyone will love you.
Pony makes it easy by allowing you to put a __docstring__ on every type, field, or method. Just put a string literal right after declaring the type or field, or right after the `=>` of a method, before writing the body. The compiler will know what to do with them.
For traits and interfaces that have methods without bodies, you can put the docstring after the method declaration, even though there is no `=>`.
By convention, a docstring should be a triple-quoted string, and it should use Markdown for any formatting.
```pony
actor Main
"""
This is documentation for my Main actor
"""
var count: USize = 0
"""
This is documentation for my count field
"""
new create(env: Env) =>
"""
This is documentation for my create method
"""
None
trait Readable
fun val read()
"""
This is documentation for my unimplemented read method
"""
```
## Comments
Use __docstrings__ first! But if you need to put some comments in the implementation of your methods, perhaps to explain what's happening on various lines, you can use C++ style comments. In Pony, block comments can be nested.
```pony
// This is a line comment.
/* This is a block comment. */
/* This block comment /* has another block comment */ inside of it. */
```
|
pony
|
23180
|
https://da.wikipedia.org/wiki/Python%20%28programmeringssprog%29
|
Python (programmeringssprog)
|
Python er et dynamisk og fortolket platformsuafhængigt programmeringssprog, oprindeligt udviklet af hollænderen Guido van Rossum. Python er tilgængeligt under en Open Source-licens. Pythons grammatik adskiller sig fra de fleste andre programmeringsprog ved at logiske programdele i Python opdeles ved hjælp af indrykning (eng. indentation) snarere end ved hjælp af tuborgparenteser.
Siden Python 2.0 har sproget kunnet håndtere Unicode-tekst.
Pythons filosofi
Python er et multi-paradigme-sprog. Det betyder at programmørerne ikke bliver tvunget til at bruge en bestemt udviklingsmodel, men kan vælge mellem flere forskellige. Python understøtter blandt andet objektorientering, struktureret programmering, funktionel programmering og aspektorienteret programmering. Andre paradigmer er understøttet af udvidelser. For eksempel udvider pyDBC og Contracts for Python kontraktprogrammering på samme måde som programmeringssproget Eiffel. Python benytter sig af dynamisk typetjek og garbage collection. En væsentlig feature er den dynamiske binding, dvs. at navne på funktioner og variable først tilknyttes deres respektive objekter på afviklingstidspunktet.
Som kontrast til de mange forskellige paradigmer der understøttes, er grammatikken meget simpel, og stort set fri for syntaktisk sukker. Den væsentligste forskel fra de fleste andre sprog på dette punkt er at der ikke bruges tegn til angivelse af logiske niveauer. I stedet angives en logisk programblok ved ensartet indrykning med mellemrum eller tabulatortegn. Dette er et udslag af udviklernes kultur eller ideologi, hvor sproget er udformet så konstruktioner der bliver betragtet som "smukke", "entydige" eller "simple" favoriseres.
Et andet vigtigt mål for Pythons udviklere er at sproget skal være sjovt at bruge. Det ses blandt andet i navngivningen (efter tv-serien Monty Pythons Flyvende Cirkus), i de mange mere eller mindre skjulte referencer til Monty Pythons-sketches i koden og en fra tid til anden munter tilgang til sproget i vejledninger og referencemanualer. Et eksempel er brugen af metasyntaktiske variabler, hvor man ofte ser spam og eggs brugt i eksempler, hvor man ellers ofte ser foo og bar.
Hello world
>>> print("Hello World !")
Hello World !
Objektorienteret hello world
class HelloWorld:
def __init__(self, besked='hello world'):
self.besked = besked
def skriv_besked(self):
print(self.besked)
myobject = HelloWorld()
myobject.skriv_besked()
List Comprehensions
Pythonsyntaksen tillader list comprehensions, der er en enkel måde at
opbygge en liste på.
Syntaksen ligger tæt op ad den matematiske syntaks for mængder.
For eksempel er definitionen af mængden over alle rationale tal:
I Python ville følgende list comprehension give en liste af rationale
tal hvis tæller og nævner begge ligger mellem 0 og 99:
[n / float(m) for n in range(100) for m in range(100)]
(m konverteres til float for at undgå heltalsdivision)
Quicksort
Minimal version
Dette er en Python-implementation af algoritmen Quicksort:
def quicksort(lst):
if len(lst) <= 1:
return lst
pivot = lst.pop()
return quicksort([x for x in lst if x < pivot]) + [pivot] + quicksort([x for x in lst if x >= pivot])
Implementationen bør ikke bruges i praksis.
Python-implementationen optimerer ikke hale-rekursive funktioner, så de undgår at bruge en stak.
Derfor vil nedenstående funktion give en RuntimeError ved tilstrækkeligt store lister.
>>>> quicksort(range(1000))
RuntimeError: maximum recursion depth exceeded
Praktisk version
En iterativ implementation vil derfor være mere brugbar:
def quicksort(lst):
lst = list(lst)
queue = [(0, len(lst))]
while queue:
a, b = queue.pop()
if a == b:
continue
pivot = lst[a]
lesser = [x for x in lst[a+1:b] if x < pivot]
greater = [x for x in lst[a+1:b] if x >= pivot]
lst[a:b] = lesser + [pivot] + greater
queue.append((a, a + len(lesser)))
queue.append((a + len(lesser) + 1, b))
return lst
Man kan tale om, at der er lavet en manuel optimering af halerekursion.
Effektiv Sortering
Den simpleste måde at sortere en liste på i Python er selvfølgelig at bruge den
indbyggede metode "sort()", eller generatoren "sorted()":
lst.sort() # sorter listen
for i in sorted(lst): # itererer listen i sorteret orden
print i
Generators
Følgende er en Python-generator, der returnerer samtlige primtal i rækkefølge:
import math
import sys
def primes(N=sys.maxint):
def isprime(n):
return bool([i for i in xrange(2, int(math.sqrt(n)+1)) if n % i == 0])
for n in xrange(2, N):
if isprime(n):
yield n
Det er nu muligt at udtrække det antal primtal, der er nødvendigt, ved at iterere
igennem det generatorobjekt, funktionen returnerer. Python vil indstille beregningen
hver gang den når yield, returnere værdien og herefter vente på, at næste værdi
skal bruges. Man kan sige at generatorobjekterne minder om lazy evaluering.
Her beregnes de første 10 primtal:
for i in primes():
if i > 10:
break
print i
Python i forskning
Flere forskere anvender Python som del af deres forskning,
ligesom der findes en lang række beregnings- og forskningsorienterede biblioteker til Python.
Eksterne henvisninger
Python Programming Language , download
Python Documentation
http://www.linuxbog.dk/python/bog/ (Begynderbog på dansk)
Fodnoter
Programmeringssprog
|
danish
| 0.634102
|
Pony/format-FormatOctalBare-.txt
|
FormatOctalBare¶
[Source]
primitive val FormatOctalBare is
FormatSpec val
Implements¶
FormatSpec val
Constructors¶
create¶
[Source]
new val create()
: FormatOctalBare val^
Returns¶
FormatOctalBare val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: FormatOctalBare val)
: Bool val
Parameters¶
that: FormatOctalBare val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FormatOctalBare val)
: Bool val
Parameters¶
that: FormatOctalBare val
Returns¶
Bool val
|
pony
|
434674
|
https://da.wikipedia.org/wiki/Barrit
|
Barrit
|
Barrit er en lille by i Østjylland med . Barrit er beliggende i Barrit Sogn otte kilometer vest for Juelsminde, 26 kilometer øst for Vejle og 23 kilometer syd for Horsens. Byen tilhører Hedensted Kommune og er beliggende i Region Midtjylland.
Barrit Kirke og Barrit Skole ligger i byen.
Etymologi
Barrit kommer af Barwith, nævnt første gang 1333. Efterleddet "with" betyder "skov". Det oldnordiske navn "barrviðr" betyder "nåleskov".
Historie
Barrit var oprindeligt en landsby. I 1682 bestod landsbyen Barrit sammen med Barrithule af 24 gårde og 14 huse med jord. Det samlede dyrkede areal udgjorde 837,4 tønder land skyldst til 105,66 tønder hartkorn. Dyrkningsformen var tovangsbrug med rotationen 4/4 + 1 vang sås årlig.
I 1879 beskrives byen således: "Barrit Kirke lidt nord for Barrit; Byerne Over-Barrit med Præstegaard, Skole og Veirmølle".
Omkring århundredeskiftet blev byen beskrevet således: "Over-Barrit med Kirke (lidt N. for Byen), Præstegd., Skole, Sparekasse for B.-Vrigsted S. (opr. 1871; 31/3 1900 var Spar. Tilgodeh. 37,697 Kr., Rentef. 4 pCt., Reservef. 714, Antal af Konti 310), Andelsmejeri, Købmandshdl., Haandværkere, Mølle, Gæstgiveri, Jærnbane-, Telegraf- og Telefonst. samt Postekspedition".
Noter
Litteratur
Karl-Erik Frandsen: Vang og tægt. Studier over dyrkningssystemer og agrarstrukturer i Danmarks landsbyer 1682-83 (Bygd 1983),
Kristian Hald: Vore Stednavne; Udgivet af Udvalget for Folkeoplysningens Fremme. C. E. Gads Forlag, København 1950.
Henrik Pedersen: De danske Landbrug fremstillet paa Grundlag af Forarbejderne til Christian V.s Matrikel 1688. Udgivet efter hans Død paa Bekostning af Carlsbergfondet (København MCMXXVIII; Reprotryk for Landbohistorisk Selskab, København 1975),
J.P. Trap: Statistisk-topographisk Beskrivelse af Kongeriget Danmark, 2 Bind (Kjøbenhavn 1859),
J.P. Trap: J.P. Trap: Kongeriget Danmark; 2. Udgave 6. Deel. Amterne Aarhus, Vejle, Ringkjøbing, Ribe og Færøerne. Sted-Register og Supplement; Kjøbenhavn 1879; s. 216
J.P. Trap: Kongeriget Danmark; 3. Udgave 5. Bind: Aarhus, Vejle, Ringkjøbing, Ribe og Færø Amter samt Supplement og Stedregister; Kjøbenhavn 1904; s. 338
Byer i Hedensted Kommune
|
danish
| 1.242046
|
Pony/src-serialise-serialise-.txt
|
serialise.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142"""
# Serialise package
This package provides support for serialising and deserialising arbitrary data
structures.
The API is designed to require capability tokens, as otherwise serialising
would leak the bit patterns of all private information in a type if the
resulting Array[U8] could be examined.
Deserialisation is fundamentally unsafe currently: there isn't yet a
verification pass to check that the resulting object graph maintains a
well-formed heap or that individual objects maintain any expected local
invariants. However, if only "trusted" data (i.e. data produced by Pony
serialisation from the same binary) is deserialised, it will always maintain a
well-formed heap and all object invariants.
Note that serialised data is not usable between different Pony binaries. This is
due to the use of type identifiers rather than a heavy-weight self-describing
serialisation schema. This also means it isn't safe to deserialise something
serialised by the same program compiled for a different platform.
The [Serialise.signature](serialise-Serialise.md#signature) method is provided
for the purposes of comparing communicating Pony binaries to determine if they
are the same. Confirming this before deserialising data can help mitigate the
risk of accidental serialisation across different Pony binaries, but does not on
its own address the security issues of accepting data from untrusted sources.
"""
use @"internal.signature"[Array[U8] val]()
use @pony_ctx[Pointer[None]]()
use @pony_alloc[Pointer[U8]](ctx: Pointer[None], size: USize)
use @pony_alloc_final[Pointer[U8]](ctx: Pointer[None], size: USize)
use @pony_serialise[None](ctx: Pointer[None], data: Any box, typ: Pointer[None],
arr_out: Array[U8] tag, alloc_fn: @{(Pointer[None], USize): Pointer[U8]},
throw_fn: @{(): None ?}) ?
use @pony_deserialise[Any iso^](ctx: Pointer[None], typ: Pointer[None],
arr_in: Array[U8] val, alloc_fn: @{(Pointer[None], USize): Pointer[U8]},
alloc_final_fn: @{(Pointer[None], USize): Pointer[U8]}, throw_fn: @{(): None ?}) ?
primitive Serialise
fun signature(): Array[U8] val =>
"""
Returns a byte array that is unique to this compiled Pony binary, for the
purposes of comparing before deserialising any data from that source.
It is statistically impossible for two serialisation-incompatible Pony
binaries to have the same serialise signature.
"""
@"internal.signature"()
primitive SerialiseAuth
"""
This is a capability that allows the holder to serialise objects. It does not
allow the holder to examine serialised data or to deserialise objects.
"""
new create(auth: AmbientAuth) =>
None
primitive DeserialiseAuth
"""
This is a capability token that allows the holder to deserialise objects. It
does not allow the holder to serialise objects or examine serialised data.
"""
new create(auth: AmbientAuth) =>
None
primitive OutputSerialisedAuth
"""
This is a capability token that allows the holder to examine serialised data.
This should only be provided to types that need to write serialised data to
some output stream, such as a file or socket. A type with the [SerialiseAuth](serialise-SerialiseAuth.md)
capability should usually not also have OutputSerialisedAuth, as the
combination gives the holder the ability to examine the bitwise contents of
any object it has a reference to.
"""
new create(auth: AmbientAuth) =>
None
primitive InputSerialisedAuth
"""
This is a capability token that allows the holder to treat arbitrary
bytes as serialised data. This is the most dangerous capability, as currently
it is possible for a malformed chunk of data to crash your program if it is
deserialised.
"""
new create(auth: AmbientAuth) =>
None
class val Serialised
"""
This represents serialised data. How it can be used depends on the other
capabilities a caller holds.
"""
let _data: Array[U8] val
new create(auth: SerialiseAuth, data: Any box) ? =>
"""
A caller with SerialiseAuth can create serialised data from any object.
"""
let r = recover Array[U8] end
let alloc_fn =
@{(ctx: Pointer[None], size: USize): Pointer[U8] =>
@pony_alloc(ctx, size)
}
let throw_fn = @{() ? => error }
@pony_serialise(@pony_ctx(), data, Pointer[None], r, alloc_fn, throw_fn) ?
_data = consume r
new input(auth: InputSerialisedAuth, data: Array[U8] val) =>
"""
A caller with InputSerialisedAuth can create serialised data from any
arbitrary set of bytes. It is the caller's responsibility to ensure that
the data is in fact well-formed serialised data. This is currently the most
dangerous method, as there is currently no way to check validity at
runtime.
"""
_data = data
fun apply(auth: DeserialiseAuth): Any iso^ ? =>
"""
A caller with DeserialiseAuth can create an object graph from serialised
data.
"""
let alloc_fn =
@{(ctx: Pointer[None], size: USize): Pointer[U8] =>
@pony_alloc(ctx, size)
}
let alloc_final_fn =
@{(ctx: Pointer[None], size: USize): Pointer[U8] =>
@pony_alloc_final(ctx, size)
}
let throw_fn = @{() ? => error }
@pony_deserialise(@pony_ctx(), Pointer[None], _data, alloc_fn,
alloc_final_fn, throw_fn) ?
fun output(auth: OutputSerialisedAuth): Array[U8] val =>
"""
A caller with OutputSerialisedAuth can gain access to the underlying bytes
that contain the serialised data. This can be used to write those bytes to,
for example, a file or socket.
"""
_data
|
pony
|
1547419
|
https://sv.wikipedia.org/wiki/Clojure
|
Clojure
|
Clojure är en dialekt inom Lisp-familjen av programmeringsspråk. Clojure skapades av Rich Hickey och släpptes i sin första version i slutet av 2009. Det är ett programmeringsspråk för allmän användning, som stödjer interaktiv utveckling och uppmuntrar en funktionell programmeringsstil. Clojure (liksom vissa andra programmeringsspråk) körs på Java Virtual Machine, Common Language Runtime och kan kompileras till Javascript.
Bakgrund
Enligt skaparen, Rich Hickey, är språket framtaget för att vara lättanvänt och ha god prestanda, snarare än att vara ett akademiskt projekt. Vidare ger Clojures API ett jämförelsevis enkelt förfarande för att inter-operera med existerande Java-bibliotek.
Kännetecken
Clojure är ett språk med fokus på funktionell programmering och samverkande ("concurrent" på engelska) programmering. På grund av denna inriktning stödjer Clojure följande funktioner:
STM (Software Transactional Memory) med inbyggda makron för att genomföra atomiska transaktioner på gemensamma data
Persistenta datastrukturer
Funktioner av första klass (funktioner är värden)
Syntax
Clojures syntax byggs på S-uttryck, något som är typiskt för ett Lisp-språk. Clojure är en Lisp-1, vilket innebär att funktioner och andra värden delar på en namnrymd. Språket kan inte kodas om till andra Lisp-dialekter eftersom det inte är kompatibelt.
Det som i huvudsak gör Clojure inkompatibelt med andra dialekter är att Clojure använder specifika teckenpar för att ange olika sorters datastrukturer.
I Clojure används [] för att ange vektorer, {} för att ange associativa vektorer och #{} för att ange associativa vektorer med unika värden.
Exempel
Hello world:
(println "Hello, world!")
Nedan definieras en funktion som tar en parameter (x) som anges som en vektor med ett element. Funktionen anropar multiplikationsfunktionen * med argumenten x, x. I Clojure, som med andra Lisp-dialekter, returneras det värde som den sist anropade funktionen returnerar automatiskt:
(defn square [x]
(* x x))
Genom att använda Javas Swing bibliotek är det möjligt att rita grafiska gränssnitt (ytterligare ett Hello World-exempel):
(javax.swing.JOptionPane/showMessageDialog nil "Hello World" )
Nedan ges exempel på en trådsäker generator av unika serienummer:
(let [i (atom 0)]
(defn generate-unique-id
"Returns a distinct numeric ID for each call."
[]
(swap! i inc)))
En anonym underklass av java.io.Writer som inte skriver till någonting, och ett makro som använder detta för att tysta alla 'prints' inuti det:
(def bit-bucket-writer
(proxy [java.io.Writer] []
(write [buf] nil)
(close [] nil)
(flush [] nil)))
(defmacro noprint
"Evaluates the given expressions with all printing to *out* silenced."
[& forms]
`(binding [*out* bit-bucket-writer]
~@forms))
(noprint
(println "Hello, nobody!"))
Tio trådar manipulerar en gemensam datastruktur, vilken består av 100 vektorer, där varje vektor använder 10 (initialt sekventiella) unika tal. Varje tråd väljer repetitivt två slumpvisa positioner i två slumpvisa vektorer och byter plats på dem.
Alla ändringar till vektorerna händer i transaktioner genom att använda clojures software transactional memory system. Tack vare denna transaktionskontroll tappas inget data bort trots att man manipulerar vektorerna från flera trådar parallellt 100 000 gånger i exemplet.
(defn run [nvecs nitems nthreads niters]
(let [vec-refs (vec (map (comp ref vec)
(partition nitems (range (* nvecs nitems)))))
swap #(let [v1 (rand-int nvecs)
v2 (rand-int nvecs)
i1 (rand-int nitems)
i2 (rand-int nitems)]
(dosync
(let [temp (nth @(vec-refs v1) i1)]
(alter (vec-refs v1) assoc i1 (nth @(vec-refs v2) i2))
(alter (vec-refs v2) assoc i2 temp))))
report #(do
(prn (map deref vec-refs))
(println "Distinct:"
(count (distinct (apply concat (map deref vec-refs))))))]
(report)
(dorun (apply pcalls (repeat nthreads #(dotimes [_ niters] (swap)))))
(report)))
(run 100 10 10 100000)
Utfall av föregående exempel:
([0 1 2 3 4 5 6 7 8 9] [10 11 12 13 14 15 16 17 18 19] ...
[990 991 992 993 994 995 996 997 998 999])
Distinct: 1000
([382 318 466 963 619 22 21 273 45 596] [808 639 804 471 394 904 952 75 289 778] ...
[484 216 622 139 651 592 379 228 242 355])
Distinct: 1000
Lisp
Programspråk
|
swedish
| 0.721636
|
Pony/builtin-StringRunes-.txt
|
StringRunes¶
[Source]
class ref StringRunes is
Iterator[U32 val] ref
Implements¶
Iterator[U32 val] ref
Constructors¶
create¶
[Source]
new ref create(
string: String box)
: StringRunes ref^
Parameters¶
string: String box
Returns¶
StringRunes ref^
Public Functions¶
has_next¶
[Source]
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
fun ref next()
: U32 val ?
Returns¶
U32 val ?
|
pony
|
864598
|
https://da.wikipedia.org/wiki/Boeing%20RC-135
|
Boeing RC-135
|
Boeing RC-135 er en flyserie der dækker over en række rekognosceringsfly der er bygget af Boeing og efterfølgende modificeret flere gange af en række virksomheder, inklusiv General Dynamics, Lockheed, LTV, E-Systems og L-3 Communications.
Flyet benyttes af United States Air Force (USAF) og Royal Air Force (RAF) til at støtte nationale og internationale samarbejdspartnere med nær-live efterretningsindhentning og analyser af disse. Flyet er baseret på C-135 Stratolifter-flystellet, den militære variant af den civile Boeing 707. Forskellige versioner af RC-135 har været i tjeneste siden 1961. Der er igennem tiden bygget flere varianter af flytypen der hver især har forskellige designatorer og konfigurationer.
Design og udvikling
Den første RC-135-variant, RC-135A, blev bestilt i 1962 af United States Air Force til at erstatte Boeing RB-50 Superfortress. Oprindeligt bestilte man ni fly, men dette blev senere reduceret til fire. Boeing tildelte flyet designationen Boeing 739-700, men flyet var reelt en modificeret variant af tankflyet KC-135A som man var ved at producere i samme periode. Flyet benyttede de samme J57-P motorer som tankflyet, men var udstyret med fotografiapparater i fragtrummet bag næsehjulet hvor den forreste brændstoftank normalt er placeret. RC-135A var ikke udstyret med lufttankningssystem og flyenes primære opgaver var rekognosceringsopgaver.
Den næste variant man bestilte var RC-135B som blev udviklet specifikt til signalefterretning og skulle erstatte Boeing RB-47H Stratojet og havde ELINT som hovedopgave. Ligesom de andre varanter af C-135-familien var flyet udstyret med TF-33 turbofan-motorer. Disse 10 fly blev leveret direkte til et lager i 1965 hvor de skulle fik installeret det avancerede EK-indhentningsudstyr. I 1967, blev de omdesigneret til RC-135C og blev alle godkendt til operativ brug samme år. Ligesom RC-135A var denne variant ikke udstyret med lufttankningsudstyr med derimod med et KA-59 kamera. Udenpå flyskroget var der installeret et avanceret SLAR-radarsystem (Sideways Looking Airborne Radar) på den nederste del af skroget.
RC-135Bs var de sidste nybyggede fly af denne type, alle efterfølgende varanter var ombygninger af fly i RC-135-familien eller konverterede KC-135-tankfly.
I 2005 afsluttede man en omfattende serie af opgraderinger af RC-135-flåden, hvor blandt andet flystellet blev moderniseret, desuden opgraderede man motorerne fra Pratt & Whitney TF33 til CFM International CFM-56 (F108) motorerne der blev benyttet på KC-135R og T Stratotankere og avionikken blev digitaliseret.
Operativ historie
Den nuværende RC-135-flåde er de nyeste modifikationer af flytypen og modifikationerne strækker sig tilbage til starten af 1960'erne. I begyndelsen blev flytypen benyttet af Strategic Air Command (SAC) til rekognoscering, RC-135 har deltaget i samtlige konflikter USA's forsvar har deltaget i siden flyet indgik i tjeneste. RC-135 støttede operationerne i Vietnamkrigen, Operation El Dorado Canyon, Operation Urgent Fury, Operation Just Cause, Operation Deliberate Force, Operation Allied Force, Operation Desert Storm, Operation Enduring Freedom og Operation Iraqi Freedom. RC-135 har været fast udstationeret i Sydvestasien siden starten af 1990'erne. De var en hjørnesten i den kolde krig hvor de fløj rekognosceringstogter langs Warszawa-pagtens ydre grænser.
I 1992 blev flyene overført fra SAC til Air Combat Command. RC-135-flåden har hjembase på flyvestationen Offutt Air Force Base i Nebraska og er tilknyttet 55th Wing. I alt er 22 RC-135 fly tilknyttet wingen: Tre RC-135S Cobra Ball, to RC-135U Combat Sent, og sytten RC-135V/W Rivet Joint.
Den 9. august 2010, fejrede Rivet Joint sit 20-års jubilæum for uafbrudt tjeneste underlagt Central Command, hvor flyet havde været tilknyttet siden begyndelsen af Desert Storm. Denne tilknytning repræsenterer den længste uafbrudte tilknytning til en ekstern kommando, som en flytype fra USAF har haft. Under tilknytningen har flyene fløjet over 8.000 operative flyvninger til støtte for luft og landstyrkerne involveret i Desert Storm, Desert Shield, Northern Watch, Southern Watch, Iraqi Freedom og Enduring Freedom, som er i gang den dag i dag.
Den 22. marts 2010 offentliggjorde det britiske forsvarsministerium at man havde indgået en aftale med USA om indkøbet af tre RC-135W Rivet Joint fly sammen med en tilhørende landbaseret infrastruktur. Disse fly skulle erstatte Nimrod R1, som efterfølgende blev skrottet i juni 2011. Flyene bliver leveret i perioden 2014-2018. Royal Air Force modtog det første RC-135W i september 2013 og det fik sin ilddåb i juli 2014 til støtte for kamphandlingerne i Syrien og Irak mod Islamisk Stat. I britisk tjeneste benytter man ikke navnet Rivet Joint, men derimod navnet Airseeker.
Varianter
KC-135A Rekognosceringsfly
Mindst fire KC-135A tankfly blev konverteret til improviserede rekognosceringsfly. De fire tankfly; 55-3121, 55-3127, 59-1465 og 59-1514 blev modificeret fra 1961. Samme år annoncerede Sovjetunionen at man ville detonere en 50 Megaton TNT-ækvivalent brintbombe ved Novaja Zemlja, den såkaldte Tsar Bomba. Flyet 55-3127, som blev modificeret under Big Safari-programmet til "SPEED LIGHT BRAVO"-konfigurationen for at indhente efterretninger på testen. Missionens succes betød at man konverterede yderligere fly til efterretningsindhentning.
KC-135R Rivet Stand / Rivet Quick
Flyet skal ikke forveksles med standardtankflyet KC-135R. Tre tankfly blev konverteret til Rivet Stand-standard i juli 1967. De tre fly var 55-3121, 59-1465, 59-1514, samt yderligere en KC-135A, 58-0126, i 1969 som erstatning for 59-1465 som styrtede ved Offutt AFB i Nebraska i 1967. Dette ene fly var betegnet Rivet Quick. Eksternt havde KC-135R forskellige konfigurationer igennem deres levetid, men et karaktesistisk kendetegn var de fem antenner der lignede et håndklædestativ på flyets overside samt radomen under flyet. De første tre fly beholdte standardradomen fra fra tankflyet mens det fjerde fly, 58-0126, blev udstyret med den markante snude der normalt er associeret med et RC-135. En trekantet kasse var placeret bagerst på flyet i stedet for flytankningsstudsen. Herfra man kunne slæbe en speciel modtager via en wire. Dette system blev efter sigende benyttet til "Briar Patch" og "Combat Lion" missioner. Flyet havde fire små vinduer på hver side af den forreste del af skroget. Alle fire fly fik tilføjet en flytankningsstuds umiddelbart bag cockpittet og er sidenhen blevet konverteret tilbage til tankfly. Disse fire fly er nogle af de eneste tankfly der er i stand til at modtage brændstof fra et andet tankfly.
KC-135T Cobra Jaw
Flyet 55-3121 blev i 1969 modificeret af Lockheed Air Services til den unikke KC-135T konfiguration benævnt Cobra Jaw. Flyet blev senere ombygget til et RC-135T Rivet Dandy.
RC-135A
Fire RC-135A (63-8058,63-8059, 63-8060 og 63-8061) var luftfotograferingsplatforme som blev benyttet i en kort periode af Air Photographic & Charting Service, som var baseret ved Turner Air Force Base, Georgia og senere hen ved Forbes Air Force Base i Kansas tilknyttet 1370. Photographic Mapping Wing. Denne opgave blev dog kort efter overtaget af satellitter og RC-135A-flyene blev konverteret til personeltransport. I starten af 1980'erne blev de konverteret til KC-135D-tankfly. På grund af forsinkelser i forbindelse med installationen af tankningsudstyret var de fire fly de sidste fly i C-135-serien der blev leveret til USAF. Internt i Boeing blev RC-135A omtalt som 739-700.
RC-135B
Dette var den første version af flytypen som blev bygget specifikt som RC-135. RC-135B blev aldrig benyttet operativt, da Boeing ikke havde installeret andet udstyr end det rent flyvetekniske. Produktionen bestod af 10 fly og blev leveret direkte til Martin Aircraft i Baltimore, Maryland hvor der skulle installeres indhentningsudstyr og foretages en række modifikationer under Big Safari-programmet. Flyene blev fløj aldrig i denne konfiguration men blev ændret til RC-135C. Boeings modelnummer for flyet var 739-445B.
RC-135C Big Team
Big Team var et modificeret RC-135B-fly benyttet til strategisk efterretning og var udstyret med et AN/ASD-1 elektronisk indhentningssystem (ELINT). Systemet bestod af et antal store kanistre på den forreste del af flyet såvel som andre antenner og en kamerainstallation på tankningsstationen agterst på flyet. Besætningen bestod af to piloter, to navigatører og adskillige efterretningsspecialister og sprogofficerer. Da RC-135C-systemet var fuldt implementeret udfasede SAC flåden af RB-47H Stratojets fra aktiv tjeneste. Alle ti fly af denne type er stadig i aktiv tjeneste som enten RC-135V Rivet Joint eller RC-135U Combat Sent-konfigurationerne.
RC-135D Office Boy / Rivet Brass
Flyene blev leveret til Eielson Air Force Base i Alaska i 1962 som en del af Office Boy-projektet. Serienumrene var 60-356, 60-357 og 60-362 og de operative opgaver startede i 1963. De tre fly blev oprindeligt bestilt som KC-135A-tankfly, men blev leveret uden bomsystemet og blev kendt som de "falske C-135A" som man samtidig havde bestilt et antal af. Den primære opgave for Rivet Brass-flyene var at flyve langs Sovjetunionens nordlige grænse, ofte som transportfly mellem Eielson og RAF Upper Heyford i Oxfordshire, og senere RAF Mildenhall i Suffolk i Storbritannien. RC-135D blev også benyttet i Sydøstasien i de perioder hvor RC-135M (se RC135M Rivet Joint) ikke var til rådighed. I slutningen af 1970'erne konverterede man flyene til KC-135R tankfly.
RC-135E Lisa Ann / Rivet Amber
RC-135E var et enkelt fly oprindeligt designeret C135B-II (projektnavn Lisa Ann) og var unikt udstyret med et stort 7 MW Hughes Aircraft phased-array radarsystem. Flyet blev oprindeligt leveret til USAF som som et C-135B med serienummeret 62-4137 og havde hjemme på Shemya Air Force Station i Alaska i perioden 1966-1969. Flyet opererede i tandem med RC-135S Rivet Ball (se længere nede i teksten). Alene flyets radarsystem vejede over 14 ton og kostede over 35 millioner USD (1960-værdi), hvorved Rivet Amber var både den tungeste C-135-variant samt det dyreste amerikanske fly i sin tid. Den elektromagnetiske udstråling fra flyets radaranlæg var kraftig nok til at være en sundhedsrisiko for besætningen og af denne grund var radaranlægget afskærmet med tykke blyskotter. Radarsystemet kunne spore et objekt på størrelse med en fodbold på en afstand af 300 kilometer og flyets primære opgave var at monitorere sovjetiske ballistiske missiltests når missilerne kom ind i atmosfæren. Radarens strømforbrug var enormt hvorfor der var behov for mere elektricitet end hvad flyet i sin standardkonfiguration kunne levere. Dette betød at man installerede en 350kVA generator under den ene vinge der udelukkende skulle give strøm til de missionsspecifikke systemer. Man installerede desuden en varmeveksler under den anden vinge som kunne køle de massive elektroniske komponenter om bord på flyet. Den 5. juni 1969 styrtede Rivet Amber ned over havet under en flyvning fra Shemya til Eielson AFB for vedligehold og man har aldrig fundet flyet igen.
RC-135M Rivet Card
RC-135M var tiltænkt som en midlertidig flytype og havde en begrænset ELINT-kapacitet i forhold til RC-135C men med en forøget COMINT-kapacitet. Flyene blev benyttet af 82nd Reconnaissance Squadron under Vietnamkrigen fra Kadena Air Base, hvor deres primære opgave var signalefterretning over Tonkinbugten og Laos i operation Combat Apple (oprindeligt Burning Candy). Der var i alt seks fly med RC-135M-konfigurationen; 62-4131, 62-4132, 62-4134, 62-4135, 62-4138 og 62-4139. Disse fly blev alle opgraderet til RC-135W Rivet Joint-standard i starten af 1980'erne.
RC-135S Nancy Rae / Wanda Belle / Rivet Ball
Rivet Ball var forgængeren til Cobra Ball og startede med et enkelt RC-135S (59-1491, tidligere et JKC-135A) den 31. december 1961 under projektnavnet Nancy Rae som et aktiv under Air Force Systems Command og senere under projektnavnet Wanda Belle. Flyet blev omdesigneret til Rivet Ball i januar 1967. Flyet havde base på Shemya Air Force Base i Alaska. Ligesom de fleste andre varianter af RC-135-serien havde RC-135S en forlænget snude hvori der var en S-bånds modtagerantenne. Flyet havde ti karakteristiske flade kvarts-vinduer på den højre side af skroget til sporingskameraer. I modsætning til andre RC-135S, havde Rivet Ball også en plexiglasdome ovenpå skroget til manuel sporing. Flyet var det første i vesten der fik fotografisk dokumentation af de første sovjetiske MIRV-tests den 4. oktober 1968. Den 13. januar 1969 blev Rivet Ball totaltskadet i en landingsulykke ved Shemya da det akvaplanede af landingsbanen, ingen kom til skade ved ulykken.
RC-135S Cobra Ball
RC-135S Cobra Ball er et MASINT-indhentningsfly udstyret med specielle elektrooptiske instrumenter der er designet til at observere ballistiske missiler på lang afstand. Cobra Ball kan monitorere elektromagnetiske signaler associeret med missiler og kan spore missilerne under opsendelsen og genindtrængen i atmosfæren. Flyet er i stand til at dokumentere hvorvidt missiler overtræder Haag-adfærdskodeksen mod spredning af ballistiske missiler. Flyet er et kraftigt modificeret C-135B. Den højre vinge og motorerne er malet sort som på de andre Rivet-varianter.
Tre fly er stadig i tjeneste og de hører under 45th Reconnaisance Squadron underlagt 55th Wing og er hjemmehørende på Offutt Air Force Base i Nebraska. Cobra Ball var oprindeligt udstationeret på Shemya og blev benyttet til at monitorere ballistiske missiltests på Kamtjatka-halvøen sammen med Cobra Dane og Cobra Judy. To fly blev konverteret til Cobra Ball-konfigurationen i 1969. Efter et flystyrt i 1981 blev et endnu fly konverteret i 1983. Det ene RC-135X-fly blev også konverteret til et RC-135S i slutningen af 1990'erne for at supplere de tilbageværende fly.
Efter et RC-135T-fly styrtede modificerede man et EC-135B i 1985 til TC-135S-standard så man kunne benytte det som et skolefly, men var ikke udstyret med den avancerede sensorpakke.
RC-135T Rivet Dandy
En KC-135T med stelnummeret 55-3121 blev modificeret til RC-135T Rivet Dandy-standard i 1971. Det blev benyttet til at supplere flåden af RC-135C/D/M-fly der var hårdt belastet grundet en igangværende opgraderinger af flyene hvilket betød at et antal fly ikke var til rådighed. I 1973 blev flyets indhentningsudstyr fjernet og flyet blev konverteret tilbage til KC-135E-standard og benyttet som et træningsfly i den resterende del af flyets tjenestetid. Flyet beholdte dog sin distinkte snude og andre eksterne modifikationer og fik aldrig installeret en lufttankningsstuds. I denne træningskonfiguration blev flyet i løbet af sin karierre tilknyttet 376th Strategic Wing ved Kadena Air Base, Okinawa, 305th AREFW ved Grissom Air Force Base, Indiana samt den 6th Strategic Wing ved Eielson Air Force Base, Alaska. I 1982 fik flyet installeret Pratt & Whitney TF33-PW102 motorer og andre modifikationer under KC-135E-standarden. Flyet styrtede under indflyvning til Valdez Airport, Alaska den 25. februar 1985 hvor tre besætningsmedlemmer mistede livet. Vraget blev ikke fundet før august 1985, seks måneder efter ulykken.
RC-135U Combat Sent
RC-135U Combat Sent blev designet til at indhente tekniske ELINT data på modstanderens radarsystemer. Indhentningen af Combat Sent data var primært til udviklingen af Radar warning receiver, jammere, missilvildledningssystemer, antiradarmissiler, og træningssimulatorer.
Flyet er udstyret med distinkte antenner på næsen, halen og vingespidserne. I alt blev tre RC-135C konverteret til RC-135U (63-9792, 64-14847 og 64-14849) i starten af 1970'erne. 63-9792 er siden hen konverteret til Rivet Joint-standard i 1978 og alle flyene har base på Offutt Air Force Base i Nebraska. Besætningen består normalt af 2 piloter, 2 navigatører, 3 systemteknikere, 10 EK-operatører og 6 specialister.
RC-135V/W Rivet Joint
RC-135V/W er USAF's primære SIGINT-platform. Flyets sensorpakke gør besætningen i stand til at opfange og identificere elektromagnetiske signaler samt stadfæste deres oprindelsespunkt. Besætningen kan derefter videresende disse informationer i forskellige formater til dem der har et behov for at modtage disse informationer ved hjælp af flyets omfattende kommunikationssystem. Vedligeholdelsen af alle Rivet Joint-flystellene og deres elektroniske systemer bliver udført af L-3 Communications i Greenville, Texas under opsyn af Air Force Materiel Command.
Alle RC-135s er underlagt Air Combat Command. Flyene hører alle til på Offutt Air Force Base i Nebraska og er underlagt 55th Wing. Man benytter dog også en række fremskudte baser rundt om i verden.
Under "BIG SAFARI-programmet" opgraderede man RC-135C "Big Team" til RC-135V-standarden. RC-135W var oprindeligt bygget som et C-135B transportfly og havde tidligere fungeret som RC-135M. I lang tid kunne man kende RC-135V/W på deres fire distinkte MUCELS-antenner forrest, fire mindre agter og en mængde mindre antenner på undersiden af flyet. I 2000'erne introducerede man i baseline 8 Rivet Joints den første større synlige ændring på RC-135V/W hvor man erstattede de store MUCELS-antenner med distinkte mindre antenner. Konfigurationen af de mindre antenner på undersiden af flyet blev også ændret betydeligt.
RC-135X Cobra Eye
Det er kun bygget et enkelt RC-135X Cobra Eye. Det blev konverteret fra et C-135B Telemetrifly i den sidste halvdel af 1980'erne. Flyets opgave er at observere ICBMs vej tilbage igennem atmosfæren. I 1993 blev flyet konverteret til RC-135S Cobra Ball-standard.
</sup>
RC-135W Rivet Joint (Projekt Airseeker)
Storbritannien har købt tre KC-135R-tankfly som skal konverteres til RC-135W Rivet Joint standard under Airseeker-projektet. Anskaffelsen af de tre fly er budgetteret til at koste 634 millioner britiske pund og det første fly skulle efter planen blive leveret i oktober 2014. Flyene udgør No. 51 Squadron RAF, som er baseret på RAF Waddington sammen med RAF's andre ISTAR-aktiver. De forventes at være i tjeneste frem til 2045.
Tidligere benyttede Royal Air Force tre Nimrod R1, som var konverterede maritime patruljefly. Da man begyndte at undersøge mulighederne for at opgradere de tilbageværende maritime Nimrods til MRA4-standarden valgte man samtidig at iværksætte projekt Helix i August 2003. Projektet skulle undersøge mulighederne for at videreføre R1-varianten frem til 2025. I 2008 begyndte man at undersøge muligheden for at pensionere Nimroden og købe Rivet Joint. Da Royal Air Force i 2010 skulle gennemføre store besparelser betød det at hele Nimrod-kapaciteten blev skåret væk. Nimrod R1s deltagelse i Operation Ellamy over Libyen betød dog at flyet først udgik fra aktiv tjeneste i juni 2011. Projekt Helix blev omdøbt til Projekt Airseeker hvorunder tre KC-135R-flystel skulle konverteres til RC-135W-standard af firmaet L-3 Communications. L-3 skal desuden forestå løbende vedligeholdelse og opgraderinger. De tre flystel er tidligere United States Air Force KC-135R, som alle fløj deres jomfruflyvninger i 1964, men nu vil blive modificeret til den nyeste standard inden levering. De tre flystel Storbritannien har bestilt er de yngste KC-135'ere i USAF. I september 2010 havde flyene logget henholdsvis 23.200, 22.200 og 23.200 flyvetimer.
Omskolingen af det britiske personel fra 51 Sqadron til RC-135 begyndte i Offutt i januar 2011. Den første RC135W (ZZ664) blev leveret til Royal Air Force forud for planen den 12. november 2013 og undergik en modtagekontrol og en række tests før den indgik i aktiv tjeneste.
Brugere
55th Wing
38th Reconnaissance Squadron
45th Reconnaissance Squadron
82nd Reconnaissance Squadron (Kadena Air Base, Japan)
95th Reconnaissance Squadron (RAF Mildenhall, England)
343rd Reconnaissance Squadron
No. 51 Squadron RAF
Uheld
Den 13. januar 1969 returnerede USAF RC-135S (Rivet Ball), 59-1491 fra en opgave da det skulle lande på Shemya Air Force Base, Alaska i en snestorm. Flyet aquaplanede af landingsbanen og endte i en 12 meter dyb kløft. Fly af den samme type blev efterfølgende udstyret med thrust-reversere på deres TF-33 turbofanmotorer. Dette fly var dog først udstyret med J-57 turbojetmotorer uden thrust-reversere. Alle 18 besætningsmedlemmer overlevede, men flyet blev afskrevet som totalskadet. Mange af flyets indhentningssystemer er efterfølgende blevet genbrugt i andre fly.
Den 5. juni 1969 forlod USAF RC-135E, 62-4137 (Rivet Amber) Shemya Air Force Base for at flyve til Eielson Air Force Base, Arkansas. Formålet med flyvningen var beskrevet som en rutineflyvning, men under den forrige flyvning havde flyet været i svær turbulens og var derfor kun godkendt til en enkelt kontrolflyvning hvor man skulle undersøge flyet for strukturskader. "Rivet Amber" var det tungeste RC-135-fly bygget og var et yderst sofistikeret fly med en radar der vejede over 15 ton og under hver vinge var specielle kanistre der indeholdt en varmeveksler (højre vinge) og en generator (venstre vinge). Under flyvningen mistede man kontakten til flyet og man fandt aldrig vraget.
Den 15. marts 1981 forulykkede USAF RC-135S (Cobra Ball), 61-2664, under indflyvningen til Shemya Air Force Base fra Eielson Air Force Base i Alaska. det lykkedes ikke for piloten at etablere hverken en korrekt indflyvningsvinkel eller korrekt landingshastighed og ramte jorden før landingsbanen. Ud af de 24 besætningsmedlemmer om bord mistede de seks livet.
Den 25. februar 1985 forulykkede USAF RC-135T (Rivet Dandy), 55-3121. Flyet var lettet fra Eielson AFB og skulle træne landinger under dårlige forhold ved Valdez Municipal Airport (VDZ) i Alaska. De første to landingsforsøg forløb efter planen, men under det tredje løb blev besætningen tilsyneladende disorienteret og ILS-landingskursen blev sat 6,4 kilometer forskudt mod nord i forhold til den korrekte kurs. Den tre mand store besætning (to piloter og en navigatør) mistede livet da flyet fløj ind i en bjergside. Den anvendte indflyvningsprocedure var certificeret for en de Havilland Canada DHC-7, STOL-fly. Både indflyvningsvinklen og flyvemønstret var for stejlt til en RC-135. Flyvraget blev ikke fundet før den 2. august 1985.
Se også
Boeing 707
C-135 Stratolifter
KC-135 Stratotanker
Boeing EC-135
WC-135 Constant Phoenix
Strategic Air Command
Referencer
Bibliografi
Cobra Ball – Federation of American Scientists
RC-135S Cobra Ball Air Force's optical intelligence collection platform – Federation of American Scientists
Eksterne henvisninger
Rivet Joint på FAS.org
The RB-47 & RC-135 in Vietnam af Bruce Bailey
"A Tale of Two Airplanes" af Kingdon R. "King" Hawes, Lt Col, USAF (Pens.)
Boeing RC-135 Reconnaissance Aircraft Images & Info
Fly til elektronisk krigsførelse
RC-135
RC-135
4-motors jetfly
|
danish
| 1.2103
|
Pony/src-builtin-nullable_pointer-.txt
|
nullable_pointer.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35struct NullablePointer[A]
"""
A NullablePointer[A] is used to encode a possibly-null type. It should
_only_ be used for structs that need to be passed to and from the C FFI.
An optional type for anything that isn't a struct should be encoded as a
union type, for example (A | None).
"""
new create(that: A) =>
"""
This re-encodes the type of `that` from A to NullablePointer[A], allowing
`that` to be assigned to a field or variable of type NullablePointer[A]. It
doesn't allocate a wrapper object: there is no containing object for `that`.
"""
compile_intrinsic
new none() =>
"""
This returns a null pointer typed as a NullablePointer[A].
"""
compile_intrinsic
fun apply(): this->A ? =>
"""
This re-encodes the type of `this` from NullablePointer[A] to A, allowing
`this` to be assigned to a field of variable of type A. If `this` is a null
pointer, an error is raised.
"""
compile_intrinsic
fun is_none(): Bool =>
"""
Returns true if `this` is null (ie apply would raise an error).
"""
compile_intrinsic
|
pony
|
4859085
|
https://sv.wikipedia.org/wiki/Ampelopsis%20denudata
|
Ampelopsis denudata
|
Ampelopsis denudata är en vinväxtart som beskrevs av Jules Émile Planchon. Ampelopsis denudata ingår i släktet Ampelopsis och familjen vinväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Vinväxter
denudata
|
swedish
| 1.460039
|
Pony/files-Path-.txt
|
Path¶
[Source]
Operations on paths that do not require a capability. The operations can be
used to manipulate path names, but give no access to the resulting paths.
primitive val Path
Constructors¶
create¶
[Source]
new val create()
: Path val^
Returns¶
Path val^
Public Functions¶
is_sep¶
[Source]
Determine if a byte is a path separator.
fun box is_sep(
c: U8 val)
: Bool val
Parameters¶
c: U8 val
Returns¶
Bool val
sep¶
[Source]
Return the path separator as a string.
fun tag sep()
: String val
Returns¶
String val
is_abs¶
[Source]
Return true if the path is an absolute path.
fun box is_abs(
path: String val)
: Bool val
Parameters¶
path: String val
Returns¶
Bool val
join¶
[Source]
Join two paths together. If the next_path is absolute, simply return it.
The returned path will be cleaned.
fun box join(
path: String val,
next_path: String val)
: String val
Parameters¶
path: String val
next_path: String val
Returns¶
String val
clean¶
[Source]
Replace multiple separators with a single separator.
Convert / to the OS separator.
Remove instances of . from the path.
Remove instances of .. and the preceding path element from the path.
The result will have no trailing slash unless it is a root directory.
If the result would be empty, "." will be returned instead.
fun box clean(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
normcase¶
[Source]
Normalizes the case of path for the runtime platform.
fun box normcase(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
cwd¶
[Source]
Returns the program's working directory. Setting the working directory is
not supported, as it is not concurrency-safe.
fun box cwd()
: String val
Returns¶
String val
abs¶
[Source]
Returns a cleaned, absolute path.
fun box abs(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
rel¶
[Source]
Returns a path such that Path.join(to, Path.rel(to, target)) == target.
Raises an error if this isn't possible.
fun box rel(
to: String val,
target: String val)
: String val ?
Parameters¶
to: String val
target: String val
Returns¶
String val ?
split¶
[Source]
Splits the path into a pair, (head, tail) where tail is the last pathname
component and head is everything leading up to that. The tail part will
never contain a slash; if path ends in a slash, tail will be empty. If
there is no slash in path, head will be empty. If path is empty, both head
and tail are empty. The path in head will be cleaned before it is returned.
In all cases, join(head, tail) returns a path to the same location as path
(but the strings may differ). Also see the functions dir() and base().
fun box split(
path: String val,
separator: String val = call)
: (String val , String val)
Parameters¶
path: String val
separator: String val = call
Returns¶
(String val , String val)
base¶
[Source]
Return the path after the last separator, or the whole path if there is no
separator.
If with_ext is false, the extension as defined by the ext() method
will be omitted from the result.
fun box base(
path: String val,
with_ext: Bool val = true)
: String val
Parameters¶
path: String val
with_ext: Bool val = true
Returns¶
String val
dir¶
[Source]
Return a cleaned path before the last separator, or the whole path if there
is no separator.
fun box dir(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
ext¶
[Source]
Return the file extension, i.e. the part after the last dot as long as that
dot is after all separators. Return an empty string for no extension.
fun box ext(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
volume¶
[Source]
On Windows, this returns the drive letter or UNC base at the beginning of
the path, if there is one. Otherwise, this returns an empty string.
fun box volume(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
from_slash¶
[Source]
Changes each / in the path to the OS specific separator.
fun box from_slash(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
to_slash¶
[Source]
Changes each OS specific separator in the path to /.
fun box to_slash(
path: String val)
: String val
Parameters¶
path: String val
Returns¶
String val
canonical¶
[Source]
Return the equivalent canonical absolute path. Raise an error if there
isn't one.
fun box canonical(
path: String val)
: String val ?
Parameters¶
path: String val
Returns¶
String val ?
is_list_sep¶
[Source]
Determine if a byte is a path list separator.
fun box is_list_sep(
c: U8 val)
: Bool val
Parameters¶
c: U8 val
Returns¶
Bool val
list_sep¶
[Source]
Return the path list separator as a string.
fun box list_sep()
: String val
Returns¶
String val
split_list¶
[Source]
Separate a list of paths into an array of cleaned paths.
fun box split_list(
path: String val)
: Array[String val] iso^
Parameters¶
path: String val
Returns¶
Array[String val] iso^
random¶
[Source]
Returns a pseudo-random base, suitable as a temporary file name or
directory name, but not guaranteed to not already exist.
fun box random(
len: USize val = 6)
: String val
Parameters¶
len: USize val = 6
Returns¶
String val
eq¶
[Source]
fun box eq(
that: Path val)
: Bool val
Parameters¶
that: Path val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: Path val)
: Bool val
Parameters¶
that: Path val
Returns¶
Bool val
|
pony
|
2028174
|
https://no.wikipedia.org/wiki/GraphQL
|
GraphQL
|
GraphQL er et språk tilgjengelig som åpen kildekode som er brukt til spørring og manipulering av programmeringsgrensesnitt, samt en kjøreomgivelse for å utføre spørringer mot eksisterende data.
Historie
I 2012 ble GraphQL utviklet internt av Facebook, og i 2015 ble det gitt ut offentlig. I 2018 ble GraphQL-prosjektet overført fra Facebook til den nyetablerte GraphQL Foundation i regi av den ideelle organisasjonen Linux Foundation.
Siden 2012 har bruken av GraphQL økt tilnærmet likt adopsjonstidslinjen som ble angitt av Lee Byron, en av skaperne bak GraphQL. Byrons mål var å gjøre GraphQL allestedsnærværende på tvers av webplattformer.
Den 9. februar 2018 ble GraphQL Schema Definition Language (SDL) en del av spesifikasjonen.
Spesifikasjon av datastrukturer
GraphQL angir en tilnærming til å utvikle web-API-er, og har blitt sammenlignet med og opp mot REST og andre webtjeneste-arkitekturer. Den tillater klienter å definere strukturen til dataene som kreves, og den samme datastrukturen returneres fra serveren, hvilket forhindrer at store datamengder returneres. Dette har betydning for hvor effektivt man kan få resultater fra spørringer mot webhurtiglagre.
Eksempel
POST-forespørsel:{
orders {
id
productsList {
product {
name
price
}
quantity
}
totalAmount
}
}Svar:{
"data": {
"orders": [
{
"id": 1,
"productsList": [
{
"product": {
"name": "orange",
"price": 1.5
},
"quantity": 100
}
],
"totalAmount": 150
}
]
}
}
Oppbygning
GraphQL består av et typesystem, spørrespråk og utførelsessemantikk, statisk validering og typeintrospeksjon. Den støtter lesing, skriving (mutering) og abonnering på endringer i data (sanntidsoppdateringer), oftest implementert ved hjelp av WebSockets. GraphQL-tjenere er tilgjengelige for flere språk inkludert Haskell, JavaScript, Perl, Python, Ruby, Java, C++, C#, Scala, Go, Rust, Elixir, Erlang, PHP, R, D og Clojure.
Alternativer
Fleksibiliteten og rikdommen i spørringsspråket legger også opp til en kompleksitet som kanskje ikke er verdt å ha for enkle API-er. Til tross for navnet har ikke GraphQL mulighet for samme mengde av grafoperasjoner som en fullverdig grafdatabase, som for eksempel Neo4j eller enkelte dialekter av SQL som støtter transitiv lukking. Eksempelvis vil man med et GraphQL-grensesnitt som rapporterer foreldrene til et individ ikke kunne returnere mengden med alle disse sine forfedre i en enkelt spørring.
Se også
OpenAPI Specification
Referanser
Datamodellering
Grensesnitt for programvare
|
norwegian_bokmål
| 1.064799
|
Pony/calling-c.txt
|
# Calling C from Pony
FFI is built into Pony and native libraries may be directly referenced in Pony code. There is no need to code or configure bindings, wrappers or interfaces.
## Safely does it
__It is VERY important that when calling FFI functions you MUST get the parameter and return types right__. The compiler has no way to know what the native code expects and will just believe whatever you do. Errors here can cause invalid data to be passed to the FFI function or returned to Pony, which can lead to program crashes.
To help avoid bugs, Pony requires you to specify the type signatures of FFI functions in advance. While the compiler will trust that you specify the correct types in the signature, it will check the arguments you provide at each FFI call site against the declared signature. This means that you must get the types right only once, in the declaration. A declaration won't help you if the argument types the native code expects are different to what you think they are, but it will protect you against trivial mistakes and simple typos.
Here's an example of an FFI signature and call from the standard library:
```pony
use @_mkdir[I32](dir: Pointer[U8] tag) if windows
use @mkdir[I32](path: Pointer[U8] tag, mode: U32) if not windows
class val FilePath
fun val mkdir(must_create: Bool = false): Bool =>
// ...
let r = ifdef windows then
@_mkdir(element.cstring())
else
@mkdir(element.cstring(), 0x1FF)
end
```
FFI functions have the @ symbol before its name, and FFI signatures are declared using the `use` command. The types specified here are considered authoritative, and any FFI calls that use different parameter types will result in a compile error.
The use @ command can take a condition just like other `use` commands. This is useful in this case, since the `_mkdir` function only exists in Windows.
If the name of the C function that you want to call is also a [reserved keyword in Pony](/appendices/keywords.md) (such as `box`), you will need to wrap the name in double quotes (`@"box"`). If you forget to do so, your program will not compile.
An FFI signature is public to all Pony files inside the same package, so you only need to write them once.
## C types
Many C functions require types that don't have an exact equivalent in Pony. A variety of features is provided for these.
For FFI functions that have no return value (i.e. they return `void` in C) the return value specified should be `None`.
In Pony, a String is an object with a header and fields, while in C a `char*` is simply a pointer to character data. The `.cstring()` function on String provides us with a valid pointer to hand to C. Our `mkdir` example above makes use of this for the first argument.
Pony classes and structs correspond directly to pointers to the class or struct in C.
For C pointers to simple types, such as U64, the Pony `Pointer[]` polymorphic type should be used, with a `tag` reference capability. To represent `void*` arguments, you should the `Pointer[None] tag` type, which will allow you to pass a pointer to any type, including other pointers. This is needed to write declarations for certain POSIX functions, such as `memcpy`:
```pony
// The C type is void* memcpy(void *restrict dst, const void *restrict src, size_t n);
use @memcpy[Pointer[U8]](dst: Pointer[None] tag, src: Pointer[None] tag, n: USize)
// Now we can use memcpy with any Pointer type
let out: Pointer[Pointer[U8] tag] tag = // ...
let outlen: Pointer[U8] tag = // ...
let ptr: Pointer[U8] tag = // ...
let size: USize = // ...
// ...
@memcpy(out, addressof ptr, size.bitwidth() / 8)
@memcpy(outlen, addressof size, 1)
```
When dealing with `void*` return types from C, it is good practice to try to narrow the type down to the most specific Pony type that you expect to receive. In the example above, we chose `Pointer[U8]` as the return type, since we can use such a pointer to construct Pony Arrays and Strings.
To pass pointers to values to C the `addressof` operator can be used (previously `&`), just like taking an address in C. This is done in the standard library to pass the address of a `U32` to an FFI function that takes a `int*` as an out parameter:
```pony
use @frexp[F64](value: F64, exponent: Pointer[U32])
// ...
var exponent: U32 = 0
var mantissa = @frexp(this, addressof exponent)
```
### Get and Pass Pointers to FFI
If you want to receive a pointer to an opaque C type, using a pointer to a primitive can be useful:
```pony
use @XOpenDisplay[Pointer[_XDisplayHandle]](name: Pointer[U8] tag)
use @eglGetDisplay[Pointer[_EGLDisplayHandle]](disp: Pointer[_XDisplayHandle])
primitive _XDisplayHandle
primitive _EGLDisplayHandle
let x_dpy = @XOpenDisplay(Pointer[U8])
if x_dpy.is_null() then
env.out.print("XOpenDisplay failed")
end
let e_dpy = @eglGetDisplay(x_dpy)
if e_dpy.is_null() then
env.out.print("eglGetDisplay failed")
end
```
The above example would also work if we used `Pointer[None]` for all the pointer types. By using a pointer to a primitive, we are adding a level of type safety, as the compiler will ensure that we don't pass a pointer to any other type as a parameter to `eglGetDisplay`. It is important to note that these primitives should __not be used anywhere except as a type parameter__ of `Pointer[]`, to avoid misuse.
### Working with Structs: from Pony to C
Like we mentioned above, Pony classes and structs correspond directly to pointers to the class or struct in C. This means that in most cases we won't need to use the `addressof` operator when passing struct types to C. For example, let's imagine we want to use the `writev` function from Pony on Linux:
```pony
// In C: ssize_t writev(int fd, const struct iovec *iov, int iovcnt)
use @writev[USize](fd: U32, iov: IOVec tag, iovcnt: I32)
// In C:
// struct iovec {
// void *iov_base; /* Starting address */
// size_t iov_len; /* Number of bytes to transfer */
// };
struct IOVec
var base: Pointer[U8] tag = Pointer[U8]
var len: USize = 0
let data = "Hello from Pony!"
var iov = IOVec
iov.base = data.cpointer()
iov.len = data.size()
@writev(1, iov, 1) // Will print "Hello from Pony!"
```
As you saw, a `IOVec` instance in Pony is equivalent to `struct iovec*`. In some cases, like the above example, it can be cumbersome to define a `struct` type in Pony if you only want to use it in a single place. You can also use a pointer to a tuple type as a shorthand for a struct: let's rework the above example:
```pony
use @writev[USize](fd: U32, iov: Pointer[(Pointer[U8] tag, USize)] tag, iovcnt: I32)
let data = "Hello from Pony!"
var iov = (data.cpointer(), data.size())
@writev(1, addressof iov, 1) // Will print "Hello from Pony!"
```
In the example above, the type `Pointer[(Pointer[U8] tag, USize)] tag` is equivalent to the `IOVec` struct type we defined earlier. That is, _a struct type is equivalent to a pointer to a tuple type with the fields of the struct as elements, in the same order as the original struct type defined them_.
**Can I pass struct types by value, instead of passing a pointer?** Not at the moment. This is a known limitation of the current FFI system, but it is something the Pony team is interested in fixing.
### Working with Structs: from C to Pony
A common pattern in C is to pass a struct pointer to a function, and that function will fill in various values in the struct. To do this in Pony, you make a `struct` and then use a `NullablePointer`, which denotes a possibly-null type:
```pony
use @ioctl[I32](fd: I32, req: U32, ...)
struct Winsize
var height: U16 = 0
var width: U16 = 0
new create() => None
let size = Winsize
@ioctl(0, 21523, NullablePointer[Winsize](size))
env.out.print(size.height.string())
```
A `NullablePointer` type can only be used with `structs`, and is only intended for output parameters (like in the example above) or for return types from C. You don't need to use a `NullablePointer` if you are only passing a `struct` as a regular input parameter.
### Return-type Polymorphism
We mentioned before that you should use the `Pointer[None]` type in Pony when dealing with values of `void*` type in C. This is very useful for function parameters, but when we use `Pointer[None]` for the return type of a C function, we won't be able to access the value that the pointer points to. Let's imagine a generic list in C:
```C
struct List;
struct List* list_create();
void list_free(struct List* list);
void list_push(struct List* list, void *data);
void* list_pop(struct List* list);
```
Following the advice from previous sections, we can write the following Pony declarations:
```pony
use @list_create[Pointer[_List]]()
use @list_free[None](list: Pointer[_List])
use @list_push[None](list: Pointer[_List], data: Pointer[None])
use @list_pop[Pointer[None]](list: Pointer[_List])
primitive _List
```
We can use these declarations to create lists of different types, and insert elements into them:
```pony
struct Point
var x: U64 = 0
var y: U64 = 0
let list_of_points = @list_create()
@list_push(list_of_points, NullablePointer[Point].create(Point))
let list_of_strings = @list_create()
@list_push(list_of_strings, "some data".cstring())
```
We can also get elements out of the list, although we won't be able to do anything with them:
```pony
// Compiler error: couldn't find 'x' in 'Pointer'
let point_x = @list_pop(list_of_points)
point.x
// Compiler error: wanted Pointer[U8 val] ref^, got Pointer[None val] ref
let head = String.from_cstring(@list_pop(list_of_strings))
```
We can fix this problem by adding an explicit return type when calling `list_pop`:
```pony
// OK
let point = @list_pop[Point](list_of_points)
let x_coord = point.x
// OK
let pointer = @list_pop[Pointer[U8]](list_of_strings)
let data = String.from_cstring(pointer)
```
Note that the declaration for `list_pop` is still needed: if we don't add an explicit return type when calling `list_pop`, the default type will be the return type of the declaration.
When specifying a different return type for an FFI function, make sure that the new type is [compatible](#type-signature-compatibility) with the type specified in the declaration.
### Variadic C functions
Some C functions are variadic, that is, they can take a variable number of parameters. To interact with these functions, you should also specify that fact in the FFI signature:
```pony
use @printf[I32](fmt: Pointer[U8] tag, ...)
// ...
let run_ns: I64 = _current_t - _last_t
let rate: I64 = (_partial_count.i64() * 1_000_000_000) / run_ns
@printf("Elapsed: %lld,%lld\n".cstring(), run_ns, rate)
```
In the example above, the compiler will type-check the first argument to `printf`, but will not be able to check any other argument, since it lacks the necessary type information. It is __very__ important that you use `...` in the FFI signature if the corresponding C function is variadic: if you don't, the compiler might generate a program that is incorrect or crash on some platforms while appearing to work correctly on others.
## FFI functions raising errors
Some FFI functions might raise Pony errors. Functions in existing C libraries are very unlikely to do this, but support libraries specifically written for use with Pony may well do.
FFI calls to functions that __might__ raise an error __must__ mark it as such by adding a ? after its declaration. The FFI call site must mark it as well. For example:
```pony
use @pony_os_send[USize](event: AsioEventID, buffer: Pointer[U8] tag, size: USize) ?
// ...
// May raise an error
@pony_os_send(_event, data.cpointer(), data.size()) ?
```
If you're writing a C library that wants to raise a Pony error, you should do so using the `pony_error` function. Here's an example from the Pony runtime:
```C
// In pony.h
PONY_API void pony_error();
// In socket.c
PONY_API size_t pony_os_send(asio_event_t* ev, const char* buf, size_t len)
{
ssize_t sent = send(ev->fd, buf, len, 0);
if(sent < 0)
{
if(errno == EWOULDBLOCK || errno == EAGAIN)
return 0;
pony_error();
}
return (size_t)sent;
}
```
A function that calls the `pony_error` function should only be called from inside a `try` block in Pony. If this is not done, the call to `pony_error` will result in a call to C's `abort` function, which will terminate the program.
## Type signature compatibility
Since type signature declarations are scoped to a single Pony package, separate packages might define different FFI signatures for the same C function. In this case, as well as the case where you specify a different return type for an FFI call, the compiler will make sure that all calls and declarations are compatible with each other. Two functions are compatible if their arguments and return types are compatible. Two types are compatible with each other if they have the same ABI size and they can be safely cast to each other. The compiler allows the following type casts:
* Any `struct` type can be cast to any other `struct` (as they are both pointer types)
* Pointers and integers can be cast to each other.
Consider the following example:
```pony
// In library lib_a
use @memcmp[I32](dst: Pointer[None] tag, src: Pointer[None] tag, len: USize)
// In library lib_b
use @memcmp[I32](dst: Pointer[None] tag, src: USize, len: U64)
```
These two declarations have different types for the `src` and `len` parameters. In the case of `src`, the types are compatible since an integer can be cast as a pointer, and vice versa. For `len`, the types will not be compatible on 32 bit platforms, where `USize` is equivalent to `U32`. It is important to take the rules around casting into account when writing type declarations in libraries that will be used by others, as it will avoid any compatibility problems with other libraries.
## Calling FFI functions from Interfaces or Traits
We mentioned in the previous section that FFI declarations are scoped to a single Pony package, with separate packages possibly defining different FFI signatures for the same C function. Importing an external package will not import any FFI declarations, since any name collisions would produce multiple declarations for the same C function name, and thus deciding which declaration to use would be ambiguous.
Given the above fact, if you define any default methods (or behaviors) in an interface or trait, you will not be able to perform an FFI call from them. For example, the code below will fail to compile:
```pony
use @printf[I32](fmt: Pointer[None] tag, ...)
trait Foo
fun apply() =>
// Error: Can't call an FFI function in a default method or behavior
@printf("Hello from trait Foo\n".cstring())
actor Main is Foo
new create(env: Env) =>
this.apply()
```
If the trait `Foo` above was part of the public API of a package, allowing its `apply` method to perform an FFI call would render `Foo` unusable for any external users, given that the declaration for `printf` would not be in scope.
Fortunately, avoiding this limitation is relatively painless. Whenever you need to call an FFI function from a default method implementation, consider moving said function to a separate type:
```pony
use @printf[I32](fmt: Pointer[None] tag, ...)
trait Foo
fun apply() =>
// OK
Printf("Hello from trait Foo\n")
primitive Printf
fun apply(str: String) =>
@printf(str.cstring())
actor Main is Foo
new create(env: Env) =>
this.apply()
```
By making the change above, we avoid exposing the call to `printf` to any consumers of our trait, thus making it usable by external users.
|
pony
|
6672676
|
https://sv.wikipedia.org/wiki/Busy-waiting
|
Busy-waiting
|
Busy-waiting, busy-looping eller spinning är en teknik där en process upprepade gånger kontrollerar om ett tillstånd gäller, exempelvis om en tangentbordsinmatning eller ett datorlås finns tillgängligt. Spinning kan även användas för att generera en godtycklig fördröjning, en teknik som var nödvändig på system som saknade en metod för att vänta en specifik tidslängd. Processorhastigheter varierar kraftigt mellan datorer, speciellt då en del processorer är utformade för att dynamiskt justera hastigheten baserat på externa faktorer, som exempelvis belastningen på operativsystemet. Därför kan spinning som en tidsfördröjningsteknik ofta producera oförutsägbara eller t.o.m. inkonsistenta resultat såvida koden är implementerad för att bestämma hur snabbt processorn kan köra en tom loop, eller om loopkoden kollar en realtidsklocka.
Spinning kan vara en bra strategi i vissa förhållanden, i synnerhet för implementationen av spinlock inom operativsystem som är byggda att köras på SMP-system. I allmänhet ses spinning som ett antimönster och bör undvikas då processortiden skulle kunna användas för att utföra en annan uppgift istället för att slösa på den på en meningslös aktivitet.
Exempel i C
Följande kod skriven i C illustrerar två trådar som delar ett globalt heltal i. Den första tråden använder busy-waiting för att kolla efter en ändring i värdet för i:
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
volatile int i = 0; /* i är global, så den är synlig för alla funktioner.
Den är även volatile, eftersom den
kanske ändras på ett sätt som kompilatorn inte kan förutspå,
här ifrån en annan tråd. */
/* f1 använder ett spinlock för att vänta på i att ska ändras från 0. */
static void *f1(void *p)
{
while (i==0) {
/* gör ingenting - fortsätt vänta om och om igen */
}
printf("i's value has changed to %d.\n", i);
return NULL;
}
static void *f2(void *p)
{
sleep(60); /* vila i 60 sekunder */
i = 99;
printf("t2 has changed the value of i to %d.\n", i);
return NULL;
}
int main()
{
int rc;
pthread_t t1, t2;
rc = pthread_create(&t1, NULL, f1, NULL);
if (rc != 0) {
fprintf(stderr,"pthread f1 failed\n");
return EXIT_FAILURE;
}
rc = pthread_create(&t2, NULL, f2, NULL);
if (rc != 0) {
fprintf(stderr,"pthread f2 failed\n");
return EXIT_FAILURE;
}
pthread_join(t1, NULL);
pthread_join(t2, NULL);
puts("All pthreads finished.");
return 0;
}
I ett fall som detta kan C11:s condition variable användas istället.
Källor
Se även
Polla (mikroprocessor)
Externa länkar
Beskrivning från The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
Artikeln "User-Level Spin Locks - Threads, Processes & IPC" av Gert Boddaert
Austria SpinLock Class Reference
Antimönster
|
swedish
| 0.765717
|
Pony/src-pony_check-ascii_range-.txt
|
ascii_range.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60primitive ASCIINUL
fun apply(): String => "\x00"
primitive ASCIIDigits
fun apply(): String => "0123456789"
primitive ASCIIWhiteSpace
fun apply(): String => " \t\n\r\x0b\x0c"
primitive ASCIIPunctuation
fun apply(): String => "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
primitive ASCIILettersLower
fun apply(): String => "abcdefghijklmnopqrstuvwxyz"
primitive ASCIILettersUpper
fun apply(): String => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
primitive ASCIILetters
fun apply(): String => ASCIILettersLower() + ASCIILettersUpper()
primitive ASCIIPrintable
fun apply(): String =>
ASCIIDigits()
+ ASCIILetters()
+ ASCIIPunctuation()
+ ASCIIWhiteSpace()
primitive ASCIINonPrintable
fun apply(): String =>
"\x01\x02\x03\x04\x05\x06\x07\x08\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
primitive ASCIIAll
"""
Represents all ASCII characters,
excluding the NUL (\x00) character for its special treatment in C strings.
"""
fun apply(): String =>
ASCIIPrintable() + ASCIINonPrintable()
primitive ASCIIAllWithNUL
"""
Represents all ASCII characters,
including the NUL (\x00) character for its special treatment in C strings.
"""
fun apply(): String =>
ASCIIAll() + ASCIINUL()
type ASCIIRange is
( ASCIINUL
| ASCIIDigits
| ASCIIWhiteSpace
| ASCIIPunctuation
| ASCIILettersLower
| ASCIILettersUpper
| ASCIILetters
| ASCIIPrintable
| ASCIINonPrintable
| ASCIIAll
| ASCIIAllWithNUL)
|
pony
|
2169492
|
https://sv.wikipedia.org/wiki/Thelcticopis%20ajax
|
Thelcticopis ajax
|
Thelcticopis ajax är en spindelart som beskrevs av Pocock 1901. Thelcticopis ajax ingår i släktet Thelcticopis och familjen jättekrabbspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Jättekrabbspindlar
ajax
|
swedish
| 1.172224
|
Pony/files-FileTruncate-.txt
|
FileTruncate¶
[Source]
primitive val FileTruncate
Constructors¶
create¶
[Source]
new val create()
: FileTruncate val^
Returns¶
FileTruncate val^
Public Functions¶
value¶
[Source]
fun box value()
: U32 val
Returns¶
U32 val
eq¶
[Source]
fun box eq(
that: FileTruncate val)
: Bool val
Parameters¶
that: FileTruncate val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileTruncate val)
: Bool val
Parameters¶
that: FileTruncate val
Returns¶
Bool val
|
pony
|
2885200
|
https://sv.wikipedia.org/wiki/Argyrosticta%20atribrunnea
|
Argyrosticta atribrunnea
|
Argyrosticta atribrunnea är en fjärilsart som beskrevs av Embrik Strand 1916. Argyrosticta atribrunnea ingår i släktet Argyrosticta och familjen nattflyn. Inga underarter finns listade i Catalogue of Life.
Källor
Nattflyn
atribrunnea
|
swedish
| 1.18379
|
Pony/collections-persistent-MapIs-.txt
|
MapIs[K: Any #share, V: Any #share]¶
[Source]
A map that uses identity comparison on the key.
type MapIs[K: Any #share, V: Any #share] is
HashMap[K, V, HashIs[K] val] val
Type Alias For¶
HashMap[K, V, HashIs[K] val] val
|
pony
|
4423544
|
https://sv.wikipedia.org/wiki/Viburnum%20fansipanense
|
Viburnum fansipanense
|
Viburnum fansipanense är en desmeknoppsväxtart som beskrevs av J.M.H.Shaw, Wynn-jones och V.D.Nguyen. Viburnum fansipanense ingår i släktet olvonsläktet, och familjen desmeknoppsväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Olvonsläktet
fansipanense
|
swedish
| 1.273024
|
Pony/backpressure--index-.txt
|
Backpressure Package¶
The Backpressure package allows Pony programmers to participate in Pony's
runtime backpressure system. The goal of the backpressure system is to prevent
an actor's mailbox from growing at an unbounded rate.
At a high level, the runtime backpressure system works by adjusting the
scheduling of actors. When an actor becomes overloaded, the Pony runtime will
deprioritize scheduling the actors that are sending to it. This change in
scheduling allows the overloaded actor to catch up.
The Pony runtime can detect overloading based on message queue size. However,
the overloading of some types of actors is harder to detect. Let's take the
case of actors like TCPConnection.
TCPConnection manages a socket for sending data to and receiving data from
another process. TCP connections can experience backpressure from outside
our Pony program that prevents them from sending. There's no way for the Pony
runtime to detect this, so intervention by the programmer is needed.
TCPConnection is a single example. This Backpressure package exists to allow
a programmer to indicate to the runtime that a given actor is experiencing
pressure and sending messages to it should be adjusted accordingly.
Any actor that needs to be able to tell the runtime to "send me messages
slower" due to external conditions can do so via this package. Additionally,
actors that maintain their own internal queues of any sort, say for buffering,
are also prime candidates for using this package. If an actor's internal
queue grows too large, it can call Backpressure.apply to let the runtime know
it is under pressure.
Example program¶
// Here we have a TCPConnectionNotify that upon construction
// is given a ApplyReleaseBackpressureAuth token. This allows the notifier
// to inform the Pony runtime when to apply and release backpressure
// as the connection experiences it.
// Note the calls to
//
// Backpressure.apply(_auth)
// Backpressure.release(_auth)
//
// that apply and release backpressure as needed
use "backpressure"
use "collections"
use "net"
class SlowDown is TCPConnectionNotify
let _auth: ApplyReleaseBackpressureAuth
let _out: OutStream
new iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>
_auth = auth
_out = out
fun ref throttled(connection: TCPConnection ref) =>
_out.print("Experiencing backpressure!")
Backpressure.apply(_auth)
fun ref unthrottled(connection: TCPConnection ref) =>
_out.print("Releasing backpressure!")
Backpressure.release(_auth)
fun ref connect_failed(conn: TCPConnection ref) =>
None
actor Main
new create(env: Env) =>
let socket = TCPConnection(TCPConnectAuth(env.root),
recover SlowDown(
ApplyReleaseBackpressureAuth(env.root), env.out) end, "", "7669")
Caveat¶
The runtime backpressure is a powerful system. By intervening, programmers can
create deadlocks. Any call to Backpressure.apply should be matched by a
corresponding call to Backpressure.release. Authorization via the
ApplyReleaseBackpressureAuth capability is required to apply or release
backpressure. By requiring that the caller have a token to apply or release a
backpressure, rouge 3rd party library code can't run wild and unknowingly
interfere with the runtime.
Public Types¶
primitive ApplyReleaseBackpressureAuth
primitive Backpressure
|
pony
|
57179
|
https://da.wikipedia.org/wiki/Multithreading
|
Multithreading
|
Multithreading er en måde at distribuere opgaver i programmer mellem flere, alenestående men samarbejdende tråde i programmet, og adskiller sig fra multiproces-programmer ved, at der ikke anvendes flere instanser af samme program samtidig, med dertil hørende interproceskommunikation, men at al håndtering af koordination og kommunikation foregår inde i selve programmet, samt at programmerne nemt og elegant kan anvende samtlige globale variable.
Anvendelse af multithreading
Da tråde elegant kan distribueres over flere processorer, kan maksimal ydeevne for multiprocessor-systemer nåes ved enkel og effektiv anvendelse af multithreading, uden det store overhead multiproces-programmer skaber hos operativsystemet.
Eksempel
Et enkelt eksempel på multithreading, skrevet i Cocoa:
multithread.m
#import <Cocoa/Cocoa.h>
@interface Multithread : NSObject {
}
– (void) sigHejToGange;
– (void) hejThread;
@end
@implementation Multithread
– (void) sigHejToGange {
NSLog(@"Hej, verden");
[NSThread detachThreadSelector: @selector( hejThread) toTarget: self withObject: NIL];
}
– (void) hejThread {
NSLog(@"Hej, verden");
}
@end
int main() {
Multithread * test = [[Multithread alloc] init];
[test sigHejToGange];
[test release]
}
Programmet udskriver "Hej, verden" to gange – i to forskellige threads.
Synkronisering mellem tråde
Synkronisering kan ske med mutexes og spinlocks, eller ved hjælp af primitive kontrolvariable, og et simpelt if-udsagn.
Programmeringssprog, som understøtter tråde
C (gennem bl.a. POSIX)
C++ som C.
Objective-C (POSIX, Cocoa)
Ruby, indbygget
Perl, indbygget
Python, indbygget
Java, indbygget
Delphi/Object Pascal, via OOP
Operativsystemer, som understøtter tråde
Apple: Mac OS X
Microsoft Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows 2003
Open source: Linux, FreeBSD, NetBSD, OpenBSD og andre
Sun Microsystems: Solaris
Datalogi
Programmeringssprog
|
danish
| 0.856632
|
Pony/src-net-dns-.txt
|
dns.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91use @pony_os_addrinfo[Pointer[U8]](family: U32, host: Pointer[U8] tag,
service: Pointer[U8] tag)
use @pony_os_getaddr[None](addr: Pointer[None] tag, ipaddr: NetAddress tag)
use @pony_os_nextaddr[Pointer[U8]](addr: Pointer[None] tag)
use @freeaddrinfo[None](addr: Pointer[None] tag)
use @pony_os_host_ip4[Bool](host: Pointer[U8] tag)
use @pony_os_host_ip6[Bool](host: Pointer[U8] tag)
primitive DNS
"""
Helper functions for resolving DNS queries.
"""
fun apply(auth: DNSAuth, host: String, service: String)
: Array[NetAddress] iso^
=>
"""
Gets all IPv4 and IPv6 addresses for a host and service.
"""
_resolve(auth, 0, host, service)
fun ip4(auth: DNSAuth, host: String, service: String)
: Array[NetAddress] iso^
=>
"""
Gets all IPv4 addresses for a host and service.
"""
_resolve(auth, 1, host, service)
fun ip6(auth: DNSAuth, host: String, service: String)
: Array[NetAddress] iso^
=>
"""
Gets all IPv6 addresses for a host and service.
"""
_resolve(auth, 2, host, service)
fun broadcast_ip4(auth: DNSAuth, service: String)
: Array[NetAddress] iso^
=>
"""
Link-local IP4 broadcast address.
"""
ip4(auth, "255.255.255.255", service)
fun broadcast_ip6(auth: DNSAuth, service: String)
: Array[NetAddress] iso^
=>
"""
Link-local IP6 broadcast address.
"""
ip6(auth, "FF02::1", service)
fun is_ip4(host: String): Bool =>
"""
Returns true if the host is a literal IPv4 address.
"""
@pony_os_host_ip4(host.cstring())
fun is_ip6(host: String): Bool =>
"""
Returns true if the host is a literal IPv6 address.
"""
@pony_os_host_ip6(host.cstring())
fun _resolve(
auth: DNSAuth,
family: U32,
host: String,
service: String)
: Array[NetAddress] iso^
=>
"""
Turns an addrinfo pointer into an array of addresses.
"""
var list = recover Array[NetAddress] end
var result = @pony_os_addrinfo(family, host.cstring(), service.cstring())
if not result.is_null() then
var addr = result
while not addr.is_null() do
let ip = recover NetAddress end
@pony_os_getaddr(addr, ip)
list.push(consume ip)
addr = @pony_os_nextaddr(addr)
end
@freeaddrinfo(result)
end
list
|
pony
|
114436
|
https://sv.wikipedia.org/wiki/Address%20Resolution%20Protocol
|
Address Resolution Protocol
|
ARP, Address Resolution Protocol, är ett kommunikationsprotokoll som används för att koppla samman en IP-adress med en MAC-adress. ARP brukar anses som ett nätverksprotokoll, och är förbindelsen mellan nätverk- och länklagret i OSI-modellen.
Ett nätverkskort, exempelvis för ethernet, är en nivå 2-utrustning som kan skicka ramar (frames) från en nod till en annan. Alla noder är adresserbara genom sina MAC-adresser. Den fysiska signaleringen från nod till nod utgår alltså från dessa MAC-adresser, medan applikationerna som kommunicerar använder sig av IP-adresser. För att detta skall ske måste alltså en nod associera mottagarens IP-adress med mottagarens MAC-adress.
Hur ARP fungerar
En ARP-förfrågan (ARP-request) frågar i princip "Vem har IP-adress x.x.x.x" och är en nivå-2 broadcast med den egna nodens MAC-adress som avsändaradress. Noden med IP-adress x.x.x.x svarar med en unicast tillbaka.
ARP-trafik loggad med tcpdump kan se ut så här:
[root@teacher ~]# tcpdump -ennqti eth0 \( arp or icmp \)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
00:19:5b:4c:2c:5A > ff:ff:ff:ff:ff:ff, ARP, length 60: arp who-has 192.168.10.179 (ff:ff:ff:ff:ff:ff) tell 192.168.10.1
00:14:22:52:6b:03 > 00:19:5b:4c:2c:5A, ARP, length 42: arp reply 192.168.10.179 is-at 00:14:22:52:6b:03
00:14:22:52:6b:03 > ff:ff:ff:ff:ff:ff, ARP, length 42: arp who-has 192.168.10.31 tell 192.168.10.179
00:40:8c:55:70:9c > 00:14:22:52:6b:03, ARP, length 60: arp reply 192.168.10.31 is-at 00:40:8c:55:70:9c
Först kommer det en fråga ("who-has") från värden med ip-adress 192.168.10.1 som skickats till broadcastadressen ff:ff:ff:ff:ff:ff. Den kommer att uppfattas av alla noder inom broadcastdomänen. Den dator på vilken loggningen sker är efterfrågad och svarar därför (reply). Alla andra datorer ignorerar denna förfrågan.
Andra exemplet är hur den loggande datorn skickar en fråga efter MAC-adressen som motsvarar ip 192.168.10.31 och får svar från noden med MAC-adress 00:40:8c:55:70:9c.
ARP-tabeller
För att slippa göra en ARP-förfrågan för varje paket som ska skickas cachar operativsystemet resultatet i en tabell. På många operativsystem finns kommandot arp för att visa och manipulera arp-cachen. Exempelvis listar arp -a cachen och arp -d raderar cachen.
[root@teacher ~]# arp -a
gw (192.168.10.1) at 00:19:5B:4C:2C:5A [ether] on eth0
server (192.168.10.11) at 00:30:05:C7:D4:04 [ether] on eth0
? (192.168.10.31) at 00:40:8C:55:70:9C [ether] on eth0
Tag bort värden gw från tabellen:
[root@teacher ~]# arp -d gw
Ny tabell:
[root@teacher ~]# arp -a
gw (192.168.10.1) at <incomplete> on eth0
server (192.168.10.11) at 00:30:05:C7:D4:04 [ether] on eth0
? (192.168.10.31) at 00:40:8C:55:70:9C [ether] on eth0
ARP och routning
ARP används i fyra fall när noder vill kommunicera:
När noder är i samma nätverk och vill kommunicera med varandra
När noder är i olika nätverk och behöver använda sig av en router för att nå mottagande nod
När en router behöver vidarebefordra ett paket åt en nod genom en annan router
När en router behöver vidarebefordra ett paket från en nod till en annan på samma nätverk
InARP
InARP är en akronym för "Inverse Adress Resolution Protocol".
Det är ett protokoll som används för att få tag på adresser på nätverksskiktet (till exempel IP-adresser) från en station på datalänkskiktet. Det används främst inom Frame Relay protokollet och ATM nätverk, där en Virtuell Kanals Datalänk adresser fås ibland av Datalänk signalering, de motsvarande adresserna i nätverksskiktet måste vara tillgängliga innan man kan använda Virtuella kanaler.
ARP mappar nätverks adresser till datalänk adresser, InARP fungerar på samma sätt men omvänt, dessutom så är InARP implementerat som en utvidgning av ARP.
Se även
Reverse Address Resolution Protocol (RARP)
ARP spoofing genom ARP poisoning
Källor
Nätverksskiktsprotokoll
IP-adresser
|
swedish
| 0.580288
|
Pony/src-collections-sort-.txt
|
sort.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78primitive Sort[A: Seq[B] ref, B: Comparable[B] #read]
"""
Implementation of dual-pivot quicksort. It operates in-place on the provided Seq, using
a small amount of additional memory. The nature of the element-realation is expressed via
the supplied comparator.
(The following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Quicksort).)
Quicksort is a common implementation of a sort algorithm which can sort items of any type
for which a "less-than" relation (formally, a total order) is defined.
On average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case,
it makes O(n2) comparisons, though this behavior is rare. Multi-pivot implementations
(of which dual-pivot is one) make efficient use of modern processor caches.
## Example program
The following takes an reverse-alphabetical array of Strings ("third", "second", "first"),
and sorts it in place alphabetically using the default String Comparator.
It outputs:
> first
> second
> third
```pony
use "collections"
actor Main
new create(env:Env) =>
let array = [ "third"; "second"; "first" ]
let sorted_array = Sort[Array[String], String](array)
for e in sorted_array.values() do
env.out.print(e) // prints "first \n second \n third"
end
```
"""
fun apply(a: A): A^ =>
"""
Sort the given seq.
"""
try _sort(a, 0, a.size().isize() - 1)? end
a
fun _sort(a: A, lo: ISize, hi: ISize) ? =>
if hi <= lo then return end
// choose outermost elements as pivots
if a(lo.usize())? > a(hi.usize())? then _swap(a, lo, hi)? end
(var p, var q) = (a(lo.usize())?, a(hi.usize())?)
// partition according to invariant
(var l, var g) = (lo + 1, hi - 1)
var k = l
while k <= g do
if a(k.usize())? < p then
_swap(a, k, l)?
l = l + 1
elseif a(k.usize())? >= q then
while (a(g.usize())? > q) and (k < g) do g = g - 1 end
_swap(a, k, g)?
g = g - 1
if a(k.usize())? < p then
_swap(a, k, l)?
l = l + 1
end
end
k = k + 1
end
(l, g) = (l - 1, g + 1)
// swap pivots to final positions
_swap(a, lo, l)?
_swap(a, hi, g)?
// recursively sort 3 partitions
_sort(a, lo, l - 1)?
_sort(a, l + 1, g - 1)?
_sort(a, g + 1, hi)?
fun _swap(a: A, i: ISize, j: ISize) ? =>
a(j.usize())? = a(i.usize())? = a(j.usize())?
|
pony
|
1458339
|
https://sv.wikipedia.org/wiki/Shell%20sort
|
Shell sort
|
Shell Sort är en sorteringsalgoritm som uppfanns 1959 av Donald Shell. Algoritmen kan ses som en förbättring av andra enklare sorteringsalgoritmer, vanligtvis Insättningssortering. Det som gör att Shell Sort är effektivare än vanlig insättningssortering är att algoritmen tillåter jämförelse mellan två element som ligger långt ifrån varandra.
Exempelkod
Två funktioner "swapItems" och "compare" antas finnas tillgängliga för ett indexerbart objekt för att kasta om respektive göra jämförelser mellan objektets element.
void
shellSort(int itemSize,
swapFuncType swapItems,
compFuncType compare)
{
itemSize--;
int offset = itemSize / 2;
while (offset > 0) {
bool done = false;
int limit = itemSize - offset;
while (done == false) {
int swap = 0;
done = true;
for (int i = 0; i <= limit; i++) {
if (compare(i, i + offset)) {
swapItems(i, i + offset);
swap = i;
done = false;
}
}
limit = swap - offset;
}
offset = offset / 2;
}
}
Sorteringsalgoritmer
|
swedish
| 0.56014
|
Pony/symbol-lookup-cheat-sheet.txt
|
# Symbol Lookup Cheat Sheet
Pony, like just about any other programming language, has plenty of odd symbols that make up its syntax. If you don't remember what one means, it can be hard to search for them. Below you'll find a table with various Pony symbols and what you should search the tutorial for in order to learn more about the symbol.
| Symbol | Search Keywords |
| ------ | --------------------- |
| `!` | Alias |
| `->` | Arrow type, viewpoint |
| `.>` | Chaining |
| `^` | Ephemeral |
| `@` | FFI |
| `&` | Intersection |
| `=>` | Match arrow |
| `~` | Partial application |
| `?` | Partial function |
| `'` | Prime |
| `<:` | Subtype |
Here is a more elaborate explanation of Pony's use of special characters: (a line with (2) or (3) means an alternate usage of the symbol of the previous line)
| Symbol | Usage |
| ------- | ------------------------------------------------------------------------------- |
| `,` | to separate parameters in a function signature, or the items of a tuple |
| `.` | (1) to call a field or a function on a variable (field access or method call) |
| | (2) to qualify a type/method with its package name |
| `.>` | to call a method on an object and return the receiver (chaining) |
| `'` | used as alternative name in parameters (prime) |
| `"` | to delineate a literal string |
| `"""` | to delineate a documentation string |
| `(` | (1) start of line: start of a tuple |
| | (2) middle of line: method call |
| `()` | (1) parentheses, for function or behavior parameters |
| | (2) making a tuple (values separated by `,`) |
| | (3) making an enumeration (values separated by |) |
| `[` | (1) start of line: start of an array literal |
| | (2) middle of line: generic formal parameters |
| `[]` | (1) to indicate a generic type, for example `Range[U64]` |
| | (2) to indicate the return type of an FFI function call |
| `{}` | a function type |
| `:` | (1) after a variable: is followed by the type name |
| | (2) to indicate a function return type |
| | (3) a type constraint |
| `;` | only used to separate expressions on the same line |
| `=` | (1) (destructive) assignment |
| | (2) in: use alias = package name |
| | (3) supply default argument for method |
| | (4) supply default type for generics |
| `!` | (1) boolean negation |
| | (2) a type that is an alias of another type |
| `?` | (1) partial functions |
| | (2) a call to a C function that could raise an error |
| `-` | (1) start of line: unary negation |
| | (2) middle of line: subtraction |
| `_` | (1) to indicate a private variable, constructor, function, behavior |
| | (2) to ignore a tuple item in a pattern match |
| `~` | partial application |
| `^` | an ephemeral type |
| | | (1) separates the types in an enumeration (the value can be any of these types) |
| | (2) starts a branch in a match |
| `&` | (1) separates the types in a complex type (the value is of all of these types) |
| | (2) intersection |
| `@` | FFI call |
| `//` | comments |
| `/* */` | multi-line or block comments |
| `=>` | (1) start of a function body |
| | (2) starts the code of a matching branch |
| `->` | (1) arrow type |
| | (2) viewpoint |
| `._i` | where `i = 1,2,…` means the item at position i in the tuple |
| `<:` | "is a subtype of" or "can be substituted for" |
|
pony
|
618694
|
https://sv.wikipedia.org/wiki/Grind%20Finale
|
Grind Finale
|
Grind Finale är en dubbelskivsamling med alla grindcorebandet Nasums låtar från 15 studioinspelningar från 1993 till och med 2004, inklusive 21 tidigare osläppta låtar.
Originaltiteln på samlingen var "Blueprint for Extinction" men då Nasum-sångaren Mieszko dog, kände bandet att ordet "extinction" ("utdöd") gjorde hela titeln väldig opassande. Grind Finale blev titeln för grindbandet Nasums sista släpp.
Spår
Skiva ett
Blind World – 1:18
Think – 1:20
Scarecrows – 1:36
No Time to Waste – 0:42
Total Destruction – 0:27
Between the Walls – 1:50
Left in a Dream – 0:24
Uneventful Occupation – 0:58
Reasons? – 0:18
Disforest – 0:10
Self Vilification – 0:35
Red Tape Suckers – 0:04
Re-create the System – 0:27
Rens – 0:04
Hurt – 0:24
Corpse Flesh Genitals – 0:58
Sawder – 0:47
A Look at Society – 0:44
Fucking Murder! – 0:43
Black Visions (Scarecrows II) – 1:00
Escape – 0:17
See the Shit (With Your Own Eyes) – 0:47
Restrained from the Truth – 0:31
No Chance – 0:57
My Fear – 0:37
Fur – 1:02
A Game Played by Society – 0:28
It's All About the Information – 0:20
Smile When You're Sead – 0:32
Blindfolded (By the Media) – 0:22
Erased – 0:20
Warfuck – 0:12
No Chance (Extended Noise-remix Version) – 1:51
Cut to Fit – 0:44
Forced Opinion – 0:37
Domedagen – 0:43
Left in a Dream – 0:23
Distortion & Disinformation – 1:23
Stalemate (Napalm Death-cover) – 0:58
Bag – 0:46
Revolution – 0:37
What's "Life"? – 0:35
Think – 1:12
Verklighetsflykt – 0:19
Face Obliteration – 0:58
Enough! – 1:03
Dom Styr Vara Liv (Mob 47-cover) – 1:01
Industrislaven – 0:25
Löpandebandsprincipen – 0:28
Cut to Fit – 0:45
Fantasibilder – 0:52
Distortion & Disinformation – 1:24
Brinn – 0:51
Krigets Skörd – 1:09
Mer Rens – 0:17
Ditt Öde – 0:26
Ingenting Att Ha! – 0:17
Revolution – 0:35
Den Mörka Tiden – 0:39
Forcefed Opinion – 0:37
Domedagen – 0:37
Dolt Under Ytan – 0:22
I Helvetet – 0:33
Skithus – 0:37
Söndermald – 1:35
Revolution II – 0:37
World in Turmoil – 0:13
The Final Confrontation (Scarecrows III) – 0:44
The Dream – 0:54
Zombie Society – 0:33
Sheer Horror – 0:50
Awake – 0:25
En Värld Utan Hopp – 0:35
End – 0:18
As Time Goes By... – 0:22
Our Revolution – 0:50
Masqureade – 0:26
Ripped – 0:48
Rage – 0:19
Law & Order? – 0:30
Rise – 0:44
Killed By Your Greed – 0:42
Silent Sanguinary Soil – 1:48
Evacuate the Earth – 1:04
The Black Illusions – 0:11
Disgrace – 0:47
No Paradise for the Damned – 0:32
A Change in Your Mind – 0:26
Dreamland – 1:00
Last – 0:42
Skiva två
Dis Sucks – 0:38
The Leak – 0:19
Eviscerated (By the Fiend) – 0:58
Shambler – 0:26
Lack of Ammunition – 0:23
The Machines – 0:27
Låt Inte Asen Styra Ditt Liv – 0:56
Going Nowhere – 0:55
Generation Ex – 0:26
The Soil Bleeds Black – 0:42
Hail the Chaos! – 1:00
Fuck the System – 0:31
The Spiral Goes Down – 1:00
Shortcut to Extinction – 0:20
Vows – 0:31
Hate Division – 0:59
Visions of War (Discharge-cover) – 0:59
Bullshit Tradition (DropDead-cover) – 0:29
Device (S.O.B.-cover) – 1:36
The Real (Refused-cover) – 2:18
Rio de San Atlanta, Manitoba (Propagandhi-cover) – 0:33
...And You Were Blind to What Lay Beyond the Horizon – 0:45
Stolen Pride – 0:55
Silent – 1:07
Losing Faith – 0:35
I Decline! – 0:25
Naive Ignorant Fucks! – 0:11
Obstacle – 0:20
The Political Structure is not What it Seems in the So Called Lucid View that Man has Upon Today's Society. What the Eye Sees is a Lie. – 0:11
A Bloodbath Displayed – 0:46
God-slave America – 1:34
Supernova – 0:52
Shafted – 0:35
S.O.C.I.E.T.Y. (Hall of the Dead) – 0:28
Tools of the Trade (Carcass-cover) – 2:58
Fear – 1:09
Krossa – 1:21
In Praise of Folly – 1:27
Peace? – 0:54
Falska tankar – 1:22
Godmorgon, Idiotjävel – 1:16
Understand: You are Deluded – 1:06
Fear of the China Syndrome – 1:21
Suicide – 0:58
X Marks the Spot – 2:14
The Flames of the Truth – 2:07
Sticks and Stones – 0:36
Dead Mirror – 1:22
Helvete – 1:00
A Civil Critique – 1:58
Damned Nation – 0:58
A Dead Generation – 1:07
Divine Intervention – 0:47
Fury – 2:26
The Unfathomable Situation – 2:19
Unchallenged Hate (Napalm Death-cover) – 2:03
D.L.T.D. – 0:38
Gravar – 0:25
Ingenting – 0:55
Until the Board Breaks – 1:31
Downwards – 0:53
Stealth Politics – 0:46
Musikalbum 2005
Album av Nasum
Album producerade av Mieszko Talarczyk
|
swedish
| 1.596448
|
Pony/capability-matrix.txt
|
# Reference Capability Matrix
At this point, it's quite possible that you read the previous sections in this chapter and are still pretty confused about the relation between reference capabilities. It's okay! We have all struggled when learning this part of Pony, too. Once you start working on Pony code, you'll get a better intuition with them.
In the meantime, if you still feel like all these tidbits in the chapter are still scrambled in your head, there is one resource often presented with Pony that can give you a more visual representation: the __reference capability matrix__.
It is also the origin of the concept behind each capability in Pony, in the sense of how each capability denies certain properties to its reference -- in other words, which guarantees a capability makes. We will explain what that actually means before presenting the matrix.
## Local and global aliases
Before anything else, we want to clarify what we mean by "local" and "global" aliases.
A local alias is a reference to the same variable that exists in the same actor. Whenever you pass a value around, and it's not the argument of an actor's behavior, this is the kind of alias we are working with.
On the other hand, a global alias is a reference to the same variable that can exist in a _different_ actor. That is, it describes the properties of how two or more actors could interact with the same reference.
Each reference capability in Pony is actually a pair of local guarantees and global guarantees. For instance, `ref` doesn't deny any read/write capabilities inside the actor, but denies other actors from reading or writing to that reference.
You may recall from the [Reference Capability Guarantees](guarantees.md) section that mutable references cannot be safely shared between actors, while immutable references can be read by multiple actors. In general, global properties are always as restrictive or more restrictive than the local properties to that reference - what is denied globally must also be denied locally. For example, it's not possible to write to an immutable reference in either a global or local alias. It's also not possible to read from or write to an opaque reference, `tag`. Therefore, some combinations of local and global aliases are impossible, and have no designated capabilities.
## Reference capability matrix
Without further ado, here's the reference capability matrix:
---
| | Deny global read/write aliases | Deny global write aliases | Don't deny any global aliases |
| --------------------------------- | ------------------------------ | ------------------------- | ----------------------------- |
| __Deny local read/write aliases__ | __`iso`__ | |
| __Deny local write aliases__ | `trn` | __`val`__ |
| __Don't deny any local aliases__ | `ref` | `box` | __`tag`__ |
| | _(Mutable)_ | _(Immutable)_ | _(Opaque)_ |
---
In the context of the matrix, "denying a capability" means that any other alias to that reference is not allowed to do that action. For example, since `trn` denies other local write aliases (but allows reads), this is the only reference that allows writing to the object; and since it denies both read and write aliases to other actors, it's safe to write inside this actor, thus being mutable. And since `box` does not break any guarantees that `trn` makes (local reads are allowed, but global writes are forbidden), we can create `box` aliases to a `trn` reference.
You'll notice that the top-right side is empty. That's because, as previously discussed, we cannot make any local guarantees that are more restrictive than the global guarantees, or we'd end up with invalid capabilities that could be written to in this actor but read somewhere else at the same time.
The matrix also helps visualizing other concepts previously discussed in this chapter:
* __Sendable capabilities__. If we want to send references to a different actor, we must make sure that the global and local aliases make the same guarantees. It'd be unsafe to send a `trn` to another actor, since we could possibly hold `box` references locally. Only `iso`, `val`, and `tag` have the same global and local restrictions – all of which are in the main diagonal of the matrix.
* __Ephemeral subtyping__. If we have an ephemeral capability (for instance, `iso^` after consuming an isolated variable), we can be more permissive for the new alias, i.e. remove restrictions, such as allowing local aliases with read capabilities, and receive the reference into a `trn^`; or both read and write, which gives us `ref`. The same is true for more global alias, and we can get `val`, `box`, or `tag`. Visually, this would be equivalent to walking downwards and/or to-the-right starting from the capability in the matrix.
* __Recovering capabilities__. This is when we "lift" a capability, from a mutable reference to `iso` or an immutable reference to `val`. The matrix equivalent would be walking upwards starting from the capability – quite literally lifting in this case.
* __Aliasing__. With a bit more of imagination, it's possible to picture aliasing `iso` and `trn` as reflecting them on the secondary diagonal of the matrix onto `tag` and `box`, respectively. The reason for that lies on which restrictions arise from the local guarantees. An `iso` doesn't allow different aliases to read or write, which `tag` enforces; and `trn` doesn't allow different aliases to write but allows them to do local reads, fitting `box`'s restrictions.
We want to emphasize that trying to apply the reference capability matrix to some capabilities problems is not guaranteed to work (viewpoint adaptation is one example). The matrix is the original definition of the reference capabilities, presented here as a mnemonic device. Whenever you struggle with reference capabilities, we recommend that you reread the corresponding section of this chapter to understand why something is not allowed by the compiler.
|
pony
|
2430981
|
https://sv.wikipedia.org/wiki/Naso%20brevirostris
|
Naso brevirostris
|
Naso brevirostris är en fiskart som först beskrevs av Cuvier 1829. Naso brevirostris ingår i släktet Naso och familjen Acanthuridae. IUCN kategoriserar arten globalt som livskraftig. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Abborrartade fiskar
brevirostris
|
swedish
| 1.449367
|
Pony/builtin-Int-.txt
|
Int¶
[Source]
type Int is
(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)
Type Alias For¶
(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)
|
pony
|
8491644
|
https://sv.wikipedia.org/wiki/Ulleung
|
Ulleung
|
Ulleung kan syfta på:
Ulleungdo, en ö i Sydkorea, 130 km öster om fastlandet
Ulleung-gun, en landskommun som omfattar Ulleungdo och kringliggande öar
Ulleung-eup, en köping i Ulleung-gun
|
swedish
| 1.12337
|
Pony/collections-Flag-.txt
|
Flag[A: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[A] val)]¶
[Source]
A flag should be a primitive with a value method that returns the bits that
represent the flag. This allows a flag to encode a single bit, or any
combination of bits.
interface val Flag[A: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Integer[A] val)]
Public Functions¶
value¶
[Source]
fun box value()
: A
Returns¶
A
|
pony
|
8491644
|
https://sv.wikipedia.org/wiki/Ulleung
|
Ulleung
|
Ulleung kan syfta på:
Ulleungdo, en ö i Sydkorea, 130 km öster om fastlandet
Ulleung-gun, en landskommun som omfattar Ulleungdo och kringliggande öar
Ulleung-eup, en köping i Ulleung-gun
|
swedish
| 1.12337
|
Pony/collections-ListValues-.txt
|
ListValues[A: A, N: ListNode[A] #read]¶
[Source]
Iterate over the values in a List.
class ref ListValues[A: A, N: ListNode[A] #read] is
Iterator[N->A] ref
Implements¶
Iterator[N->A] ref
Constructors¶
create¶
[Source]
Build the iterator over values.
reverse of false iterates forward, while
reverse of true iterates in reverse.
new ref create(
head: (N | None val),
reverse: Bool val = false)
: ListValues[A, N] ref^
Parameters¶
head: (N | None val)
reverse: Bool val = false
Returns¶
ListValues[A, N] ref^
Public Functions¶
has_next¶
[Source]
Indicates whether there are any values remaining in the iterator.
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by reverse argument during creation.
fun ref next()
: N->A ?
Returns¶
N->A ?
|
pony
|
1713798
|
https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%201004
|
Vitenskapsåret 1004
|
Vitenskapsåret 1004 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 1004.
Hendelser
Fødsler
Nasir Khusraw, persisk poet, filosof, ismailittitsk lærd og en reisende (død 1088)
Dødsfall
Referanser
|
norwegian_bokmål
| 1.468151
|
Pony/collections-MaxHeapPriority-.txt
|
MaxHeapPriority[A: Comparable[A] #read]¶
[Source]
primitive val MaxHeapPriority[A: Comparable[A] #read] is
_BinaryHeapPriority[A] val
Implements¶
_BinaryHeapPriority[A] val
Constructors¶
create¶
[Source]
new val create()
: MaxHeapPriority[A] val^
Returns¶
MaxHeapPriority[A] val^
Public Functions¶
apply¶
[Source]
fun box apply(
x: A,
y: A)
: Bool val
Parameters¶
x: A
y: A
Returns¶
Bool val
eq¶
[Source]
fun box eq(
that: MaxHeapPriority[A] val)
: Bool val
Parameters¶
that: MaxHeapPriority[A] val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: MaxHeapPriority[A] val)
: Bool val
Parameters¶
that: MaxHeapPriority[A] val
Returns¶
Bool val
|
pony
|
3268685
|
https://sv.wikipedia.org/wiki/Poecilanthrax%20alcyon
|
Poecilanthrax alcyon
|
Poecilanthrax alcyon är en tvåvingeart som först beskrevs av Thomas Say 1824. Poecilanthrax alcyon ingår i släktet Poecilanthrax och familjen svävflugor. Inga underarter finns listade i Catalogue of Life.
Källor
Svävflugor
alcyon
|
swedish
| 1.106375
|
Pony/src-cli-command_spec-.txt
|
command_spec.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556use "collections"
use pc = "collections/persistent"
primitive _CommandSpecLeaf
primitive _CommandSpecParent
type _CommandSpecType is (_CommandSpecLeaf | _CommandSpecParent )
class CommandSpec
"""
CommandSpec describes the specification of a parent or leaf command. Each
command has the following attributes:
- a name: a simple string token that identifies the command.
- a description: used in the syntax message.
- a map of options: the valid options for this command.
- an optional help option+command name for help parsing
- one of:
- a Map of child commands.
- an Array of arguments.
"""
let _type: _CommandSpecType
let _name: String
let _descr: String
let _options: Map[String, OptionSpec] = _options.create()
var _help_name: String = ""
var _help_info: String = ""
// A parent commands can have sub-commands; leaf commands can have args.
let _commands: Map[String, CommandSpec box] = _commands.create()
let _args: Array[ArgSpec] = _args.create()
new parent(
name': String,
descr': String = "",
options': Array[OptionSpec] box = Array[OptionSpec](),
commands': Array[CommandSpec] box = Array[CommandSpec]()) ?
=>
"""
Creates a command spec that can accept options and child commands, but not
arguments.
"""
_type = _CommandSpecParent
_name = _assertName(name')?
_descr = descr'
for o in options'.values() do
_options.update(o.name(), o)
end
for c in commands'.values() do
_commands.update(c.name(), c)
end
new leaf(
name': String,
descr': String = "",
options': Array[OptionSpec] box = Array[OptionSpec](),
args': Array[ArgSpec] box = Array[ArgSpec]()) ?
=>
"""
Creates a command spec that can accept options and arguments, but not child
commands.
"""
_type = _CommandSpecLeaf
_name = _assertName(name')?
_descr = descr'
for o in options'.values() do
_options.update(o.name(), o)
end
for a in args'.values() do
_args.push(a)
end
fun tag _assertName(nm: String): String ? =>
for b in nm.values() do
if (b != '-') and (b != '_') and
not ((b >= '0') and (b <= '9')) and
not ((b >= 'A') and (b <= 'Z')) and
not ((b >= 'a') and (b <= 'z')) then
error
end
end
nm
fun ref add_command(cmd: CommandSpec box) ? =>
"""
Adds an additional child command to this parent command.
"""
if is_leaf() then error end
_commands.update(cmd.name(), cmd)
fun ref add_help(hname: String = "help", descr': String = "") ? =>
"""
Adds a standard help option and, optionally command, to a root command.
"""
_help_name = hname
_help_info = descr'
let help_option = OptionSpec.bool(_help_name, _help_info, 'h', false)
_options.update(_help_name, help_option)
if is_parent() then
let help_cmd = CommandSpec.leaf(_help_name, "", Array[OptionSpec](), [
ArgSpec.string("command" where default' = "")
])?
_commands.update(_help_name, help_cmd)
end
fun name(): String =>
"""
Returns the name of this command.
"""
_name
fun descr(): String =>
"""
Returns the description for this command.
"""
_descr
fun options(): Map[String, OptionSpec] box =>
"""
Returns a map by name of the named options of this command.
"""
_options
fun commands(): Map[String, CommandSpec box] box =>
"""
Returns a map by name of the child commands of this command.
"""
_commands
fun args(): Array[ArgSpec] box =>
"""
Returns an array of the positional arguments of this command.
"""
_args
fun is_leaf(): Bool => _type is _CommandSpecLeaf
fun is_parent(): Bool => _type is _CommandSpecParent
fun help_name(): String =>
"""
Returns the name of the help command, which defaults to "help".
"""
_help_name
fun help_string(): String =>
"""
Returns a formated help string for this command and all of its arguments.
"""
let s = _name.clone()
s.append(" ")
let args_iter = _args.values()
for a in args_iter do
s.append(a.help_string())
if args_iter.has_next() then s.append(" ") end
end
s
class val OptionSpec
"""
OptionSpec describes the specification of a named Option. They have a name,
descr(iption), a short-name, a typ(e), and a default value when they are not
required.
Options can be placed anywhere before or after commands, and can be thought
of as named arguments.
"""
let _name: String
let _descr: String
let _short: (U8 | None)
let _typ: _ValueType
let _default: _Value
let _required: Bool
fun tag _init(typ': _ValueType, default': (_Value | None))
: (_ValueType, _Value, Bool)
=>
match default'
| None => (typ', false, true)
| let d: _Value => (typ', d, false)
end
new val bool(
name': String,
descr': String = "",
short': (U8 | None) = None,
default': (Bool | None) = None)
=>
"""
Creates an Option with a Bool typed value that can be used like
`--opt` or `-O` or `--opt=true` or `-O=true`
to yield an option value like
`cmd.option("opt").bool() == true`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_BoolType, default')
new val string(
name': String,
descr': String = "",
short': (U8 | None) = None,
default': (String | None) = None)
=>
"""
Creates an Option with a String typed value that can be used like
`--file=dir/filename` or `-F=dir/filename` or `-Fdir/filename`
to yield an option value like
`cmd.option("file").string() == "dir/filename"`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_StringType, default')
new val i64(name': String,
descr': String = "",
short': (U8 | None) = None,
default': (I64 | None) = None)
=>
"""
Creates an Option with an I64 typed value that can be used like
`--count=42 -C=42`
to yield an option value like
`cmd.option("count").i64() == I64(42)`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_I64Type, default')
new val u64(name': String,
descr': String = "",
short': (U8 | None) = None,
default': (U64 | None) = None)
=>
"""
Creates an Option with an U64 typed value that can be used like
`--count=47 -C=47`
to yield an option value like
`cmd.option("count").u64() == U64(47)`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_U64Type, default')
new val f64(name': String,
descr': String = "",
short': (U8 | None) = None,
default': (F64 | None) = None)
=>
"""
Creates an Option with a F64 typed value that can be used like
`--ratio=1.039` or `-R=1.039`
to yield an option value like
`cmd.option("ratio").f64() == F64(1.039)`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_F64Type, default')
new val string_seq(
name': String,
descr': String = "",
short': (U8 | None) = None)
=>
"""
Creates an Option with a ReadSeq[String] typed value that can be used like
`--files=file1 --files=files2 --files=files2`
to yield a sequence of three strings equivalent to
`cmd.option("ratio").string_seq() (equiv) ["file1"; "file2"; "file3"]`.
"""
_name = name'
_descr = descr'
_short = short'
(_typ, _default, _required) = _init(_StringSeqType, _StringSeq.empty())
fun name(): String =>
"""
Returns the name of this option.
"""
_name
fun descr(): String =>
"""
Returns the description for this option.
"""
_descr
fun _typ_p(): _ValueType => _typ
fun _default_p(): _Value => _default
fun required(): Bool =>
"""
Returns true iff this option is required to be present in the command line.
"""
_required
// Other than bools, all options require args.
fun _requires_arg(): Bool =>
match _typ
| let _: _BoolType => false
else
true
end
// Used for bool options to get the true arg when option is present w/o arg
fun _default_arg(): _Value =>
match _typ
| let _: _BoolType => true
else
false
end
fun _has_short(sh: U8): Bool =>
match _short
| let ss: U8 => sh == ss
else
false
end
fun help_string(): String =>
"""
Returns a formated help string for this option.
"""
let s =
match _short
| let ss: U8 => "-" + String.from_utf32(ss.u32()) + ", "
else
" "
end
s + "--" + _name +
if not _required then "=" + _default.string() else "" end
fun deb_string(): String =>
"--" + _name + "[" + _typ.string() + "]" +
if not _required then "(=" + _default.string() + ")" else "" end
class val ArgSpec
"""
ArgSpec describes the specification of a positional Arg(ument). They have a
name, descr(iption), a typ(e), and a default value when they are not
required.
Args always come after a leaf command, and are assigned in their positional
order.
"""
let _name: String
let _descr: String
let _typ: _ValueType
let _default: _Value
let _required: Bool
fun tag _init(typ': _ValueType, default': (_Value | None))
: (_ValueType, _Value, Bool)
=>
match default'
| None => (typ', false, true)
| let d: _Value => (typ', d, false)
end
new val bool(
name': String,
descr': String = "",
default': (Bool | None) = None)
=>
"""
Creates an Arg with a Bool typed value that can be used like
`<cmd> true`
to yield an arg value like
`cmd.arg("opt").bool() == true`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_BoolType, default')
new val string(
name': String,
descr': String = "",
default': (String | None) = None)
=>
"""
Creates an Arg with a String typed value that can be used like
`<cmd> filename`
to yield an arg value
`cmd.arg("file").string() == "filename"`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_StringType, default')
new val i64(name': String,
descr': String = "",
default': (I64 | None) = None)
=>
"""
Creates an Arg with an I64 typed value that can be used like
`<cmd> 42`
to yield an arg value like
`cmd.arg("count").i64() == I64(42)`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_I64Type, default')
new val u64(name': String,
descr': String = "",
default': (U64 | None) = None)
=>
"""
Creates an Arg with an U64 typed value that can be used like
`<cmd> 47`
to yield an arg value like
`cmd.arg("count").u64() == U64(47)`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_U64Type, default')
new val f64(name': String,
descr': String = "",
default': (F64 | None) = None)
=>
"""
Creates an Arg with a F64 typed value that can be used like
`<cmd> 1.039`
to yield an arg value like
`cmd.arg("ratio").f64() == F64(1.039)`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_F64Type, default')
new val string_seq(
name': String,
descr': String = "")
=>
"""
Creates an Arg with a ReadSeq[String] typed value that can be used like
`<cmd> file1 file2 file3`
to yield a sequence of three strings equivalent to
`cmd.arg("file").string_seq() (equiv) ["file1"; "file2"; "file3"]`.
"""
_name = name'
_descr = descr'
(_typ, _default, _required) = _init(_StringSeqType, _StringSeq.empty())
fun name(): String =>
"""
Returns the name of this arg.
"""
_name
fun descr(): String =>
"""
Returns the description for this arg.
"""
_descr
fun _typ_p(): _ValueType => _typ
fun _default_p(): _Value => _default
fun required(): Bool =>
"""
Returns true iff this arg is required to be present in the command line.
"""
_required
fun help_string(): String =>
"""
Returns a formated help string for this arg.
"""
"<" + _name + ">"
fun deb_string(): String =>
_name + "[" + _typ.string() + "]" +
if not _required then "(=" + _default.string() + ")" else "" end
class _StringSeq is ReadSeq[String]
"""
_StringSeq is a wrapper / helper class for working with String sequence
values while parsing. It assists in collecting the strings as they are
parsed, and producing a ReadSeq[String] as a result.
"""
let strings: pc.Vec[String]
new val empty() =>
strings = pc.Vec[String]
new val from_string(s: String) =>
strings = (pc.Vec[String]).push(s)
new val from_concat(ss0: _StringSeq val, ss1: _StringSeq val) =>
strings = ss0.strings.concat(ss1.strings.values())
fun string(): String iso^ =>
let str = recover String() end
str.push('[')
for s in strings.values() do
if str.size() > 1 then str.push(',') end
str.append(s)
end
str.push(']')
str
fun size(): USize => strings.size()
fun apply(i: USize): this->String ? => strings(i)?
fun values(): Iterator[this->String]^ => strings.values()
type _Value is (Bool | String | I64 | U64 | F64 | _StringSeq val)
trait val _ValueType
fun string(): String
fun value_of(s: String): _Value ?
fun is_seq(): Bool => false
fun append(v1: _Value, v2: _Value): _Value => v1
primitive _BoolType is _ValueType
fun string(): String => "Bool"
fun value_of(s: String): _Value ? => s.bool()?
primitive _StringType is _ValueType
fun string(): String => "String"
fun value_of(s: String): _Value => s
primitive _I64Type is _ValueType
fun string(): String => "I64"
fun value_of(s: String): _Value ? => s.i64()?
primitive _U64Type is _ValueType
fun string(): String => "U64"
fun value_of(s: String): _Value ? => s.u64()?
primitive _F64Type is _ValueType
fun string(): String => "F64"
fun value_of(s: String): _Value ? => s.f64()?
primitive _StringSeqType is _ValueType
fun string(): String => "ReadSeq[String]"
fun value_of(s: String): _Value => _StringSeq.from_string(s)
fun is_seq(): Bool => true
fun append(v1: _Value, v2: _Value): _Value =>
"""
When is_seq() returns true, append() is called during parsing to append
a new parsed value onto an existing value.
"""
try
_StringSeq.from_concat(v1 as _StringSeq val, v2 as _StringSeq val)
else
v1
end
|
pony
|
447906
|
https://sv.wikipedia.org/wiki/AC97
|
AC97
|
AC'97 (Audio Codec 1997) är en codecstandard för ljud, utvecklad av Intel 1997. Den ersattes 2004 av Intel High Definition Audio. Båda begreppen används som förtydligande egenskap hos de elektronikkretsar och tillhörande anslutningskontakter som kan utgöra delsystem på ett moderkort till en PC-dator.
Ljudkort
|
swedish
| 1.276068
|
Pony/collections-MapKeys-.txt
|
MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read]¶
[Source]
An iterator over the keys in a map.
class ref MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is
Iterator[M->K] ref
Implements¶
Iterator[M->K] ref
Constructors¶
create¶
[Source]
Creates an iterator for the given map.
new ref create(
map: M)
: MapKeys[K, V, H, M] ref^
Parameters¶
map: M
Returns¶
MapKeys[K, V, H, M] ref^
Public Functions¶
has_next¶
[Source]
True if it believes there are remaining entries. May not be right if values
were added or removed from the map.
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
Returns the next key, or raises an error if there isn't one. If keys are
added during iteration, this may not return all keys.
fun ref next()
: M->K ?
Returns¶
M->K ?
|
pony
|
8407806
|
https://sv.wikipedia.org/wiki/Hunter%2C%20Kansas
|
Hunter, Kansas
|
Hunter är en ort i Mitchell County i Kansas. Vid 2010 års folkräkning hade Hunter 57 invånare.
Källor
Orter i Kansas
Mitchell County, Kansas
|
swedish
| 1.148351
|
Pony/ini-IniError-.txt
|
IniError¶
[Source]
type IniError is
(IniIncompleteSection val | IniNoDelimiter val)
Type Alias For¶
(IniIncompleteSection val | IniNoDelimiter val)
|
pony
|
3759729
|
https://sv.wikipedia.org/wiki/Ischasioides%20gounellei
|
Ischasioides gounellei
|
Ischasioides gounellei är en skalbaggsart som beskrevs av Tavakilian och Peñaherrera 2003. Ischasioides gounellei ingår i släktet Ischasioides och familjen långhorningar. Inga underarter finns listade i Catalogue of Life.
Källor
Långhorningar
gounellei
|
swedish
| 1.017195
|
Pony/builtin-Real-.txt
|
Real[A: Real[A] val]¶
[Source]
trait val Real[A: Real[A] val] is
Stringable box,
_ArithmeticConvertible val,
Comparable[A] ref
Implements¶
Stringable box
_ArithmeticConvertible val
Comparable[A] ref
Constructors¶
create¶
[Source]
new val create(
value: A)
: Real[A] val^
Parameters¶
value: A
Returns¶
Real[A] val^
from[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]¶
[Source]
new val from[B: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[B] val)](
a: B)
: Real[A] val^
Parameters¶
a: B
Returns¶
Real[A] val^
min_value¶
[Source]
new val min_value()
: Real[A] val^
Returns¶
Real[A] val^
max_value¶
[Source]
new val max_value()
: Real[A] val^
Returns¶
Real[A] val^
Public Functions¶
add¶
[Source]
fun box add(
y: A)
: A
Parameters¶
y: A
Returns¶
A
sub¶
[Source]
fun box sub(
y: A)
: A
Parameters¶
y: A
Returns¶
A
mul¶
[Source]
fun box mul(
y: A)
: A
Parameters¶
y: A
Returns¶
A
div¶
[Source]
Integer division, rounded towards zero.
fun box div(
y: A)
: A
Parameters¶
y: A
Returns¶
A
divrem¶
[Source]
fun box divrem(
y: A)
: (A , A)
Parameters¶
y: A
Returns¶
(A , A)
rem¶
[Source]
Calculate the remainder after integer division, rounded towards zero (div).
The result has the sign of the dividend.
fun box rem(
y: A)
: A
Parameters¶
y: A
Returns¶
A
neg¶
[Source]
fun box neg()
: A
Returns¶
A
fld¶
[Source]
Floored integer division, rounded towards negative infinity.
fun box fld(
y: A)
: A
Parameters¶
y: A
Returns¶
A
mod¶
[Source]
Calculate the modulo after floored integer division, rounded towards negative infinity (fld).
The result has the sign of the divisor.
fun box mod(
y: A)
: A
Parameters¶
y: A
Returns¶
A
eq¶
[Source]
fun box eq(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
le¶
[Source]
fun box le(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: box->A)
: Bool val
Parameters¶
y: box->A
Returns¶
Bool val
min¶
[Source]
fun box min(
y: A)
: A
Parameters¶
y: A
Returns¶
A
max¶
[Source]
fun box max(
y: A)
: A
Parameters¶
y: A
Returns¶
A
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
string¶
fun box string()
: String iso^
Returns¶
String iso^
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
[Source]
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: box->A)
: (Less val | Equal val | Greater val)
Parameters¶
that: box->A
Returns¶
(Less val | Equal val | Greater val)
|
pony
|
501834
|
https://sv.wikipedia.org/wiki/Textredigerare%20%28OS%20X%29
|
Textredigerare (OS X)
|
Textredigerare är en textredigerare från Apple som ingår i Mac OS. Programmet används för att öppna och spara textdokument skrivna i bland andra filformaten HTML, Microsoft Word, ren txt-fil, Opendocument och Rich Text Format. Textredigerare ersatte Apples tidigare textredigerare SimpleText.
Senaste version (2020) är 1.14.
Apple-mjukvara
Textredigerare
|
swedish
| 1.273065
|
Pony/src-files-directory-.txt
|
directory.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542use "time"
use @ponyint_o_rdonly[I32]()
use @ponyint_o_rdwr[I32]()
use @ponyint_o_creat[I32]()
use @ponyint_o_trunc[I32]()
use @ponyint_o_directory[I32]()
use @ponyint_o_cloexec[I32]()
use @ponyint_at_removedir[I32]()
use @openat[I32](fd: I32, path: Pointer[U8] tag, flags: I32, ...)
if linux or bsd
use @unlinkat[I32](fd: I32, target: Pointer[U8] tag, flags: I32)
use @futimes[I32](fildes: I32, tv: Pointer[(ILong, ILong, ILong, ILong)])
if not windows
use @renameat[I32](fd: I32, from: Pointer[U8] tag, tofd: I32, to_path: Pointer[U8] tag)
if linux or bsd
use @symlinkat[I32](source: Pointer[U8] tag, fd: I32, dst: Pointer[U8] tag) if linux or bsd
use @futimesat[I32](fd: I32, path: Pointer[U8] tag,
timeval: Pointer[(ILong, ILong, ILong, ILong)]) if linux or bsd
use @fchownat[I32](fd: I32, path: Pointer[U8] tag, uid: U32, gid: U32, flags: I32) if linux or bsd
use @fchmodat[I32](fd: I32, path: Pointer[U8] tag, mode: U32, flag: I32) if linux or bsd
use @mkdirat[I32](fd: I32, path: Pointer[U8] tag, mode: U32)
use @fdopendir[Pointer[_DirectoryHandle]](fd: I32) if posix
use @opendir[Pointer[_DirectoryHandle]](name: Pointer[U8] tag) if posix
use @closedir[I32](dir: Pointer[_DirectoryHandle] tag) if posix
use @ponyint_unix_readdir[Pointer[U8] iso^](dir: Pointer[None] tag)
use @ponyint_windows_find_data[Pointer[_DirectoryEntry]]()
if windows
use @ponyint_windows_find_data_free[None](data: Pointer[_DirectoryEntry])
if windows
use @ponyint_windows_readdir[Pointer[U8] iso^](data: Pointer[_DirectoryEntry])
if windows
use @FindFirstFileA[Pointer[_DirectoryHandle]](file_name: Pointer[U8] tag, data: Pointer[_DirectoryEntry])
if windows
use @FindNextFileA[Bool](handle: Pointer[None] tag, data: Pointer[_DirectoryEntry])
if windows
use @FindClose[Bool](handle: Pointer[_DirectoryHandle] tag) if windows
primitive _DirectoryHandle
primitive _DirectoryEntry
class Directory
"""
Operations on a directory.
The directory-relative functions (open, etc) use the *at interface on FreeBSD
and Linux. This isn't available on OS X prior to 10.10, so it is not used. On
FreeBSD, this allows the directory-relative functions to take advantage of
Capsicum.
"""
let path: FilePath
"""
This is the filesystem path locating this directory on the file system
and an object capability granting access to operate on this directory.
"""
var _fd: I32 = -1
// We don't need a file descriptor in Windows. However we do still need to
// know whether we've disposed of this object, so we use the _fd to indicate
// this.
// 0 => not yet disposed of.
// -1 => disposed of.
new create(from: FilePath) ? =>
"""
This will raise an error if the path doesn't exist or it is not a
directory, or if FileRead or FileStat permission isn't available.
"""
if not from.caps(FileRead) then
error
end
if not FileInfo(from)?.directory then
error
end
path = from
ifdef posix then
_fd =
@open(from.path.cstring(),
@ponyint_o_rdonly()
or @ponyint_o_directory()
or @ponyint_o_cloexec())
if _fd == -1 then
error
end
elseif windows then
_fd = 0
else
compile_error "unsupported platform"
end
_FileDes.set_rights(_fd, path)?
new iso _relative(path': FilePath, fd': I32) =>
"""
Internal constructor. Capsicum rights are already set by inheritence.
"""
path = path'
_fd = fd'
fun entries(): Array[String] iso^ ? =>
"""
The entries will include everything in the directory, but it is not
recursive. The path for the entry will be relative to the directory, so it
will contain no directory separators. The entries will not include "." or
"..".
"""
if not path.caps(FileRead) or (_fd == -1) then
error
end
let path' = path.path
let fd' = _fd
recover
let list = Array[String]
ifdef posix then
if fd' == -1 then
error
end
let h =
ifdef linux or bsd then
let fd =
@openat(fd', ".".cstring(),
@ponyint_o_rdonly()
or @ponyint_o_directory()
or @ponyint_o_cloexec())
@fdopendir(fd)
else
@opendir(path'.cstring())
end
if h.is_null() then
error
end
while true do
let p = @ponyint_unix_readdir(h)
if p.is_null() then break end
list.push(recover String.from_cstring(consume p) end)
end
@closedir(h)
elseif windows then
var find = @ponyint_windows_find_data()
let search = path' + "\\*"
let h = @FindFirstFileA(search.cstring(), find)
if h.usize() == -1 then
error
end
repeat
let p = @ponyint_windows_readdir(find)
if not p.is_null() then
list.push(recover String.from_cstring(consume p) end)
end
until not @FindNextFileA(h, find) end
@FindClose(h)
@ponyint_windows_find_data_free(find)
else
compile_error "unsupported platform"
end
consume list
end
fun open(target: String): Directory iso^ ? =>
"""
Open a directory relative to this one. Raises an error if the path is not
within this directory hierarchy.
"""
if _fd == -1 then
error
end
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
let fd' =
@openat(_fd, target.cstring(),
@ponyint_o_rdonly()
or @ponyint_o_directory()
or @ponyint_o_cloexec())
_relative(path', fd')
else
recover create(path')? end
end
fun mkdir(target: String): Bool =>
"""
Creates a directory relative to this one. Returns false if the path is
not within this directory hierarchy or if FileMkdir permission is missing.
"""
if
not path.caps(FileMkdir) or
not path.caps(FileLookup) or
(_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
var offset: ISize = 0
repeat
let element = try
offset = target.find(Path.sep(), offset)? + 1
target.substring(0, offset - 1)
else
offset = -1
target
end
@mkdirat(_fd, element.cstring(), U32(0x1FF))
until offset < 0 end
FileInfo(path')?.directory
else
path'.mkdir()
end
else
false
end
fun create_file(target: String): File iso^ ? =>
"""
Open for read/write, creating if it doesn't exist, preserving the contents
if it does exist.
"""
if
not path.caps(FileCreate)
or not path.caps(FileRead)
or not path.caps(FileWrite)
or (_fd == -1)
then
error
end
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
let fd' =
@openat(_fd, target.cstring(),
@ponyint_o_rdwr()
or @ponyint_o_creat()
or @ponyint_o_cloexec(),
I32(0x1B6))
recover File._descriptor(fd', path')? end
else
recover File(path') end
end
fun open_file(target: String): File iso^ ? =>
"""
Open for read only, failing if it doesn't exist.
"""
if
not path.caps(FileRead)
or (_fd == -1)
then
error
end
let path' = FilePath.from(path, target, path.caps - FileWrite)?
ifdef linux or bsd then
let fd' =
@openat(_fd, target.cstring(),
@ponyint_o_rdonly() or @ponyint_o_cloexec(),
I32(0x1B6))
recover File._descriptor(fd', path')? end
else
recover File.open(path') end
end
fun info(): FileInfo ? =>
"""
Return a FileInfo for this directory. Raise an error if the fd is invalid
or if we don't have FileStat permission.
"""
FileInfo._descriptor(_fd, path)?
fun chmod(mode: FileMode box): Bool =>
"""
Set the FileMode for this directory.
"""
_FileDes.chmod(_fd, path, mode)
fun chown(uid: U32, gid: U32): Bool =>
"""
Set the owner and group for this directory. Does nothing on Windows.
"""
_FileDes.chown(_fd, path, uid, gid)
fun touch(): Bool =>
"""
Set the last access and modification times of the directory to now.
"""
_FileDes.touch(_fd, path)
fun set_time(atime: (I64, I64), mtime: (I64, I64)): Bool =>
"""
Set the last access and modification times of the directory to the given
values.
"""
_FileDes.set_time(_fd, path, atime, mtime)
fun infoat(target: String): FileInfo ? =>
"""
Return a FileInfo for some path relative to this directory.
"""
if
not path.caps(FileStat)
or not path.caps(FileLookup)
or (_fd == -1)
then
error
end
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
FileInfo._relative(_fd, path', target)?
else
FileInfo(path')?
end
fun chmodat(target: String, mode: FileMode box): Bool =>
"""
Set the FileMode for some path relative to this directory.
"""
if
not path.caps(FileChmod)
or not path.caps(FileLookup)
or (_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
0 == @fchmodat(_fd, target.cstring(), mode.u32(), I32(0))
else
path'.chmod(mode)
end
else
false
end
fun chownat(target: String, uid: U32, gid: U32): Bool =>
"""
Set the FileMode for some path relative to this directory.
"""
if
not path.caps(FileChown)
or not path.caps(FileLookup)
or (_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
0 == @fchownat(_fd, target.cstring(), uid, gid, I32(0))
else
path'.chown(uid, gid)
end
else
false
end
fun touchat(target: String): Bool =>
"""
Set the last access and modification times of the directory to now.
"""
set_time_at(target, Time.now(), Time.now())
fun set_time_at(
target: String,
atime: (I64, I64),
mtime: (I64, I64))
: Bool
=>
"""
Set the last access and modification times of the directory to the given
values.
"""
if
not path.caps(FileChown)
or not path.caps(FileLookup)
or (_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
var tv: (ILong, ILong, ILong, ILong) =
( atime._1.ilong(), atime._2.ilong() / 1000,
mtime._1.ilong(), mtime._2.ilong() / 1000 )
0 == @futimesat(_fd, target.cstring(), addressof tv)
else
path'.set_time(atime, mtime)
end
else
false
end
fun symlink(source: FilePath, link_name: String): Bool =>
"""
Link the source path to the link_name, where the link_name is relative to
this directory.
"""
if
not path.caps(FileLink)
or not path.caps(FileLookup)
or not path.caps(FileCreate)
or not source.caps(FileLink)
or (_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, link_name, path.caps)?
ifdef linux or bsd then
0 == @symlinkat(source.path.cstring(), _fd, link_name.cstring())
else
source.symlink(path')
end
else
false
end
fun remove(target: String): Bool =>
"""
Remove the file or directory. The directory contents will be removed as
well, recursively. Symlinks will be removed but not traversed.
"""
if
not path.caps(FileLookup)
or not path.caps(FileRemove)
or (_fd == -1)
then
return false
end
try
let path' = FilePath.from(path, target, path.caps)?
ifdef linux or bsd then
let fi = FileInfo(path')?
if fi.directory and not fi.symlink then
let directory = open(target)?
for entry in directory.entries()?.values() do
if not directory.remove(entry) then
return false
end
end
0 == @unlinkat(_fd, target.cstring(), @ponyint_at_removedir())
else
0 == @unlinkat(_fd, target.cstring(), 0)
end
else
path'.remove()
end
else
false
end
fun rename(source: String, to: Directory box, target: String): Bool =>
"""
Rename source (which is relative to this directory) to target (which is
relative to the `to` directory).
"""
if
not path.caps(FileLookup)
or not path.caps(FileRename)
or not to.path.caps(FileLookup)
or not to.path.caps(FileCreate)
or (_fd == -1)
or (to._fd == -1)
then
return false
end
try
let path' = FilePath.from(path, source, path.caps)?
let path'' = FilePath.from(to.path, target, to.path.caps)?
ifdef linux or bsd then
0 == @renameat(_fd, source.cstring(), to._fd, target.cstring())
else
path'.rename(path'')
end
else
false
end
fun ref dispose() =>
"""
Close the directory.
"""
if _fd != -1 then
ifdef posix then
@close(_fd)
end
_fd = -1
end
fun _final() =>
"""
Close the file descriptor.
"""
if _fd != -1 then
ifdef posix then
@close(_fd)
end
end
|
pony
|
1244333
|
https://sv.wikipedia.org/wiki/Commodore%20DOS
|
Commodore DOS
|
Commodore DOS, alternativt CBM DOS, är operativsystemet för att hantera lagringsmedia på Commodores 8-bitars datorer under 1970-1990-talet. Till skillnad från andra DOS-system före och efter Commodore—vilka laddas från diskett och lagras i datorns RAM-minne vid systemstart, för att sedan exekveras—startade CBM DOS internt i diskettstationen eller hårddisken: operativsystemet är lagrat i ett (eller två) ROM-chip i den aktuella lagringsenheten, och sköttes av en eller fler dedikerade CPU:er (MOS 6502) som också var integrerade i den aktuella enheten.
CBM DOS-versioner
Åtminstone sju numrerade versioner av Commodore DOS är kända; följande lista ger information om versionnummer och aktuell lagringsenhet. Om inget annat nämns är diskettstationen 5¼". Markeringen "lp" står för "low profile". Diskettstationer vars modellnummer börjar med 15 använder sig av Commodores unika seriellprotokoll (TALK/LISTEN), alla andra av IEEE-488.
1.0 – hittas i diskettstationerna 2040 och 3040
2.0 – hittas i diskettstationerna 4040 och 3040
2.6 – hittas i diskettstationerna 1540, 1541, SX-64 (inbyggd), 1551, 2031 (+"lp"), samt 4031
2.7 – hittas i diskettstationerna 8050, 8250 (+"lp"), och SFD-1001
3.0 – hittas i diskettstationerna 1570, 1571, och 8280 (8280: 8"), samt i hårddiskarna 9060 och 9090
3.1 – hittas i den inbyggda diskettstationen 1571 i C128D/DCR
10.0 – hittas i diskettstationen 1581 (3½")
Version 2.6 var den absolut mest använda och kända DOS-versionen, då den användes i Commodore 1541 som sålde i stor mängd till den bästsäljande hemdatorn Commodore 64. Den blev även klonad av ett flertal tredjepartstillverkare.
Teknisk överblick
Katalogstruktur och filtyper
Disketterna kunde med CBM DOS innehålla upp till 144 filer (med undantag för 8050/8250 samt 1581). Filnamn kunde innehålla maximalt 16 tecken. Diskettens katalogstruktur skrevs på ett reserverat spår (18), vilket är mittspåret på en enkelsidig diskett med 35 spår. Det finns ingen möjlighet för underkataloger och filnamnen tvingades därför i teorin att vara unika (vilket innebär att om en fil med ett specifikt namn existerar så kan man inte skapa en fil med samma namn, och en fil kan heller inte döpas om till detta filnamn); emellertid kunde man, genom att skriva direkt till katalogstrukturens block, skapa flera filer med samma namn, även om detta försvårade eller gjorde det omöjligt att läsa filerna. Filer med samma namn har vanligen ingen funktion mer än att informera eller visuellt skapa ramar för filhanteringen. Ett populärt trick som användes av till exempel The Final Cartridge III var att skapa filer som döptes till "----------------" av typen DEL< i katalogstrukturen, och filer kunde då ordnas runt dessa linjer för att skapa filgrupperingar. Många spelutvecklare, warez-grupper och hackers ur demoscenen använde andra mer eller mindre utstuderade tekniker.
Det finns även en listig egendomlighet i filnamnen: filnamnen kan innehålla shift+space-tecken, och om en listad katalogstruktur visas i Commodore BASIC så kommer återstoden av filnamnet dyka upp efter filnamnet i kataloglistningen och BASIC kommer inte att anse det vara en del av filnamnet. Detta användes för att skapa saker som SAVE "PROGRAM(shift+space),8,1:",8,1 vilket dyker upp i katalogen som, exempelvis, 32 "PROGRAM",8,1: PRG. När användaren sedan flyttar pekaren till början av en rad i listningen och skriver LOAD, och därmed skriver över filstorleken på den linjen och trycker på ENTER, kommer BASIC att tolka detta som LOAD "PROGRAM",8,1: ..., och ignorera allt efter kolon.
En annan listighet är hur null byte kan skrivas i ett filnamn för att användas för att avbryta en listning efter att BASIC laddar denna. Om det finns tre null bytes så försvåras en listning i BASIC. Många maskinkodsprogrammerare kom att experimentera med null bytes i olika försök att hindra BASIC-programmerare att se och använda deras kod.
I BASIC så kan man få tillgång till katalogstrukturen som ett icke exekverbart BASIC-pseudoprogram med LOAD "$",8 följt av LIST. Den första raden har en meningslös radnumerering (0), och visar diskettens namn och ID samt en kort kod för vilken DOS-version som skapat katalogen (koderna skilde sig enbart om diskettformatet var inkompatibla, "2A" användes oftast för 5.25"-DOS-versioner, "3A" av 3.5"-1581). Raderna efter denna innehåller information om filstorlek (i block) samt filernas "pseudoradnummer", följt av filnamnet inom citationstecken och en treteckens kodtyp. De tre sista raderna visar antalet icke allokerade block på disketten (åter igen som ett "pseudoradnummer", följt av "BLOCKS FREE").
Intressant är även att om man på Commodore 64 skriver in LOAD "$",8,1 så fylls skärmen med "skräptecken" istället för att ladda in katalogen i BASIC RAM. Detta beror på att diskettstationen ger katalogen startadressen $0401 (1025), vilket motsvarar BASIC-start på Commodore PET, men korresponderar med skärmminnet på C64.
Om man listar katalogen med LOAD "$",8 så skriver man även över eventuella BASIC-program i RAM. DOS Wedge och ett antal andra tredjepartstillverkade insticksmoduler (cartridge) som Epyx FastLoad, Action Replay och The Final Cartridge III tillåter emellertid att man listar disketters innehåll utan risk för att radera ett aktuellt BASIC-program. Commodore 128 BASIC 7.0 inkluderar kommandona DIRECTORY och CATALOG, (kopplade till F3 vid start) som har samma funktion.
Följande filtyper är stödjs:
SEQ
Sekventiella filer är datafiler som kan läsas linjärt. Många ordbehandlare och andra Office-liknande program använder denna typ av filer för att spara data. En sekventiell fil är analog med en "flat file" i Linux eller UNIX, då den inte har någon speciell intern struktur.
PRG
Liknar SEQ-filer, men har en programheader bestående av de första två byten (en "little endian"-kodad 16-bitsadress). Alla maskinkodsprogram och BASIC-program sparas som PRG, och kan laddas till minnet med BASIC-kommandot LOAD (eller via KERNAL LOAD).
REL
Relativa filer är filer med fast bestämda storlekar. Till skillnad från andra filformat stödjer REL-filer äkta "random access" till valfri del av filen.
USR
Användardefinierade filer. Dessa liknar fysiskt sett SEQ-filer. De är tänkta att innehålla exekverbar kod för diskettstationens egen processor. Det är okänt om detta användes i någon utsträckning. Några program som använder ickestandardiserad lågnivåstruktur på diskett sparade data som USR, vilket kom att tolkas som en typ av markör för användaren: "låt bli mig, försök inte kopiera eller radera". GEOS' "VLIR-filer visas som USR-filer.
DEL
Icke dokumenterade internt använda filtyper. Liknar SEQ. CBM DOS kan inte skapa denna filtyp, utan den måste skapas genom direkt manipulering av filstruktur- och innehåll.
Det förekommer också filer med en asterisk (*) tillagd i katalogen (exempelvis *SEQ) vilket indikerar att filen inte stängdes efter att den skrevs. Oftast händer detta när ett program kraschar och lämnar en eller flera filer öppna på disketten. Om inte en manuellt tillagd CLOSE direkt körs i en fil som var öppen, kommer diskettens "block allocation map" (BAM) inte bli uppdaterad, vilket lämnar filsystemets struktur inkonsistent. *DEL är en speciell typ av filer som skrivs till filer som raderats; sådana filer syns inte i en kataloglistning, men går att rädda med hjälp av speciell mjukvara om inte annan data ännu skrivits över den.
En fil med asterisk kallas ofta för "splat", och kan normalt sett inte nås (men kan öppnas i ett "modify mode"). Försök att använda DOS-kommandot scratch för att radera en sådan fil kan ändra om i fillänkningen och därmed göra mer skada än nytta. Den enda praktiska metoden att radera en "splat"-fil är att öppna den i "modify mode" (och fixa filen), eller att validera disketten (se DOS-kommandot validate nedan).
Filer som följs av < (exempelvis PRG<) är låsta, och kan inte raderas. Det finns inga CMD DOS-kommandon för att sätta eller återställa detta, men många tredjepartsprogram skrevs för att göra detta möjligt. Dessa program läser vanligen katalogen genom kommandon för direkt åtkomst, gör nödvändiga ändringar i rådatan, och skriver tillbaka det hela till disketten igen.
Filåtkomst
Att komma åt filer är vanligen en uppgift för datorn. Datorns KERNAL ROM innehåller primitiva rutiner för att komma åt filer, och BASIC ROM innehåller support på en högre nivå för att nå filer genom BASIC-syntaxen. Den enda komponent som verkligen har med CMD DOS att göra är filnamnshantering med kommandona OPEN och LOAD/SAVE.
Att öppna en fil på en diskettstation eller hårddisk från Commodore innebär en del parametrar som är vagt analoga med filöppningsprocedurer i andra miljöer. Eftersom DOS faktiskt körs på en egen enhet, och inte datorn, måste filöppningssekvensen innehålla tillräckligt med information för att säkerställa en entydig tolkning. En typisk filöppningssekvens i BASIC lyder:
OPEN 3,8,4,"0:ADDRESSBOOK,S,W"
Referenser
Tryckta källor
Immers, Richard; Neufeld, Gerald G. (1984). Inside Commodore DOS. The Complete Guide to the 1541 Disk Operating System. DATAMOST, Inc & Reston Publishing Company, Inc. (Prentice-Hall). .
Englisch, Lothar; Szczepanowski, Norbert (1984). The Anatomy of the 1541 Disk Drive. Grand Rapids, MI: Abacus Software (translated from the original 1983 German edition, Düsseldorf: Data Becker GmbH). .
Lundahl, Reijo (1986). 1541-Levyasema. Amersoft.
Commodore 64
Operativsystem
|
swedish
| 0.769042
|
Pony/debug-DebugOut-.txt
|
DebugOut¶
[Source]
primitive val DebugOut
Constructors¶
create¶
[Source]
new val create()
: DebugOut val^
Returns¶
DebugOut val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: DebugOut val)
: Bool val
Parameters¶
that: DebugOut val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: DebugOut val)
: Bool val
Parameters¶
that: DebugOut val
Returns¶
Bool val
|
pony
|
4853472
|
https://sv.wikipedia.org/wiki/Deinbollia
|
Deinbollia
|
Deinbollia är ett släkte av kinesträdsväxter. Deinbollia ingår i familjen kinesträdsväxter.
Dottertaxa till Deinbollia, i alfabetisk ordning
Deinbollia acuminata
Deinbollia angustifolia
Deinbollia boinensis
Deinbollia borbonica
Deinbollia calophylla
Deinbollia cauliflora
Deinbollia crassipes
Deinbollia cuneifolia
Deinbollia dasybotrys
Deinbollia evrardii
Deinbollia fanshawei
Deinbollia fulvo-tomentella
Deinbollia gossweileri
Deinbollia grandifolia
Deinbollia insignis
Deinbollia kilimandscharica
Deinbollia laurentii
Deinbollia laurifolia
Deinbollia longiacuminata
Deinbollia macrantha
Deinbollia macrocarpa
Deinbollia macroura
Deinbollia maxima
Deinbollia mezilii
Deinbollia molliuscula
Deinbollia neglecta
Deinbollia nyasica
Deinbollia oblongifolia
Deinbollia oreophila
Deinbollia pervillei
Deinbollia pinnata
Deinbollia pycnophylla
Deinbollia pynaertii
Deinbollia rambaensis
Deinbollia reticulata
Deinbollia saligna
Deinbollia unijuga
Deinbollia xanthocarpa
Källor
Externa länkar
Kinesträdsväxter
Deinbollia
|
swedish
| 1.210142
|
Pony/files-FileEOF-.txt
|
FileEOF¶
[Source]
primitive val FileEOF
Constructors¶
create¶
[Source]
new val create()
: FileEOF val^
Returns¶
FileEOF val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: FileEOF val)
: Bool val
Parameters¶
that: FileEOF val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileEOF val)
: Bool val
Parameters¶
that: FileEOF val
Returns¶
Bool val
|
pony
|
4521912
|
https://sv.wikipedia.org/wiki/Ficus%20quercetorum
|
Ficus quercetorum
|
Ficus quercetorum är en mullbärsväxtart som beskrevs av Edred John Henry Corner. Ficus quercetorum ingår i släktet fikonsläktet, och familjen mullbärsväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Fikonsläktet
quercetorum
|
swedish
| 1.225386
|
Pony/2_ops.txt
|
# Operators
## Infix Operators
Infix operators take two operands and are written between those operands. Arithmetic and comparison operators are the most common:
```pony
1 + 2
a < b
```
Pony has pretty much the same set of infix operators as other languages.
## Operator aliasing
Most infix operators in Pony are actually aliases for functions. The left operand is the receiver the function is called on and the right operand is passed as an argument. For example, the following expressions are equivalent:
```pony
x + y
x.add(y)
```
This means that `+` is not a special symbol that can only be applied to magic types. Any type can provide its own `add` function and the programmer can then use `+` with that type if they want to.
When defining your own `add` function there is no restriction on the types of the parameter or the return type. The right side of the `+` will have to match the parameter type and the whole `+` expression will have the type that `add` returns.
Here's a full example for defining a type which allows the use of `+`. This is all you need:
```pony
// Define a suitable type
class Pair
var _x: U32 = 0
var _y: U32 = 0
new create(x: U32, y: U32) =>
_x = x
_y = y
// Define a + function
fun add(other: Pair): Pair =>
Pair(_x + other._x, _y + other._y)
// Now let's use it
class Foo
fun foo() =>
var x = Pair(1, 2)
var y = Pair(3, 4)
var z = x + y
```
It is possible to overload infix operators to some degree using union types or f-bounded polymorphism, but this is beyond the scope of this tutorial. See the Pony standard library for further information.
You do not have to worry about any of this if you don't want to. You can simply use the existing infix operators for numbers just like any other language and not provide them for your own types.
The full list of infix operators that are aliases for functions is:
---
| Operator | Method | Description | Note |
| -------- | -------------- | ----------------------------- | ------------------------------ |
| `+` | `add()` | Addition |
| `-` | `sub()` | Subtraction |
| `*` | `mul()` | Multiplication |
| `/` | `div()` | Division |
| `%` | `rem()` | Remainder |
| `%%` | `mod()` | Modulo | Starting with version `0.26.1` |
| `<<` | `shl()` | Left bit shift |
| `>>` | `shr()` | Right bit shift |
| `and` | `op_and()` | And, both bitwise and logical |
| `or` | `op_or()` | Or, both bitwise and logical |
| `xor` | `op_xor()` | Xor, both bitwise and logical |
| `==` | `eq()` | Equality |
| `!=` | `ne()` | Non-equality |
| `<` | `lt()` | Less than |
| `<=` | `le()` | Less than or equal |
| `>=` | `ge()` | Greater than or equal |
| `>` | `gt()` | Greater than |
| `>~` | `gt_unsafe()` | Unsafe greater than |
| `+~` | `add_unsafe()` | Unsafe Addition |
| `-~` | `sub_unsafe()` | Unsafe Subtraction |
| `*~` | `mul_unsafe()` | Unsafe Multiplication |
| `/~` | `div_unsafe()` | Unsafe Division |
| `%~` | `rem_unsafe()` | Unsafe Remainder |
| `%%~` | `mod_unsafe()` | Unsafe Modulo | Starting with version `0.26.1` |
| `<<~` | `shl_unsafe()` | Unsafe left bit shift |
| `>>~` | `shr_unsafe()` | Unsafe right bit shift |
| `==~` | `eq_unsafe()` | Unsafe equality |
| `!=~` | `ne_unsafe()` | Unsafe non-equality |
| `<~` | `lt_unsafe()` | Unsafe less than |
| `<=~` | `le_unsafe()` | Unsafe less than or equal |
| `>=~` | `ge_unsafe()` | Unsafe greater than or equal |
| `+?` | `add_partial()?` | Partial Addition |
| `-?` | `sub_partial()?` | Partial Subtraction |
| `*?` | `mul_partial()?` | Partial Multiplication |
| `/?` | `div_partial()?` | Partial Division |
| `%?` | `rem_partial()?` | Partial Remainder |
| `%%?` | `mod_partial()?` | Partial Modulo | Starting with version `0.26.1` |
---
## Short circuiting
The `and` and `or` operators use __short circuiting__ when used with boolean variables. This means that the first operand is always evaluated, but the second is only evaluated if it can affect the result.
For `and`, if the first operand is __false__ then the second operand is not evaluated since it cannot affect the result.
For `or`, if the first operand is __true__ then the second operand is not evaluated since it cannot affect the result.
This is a special feature built into the compiler, it cannot be used with operator aliasing for any other type.
## Unary operators
The unary operators are handled in the same manner, but with only one operand. For example, the following expressions are equivalent:
```pony
-x
x.neg()
```
The full list of unary operators that are aliases for functions is:
---
| Operator | Method | Description |
| -------- | ------------ | ----------------------------- |
| `-` | `neg()` | Arithmetic negation |
| `not` | `op_not()` | Not, both bitwise and logical |
| `-~` | `neg_unsafe()` | Unsafe arithmetic negation |
---
## Precedence
In Pony, unary operators always bind stronger than any infix operators: `not a == b` will be interpreted as `(not a) == b` instead of `not (a == b)`.
When using infix operators in complex expressions a key question is the __precedence__, i.e. which operator is evaluated first. Given this expression:
```pony
1 + 2 * 3 // Compilation failed.
```
We will get a value of 9 if we evaluate the addition first and 7 if we evaluate the multiplication first. In mathematics, there are rules about the order in which to evaluate operators and most programming languages follow this approach.
The problem with this is that the programmer has to remember the order and people aren't very good at things like that. Most people will remember to do multiplication before addition, but what about left bit shifting versus bitwise and? Sometimes people misremember (or guess wrong) and that leads to bugs. Worse, those bugs are often very hard to spot.
Pony takes a different approach and outlaws infix precedence. Any expression where more than one infix operator is used __must__ use parentheses to remove the ambiguity. If you fail to do this the compiler will complain.
This means that the example above is illegal in Pony and should be rewritten as:
```pony
1 + (2 * 3) // 7
```
Repeated use of a single operator, however, is fine:
```pony
1 + 2 + 3 // 6
```
Meanwhile, mixing unary and infix operators do not need additional parentheses as unary operators always bind more closely, so if our example above used a negative three:
```pony
1 + 2 * -3 // Compilation failed.
```
We would still need parentheses to remove the ambiguity for our infix operators like we did above, but not for the unary arithmetic negative (`-`):
```pony
1 + (2 * -3) // -5
```
We can see that it makes more sense for the unary operator to be applied before either infix as it only acts on a single number in the expression so it is never ambiguous.
Unary operators can also be applied to parentheses and act on the result of all operations in those parentheses prior to applying any infix operators outside the parentheses:
```pony
1 + -(2 * -3) // 7
```
|
pony
|
3299035
|
https://sv.wikipedia.org/wiki/Diogmites%20memnon
|
Diogmites memnon
|
Diogmites memnon är en tvåvingeart som beskrevs av Osten Sacken 1887. Diogmites memnon ingår i släktet Diogmites och familjen rovflugor. Inga underarter finns listade i Catalogue of Life.
Källor
Rovflugor
memnon
|
swedish
| 1.688628
|
Pony/pony_check-Property4-.txt
|
Property4[T1: T1, T2: T2, T3: T3, T4: T4]¶
[Source]
trait ref Property4[T1: T1, T2: T2, T3: T3, T4: T4] is
Property1[(T1 , T2 , T3 , T4)] ref
Implements¶
Property1[(T1 , T2 , T3 , T4)] ref
Public Functions¶
gen1¶
[Source]
The Generator for the first argument to your property4 method.
fun box gen1()
: Generator[T1] box
Returns¶
Generator[T1] box
gen2¶
[Source]
The Generator for the second argument to your property4 method.
fun box gen2()
: Generator[T2] box
Returns¶
Generator[T2] box
gen3¶
[Source]
The Generator for the third argument to your property4 method.
fun box gen3()
: Generator[T3] box
Returns¶
Generator[T3] box
gen4¶
[Source]
The Generator for the fourth argument to your property4 method.
fun box gen4()
: Generator[T4] box
Returns¶
Generator[T4] box
gen¶
[Source]
fun box gen()
: Generator[(T1 , T2 , T3 , T4)] box
Returns¶
Generator[(T1 , T2 , T3 , T4)] box
property¶
[Source]
fun ref property(
arg1: (T1 , T2 , T3 ,
T4),
h: PropertyHelper val)
: None val ?
Parameters¶
arg1: (T1 , T2 , T3 ,
T4)
h: PropertyHelper val
Returns¶
None val ?
property4¶
[Source]
A method verifying that a certain property holds for all given
arg1, arg2, arg3, and arg4
with the help of PropertyHelper h.
fun ref property4(
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
h: PropertyHelper val)
: None val ?
Parameters¶
arg1: T1
arg2: T2
arg3: T3
arg4: T4
h: PropertyHelper val
Returns¶
None val ?
name¶
[Source]
fun box name()
: String val
Returns¶
String val
params¶
[Source]
fun box params()
: PropertyParams val
Returns¶
PropertyParams val
|
pony
|
4632940
|
https://sv.wikipedia.org/wiki/Terminalia%20glabrata
|
Terminalia glabrata
|
Terminalia glabrata är en tvåhjärtbladig växtart som beskrevs av Forst. f.. Terminalia glabrata ingår i släktet Terminalia och familjen Combretaceae.
Underarter
Arten delas in i följande underarter:
T. g. brownii
T. g. haroldii
T. g. intonsa
T. g. koariki
T. g. rarotongensis
Källor
Myrtenordningen
glabrata
|
swedish
| 1.267978
|
Pony/cli-ArgSpec-.txt
|
ArgSpec¶
[Source]
ArgSpec describes the specification of a positional Arg(ument). They have a
name, descr(iption), a typ(e), and a default value when they are not
required.
Args always come after a leaf command, and are assigned in their positional
order.
class val ArgSpec
Constructors¶
bool¶
[Source]
Creates an Arg with a Bool typed value that can be used like
<cmd> true
to yield an arg value like
cmd.arg("opt").bool() == true.
new val bool(
name': String val,
descr': String val = "",
default': (Bool val | None val) = reference)
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
default': (Bool val | None val) = reference
Returns¶
ArgSpec val^
string¶
[Source]
Creates an Arg with a String typed value that can be used like
<cmd> filename
to yield an arg value
cmd.arg("file").string() == "filename".
new val string(
name': String val,
descr': String val = "",
default': (String val | None val) = reference)
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
default': (String val | None val) = reference
Returns¶
ArgSpec val^
i64¶
[Source]
Creates an Arg with an I64 typed value that can be used like
<cmd> 42
to yield an arg value like
cmd.arg("count").i64() == I64(42).
new val i64(
name': String val,
descr': String val = "",
default': (I64 val | None val) = reference)
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
default': (I64 val | None val) = reference
Returns¶
ArgSpec val^
u64¶
[Source]
Creates an Arg with an U64 typed value that can be used like
<cmd> 47
to yield an arg value like
cmd.arg("count").u64() == U64(47).
new val u64(
name': String val,
descr': String val = "",
default': (U64 val | None val) = reference)
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
default': (U64 val | None val) = reference
Returns¶
ArgSpec val^
f64¶
[Source]
Creates an Arg with a F64 typed value that can be used like
<cmd> 1.039
to yield an arg value like
cmd.arg("ratio").f64() == F64(1.039).
new val f64(
name': String val,
descr': String val = "",
default': (F64 val | None val) = reference)
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
default': (F64 val | None val) = reference
Returns¶
ArgSpec val^
string_seq¶
[Source]
Creates an Arg with a ReadSeq[String] typed value that can be used like
<cmd> file1 file2 file3
to yield a sequence of three strings equivalent to
cmd.arg("file").string_seq() (equiv) ["file1"; "file2"; "file3"].
new val string_seq(
name': String val,
descr': String val = "")
: ArgSpec val^
Parameters¶
name': String val
descr': String val = ""
Returns¶
ArgSpec val^
Public Functions¶
name¶
[Source]
Returns the name of this arg.
fun box name()
: String val
Returns¶
String val
descr¶
[Source]
Returns the description for this arg.
fun box descr()
: String val
Returns¶
String val
required¶
[Source]
Returns true iff this arg is required to be present in the command line.
fun box required()
: Bool val
Returns¶
Bool val
help_string¶
[Source]
Returns a formated help string for this arg.
fun box help_string()
: String val
Returns¶
String val
deb_string¶
[Source]
fun box deb_string()
: String val
Returns¶
String val
|
pony
|
2202026
|
https://sv.wikipedia.org/wiki/Arctosa%20kassenjea
|
Arctosa kassenjea
|
Arctosa kassenjea är en spindelart som först beskrevs av Embrik Strand 1913. Arctosa kassenjea ingår i släktet Arctosa och familjen vargspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
<references>
<ref name = "col275701">Strand, E. (1913a) Arachnida. I. 1913., In Wissenschaftliche Ergebnisse der Deutsche Zentral-Afrika Expedition 1907-1908</b>. Leipzig, 4(Zool. 2): 325-474.</ref>
</references>
Vargspindlar
kassenjea
|
swedish
| 1.125474
|
Pony/serialise-Serialise-.txt
|
Serialise¶
[Source]
primitive val Serialise
Constructors¶
create¶
[Source]
new val create()
: Serialise val^
Returns¶
Serialise val^
Public Functions¶
signature¶
[Source]
Returns a byte array that is unique to this compiled Pony binary, for the
purposes of comparing before deserialising any data from that source.
It is statistically impossible for two serialisation-incompatible Pony
binaries to have the same serialise signature.
fun box signature()
: Array[U8 val] val
Returns¶
Array[U8 val] val
eq¶
[Source]
fun box eq(
that: Serialise val)
: Bool val
Parameters¶
that: Serialise val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: Serialise val)
: Bool val
Parameters¶
that: Serialise val
Returns¶
Bool val
|
pony
|
835512
|
https://sv.wikipedia.org/wiki/Common%20Type%20System
|
Common Type System
|
Common Type System (CTS) är en standard som specificerar hur datatyper ter sig i ett datorminne. Målet är att låta program som är skrivna i olika programspråk lätt ska kunna utbyta information med varandra. I ett programspråk kan en typ beskrivas som en definition av en mängd med värden (till exempel heltal mellan 0 och 10), och de tillåtna operationerna som kan utföras med dessa värden.
Specifikationen för CTS är en del av Ecma standard 335, "Common Language Infrastructure (CLI) Partitions I to VI." CLI och CTS skapades av Microsoft, och Microsoft .NET framework är en implementation av standarden.
Typkategorier
CTS stödjer följande två typer:
Värdetyper
En värdetyp innehåller direkt sitt värde, och allokeras på stacken eller inuti en struktur. Värdetyper kan vara förimplementerade av runtime eller definierade av användaren. De primitiva typerna (int, char, bool osv.) och strukturer är värdetyper.
Referenstyper
En referenstyp innehåller referensen till värdets plats i minnet, och är allokerade på heapen. Variabler är som pekare och är inte bundna till något specifikt objekt. Klasser, gränssnitt, strängar, delegater, boxade värdetyper och arrayer är exempel på referenstyper.
Följande exempel visar skillnaderna mellan värdetyper och referenstyper.
Imports System
Class Class1
Public Value As Integer = 0
End Class 'Class1
Class Test
Shared Sub Main()
Dim val1 As Integer = 0
Dim val2 As Integer = val1
val2 = 123
Dim ref1 As New Class1()
Dim ref2 As Class1 = ref1
ref2.Value = 123
Console.WriteLine("Värden: {0}, {1}", val1, val2)
Console.WriteLine("Referenser: {0}, {1}", ref1.Value, ref2.Value)
End Sub 'Main
End Class 'Test
Utskriften från exemplet ovan
Värden: 0, 123
Referenser: 123, 123
Boxning
Konvertering av värdetyp till en referenstyp kallas boxning. Detta är möjligt då värdetyper och referenstyper båda ärver basklassen System.Object.
Int32 x = 10;
object o = x ; // Implicit boxning
Console.WriteLine("The Object o = {0}",o); // skriver ut 10
Men en Int32 kan också bli explicit boxad:
Int32 x = 10;
object o = (object) x; // Explicit boxning
Console.WriteLine("The object o = {0}",o); // skriver ut 10
På liknande sätt kan den bli konverterad tillbaka till en värdetyp.
Int32 x = 5;
object o = x; // Implicit boxning
x = o; // Implicit utboxning
Se även
Common Language Infrastructure
Källor
Artikel på engelskspråkiga Wikipedia
Externa länkar
Microsoft developer's guide describing the CTS
built-in types in the .NET Framework
.NET Framework
|
swedish
| 0.832662
|
Pony/pony_bench-AsyncMicroBenchmark-.txt
|
AsyncMicroBenchmark¶
[Source]
Asynchronous benchmarks must provide this trait. The apply method defines a
single iteration in a sample. Each phase of the sample completes when the
given AsyncBenchContinue has its complete method invoked. Setup and
Teardown are defined by the before and after methods respectively. The
before method runs before a sample of benchmarks and after runs after
the all iterations in the sample have completed. If your benchmark requires
setup and/or teardown to occur beween each iteration of the benchmark, then
you can use before_iteration and after_iteration methods respectively
that run before/after each iteration.
trait iso AsyncMicroBenchmark
Public Functions¶
name¶
[Source]
fun box name()
: String val
Returns¶
String val
config¶
[Source]
fun box config()
: BenchConfig val
Returns¶
BenchConfig val
overhead¶
[Source]
fun box overhead()
: AsyncMicroBenchmark iso^
Returns¶
AsyncMicroBenchmark iso^
before¶
[Source]
fun ref before(
c: AsyncBenchContinue val)
: None val
Parameters¶
c: AsyncBenchContinue val
Returns¶
None val
before_iteration¶
[Source]
fun ref before_iteration(
c: AsyncBenchContinue val)
: None val
Parameters¶
c: AsyncBenchContinue val
Returns¶
None val
apply¶
[Source]
fun ref apply(
c: AsyncBenchContinue val)
: None val ?
Parameters¶
c: AsyncBenchContinue val
Returns¶
None val ?
after¶
[Source]
fun ref after(
c: AsyncBenchContinue val)
: None val
Parameters¶
c: AsyncBenchContinue val
Returns¶
None val
after_iteration¶
[Source]
fun ref after_iteration(
c: AsyncBenchContinue val)
: None val
Parameters¶
c: AsyncBenchContinue val
Returns¶
None val
|
pony
|
835512
|
https://sv.wikipedia.org/wiki/Common%20Type%20System
|
Common Type System
|
Common Type System (CTS) är en standard som specificerar hur datatyper ter sig i ett datorminne. Målet är att låta program som är skrivna i olika programspråk lätt ska kunna utbyta information med varandra. I ett programspråk kan en typ beskrivas som en definition av en mängd med värden (till exempel heltal mellan 0 och 10), och de tillåtna operationerna som kan utföras med dessa värden.
Specifikationen för CTS är en del av Ecma standard 335, "Common Language Infrastructure (CLI) Partitions I to VI." CLI och CTS skapades av Microsoft, och Microsoft .NET framework är en implementation av standarden.
Typkategorier
CTS stödjer följande två typer:
Värdetyper
En värdetyp innehåller direkt sitt värde, och allokeras på stacken eller inuti en struktur. Värdetyper kan vara förimplementerade av runtime eller definierade av användaren. De primitiva typerna (int, char, bool osv.) och strukturer är värdetyper.
Referenstyper
En referenstyp innehåller referensen till värdets plats i minnet, och är allokerade på heapen. Variabler är som pekare och är inte bundna till något specifikt objekt. Klasser, gränssnitt, strängar, delegater, boxade värdetyper och arrayer är exempel på referenstyper.
Följande exempel visar skillnaderna mellan värdetyper och referenstyper.
Imports System
Class Class1
Public Value As Integer = 0
End Class 'Class1
Class Test
Shared Sub Main()
Dim val1 As Integer = 0
Dim val2 As Integer = val1
val2 = 123
Dim ref1 As New Class1()
Dim ref2 As Class1 = ref1
ref2.Value = 123
Console.WriteLine("Värden: {0}, {1}", val1, val2)
Console.WriteLine("Referenser: {0}, {1}", ref1.Value, ref2.Value)
End Sub 'Main
End Class 'Test
Utskriften från exemplet ovan
Värden: 0, 123
Referenser: 123, 123
Boxning
Konvertering av värdetyp till en referenstyp kallas boxning. Detta är möjligt då värdetyper och referenstyper båda ärver basklassen System.Object.
Int32 x = 10;
object o = x ; // Implicit boxning
Console.WriteLine("The Object o = {0}",o); // skriver ut 10
Men en Int32 kan också bli explicit boxad:
Int32 x = 10;
object o = (object) x; // Explicit boxning
Console.WriteLine("The object o = {0}",o); // skriver ut 10
På liknande sätt kan den bli konverterad tillbaka till en värdetyp.
Int32 x = 5;
object o = x; // Implicit boxning
x = o; // Implicit utboxning
Se även
Common Language Infrastructure
Källor
Artikel på engelskspråkiga Wikipedia
Externa länkar
Microsoft developer's guide describing the CTS
built-in types in the .NET Framework
.NET Framework
|
swedish
| 0.832662
|
Pony/time-PosixDate-.txt
|
PosixDate¶
[Source]
Represents a proleptic Gregorian date and time, without specifying a
time zone. The day of month, month, day of week, and day of year are all
indexed from 1, i.e. January is 1, Monday is 1.
class ref PosixDate
Constructors¶
create¶
[Source]
Create a date from a POSIX time. Negative arguments will be changed to zero.
new ref create(
seconds: I64 val = 0,
nanoseconds: I64 val = 0)
: PosixDate ref^
Parameters¶
seconds: I64 val = 0
nanoseconds: I64 val = 0
Returns¶
PosixDate ref^
Public fields¶
var nsec: I32 val¶
[Source]
var sec: I32 val¶
[Source]
var min: I32 val¶
[Source]
var hour: I32 val¶
[Source]
var day_of_month: I32 val¶
[Source]
var month: I32 val¶
[Source]
var year: I32 val¶
[Source]
var day_of_week: I32 val¶
[Source]
var day_of_year: I32 val¶
[Source]
Public Functions¶
time¶
[Source]
Return a POSIX time. Treats the date as UTC.
fun box time()
: I64 val
Returns¶
I64 val
normal¶
[Source]
Normalise all the fields of the date. For example, if the hour is 24, it is
set to 0 and the day is advanced. This allows fields to be changed naively,
eg. adding 1000 to hours to advance the time by 1000 hours, and then
normalising the date.
fun ref normal()
: None val
Returns¶
None val
format¶
[Source]
Format the time as for strftime.
Will return an empty string if the format string is "%p" or "%P".
fun box format(
fmt: String val)
: String val ?
Parameters¶
fmt: String val
Returns¶
String val ?
|
pony
|
2127791
|
https://no.wikipedia.org/wiki/Politikk%C3%A5ret%201764
|
Politikkåret 1764
|
Hendelser
Fødsler
|-
|August
|31. || Johan August Sandels || svensk || offiser, greve og statsmann;stattholder i Norge 1818–1827 ||align=center|66 ||align=center|1831 ||
|}
Bildegalleri
Referanser
Eksterne lenker
|
norwegian_bokmål
| 1.314169
|
Pony/builtin-StdStream-.txt
|
StdStream¶
[Source]
Asynchronous access to stdout and stderr. The constructors are private to
ensure that access is provided only via an environment.
actor tag StdStream
Public Behaviours¶
print¶
[Source]
Print some bytes and insert a newline afterwards.
be print(
data: (String val | Array[U8 val] val))
Parameters¶
data: (String val | Array[U8 val] val)
write¶
[Source]
Print some bytes without inserting a newline afterwards.
be write(
data: (String val | Array[U8 val] val))
Parameters¶
data: (String val | Array[U8 val] val)
printv¶
[Source]
Print an iterable collection of ByteSeqs.
be printv(
data: ByteSeqIter val)
Parameters¶
data: ByteSeqIter val
writev¶
[Source]
Write an iterable collection of ByteSeqs.
be writev(
data: ByteSeqIter val)
Parameters¶
data: ByteSeqIter val
flush¶
[Source]
Flush any data out to the os (ignoring failures).
be flush()
|
pony
|
273484
|
https://da.wikipedia.org/wiki/IBATIS
|
IBATIS
|
iBATIS er et stykke fri software, der automatisk eller semi-automatisk laver objekter til programmeringssprogene java, C# eller ruby ud fra SQL. Programmøren skal ikke skrive SQL direkte i sin kode men i stedet skrive det i XML-filer.
Ideen med iBATES er at mindske mængden af kode en programmør skal skrive for at et program kan arbejde med data i en relationel database.
Hvis der i en database eksistere en tabel PRODUCT (PRD_ID: INTEGER, PRD_DESCRIPTION: VARCHAR) og man ønsker adgang til værdierne i en række i tabellen via et java-objekt com.example.Product (id: int, description: String) så kan iBATES lave java-objektet ved at skrive følgende i en XML-fil:
<select id="getProduct"
parameterClass="com.example.Product"
resultClass="com.example.Product">
select
PRD_ID as id,
PRD_DESCRIPTION as description
from
PRODUCT
where
PRD_ID = #id#
</select>
Java-koden der bruger Product-objektet til at hente værdier fra en bestemt række i tabellen i databasen kan se sådan her ud:
Product paramProduct = new Product();
paramProduct.setId(123);
Product resultProduct = IBatis.getObject("getProduct", paramProduct);
Eksterne links
ibatis.apache.org – Den officielle side.
Fri software
|
danish
| 0.816977
|
Pony/src-math-fibonacci-.txt
|
fibonacci.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33class Fibonacci[A: (Integer[A] val & Unsigned) = U64] is Iterator[A]
"""
Useful for microbenchmarks to impress your friends. Look y'all, Pony goes
fast! We suppose if you are into Agile planning poker that you could also
use this in conjunction with `Random` to assign User Story Points.
"""
var _last: A = 0
var _next: A = 0
var _uber_next: A = 1
fun apply(n: U8): A =>
if n == 0 then 0
elseif n == 1 then 1
else
let j = n / 2
let fib_j = apply(j)
let fib_i = apply(j - 1)
if (n % 2) == 0 then
fib_j * (fib_j + (fib_i * 2))
elseif (n % 4) == 1 then
(((fib_j * 2) + fib_i) * ((fib_j * 2) - fib_i)) + 2
else
(((fib_j * 2) + fib_i) * ((fib_j * 2) - fib_i)) - 2
end
end
//The generator stops on overflow.
fun has_next(): Bool => _last <= _next
fun ref next(): A =>
_last = _next = _uber_next = _next + _uber_next
_last
|
pony
|
2920393
|
https://sv.wikipedia.org/wiki/Fabresema%20flavibasalis
|
Fabresema flavibasalis
|
Fabresema flavibasalis är en fjärilsart som beskrevs av Holloway 1979. Fabresema flavibasalis ingår i släktet Fabresema och familjen björnspinnare. Inga underarter finns listade i Catalogue of Life.
Källor
Björnspinnare
flavibasalis
|
swedish
| 1.313568
|
Pony/src-pony_check-property_helper-.txt
|
property_helper.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465interface val _PropertyRunNotify
"""
Simple callback for notifying the runner
that a run completed.
"""
fun apply(round: _Round, success: Bool)
interface tag _IPropertyRunner
"""
Interface for a PropertyRunner without the generic type parameter,
and only with the behaviours we are interested in.
"""
be expect_action(name: String, round: _Round)
be complete_action(name: String, round: _Round, ph: PropertyHelper)
be fail_action(name: String, round: _Round, ph: PropertyHelper)
be dispose_when_done(disposable: DisposableActor, round: _Round)
be log(msg: String, verbose: Bool = false)
class val PropertyHelper
"""
Helper for PonyCheck properties.
Mirrors the [TestHelper](pony_test-TestHelper.md) API as closely as possible.
Contains assertion functions and functions for completing asynchronous
properties, for expecting and completing or failing actions.
Internally a new PropertyHelper will be created for each call to
a property with a new sample and also for every shrink run.
So don't assume anything about the identity of the PropertyHelper inside of
your Properties.
This class is `val` by default so it can be safely passed around to other
actors.
It exposes the process [Env](builtin-Env.md) as public `env` field in order to
give access to the root authority and other stuff.
"""
let _runner: _IPropertyRunner
let _run_notify: _PropertyRunNotify
let _run: _Round
let _params: String
let env: Env
new val create(
env': Env,
runner: _IPropertyRunner,
run_notify: _PropertyRunNotify,
run: _Round,
params: String
) =>
env = env'
_runner = runner
_run_notify = run_notify
_run = run
_params = params
/****** START DUPLICATION FROM TESTHELPER ********/
fun log(msg: String, verbose: Bool = false) =>
"""
Log the given message.
The verbose parameter allows messages to be printed only when the
`--verbose` command line option is used. For example, by default assert
failures are logged, but passes are not. With `--verbose`, both passes and
fails are reported.
Logs are printed one test at a time to avoid interleaving log lines from
concurrent tests.
"""
_runner.log(msg, verbose)
fun fail(msg: String = "Test failed") =>
"""
Flag the test as having failed.
"""
_fail(msg)
fun assert_false(
predicate: Bool,
msg: String val = "",
loc: SourceLoc val = __loc)
: Bool val
=>
"""
Assert that the given expression is false.
"""
if predicate then
_fail(_fmt_msg(loc, "Assert false failed. " + msg))
return false
end
_runner.log(_fmt_msg(loc, "Assert false passed. " + msg))
true
fun assert_true(
predicate: Bool,
msg: String val = "",
loc: SourceLoc val = __loc)
: Bool val
=>
"""
Assert that the given expression is true.
"""
if not predicate then
_fail(_fmt_msg(loc, "Assert true failed. " + msg))
return false
end
_runner.log(_fmt_msg(loc, "Assert true passed. " + msg))
true
fun assert_error(
test: {(): None ?} box,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the given test function throws an error when run.
"""
try
test()?
_fail(_fmt_msg(loc, "Assert error failed. " + msg))
false
else
_runner.log(_fmt_msg(loc, "Assert error passed. " + msg), true)
true
end
fun assert_no_error(
test: {(): None ?} box,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the given test function does not throw an error when run.
"""
try
test()?
_runner.log(_fmt_msg(loc, "Assert no error passed. " + msg), true)
true
else
_fail(_fmt_msg(loc, "Assert no error failed. " + msg))
false
end
fun assert_is[A](
expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions resolve to the same instance.
"""
if expect isnt actual then
_fail(_fmt_msg(loc, "Assert is failed. " + msg
+ " Expected (" + (digestof expect).string() + ") is ("
+ (digestof actual).string() + ")"))
return false
end
_runner.log(
_fmt_msg(loc, "Assert is passed. " + msg
+ " Got (" + (digestof expect).string() + ") is ("
+ (digestof actual).string() + ")"),
true)
true
fun assert_isnt[A](
not_expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions resolve to different instances.
"""
if not_expect is actual then
_fail(_fmt_msg(loc, "Assert isn't failed. " + msg
+ " Expected (" + (digestof not_expect).string() + ") isnt ("
+ (digestof actual).string() + ")"))
return false
end
_runner.log(
_fmt_msg(loc, "Assert isn't passed. " + msg
+ " Got (" + (digestof not_expect).string() + ") isnt ("
+ (digestof actual).string() + ")"),
true)
true
fun assert_eq[A: (Equatable[A] #read & Stringable #read)](
expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions are equal.
"""
if expect != actual then
_fail(_fmt_msg(loc, "Assert eq failed. " + msg
+ " Expected (" + expect.string() + ") == (" + actual.string() + ")"))
return false
end
_runner.log(_fmt_msg(loc, "Assert eq passed. " + msg
+ " Got (" + expect.string() + ") == (" + actual.string() + ")"),
true)
true
fun assert_ne[A: (Equatable[A] #read & Stringable #read)](
not_expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions are not equal.
"""
if not_expect == actual then
_fail(_fmt_msg(loc, "Assert ne failed. " + msg
+ " Expected (" + not_expect.string() + ") != (" + actual.string()
+ ")"))
return false
end
_runner.log(
_fmt_msg(loc, "Assert ne passed. " + msg
+ " Got (" + not_expect.string() + ") != (" + actual.string() + ")"),
true)
true
fun assert_array_eq[A: (Equatable[A] #read & Stringable #read)](
expect: ReadSeq[A],
actual: ReadSeq[A],
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the contents of the 2 given ReadSeqs are equal.
"""
var ok = true
if expect.size() != actual.size() then
ok = false
else
try
var i: USize = 0
while i < expect.size() do
if expect(i)? != actual(i)? then
ok = false
break
end
i = i + 1
end
else
ok = false
end
end
if not ok then
_fail(_fmt_msg(loc, "Assert EQ failed. " + msg + " Expected ("
+ _print_array[A](expect) + ") == (" + _print_array[A](actual) + ")"))
return false
end
_runner.log(
_fmt_msg(loc, "Assert EQ passed. " + msg + " Got ("
+ _print_array[A](expect) + ") == (" + _print_array[A](actual) + ")"),
true)
true
fun assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](
expect: ReadSeq[A],
actual: ReadSeq[A],
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the contents of the 2 given ReadSeqs are equal ignoring order.
"""
try
let missing = Array[box->A]
let consumed = Array[Bool].init(false, actual.size())
for e in expect.values() do
var found = false
var i: USize = -1
for a in actual.values() do
i = i + 1
if consumed(i)? then continue end
if e == a then
consumed.update(i, true)?
found = true
break
end
end
if not found then
missing.push(e)
end
end
let extra = Array[box->A]
for (i, c) in consumed.pairs() do
if not c then extra.push(actual(i)?) end
end
if (extra.size() != 0) or (missing.size() != 0) then
_fail(
_fmt_msg(loc, "Assert EQ_UNORDERED failed. " + msg
+ " Expected (" + _print_array[A](expect) + ") == ("
+ _print_array[A](actual) + "):"
+ "\nMissing: " + _print_array[box->A](missing)
+ "\nExtra: " + _print_array[box->A](extra)
)
)
return false
end
_runner.log(
_fmt_msg(
loc,
"Assert EQ_UNORDERED passed. "
+ msg
+ " Got ("
+ _print_array[A](expect)
+ ") == ("
+ _print_array[A](actual)
+ ")"
),
true
)
true
else
_fail("Assert EQ_UNORDERED failed from an internal error.")
false
end
fun _print_array[A: Stringable #read](array: ReadSeq[A]): String =>
"""
Generate a printable string of the contents of the given readseq to use in
error messages.
"""
"[len=" + array.size().string() + ": " + ", ".join(array.values()) + "]"
/****** END DUPLICATION FROM TESTHELPER *********/
fun expect_action(name: String) =>
"""
Expect some action of the given name to complete
for the property to hold.
If all expected actions are completed successfully,
the property is considered successful.
If 1 action fails, the property is considered failing.
Call `complete_action(name)` or `fail_action(name)`
to mark some action as completed.
Example:
```pony
actor AsyncActor
let _ph: PropertyHelper
new create(ph: PropertyHelper) =>
_ph = ph
be complete(s: String) =>
if (s.size() % 2) == 0 then
_ph.complete_action("is_even")
else
_ph.fail_action("is_even")
class EvenStringProperty is Property1[String]
fun name(): String => "even_string"
fun gen(): Generator[String] =>
Generators.ascii()
fun property(arg1: String, ph: PropertyHelper) =>
ph.expect_action("is_even")
AsyncActor(ph).check(arg1)
```
"""
_runner.expect_action(name, _run)
fun val complete_action(name: String) =>
"""
Complete an expected action successfully.
If all expected actions are completed successfully,
the property is considered successful.
If 1 action fails, the property is considered failing.
If the action `name` was not expected, i.e. was not registered using
`expect_action`, nothing happens.
"""
_runner.complete_action(name, _run, this)
fun val fail_action(name: String) =>
"""
Mark an expected action as failed.
If all expected actions are completed successfully,
the property is considered successful.
If 1 action fails, the property is considered failing.
"""
_runner.fail_action(name, _run, this)
fun complete(success: Bool) =>
"""
Complete an asynchronous property successfully.
Once this method is called the property
is considered successful or failing
depending on the value of the parameter `success`.
For more fine grained control over completing or failing
a property that consists of many steps, consider using
`expect_action`, `complete_action` and `fail_action`.
"""
_run_notify.apply(_run, success)
fun dispose_when_done(disposable: DisposableActor) =>
"""
Dispose the actor after a property run / a shrink is done.
"""
_runner.dispose_when_done(disposable, _run)
fun _fail(msg: String) =>
_runner.log(msg)
_run_notify.apply(_run, false)
fun _fmt_msg(loc: SourceLoc, msg: String): String =>
let msg_prefix = _params + " " + _run.string() + " " + _format_loc(loc)
if msg.size() > 0 then
msg_prefix + ": " + msg
else
msg_prefix
end
fun _format_loc(loc: SourceLoc): String =>
loc.file() + ":" + loc.line().string()
|
pony
|
4228986
|
https://sv.wikipedia.org/wiki/Agave%20stringens
|
Agave stringens
|
Agave stringens är en sparrisväxtart som beskrevs av William Trelease. Agave stringens ingår i släktet Agave och familjen sparrisväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Sparrisväxter
stringens
|
swedish
| 1.335999
|
Pony/src-pony_check-int_properties-.txt
|
int_properties.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145primitive _StringifyIntArg
fun apply(choice: U8, int: U128): String iso ^ =>
let num =
match choice % 14
| 0 => "U8(" + int.u8().string() + ")"
| 1 => "U16(" + int.u16().string() + ")"
| 2 => "U32(" + int.u32().string() + ")"
| 3 => "U64(" + int.u64().string() + ")"
| 4 => "ULong(" + int.ulong().string() + ")"
| 5 => "USize(" + int.usize().string() + ")"
| 6 => "U128(" + int.string() + ")"
| 7 => "I8(" + int.i8().string() + ")"
| 8 => "I16(" + int.i16().string() + ")"
| 9 => "I32(" + int.i32().string() + ")"
| 10 => "I64(" + int.i64().string() + ")"
| 11 => "ILong(" + int.ilong().string() + ")"
| 12 => "ISize(" + int.isize().string() + ")"
| 13 => "I128(" + int.i128().string() + ")"
else
""
end
num.clone()
class IntPropertySample is Stringable
let choice: U8
let int: U128
new create(choice': U8, int': U128) =>
choice = choice'
int = int'
fun string(): String iso^ =>
_StringifyIntArg(choice, int)
type IntUnitTest is Property1UnitTest[IntPropertySample]
trait IntProperty is Property1[IntPropertySample]
"""
A property implementation for conveniently evaluating properties
for all Pony Integer types at once.
The property needs to be formulated inside the method `int_property`:
```pony
class DivisionByZeroProperty is IntProperty
fun name(): String => "div/0"
fun int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)? =>
h.assert_eq[T](T.from[U8](0), x / T.from[U8](0))
```
"""
fun gen(): Generator[IntPropertySample] =>
Generators.map2[U8, U128, IntPropertySample](
Generators.u8(),
Generators.u128(),
{(choice, int) => IntPropertySample(choice, int) })
fun ref property(sample: IntPropertySample, h: PropertyHelper) ? =>
let x = sample.int
match sample.choice % 14
| 0 => int_property[U8](x.u8(), h)?
| 1 => int_property[U16](x.u16(), h)?
| 2 => int_property[U32](x.u32(), h)?
| 3 => int_property[U64](x.u64(), h)?
| 4 => int_property[ULong](x.ulong(), h)?
| 5 => int_property[USize](x.usize(), h)?
| 6 => int_property[U128](x, h)?
| 7 => int_property[I8](x.i8(), h)?
| 8 => int_property[I16](x.i16(), h)?
| 9 => int_property[I32](x.i32(), h)?
| 10 => int_property[I64](x.i64(), h)?
| 11 => int_property[ILong](x.ilong(), h)?
| 12 => int_property[ISize](x.isize(), h)?
| 13 => int_property[I128](x.i128(), h)?
else
h.log("rem is broken")
error
end
fun ref int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)?
class IntPairPropertySample is Stringable
let choice: U8
let int1: U128
let int2: U128
new create(choice': U8, int1': U128, int2': U128) =>
choice = choice'
int1 = int1'
int2 = int2'
fun string(): String iso^ =>
let num1: String val = _StringifyIntArg(choice, int1)
let num2: String val = _StringifyIntArg(choice, int2)
"".join(["("; num1; ", "; num2; ")"].values())
type IntPairUnitTest is Property1UnitTest[IntPairPropertySample]
trait IntPairProperty is Property1[IntPairPropertySample]
"""
A property implementation for conveniently evaluating properties
for pairs of integers of all Pony integer types at once.
The property needs to be formulated inside the method `int_property`:
```pony
class CommutativeMultiplicationProperty is IntPairProperty
fun name(): String => "commutativity/mul"
fun int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)? =>
h.assert_eq[T](x * y, y * x)
```
"""
fun gen(): Generator[IntPairPropertySample] =>
Generators.map3[U8, U128, U128, IntPairPropertySample](
Generators.u8(),
Generators.u128(),
Generators.u128(),
{(choice, int1, int2) => IntPairPropertySample(choice, int1, int2) })
fun ref property(sample: IntPairPropertySample, h: PropertyHelper) ? =>
let x = sample.int1
let y = sample.int2
match sample.choice % 14
| 0 => int_property[U8](x.u8(), y.u8(), h)?
| 1 => int_property[U16](x.u16(), y.u16(), h)?
| 2 => int_property[U32](x.u32(), y.u32(), h)?
| 3 => int_property[U64](x.u64(), y.u64(), h)?
| 4 => int_property[ULong](x.ulong(), y.ulong(), h)?
| 5 => int_property[USize](x.usize(), y.usize(), h)?
| 6 => int_property[U128](x, y, h)?
| 7 => int_property[I8](x.i8(), y.i8(), h)?
| 8 => int_property[I16](x.i16(), y.i16(), h)?
| 9 => int_property[I32](x.i32(), y.i32(), h)?
| 10 => int_property[I64](x.i64(), y.i64(), h)?
| 11 => int_property[ILong](x.ilong(), y.ilong(), h)?
| 12 => int_property[ISize](x.isize(), y.isize(), h)?
| 13 => int_property[I128](x.i128(), y.i128(), h)?
else
h.log("rem is broken")
error
end
fun ref int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)?
|
pony
|
3953748
|
https://sv.wikipedia.org/wiki/Hyperfakultet
|
Hyperfakultet
|
Inom matematiken är hyperfakulteten av n en speciell funktion definierad som
För n = 1, 2, 3, 4, … är värdena av H(n): 1, 1, 4, 108, 27648, 86400000, 4031078400000, 3319766398771200000, 55696437941726556979200000, 21577941222941856209168026828800000, 215779412229418562091680268288000000000000000, 61564384586635053951550731889313964883968000000000000000, … .
Dess asymptotiska tillväxt ges av
där A = 1.2824... är Glaisher–Kinkelins konstant. H(14) = 1.8474...×1099 är redan nästan lika stor som googol och H(15) = 8.0896...×10116 är nästan lika stor som Shannons tal.
Hyperfakultetens definition kan utvidgas till komplexa talen. Den resulterande funktionen kallas för K-funktionen.
Se även
Superfakultet
Källor
Heltalsföljder
Heltalsmängder
Kombinatorik
Gamma- och relaterade funktioner
Talteori
|
swedish
| 0.753796
|
Pony/ini-IniNoDelimiter-.txt
|
IniNoDelimiter¶
[Source]
primitive val IniNoDelimiter
Constructors¶
create¶
[Source]
new val create()
: IniNoDelimiter val^
Returns¶
IniNoDelimiter val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: IniNoDelimiter val)
: Bool val
Parameters¶
that: IniNoDelimiter val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: IniNoDelimiter val)
: Bool val
Parameters¶
that: IniNoDelimiter val
Returns¶
Bool val
|
pony
|
304016
|
https://sv.wikipedia.org/wiki/Valdistrikt
|
Valdistrikt
|
Ett valdistrikt är ett område med röstberättigade i ett val.
Valdistrikt i Sverige
Ledamöter väljs från valkretsar medan valdistrikten syftar till att fördela väljare och röster jämnt över valområdet. Detta för att effektivisera den preliminära rösträkningen och för att det inte ska uppstå köer. Ingen ledamot väljs således från ett enskilt valdistrikt utan från valkretsen som helhet.
Valdistrikten i Sverige ska bestå av mellan 1 000 och 2 000 röstberättigade. Om det finns särskilda skäl får ett valdistrikt omfattade färre än 1 000 eller fler än 2 000. Ett valdistrikt får omfatta färre än 300 röstberättigade endast om det finns synnerliga skäl, ofta gäller det öar med liten befolkning. Länsstyrelsen beslutar om indelningen i valdistrikt på förslag av kommunfullmäktige. Sådana beslut måste ha fattats senast den 1 december året innan valåret för att gälla vid nästa val.
Vid valet 2006 fanns det 5 783 valdistrikt, vid valet 2010 fanns det 5 668 valdistrikt och vid valet 2014 fanns 5 837 det valdistrikt i landet (exklusive s.k. onsdagsdistrikt) och 2018 fanns det 6004 valdistrikt.
Till varje valdistrikt hör en vallokal. Så länge varje valdistrikt har en egen vallokal får denna dock förläggas till ett annat valdistrikt i valkretsen, och en byggnad får också inhysa flera vallokaler. Det är valnämnden i kommunen som bestämmer vilka lokaler som ska användas som vallokaler. Vallokalen är endast öppen på valdagen och det är endast de väljare som bor i valdistriktet som får rösta där.
Ett valdistrikt kan också fungera som ett så kallat placeringsdistrikt. Detta är ett helt vanligt valdistrikt som har utsetts av valnämnden för att ta emot och räkna utlandsröster och röster från väljare vars gamla adress inte längre existerar.
På valdagen räknas valsedlarna per valdistrikt varvid man även lägger till förtidsrösterna. Detta redovisas som distriktets valresultat på valmyndighetens hemsida.
De förtidsröster som inte hinner till sitt valdistrikt på valdagen samlas i ett särskilt 'onsdagsdistrikt' och räknas samman där. Ett onsdagsdistrikt motsvarar en kommunvalkrets eller kommun om kommunen inte är valkretsindelad. Detta för att valhemligheten inte ska röjas.
Detta medför också att det tillkommer ett visst antal distrikt i det slutliga resultatet om man jämför mot valnattsresultatet. Antalet distrikt som skiljer beror på hur många kommuner som vid aktuellt val är valkretsindelade. I valet 2010 tillkom 81 onsdagsdistrikt .
Teknik
Lantmäteriverket har utvecklat en GIS-applikation som hjälper länsstyrelserna och kommunerna att på ett säkert sätt redigera gränserna för valdistrikten. Valdistrikten finns inritade på en digital karta som tillsammans med folkbokföringsuppgifter ger möjlighet att inför valen ta fram valdistrikt med optimal indelning.
Valresultatet i enskilda valdistrikt kan enkelt följas med hjälp av klickbar webbkarta som till valet 2006 vidareutvecklades och blev helt automatiserad.
Se även
Valkrets
Källor
Vallag (2005:837)
Noter
Val
Statsvetenskap
|
swedish
| 1.062688
|
Pony/collections-persistent-SetIs-.txt
|
SetIs[A: Any #share]¶
[Source]
type SetIs[A: Any #share] is
HashSet[A, HashIs[A] val] val
Type Alias For¶
HashSet[A, HashIs[A] val] val
|
pony
|
2569172
|
https://sv.wikipedia.org/wiki/Asiotmethis%20heptapotamicus
|
Asiotmethis heptapotamicus
|
Asiotmethis heptapotamicus är en insektsart som först beskrevs av Zubovski 1898. Asiotmethis heptapotamicus ingår i släktet Asiotmethis och familjen Pamphagidae.
Underarter
Arten delas in i följande underarter:
A. h. heptapotamicus
A. h. extimus
A. h. griseus
A. h. transiens
A. h. songoricus
Källor
Hopprätvingar
heptapotamicus
|
swedish
| 1.152462
|
Pony/builtin-OutStream-.txt
|
OutStream¶
[Source]
Asnychronous access to some output stream.
interface tag OutStream
Public Behaviours¶
print¶
[Source]
Print some bytes and insert a newline afterwards.
be print(
data: (String val | Array[U8 val] val))
Parameters¶
data: (String val | Array[U8 val] val)
write¶
[Source]
Print some bytes without inserting a newline afterwards.
be write(
data: (String val | Array[U8 val] val))
Parameters¶
data: (String val | Array[U8 val] val)
printv¶
[Source]
Print an iterable collection of ByteSeqs.
be printv(
data: ByteSeqIter val)
Parameters¶
data: ByteSeqIter val
writev¶
[Source]
Write an iterable collection of ByteSeqs.
be writev(
data: ByteSeqIter val)
Parameters¶
data: ByteSeqIter val
flush¶
[Source]
Flush the stream.
be flush()
|
pony
|
273484
|
https://da.wikipedia.org/wiki/IBATIS
|
IBATIS
|
iBATIS er et stykke fri software, der automatisk eller semi-automatisk laver objekter til programmeringssprogene java, C# eller ruby ud fra SQL. Programmøren skal ikke skrive SQL direkte i sin kode men i stedet skrive det i XML-filer.
Ideen med iBATES er at mindske mængden af kode en programmør skal skrive for at et program kan arbejde med data i en relationel database.
Hvis der i en database eksistere en tabel PRODUCT (PRD_ID: INTEGER, PRD_DESCRIPTION: VARCHAR) og man ønsker adgang til værdierne i en række i tabellen via et java-objekt com.example.Product (id: int, description: String) så kan iBATES lave java-objektet ved at skrive følgende i en XML-fil:
<select id="getProduct"
parameterClass="com.example.Product"
resultClass="com.example.Product">
select
PRD_ID as id,
PRD_DESCRIPTION as description
from
PRODUCT
where
PRD_ID = #id#
</select>
Java-koden der bruger Product-objektet til at hente værdier fra en bestemt række i tabellen i databasen kan se sådan her ud:
Product paramProduct = new Product();
paramProduct.setId(123);
Product resultProduct = IBatis.getObject("getProduct", paramProduct);
Eksterne links
ibatis.apache.org – Den officielle side.
Fri software
|
danish
| 0.816977
|
Pony/promises-Reject-.txt
|
Reject[A: Any #share]¶
[Source]
A function on A that is called when a promise is rejected.
interface iso Reject[A: Any #share]
Public Functions¶
apply¶
[Source]
fun ref apply()
: A ?
Returns¶
A ?
|
pony
|
511212
|
https://sv.wikipedia.org/wiki/A%26A
|
A&A
|
A&A kan avse:
A&A – en vetenskaplig facktidskrift, se Astronomy and Astrophysics
A&A – ett strategispel, se Axis and Allies
|
swedish
| 1.110606
|
Pony/pony_check-ASCIIPunctuation-.txt
|
ASCIIPunctuation¶
[Source]
primitive val ASCIIPunctuation
Constructors¶
create¶
[Source]
new val create()
: ASCIIPunctuation val^
Returns¶
ASCIIPunctuation val^
Public Functions¶
apply¶
[Source]
fun box apply()
: String val
Returns¶
String val
eq¶
[Source]
fun box eq(
that: ASCIIPunctuation val)
: Bool val
Parameters¶
that: ASCIIPunctuation val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ASCIIPunctuation val)
: Bool val
Parameters¶
that: ASCIIPunctuation val
Returns¶
Bool val
|
pony
|
3581282
|
https://sv.wikipedia.org/wiki/Palpator%20sicilicus
|
Palpator sicilicus
|
Palpator sicilicus är en stekelart som beskrevs av Andrey Ivanovich Khalaim 2006. Palpator sicilicus ingår i släktet Palpator och familjen brokparasitsteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Brokparasitsteklar
sicilicus
|
swedish
| 1.13826
|
Pony/files-FileCaps-.txt
|
FileCaps¶
[Source]
type FileCaps is
Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref
Type Alias For¶
Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref
|
pony
|
3547052
|
https://sv.wikipedia.org/wiki/Fileanta%20flavolaeta
|
Fileanta flavolaeta
|
Fileanta flavolaeta är en stekelart som först beskrevs av Berthoumieu 1892. Fileanta flavolaeta ingår i släktet Fileanta och familjen brokparasitsteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Brokparasitsteklar
flavolaeta
|
swedish
| 1.136926
|
Pony/process-ProcessError-.txt
|
ProcessError¶
[Source]
class val ProcessError
Constructors¶
create¶
[Source]
new val create(
error_type': (ExecveError val | PipeError val | ForkError val |
WaitpidError val | WriteError val | KillError val |
CapError val | ChdirError val | UnknownError val),
message': (String val | None val) = reference)
: ProcessError val^
Parameters¶
error_type': (ExecveError val | PipeError val | ForkError val |
WaitpidError val | WriteError val | KillError val |
CapError val | ChdirError val | UnknownError val)
message': (String val | None val) = reference
Returns¶
ProcessError val^
Public fields¶
let error_type: (ExecveError val | PipeError val | ForkError val |¶
[WaitpidError](process-WaitpidError.md) val | [WriteError](process-WriteError.md) val | [KillError](process-KillError.md) val |
[CapError](process-CapError.md) val | [ChdirError](process-ChdirError.md) val | [UnknownError](process-UnknownError.md) val)
[Source]
let message: (String val | None val)¶
[Source]
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
|
pony
|
3567475
|
https://sv.wikipedia.org/wiki/Eriborus%20erythrogaster
|
Eriborus erythrogaster
|
Eriborus erythrogaster är en stekelart som först beskrevs av William Harris Ashmead 1896. Eriborus erythrogaster ingår i släktet Eriborus och familjen brokparasitsteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Brokparasitsteklar
erythrogaster
|
swedish
| 1.010584
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.