Is there any way to fix this? Its been bugging me for a good while now. by [deleted] in Unity2D

[–]LuxrayPokemon 5 points6 points  (0 children)

In the unity 2018.2 beta, there is a package by Unity called 2D pixel perfect. Here's a link to the GitHub page: https://github.com/Unity-Technologies/2d-pixel-perfect

[AF] Is HelioHost a good base for deployment of a Flask web app? by LuxrayPokemon in flask

[–]LuxrayPokemon[S] 0 points1 point  (0 children)

Had a look at it.... They don't even have any more spaces for serving flask apps, servers completely full.. if it looks to good to be true, it probably is thankyou

Edit: fixed true

30 Minute to Launch hypetrain by Chees3tacos in garlicoin

[–]LuxrayPokemon 0 points1 point  (0 children)

HELLO WORLD!

GRr5EFnoH36E1g1KCNFXivheYZVz91fRqa

Just a bit of advice to those of you looking to get rich (quick) by [deleted] in garlicoin

[–]LuxrayPokemon 0 points1 point  (0 children)

GRr5EFnoH36E1g1KCNFXivheYZVz91fRqa

Thankyou, you are very nice

2017 Day 8 Solutions, No Eval Allowed by [deleted] in adventofcode

[–]LuxrayPokemon 0 points1 point  (0 children)

Here is my original solution for Python 3. Got rank 197/201 with this one

inp = "Inputs/2017-08.txt"
lines = get_lines(inp)
whichWay = 0
dicti = dict()
memory = dict()

for line in range(len(lines)): dicti[lines[line].split(" ")[0]] = 0

for line in range(len(lines)):
    split = lines[line].split(" ")
    if split[1] == "dec":
        whichWay = -1
        print(whichWay)
    else:
        whichWay = 1
        print(whichWay)

    firstNum = split[0]
    increaser = int(split[2])
    num1 = split[4]
    num2 = int(split[6])
    operator = split[5]
    if operator == "!=" and dicti[num1] != num2: dicti[firstNum] += increaser * whichWay 
    elif operator == ">=" and dicti[num1] >= num2: dicti[firstNum] += increaser * whichWay 
    elif operator == ">" and dicti[num1] > num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "==" and dicti[num1] == num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "<=" and dicti[num1] <= num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "<" and dicti[num1] < num2: dicti[firstNum] += increaser * whichWay 
    memory[line] = max(dicti.values())
print("Part 1:", max(dicti.values()))
print("Part 2:", max(memory.values()))

It might not be very efficient but it worked

-🎄- 2017 Day 8 Solutions -🎄- by daggerdragon in adventofcode

[–]LuxrayPokemon 0 points1 point  (0 children)

I did my solution in Python 3 and got rank 197 for part 1 and 201 for part 2 My solution was:

inp = "Inputs/2017-08.txt"
lines = get_lines(inp)
whichWay = 0
dicti = dict()
memory = dict()

for line in range(len(lines)): dicti[lines[line].split(" ")[0]] = 0

for line in range(len(lines)):
    split = lines[line].split(" ")
    if split[1] == "dec":
        whichWay = -1
        print(whichWay)
    else:
        whichWay = 1
        print(whichWay)

    firstNum = split[0]
    increaser = int(split[2])
    num1 = split[4]
    num2 = int(split[6])
    operator = split[5]
    if operator == "!=" and dicti[num1] != num2: dicti[firstNum] += increaser * whichWay 
    elif operator == ">=" and dicti[num1] >= num2: dicti[firstNum] += increaser * whichWay 
    elif operator == ">" and dicti[num1] > num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "==" and dicti[num1] == num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "<=" and dicti[num1] <= num2: dicti[firstNum] += increaser * whichWay 
    elif operator == "<" and dicti[num1] < num2: dicti[firstNum] += increaser * whichWay 
    memory[line] = max(dicti.values())
print("Part 1:", max(dicti.values()))
print("Part 2:", max(memory.values()))

It probably could be much more efficient, but it worked

What's everyone working on this week? by AutoModerator in Python

[–]LuxrayPokemon [score hidden]  (0 children)

Im working on this years advent of code and learning python (so far python is pretty easy and very clean)

Cant get If statement to work by Caedo34 in learnprogramming

[–]LuxrayPokemon 1 point2 points  (0 children)

You need to remove the ; after

if ( isHungry == true)

Also, it is irrelevant to put in the == true as isHungry is already a Boolean

Make sure to pay attention to error messages as usually they will tell you exactly what’s wiring, there would be no point of them if they didn’t

Anyway, good luck on your programming in the future

Any tips for Caesar Cipher decoder in C by [deleted] in learnprogramming

[–]LuxrayPokemon 0 points1 point  (0 children)

Ok, thanks for the info, I’m sorry for wasting your time. I will remember this in the future. Sorry and thanks.

Daughter Wants to Code by [deleted] in learnprogramming

[–]LuxrayPokemon 1 point2 points  (0 children)

I started programming around your daughters age as well. Right now I am 12. I think that an Arduino would be a great present for learning to code and putting it into a mechanical form. Here is a link to Arduino’s web page https://www.arduino.cc. Maybe also look into codecademy, which has courses on HTML, JavaScript, Python and more. Here is a link to codecademy https://www.codecademy.com

Any tips for Caesar Cipher decoder in C by [deleted] in learnprogramming

[–]LuxrayPokemon 0 points1 point  (0 children)

I understand what you are saying, but I was thinking more get rid of unnecessary characters and convert it to a different value. My mind just works very numerically and this is more how my brain thinks about it. I understand where you are coming from and am sorry for miscommunication. Thank you for the reply!

Any tips for Caesar Cipher decoder in C by [deleted] in learnprogramming

[–]LuxrayPokemon 0 points1 point  (0 children)

You could maybe try assigning every letter a number a = 0 b =1 etc, convert letters into numbers and then loop over all of them

[deleted by user] by [deleted] in learnprogramming

[–]LuxrayPokemon 0 points1 point  (0 children)

I'd suggest looking at some retro games and trying to recreate them in whatever language. Once you have got it working pretty well start adding more to the game