Today I discovered http://www.chromeexperiments.com/ . There are really cool javascript works there. I just said to myself : "Ok, I have firefox 3.5 and I can still look to them because they are javascript how hard it could be ?", but It seems I was wrong in my assumption.
I first checked out "http://deanm.github.com/pre3d/monster.html" and result was horrible for firefox ! That result just took me to the download site of chrome to see if chrome is really good at javascript handling as Google says..
Chrome was really fascinating, all the javascripts works played without a delay :)
And now result is : I have chrome installed in my computer with firefox of course :) (I just can't leave firefox :D )
Skr
17 Temmuz 2009 Cuma
Welcome chrome !
03 Temmuz 2009 Cuma
python 3.x series urllib example
I am currently working on request-response relations on web and this time I chose python as the programming language. As you may know, python 3.x series are a lot different than 2.x series. That's why I wanted to share things that I accomplished so far. Because there is not much source on the net.
At first my aim really simple. I want to send a variable to a php site by POST method and I will see its response and this time this response will be our sent variable.
my php file is :
echo $_POST["data"]
and my python file is :
# -*- coding: utf-8 -*-
import urllib , urllib.parse , urllib.request
class postexp:
def post(self):values = {'data' : 'example' ,}
data = urllib.parse.urlencode(values)
url = address of the our php file
opener = urllib.request.URLopener()
openedURL = opener.open(url , data)
return openedURL
obj = postexp()
print(obj.post().read())
In python 3.x there is no urllib2 as it was in python 2.x. Instead of that now we have a better designed urllib module. That's why people find it hard to use python 3.x instead of 2.x and it is the same reason I write this post :)
By using urlencode I translated data value to be ready for the sending process. After that by opening our desired url which keeps our php file, we managed to do what we aimed at first.
If you do all these things and at the end when you execute the above python code you get 'example' , then you did it !
Another game : Prototype
After playing with Prince of Persia, I just couldn't stop myself from playing a similar game soon.
Some of my friends adviced me to play the game named 'prototype'. I downloaded it and started playing it. I can say that it is one of the most diffucult games I ever played so far. Game environment, story and characters in it are so real and good that you keep playing till someone says you to stop. I have to warn you, game is a liitle bit bloody. And also it can make you an addicted..
If you still want to play it, google the game and download it and play it.
Skr
17 Haziran 2009 Çarşamba
Holiday starts..
All my resposibilities about my school for this semester was finished yesterday morning so I immediately downloaded a game named Prince of Persia 4 .
As I expected, Ubisoft made another legendary game :) Fighting scenes, game environment, character development.. everything was beyond my imagination. I'm still playing it and I can say that Ubisoft knows how to make a game. No wait.. not a game, a legendary game :)
And also I watched trailer of a new game again produced by Ubisoft named Assasin's Creed 2. As soon as the game launches, I will need to get it :D
This is all for now. I'll be updating soon.
See ya..
Skr
09 Haziran 2009 Salı
Browser testing
Test site : http://service.futuremark.com/peacekeeper
Browser versions :
Mozilla Firefox : 3.0.10
Internet Explorer : 7.0.5730.13
Google Chrome : 2.0.172.30
Apple Safari : 4.0 (530.17)
Browser scores :
Mozilla Firefox : 1497 points
Internet Explorer : 653 points
Google Chrome : 3853 points
Apple Safari : 4437 points
And Safari is the WINNER !
After some break
Well...
It seems I paused blogging for a while :). Not because of finding nothing to write about but instead I was so busy with dealing my courses that I couldn't have enough time to spend on blogging..
It is over now, you can be happy :p
I simlipified the theme and starting from this moment I will write with black colored text ;)
Have a nice reading !
17 Mayıs 2009 Pazar
How to play ManiaDrive multiplayer using Lan
I am playing ManiaDrive in story mode for a few weeks. Tonight I wanted to try a multiplayer game with my brother. But I couldn't figure out how to do it on Pardus..
Thanks to google, I learned that I needed to execute 'maniadrive-server' instead of normal game. After than I came face to face with an error wihich was saying program couldn't find any track file called 'mania_server_tracks.txt'. I searched about it on web and find out that it was a file which includes names of tracks followed by '.mni' .
Ex:
xxx.mni
yy.mni
After than I realized that this file have to be placed to a directory where our 'maniadrive-server' executable lives in. In Pardus this directory is '/usr/share/maniadrive'.
After than there is one important thing. If you came face to face with an error, before you try to launch a server you must reboot your system. Because killing the program does not kill the port it uses. So when you try to reach to port you get another error which says program couldn't reach to the port.
I hope it is clear now :)
Keep playing !
10 Mayıs 2009 Pazar
04 Mayıs 2009 Pazartesi
How to write a makefile
To be honest, I always coded my hws but someone else wrote the makefile part for those hws. Today I couldn't find any friends to make them do it for me, so I learned how to write a simple and working makefile :)
Firstly, one should know that makefile goes from the result to the source. We define how we got the result, by using what and with what parameters. After that, we assume files that we used to create the result are themselves results of some other files and it continues like that until we meet with a base condition. Now let's analyze the syntax of makefile:
Note : '\t' are tab characters
all: RESULT
'\t' COMPILER [PARAMETERS] [FILES] // result of this command is RESULT
[FILES][0] : some_other_ file
'\t' COMPILER [PARAMETERS] some_other_file // result of this command is [FILES][0]
[FILES][1] : ...
...
..
.
Let's try it with a real example:
all : hw_executable
'\t' gcc hw.o -o hw_executable
hw.o : hw.c
'\t' gcc -c hw.c
In this example our RESULT is hw_executable and base condition is hw.c.
After we did all of these things we save the makefile file and close it. Then when we give "make" command in a directory where makefile and hw.c exists, our RESULT hw_executable will be created.
26 Nisan 2009 Pazar
Holiday... ?
Thanks to 23 Nisan I had a 4 day long holiday. Instead of traveling around and tasting shiny weather I downloaded and watched 2 new tv showes.
One of them was called "Chuck". Interesting topic: think about a human brain holding whole secret information of a country and can retrieve this information whenever contacts with some related thing.
Other one was "Dollhouse". Another interesting topic : think about installing characters to human bodies just like installing a software to a computer. As you may guess human is much more complicated than computer.. And tv show continues..
In my "bored from tv show" times I worked on my operating system course's homework and it was about threads. I will admit that threads seemed a little bit scary to me at first, but they are no different than other things that we deal while coding unless you know what threads share and what don't :).
And also there were times such as "bored from tv showes and also from threads". In these times I studied on software engineering stuff and read "The Idiot" from Dostoyevski.
As you see it was the perfect holiday ever ! (pff ..)