Friday, March 30, 2012

Screen

Today I learned how to use screen:

First we opened the terminal.
We got into the sever amazon.elkner.net and got Matt to set SUID permission there.
As complicated as it looked Matt guided us through it.
We had to type screen -S username
Then set up the multiuser on. Which is enabled by pressing the keyboards CTRL-a then shift :
Then type multiuser on and acladd useryouwanttoadd
Now the user who wants to join the session needs to type:
screen -x hisusername/hissession name

This should connect you.

Monday, March 26, 2012

Login page

Managed to create a madlib, but wanted to take it to the next level. I was bored and decided to see if I could created a login page. All I need to learn now is about storing peoples data, and I'm set.

Madlib

I started working the madlib page. When I was done I wanted the python file to be small, and not have all the html codes in there.
Well I learned that the open('nameofthefile.tpl', 'r').read() can be used to open the story you have in a different file, this made everything much easier for me and for everyone in class. We can now style the pages to your own liking.

It does not necessarily have to end in .tpl it can be anything suck as .html but I find it more helpful to save it as that.

Monday, March 5, 2012

Project 5

This week I created a Brazilian flag. Click here to see example.
I created a rectangle that covers the whole canvas.
I learned this new code globalCompositeOperation and here you can assign it: source-over which puts the newer shapes on top the canvas and so on.

In this case I'm using source-over this will make the new shapes be on top of the old ones.

I created two triangles and moved them around, the first one was tricky, but for the second one you can use the same, just change the coordinates of the x, y.