I hereby claim:
- I am lifeofchrome on github.
- I am lifeofchrome (https://keybase.io/lifeofchrome) on keybase.
- I have a public key ASDBFpod1I6Eha0--SM1d59E5wH2EDiIKZ8UrmjoFo9YyQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
"""LCM and GCF tools for lists | |
Made by lifeofchrome on July 21, 2017 | |
""" | |
"""lcm(numbers) takes in a list of integers and returns their least common multiple | |
The function loops through the minimum possible LCM and increments by 1 until the first multiple is found | |
test is the current test value | |
correct is set to correct until there's a number that isn't a multiple | |
""" |
summon FallingSand ~ ~1 ~ {Block:redstone_block,Time:1,Passengers:[{id:FallingSand,Block:activator_rail,Time:1,Passengers:[{id:MinecartCommandBlock,Command:/scoreboard objectives add dW_timer dummy},{id:MinecartCommandBlock,Command:"/summon ArmorStand ~ ~5 ~ {NoGravity:1b,Invisible:1b,PersistenceRequired:1b,CustomName:\"destroyBlockUnder\"}"},{id:MinecartCommandBlock,Command:"/summon ArmorStand ~ ~5 ~ {NoGravity:1b,Invisible:1b,PersistenceRequired:1b,CustomName:\"dW_timer_tracker\"}"},{id:MinecartCommandBlock,Command:/scoreboard players set @e[name=dW_timer_tracker] dW_timer 400},{id:MinecartCommandBlock,Command:"/title @a title [\"\",{\"text\":\"Disentigrating World\",\"color\":\"yellow\",\"bold\":true}]"},{id:MinecartCommandBlock,Command:"/title @a subtitle [\"\",{\"text\":\"is now active\",\"color\":\"gray\",\"italic\":true}]"},{id:MinecartCommandBlock,Command:"/tellraw @a [\"\",{\"text\":\"[ 180,000 ticks elapsed / 2.5 hours ]\",\"color\":\"aqua\",\"italic\":true}]"},{id:MinecartCommandBlock,Command:setbl |
/** | |
* Created by lifeofchrome on 12/5/2015. | |
* Credit to /u/_zg_ for the Pattern code | |
*/ | |
import java.util.regex.Pattern; | |
public class Day5 { | |
public static void main(String[] args) { | |
String input = "uxcplgxnkwbdwhrp\n" + | |
"suerykeptdsutidb\n" + |
/** | |
* Created by lifeofchrome on 12/4/2015. | |
* Credit to markwryan for ~99% of this solution. | |
*/ | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Day4 { | |
static final String HASH_KEY = "hash"; |
/** | |
* Created by lifeofchrome on 12/3/2015. | |
*/ | |
public class Day3 { | |
public static void main( String[] args ) | |
{ | |
String input = "^><^>>>^<^v<v^^vv^><<^<><<vv^<>^<^v>^vv<>v><vv^^<>>^^^v<<vv><<^>^<^v<^>^v><<<v^<v<<<v<<vv<v<^><^>><>v>v^<<v^^<^v<><^>^<<^^^>v>>v^^<v>>^>vv><v>>^>>v^>^v>^<^^v>^>^^v<v>^^<v<>>v^^v><^><^<<>v^<^<^v<v>v^>>>v^v^>^<>^v<^^vv<v>^>^<>^^<vv^<><<v<^<^^>vv<>^>v<^>^v>v^>^v<>^><>><vv<>v^v<><>v^v>>>>v^^>^><^^<v<^><^<v>>^v^v<>v<<<^<<vvvv<<v^vv^>v^^^<^^^<v>>v<^v>>>>>v<^^^^>v<^<><v>>>>><v>>v^vvvv^^<v^<>^v<^v^>v><^>^v<<>>vv^>v>v^^>vv^<^vvv<>><>><><^^^<v<>^<^^^<v><^v>>v>^v<v^vv^<>^^^>v^^^v>>^v^^<^>>^>^<<v>>>^^<>>^vv>v^<^>>>><v<><><^^v<><<<<^^<>>^<vvv^><>v<v<<<<><v<<v>v<v^><vv<v^>^<^>v^^><^v>^^>v<>^v^<>^vv^><v^^vv>vvv>v>^<vv^>>^>>^>><>>>^^^^v<vv>^<>v^^><v^>^<>v<^^v><v<<><^v><>^^^^^v^v>>^^v><<><<vv>^^^^><^>v>><<<^v>v^^>^v^<^^v>v<^<<>>^v<<<v<<>>v<^v^><vv<v^v>v^<v>><v>^v<<<vv^>v<v>>v>>v><v><v^>v^^v>^v^>>>><>^>v>^v^>>>>v^<<vv<^v><<>v<v^<^^<<v<^v^^v^>vv><vv<v^<^>><^^>^<><^^<v<><^v^v^<^^>^<v><^< |
/** | |
* Created by lifeofchrome on 12/2/2015. | |
*/ | |
import java.util.Scanner; | |
import java.lang.Math; | |
public class Day2 { | |
public static void main( String[] args) | |
{ | |
int l; | |
int w; |
/** | |
* Created by lifeofchrome on 12/1/2015. | |
*/ | |
public class Day1 { | |
public static void main( String[] args) | |
{ | |
//=======PART 1======= | |
String input = "(((())))()((((((((())()(()))(()((((()(()(((()((()((()(()()()()()))(((()(()((((((((((())(()()((())()(((())))()(()(()((()(()))(()()()()((()((()(((()()(((((((()()())()((((()()(((((()(())()(())((())()()))()(((((((())(()())(()(((())(()))((())))(()((()())))()())((((())))(()(((((()(())(((()()((()((()((((((((((())(()())))))()))())()()((((()()()()()()((((((())())(((()())()((()()(((()()()))(((((()))(((()(()()()(()(()(((())()))(()(((()((())()(()())())))((()()()(()()(((()))(((()((((()(((((()()(()())((()())())(()((((((()(()()))((((()))))())((())()()((()(()))))((((((((()))(()()(((())())(())()((()()()()((()((()((()()(((())))(()((())()((((((((()((()(()()(((())())())))(())())))()((((()))))))())))()()))()())((()())()((()()()))(()()(((()(())((((())())((((((((()()()()())))()()()((((()()))))))()((((()(((()))(()()())))((()()(((()))()()())())(((())((()()(())()( |
I'm looking for a way to target entities following number patterns or based on values on a scoreboard with respect to proximity to the nearest player. | |
Let me explain further. Either of these will work for me: | |
Option 1: | |
Precondition: There is at least one entity in the world besides the player. | |
Postcondition: A scoreboard value or custom NBT tag for entities following a specific number pattern such as Fibonacci or multiples of 5 as their ranking on proximity to the player. | |
Example: | |
For Fibonacci, the first, second, third, fifth, eighth, thirteenth, etc. closest entities to the player receive a scoreboard value or custom NBT tag. | |
Option 2: |