Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Monday, 29 June 2015

Trouble Installing Docker Compose

Had some trouble installing Docker Compose on a fresh Fedora 22 install today.
Figured I'd write it here, as this is the kind of problem I'd hit multiple times...

Needed to run the following:

sudo dnf install python-devel
fixed the "missing Python.h" error, so that I could run:

sudo pip install -U websocket
fixed the "No module named urllib.parse" error, so that I could run:

sudo pip install -U docker-compose

And then it all worked fine :)

Wednesday, 3 September 2014

Apache Server Permission Error

Every single time I create a new apache server I forget to give permissions to the www-data group. So I'm pasting a great answer I got from stackoverflow to this blog for future reference.

//Create new group
$ sudo addgroup webdev

//Change the group of your web directory:
$ sudo chgrp -R webdev /var/www/
$ sudo chmod -R g+rw /var/www/

//Set the guid bit on all folders in your web directory:
$ sudo find /var/www -type d -exec chmod +s {} \;

//Add Apache to the webdev group:
$ sudo usermod -a -G webdev www-data

//Add your user to the webdev group:
$ sudo usermod -a -G webdev <user_name>

Hopefully this helps someone

Friday, 7 January 2011

miTanks, Part 5

Here's a some pics of what I've got so far for testing.


Support for an arbitrary amount of players. They are actually all human controlled at the moment.



In this one you can see the error with damage. You can see it has broken one line correctly. But hasn't done the others.


 If anyone can help me with code formatting on here let me know. Here's a screen of it. Lol.




ground is a 2d array of size game_width x game_height. All the others should be self explanatory.
When it prints we see:


Destroy: -5, 0
Destroy: -4, 0
Destroy: -3, 0
Destroy: -2, 0
Destroy: -1, 0
Destroy: 0, 0
Destroy: 1, 0
Destroy: 2, 0
Destroy: 3, 0
Destroy: 4, 0
Destroy: 5, 0

So for every x, y = 0. But why! Should be something like. x = -5, y = 0; x = -4, y = 1; ...

[Edit: Found it!!

Not sure why I was scaling y by the bullet location... Removed this.bullet_x and this.bullet_y in the y calculation and it works. Too easy. Doesn't even look that circular... How to fix that?

]