Knowledge (XXG)

Template:Random number

Source 📝

32: 63: 194:
is {{#time:z}} (currently 263, i.e. the current day number in the year, at the time this page was last saved or purged from the cache) and can be set to any other integer value (used to generate distinct values on the same
446:
On the same page, multiple invocations of this template with the same parameters will generate the same output value, so it is possible to create multiple links related to the same article.
865: 860: 1040: 443:. However, later invocations will still alternate odd and even numbers on output (this problem only occurs on the same page where multiple random numbers are invoked). 1025: 1013: 855: 47: 719: 1052: 1009: 427:
is even (such as 100 by default, or 1000 in the examples above), the generated numbers (on the same page) are all odd or all even when you are varying the
43: 828: 1068: 850: 823: 714: 834: 845: 818: 51: 957: 952: 947: 942: 937: 932: 907: 594: 995: 927: 902: 880: 1035: 840: 813: 796: 536: 525: 79: 922: 741: 704: 1020: 970: 791: 761: 75: 897: 875: 776: 665: 645: 634: 620: 756: 688: 917: 807: 736: 699: 675: 87: 1048: 1003: 786: 187:
is 100 (so by default, this template generates values between 0 and 99) and must be less than -1 or greater than 1;
39: 963: 892: 870: 771: 709: 660: 640: 613: 558: 547: 492: 981: 751: 681: 420:(provided that they are odd prime numbers) generates pseudo-random that have independent random distribution. 912: 724: 670: 569: 470: 83: 781: 886: 766: 730: 694: 655: 650: 580: 503: 481: 97: 976: 801: 746: 514: 459: 413:
linearly generates numbers that generate a linear sequence on the same page, with equal cyclic steps;
627: 999: 606: 210: 130: 1062: 126: 203: 216:
Articles is the raw number of articles on the English Knowledge (XXG) (6885035).
70: 17: 173:
All parameters are optional and have default values. They must be integers.
26: 74:
and changes may be widely noticed. Test changes in the template's
57: 206:
above 17 (used to generate distinct values on the same page);
1029: 115: 106: 178:(Prime(Unix + Seed) + (Articles mod Prime)) mod Count 237:= 501 (second and third digit are the same as above) 255:= 125 (this and others should all be different) 223:Examples generating numbers between 0 and 999: 866:Random portal component with nominate/sandbox 8: 231:= 1 (default, gives values between 0 and 99) 1019:Editors can experiment in this template's 589: 861:Random portal component with nominate/doc 603: 435:, unless half of the calls use an even 856:Random portal component with nominate 86:. Consider discussing changes on the 7: 720:Random component main namespace/doc 595:Special:PrefixIndex/Template:Random 243:= 501 (same page load, same output) 25: 829:Random page in category/testcases 61: 30: 1069:Mathematical function templates 851:Random portal component/sandbox 824:Random page in category/sandbox 715:Random component main namespace 303:= 33 (varying the prime number) 71:approximately 5,400 pages 1: 253:{{Random number|1000|263|61}} 247:{{Random number|1000|263|67}} 835:Random page in this category 846:Random portal component/doc 819:Random page in category/doc 439:and the others used an odd 397:{{Random number|1000|1|79}} 391:{{Random number|1000|1|73}} 385:{{Random number|1000|1|71}} 379:{{Random number|1000|1|67}} 373:{{Random number|1000|1|61}} 367:{{Random number|1000|1|59}} 361:{{Random number|1000|1|53}} 355:{{Random number|1000|1|51}} 349:{{Random number|1000|1|47}} 343:{{Random number|1000|1|43}} 337:{{Random number|1000|1|41}} 331:{{Random number|1000|1|37}} 325:{{Random number|1000|1|31}} 319:{{Random number|1000|1|29}} 313:{{Random number|1000|1|23}} 307:{{Random number|1000|1|19}} 301:{{Random number|1000|1|17}} 1085: 1004:Template:Random number/doc 993: 958:Random subpage/testcases/6 953:Random subpage/testcases/5 948:Random subpage/testcases/4 943:Random subpage/testcases/3 938:Random subpage/testcases/2 933:Random subpage/testcases/1 908:Random slideshow/testcases 125:This template generates a 95: 1053:Subpages of this template 90:before implementing them. 82:subpages, or in your own 69:This template is used on 928:Random subpage/testcases 903:Random slideshow/sandbox 881:Random quotation/sandbox 295:{{Random number|1000|0}} 289:{{Random number|1000|1}} 283:{{Random number|1000|2}} 277:{{Random number|1000|3}} 271:{{Random number|1000|4}} 265:{{Random number|1000|5}} 259:{{Random number|1000|6}} 841:Random portal component 814:Random page in category 797:Random number/testcases 537:Random portal component 526:Random page in category 1047:Add categories to the 923:Random subpage/sandbox 742:Random in category/doc 705:Random color/Digit/doc 241:{{Random number|1000}} 235:{{Random number|1000}} 202:is 67 and should be a 129:integer between 0 and 35:Template documentation 971:Randomized algorithms 792:Random number/sandbox 762:Random item/testcases 249:= 501 (same as above) 898:Random slideshow/doc 876:Random quotation/doc 777:Random motto/sandbox 666:Random Motto/sandbox 646:Random Component/doc 635:RandomPageInCategory 621:RandomInCategory/doc 209:Unix is the current 757:Random item/sandbox 689:Random articles/doc 176:The calculation is 918:Random subpage/doc 808:Random page in cat 737:Random in category 700:Random color/Digit 676:Random article/doc 990: 989: 787:Random number/doc 229:{{Random number}} 213:(1726818296); and 94: 93: 16:(Redirected from 1076: 1044: 1033: 1017: 964:Randomincategory 893:Random slideshow 871:Random quotation 772:Random motto/doc 710:Random color/doc 661:Random Motto/doc 641:Random Component 614:RandomInCategory 590: 585: 579: 574: 568: 563: 559:Random slideshow 557: 552: 548:Random quotation 546: 541: 535: 530: 524: 519: 513: 508: 502: 497: 493:Random Component 491: 486: 480: 475: 469: 464: 458: 398: 392: 386: 380: 374: 368: 362: 356: 350: 344: 338: 332: 326: 320: 314: 308: 302: 296: 290: 284: 278: 272: 266: 260: 254: 248: 242: 236: 230: 179: 170: 164: 158: 152: 151:{{Random number| 139: 137: 118: 109: 65: 64: 58: 55: 36: 34: 33: 21: 1084: 1083: 1079: 1078: 1077: 1075: 1074: 1073: 1059: 1058: 1057: 1056: 1046: 1038: 1023: 1018: 1007: 992: 991: 986: 982:Randomquote/doc 973: 966: 889: 837: 810: 752:Random item/doc 733: 691: 684: 682:Random articles 637: 630: 623: 616: 609: 597: 583: 577: 572: 566: 561: 555: 550: 544: 539: 533: 528: 522: 517: 511: 506: 500: 495: 489: 484: 478: 473: 467: 462: 456: 453: 423:Note that when 396: 390: 384: 378: 372: 366: 360: 354: 348: 342: 336: 330: 324: 318: 312: 306: 300: 294: 288: 282: 276: 270: 264: 258: 252: 246: 240: 234: 228: 177: 168: 162: 156: 150: 133: 131: 123: 122: 114: 105: 100: 62: 56: 37: 31: 29: 23: 22: 15: 12: 11: 5: 1082: 1080: 1072: 1071: 1061: 1060: 988: 987: 985: 984: 979: 974: 969: 967: 962: 960: 955: 950: 945: 940: 935: 930: 925: 920: 915: 913:Random subpage 910: 905: 900: 895: 890: 885: 883: 878: 873: 868: 863: 858: 853: 848: 843: 838: 833: 831: 826: 821: 816: 811: 806: 804: 799: 794: 789: 784: 779: 774: 769: 764: 759: 754: 749: 744: 739: 734: 729: 727: 725:Random country 722: 717: 712: 707: 702: 697: 692: 687: 685: 680: 678: 673: 671:Random article 668: 663: 658: 653: 648: 643: 638: 633: 631: 626: 624: 619: 617: 612: 610: 605: 602: 599: 598: 593: 588: 587: 586: 575: 570:Random subpage 564: 553: 542: 531: 520: 509: 498: 487: 476: 471:Random country 465: 452: 449: 448: 447: 444: 421: 414: 406: 405: 401: 400: 394: 388: 382: 376: 370: 364: 358: 352: 346: 340: 334: 328: 322: 316: 310: 304: 298: 292: 286: 280: 274: 268: 262: 256: 250: 244: 238: 232: 225: 224: 220: 219: 218: 217: 214: 211:Unix timestamp 207: 196: 188: 174: 171: 147: 146: 121: 120: 111: 101: 96: 92: 91: 66: 28: 27: 24: 14: 13: 10: 9: 6: 4: 3: 2: 1081: 1070: 1067: 1066: 1064: 1054: 1050: 1042: 1037: 1031: 1027: 1022: 1015: 1011: 1005: 1001: 997: 996:documentation 983: 980: 978: 975: 972: 968: 965: 961: 959: 956: 954: 951: 949: 946: 944: 941: 939: 936: 934: 931: 929: 926: 924: 921: 919: 916: 914: 911: 909: 906: 904: 901: 899: 896: 894: 891: 888: 884: 882: 879: 877: 874: 872: 869: 867: 864: 862: 859: 857: 854: 852: 849: 847: 844: 842: 839: 836: 832: 830: 827: 825: 822: 820: 817: 815: 812: 809: 805: 803: 800: 798: 795: 793: 790: 788: 785: 783: 782:Random number 780: 778: 775: 773: 770: 768: 765: 763: 760: 758: 755: 753: 750: 748: 745: 743: 740: 738: 735: 732: 728: 726: 723: 721: 718: 716: 713: 711: 708: 706: 703: 701: 698: 696: 693: 690: 686: 683: 679: 677: 674: 672: 669: 667: 664: 662: 659: 657: 654: 652: 649: 647: 644: 642: 639: 636: 632: 629: 625: 622: 618: 615: 611: 608: 604: 601: 600: 596: 592: 591: 582: 576: 571: 565: 560: 554: 549: 543: 538: 532: 527: 521: 516: 510: 505: 499: 494: 488: 483: 477: 472: 466: 461: 455: 454: 450: 445: 442: 438: 434: 430: 426: 422: 419: 415: 412: 408: 407: 403: 402: 395: 389: 383: 377: 371: 365: 359: 353: 347: 341: 335: 329: 323: 317: 311: 305: 299: 293: 287: 281: 275: 269: 263: 257: 251: 245: 239: 233: 227: 226: 222: 221: 215: 212: 208: 205: 201: 197: 193: 189: 186: 182: 181: 175: 172: 167: 161: 155: 149: 148: 144: 143: 142: 140: 136: 128: 127:pseudo-random 117: 112: 108: 103: 102: 99: 89: 85: 81: 77: 73: 72: 67: 60: 59: 53: 49: 45: 41: 19: 18:Template:Rand 887:Random quote 767:Random motto 731:Random image 695:Random color 656:Random Motto 651:Random Games 584:}} 581:Random quote 578:{{ 573:}} 567:{{ 562:}} 556:{{ 551:}} 545:{{ 540:}} 534:{{ 529:}} 523:{{ 518:}} 512:{{ 507:}} 504:Random motto 501:{{ 496:}} 490:{{ 485:}} 482:Random color 479:{{ 474:}} 468:{{ 463:}} 457:{{ 440: 436: 432: 428: 424: 417: 410: 204:prime number 199: 198:the default 191: 190:the default 184: 183:the default 165: 159: 153: 134: 124: 119:}} 113:{{ 110:}} 104:{{ 84:user subpage 68: 1000:transcluded 977:Randomquote 802:Random page 747:Random item 515:Random page 460:Random item 50:] [ 46:] [ 42:] [ 994:The above 628:RandomPage 80:/testcases 1051:subpage. 1036:testcases 98:Shortcuts 88:talk page 1063:Category 451:See also 416:Varying 409:Varying 180:, where 76:/sandbox 1028:| 1021:sandbox 1014:history 1012:| 48:history 1045:pages. 607:Random 195:page); 145:Usage: 138:| 132:| 107:Random 1002:from 433:prime 425:count 418:prime 404:Note: 399:= 411 393:= 648 381:= 880 369:= 494 363:= 705 357:= 131 351:= 917 345:= 732 339:= 164 333:= 953 327:= 204 321:= 584 315:= 816 309:= 629 297:= 880 291:= 947 273:= 148 267:= 215 261:= 282 200:prime 185:count 166:prime 154:count 135:count 54:] 52:purge 38:[ 1049:/doc 1041:edit 1034:and 1030:diff 1026:edit 1010:edit 441:seed 437:seed 429:seed 411:seed 387:= 39 375:= 82 285:= 14 279:= 81 192:seed 160:seed 141:-1. 116:Rand 44:edit 40:view 998:is 431:or 78:or 1065:: 1006:. 169:}} 1055:. 1043:) 1039:( 1032:) 1024:( 1016:) 1008:( 163:| 157:| 20:)

Index

Template:Rand
view
edit
history
purge
approximately 5,400 pages
/sandbox
/testcases
user subpage
talk page
Shortcuts
Random
Rand
pseudo-random
|count|
prime number
Unix timestamp
Random item
Random country
Random color
Random Component
Random motto
Random page
Random page in category
Random portal component
Random quotation
Random slideshow
Random subpage
Random quote
Special:PrefixIndex/Template:Random

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.