Everything posted by Botre
-
Sieve of Eratosthenes & Primality test
Gold ol' boredom :l
-
Sieve of Eratosthenes & Primality test
Heads or tails? package org.bjornkrols.fun; import java.util.Random; /** * @author Bjorn Krols (Botre) * @version 0.0 * @since April 16, 2015 */ public class Coin { public static void main(String[] args) { Coin coin = new Coin(); coin.toss(); if (coin.isHeads() || coin.isTails()) System.out.println(":doge:"); } private static final Random RANDOM = new Random(); private boolean heads; public Coin() { toss(); } public void toss() { heads = RANDOM.nextBoolean(); } public boolean isHeads() { return heads; } public boolean isTails() { return !heads; } } I'm bored
-
Sieve of Eratosthenes & Primality test
Visuals courtesy of Wikipedia :x
-
Sieve of Eratosthenes & Primality test
Not super useful for scripting, but here you go. package org.bjornkrols.math; import java.util.BitSet; /** * @author Bjorn Krols (Botre) * @version 0.2 * @since April 16, 2015 */ public final class SieveOfEratosthenes { public static void main(String[] args) { SieveOfEratosthenes sieve = new SieveOfEratosthenes(100); System.out.println(sieve.isPrime(29)); } public BitSet sieve; public SieveOfEratosthenes(int n) { calculate(n); } private void calculate(int n) { sieve = new BitSet(n); // Assume all numbers are prime. for (int i = 2; i < sieve.size(); i++) sieve.set(i, true); // Find the square root of n. double sqrtn = Math.floor(Math.sqrt(n)); for (int i = 2; i < sqrtn; i++) if (sieve.get(i)) for (int j = i * i; j < n; j += i) sieve.set(j, false); } public boolean isPrime(int n) { return sieve.get(n); } } package org.bjornkrols.math; /** * @author Bjorn Krols (Botre) * @version 0.0 * @since April 16, 2015 */ public final class PrimalityTest { private PrimalityTest() { // This class should never be instantiated. // Do not delete or make accessible. } public static boolean test(long n) { // A whole number greater than one is called a prime number if its only positive divisors (factors) are one and itself. // All whole numbers between 1 and 3 are prime. if (n <= 3) return n > 1; // All multiples of 2 and 3 are not prime. if (n % 2 == 0 || n % 3 == 0) return false; // Find the square root of n. double sqrtn = Math.floor(Math.sqrt(n)); // All primes are of the form 6k ± 1 (with the exception of 2 and 3). for (int divisor = 5; divisor <= sqrtn; divisor += 6) if (n % divisor == 0 || n % (divisor + 2) == 0) return false; return true; } } 2 true 3 true 5 true 7 true 11 true 13 true 17 true 19 true 23 true 29 true 31 true 37 true 41 true 43 true 47 true 53 true 59 true 61 true 67 true 71 true 73 true 79 true 83 true 89 true 97 true
-
Rate my new girlfriends ass
Well played
-
Price check pure
90 fletching 55 Ranged 30 Attack 50 Strength 1 defense 1 prayer (no bans / mutes) (no important quests)
-
I think I got ratted...
I'm pretty sure that's a tuba :p
-
I think I got ratted...
- Wow what a f*g
- Does this forum theme look easy to use for you?
A bit bright, especially the white text on light blue. Other than that it looks neato.- Toxic OP-Pipe
How's 80k/h better than chinning ? :x- Count To 10,000!
- Vacation
Enjoy amigo! (I'll be supervising the super mods, as per your request )- Selling 92 magic, level 50.
5M (starting bid)- [Coming Soon] Classic Fletcher: all bows | arrow shafts | cutting & stringing
I have some very sexy features planned. ... and task scheduling sure is one of them (out of likes, but thank you for the kind words)- Script Updates
Very unlikely so don't worry. Give it some more time- MouseKeys like mouse movement?
It's going to get you flagged. But then again, a super click intensive task will probably too. Let us know how it turns out ^^- Buying 91 Runecrafting Account
- Script Updates
If a script was updated by its writer then it can take a couple of hours for the update to be visible to its users. What kind of update are you waiting for ?- Script Updates
Are you talking about local scripts or SDN scripts? Have you tried the "refresh" button?- [Coming Soon] Classic Fletcher: all bows | arrow shafts | cutting & stringing
apa pls- [Coming Soon] Classic Fletcher: all bows | arrow shafts | cutting & stringing
Reserved- [Coming Soon] Classic Fletcher: all bows | arrow shafts | cutting & stringing
Reserved- [Coming Soon] Classic Fletcher: all bows | arrow shafts | cutting & stringing
Classic Fletcher by Botre. Description Classic Fletcher can make all bows and arrow shafts, it is capable of both cutting and stringing and can be used wherever you want. Features - Can cut all bows. - Can string all bows. - Can make arrow shafts. - Supports all banks (including chests). - Ability to change settings mid-session. - Can be started online & offline. Get it now >> Coming Soon! << Price: $7.99 Free trials are available for this product! Post on this thread or send me a PM, don't be shy! Tutorial >> Go to the "Tutorial" post inside this thread << (or just scroll down) FAQ >> Go to the "FAQ" post inside this thread << (or just scroll down) Media- [Legit/Botted] Road to 99/99/99 [Going to beat Anne] + Ill beat Maldesto aswell
Lel :| OT: GL - Wow what a f*g