Saturday, December 15, 2007

XmlHttpRequest script 2.0

Quite a while ago, I told you about this script that I had written, which would make xmlHttpRequests for me. Now I have made a version 2.0, I ramp up all the way to the next major version umber. Why? Because there are considerable changes, including ones in syntax.
I changed the name of my function, added an argument (called args for irony's sake). Besides that the script now supports POST calls besides the regular GET calls. Also, it no longer ought to make any kind of complain when new requests are made before the first one is finished.
The script is available from here, but there are some things I really want to say. For my bandwidth (even though it won't matter much) and your security, do not include the script right from my website. Instead, download it, and put it with your website on a host and then include it using a script tag. And to make sure I won't mistake you for a "includer" do not link directly to the file, link to this post instead.
If you stick to these few rules you can use my script. A guide is to be found within the file (all commented out of course) - using the script shouldn't be too hard. Good luck with your web designing.

Changelog

  • changed the name of main function from send to request
  • added an argument to request in preparation for POST support
  • changed GET cases to work with new args argument
  • added POST support
  • made XMLHttpRequest variable local - solving problems with multiple calls after eachother
  • renamed the XMLHttpRequest variable from submitting to XHRequest
  • removed time-out as changes should have taken away any reason for it
  • deleted highPrioritySend function, as it would do nothing now
  • removed global variables busy and time_out that were related to time outs
  • made receive an inline, unnamed function inside request - allowing easier variable names
  • removed global variable next_function, as this allowed todo to be used directly (woot, no global variables anymore)

Wednesday, December 12, 2007

POST in xmlHttpRquests

Just a quick hello and dropping by a link. It's what helped me getting POST working in xmlHttpRequest.
The point is that you actually need to set some headers, to go along with that request. No long story about it for now, just a link: http://www.openjs.com/articles/ajax_xmlhttp_using_post.php

Hope it helps some of you out.

The dilemma of a blog

Once again I have not posted in a while. And that's while so much happened.

That's exactly my problem. When I have much to do, I have much to tell, but very little time to tell it. When I don't have much to do, I have enough time, but not so much to tell.

I just stopped by to share that revelation, and to so hi to you all of course.

Hi!

Saturday, November 24, 2007

UGtech.net

Ages ago I was looking for a host. There were two criteria the host needed to meet. I wanted a free host, that allowed me to hotlink. Hotlinking is linking to non-viewable files. This means you can take images from this host and put on some other site of your's. Or you can put your downloads on this host that allowed hotlinking and link to them from another site.
That last thing was what I wanted to do. I had put my website on a really - and I really mean really - crappy host and wanted to have a place to put my downloads. I couldn't put them on the crappy host, because it didn't allow .exe files, or any archives. It took me a while, but I found something in the end, ugtech.net.
It had PHP and mySQL support and gave me a reasonable amount of space and bandwidth (100mB - 1000mB/month). Allowing hotlinking basically also meant there were no ads on your website. This is because any host that forces ads on your websites, doesn't get any hits if you are only hotlinking, thus only hosts without ads on your site (and only very few of those) allowed hotlinking. Besides all that UGtech provided cPanel. All of this couldn't even compare to any other free host.
I became active on the ultrageek-tech forum. And when they needed a moderator I applied. Being a very active member, I was the one chosen for the job. At that moment I was the only non-owner with rights on the site :D. Because the service was so amazing they attracted an amazing amount of "customers". And the 'ebay-offer' the owners intended to use to raise money, didn't work as good as they had hoped. Due to these two things they discontinued providing free hosting. They provided $1/month hosting instead. Moderators and administrators on the forum got to keep their hosting.

Later I moved my site to this host. And also started using it for about anything. A game I made for school was put on there, as they simply provided the best hosting I could get for free. Over the years, though, the forum died out and it started to get really hard to get support, even for those who paid. And they once even did not have a domain name for a couple of days. The same thing that happened now, happened back then, they didn't renew their domain and some dummy page was put up by the provider.
This time it happened just when I and I admin on the forum where discussing whether we could put some new life into the service, possibly even offering free hosting again. And this time it wasn't fixed within a few days. I checked the domain every day for a couple of days, but it didn't help. So I went looking for a new host, and when I had put my website up on the new site and I was browsing to it, my browser showed me my ugtech.net website URL, so I decided to have a look what happened if I entered it. Without expecting anything from it, I entered the URL and ended up on my own website. Then I also tried the ugtech.net front page, which also turned out to work.
The cPanel is currently broken, so the service isn't back to where it was before they lost their domain. And even back then the forum was dead and it was hard to contact about anybody. The start is there, though, and you should not be surprised when I post that ugtech.net is providing free hosting again.

Friday - the day of inspiration

It's friday night. The moment of the week I drink the most alcohol, and also the moment of the week I am pretty creative. Just like I wrote the post two before this one on a Friday night.
Anyway, that's also the moment I think of my blog. Don't know why I think of my blog on Fridays, but I do.
I do have quite a lot of stories to tell: ugtech.net is back after having been gone for a while, I signed up with a new host, Marek is releasing his DVD, I am busy with a PHP project, I found some new music to listen to and there was a student strike today. I really should write more on my blog - as I just said, I have way more than enough material to write about. So I will try to tell you about it in the near future, even though I don't feel like telling all about it right now.
For now, just consider the following surge of creativity:

Editor's note: Please note that I wrote this when it was very late and I had had quite a couple of beers. Even though I was quite aware of what I did, the following piece was influenced by both factors. Though the general idea of these feelings - I'll leave it up to you what the idea is - are really true, but the specific subject I wrote about is bothering me a lot less in daily life than this piece may make it seem. Alcohol and tiredness - and not having anything else on my mind - (almost) inevitably lead to me thinking about it, though.

Messed up.
It's still messed up.
Even when she's not there.
Even when she is far away from here.
I still can't stop thinking of her.
Perfect - good = still good.
So still I should try.
Having a good life.
Without her.

The best.
Make the best.
Get all of it you can.
I should not be stuck in my mind.
Move on and find some other girl, I should.
Even if you're still up there.
You're not leaving.
Won't forget.

Drowning.
Drowning in work.
I drown myself in projects.
Just so I don't have to face the reality.
A bit of PHP here, some C++ there.
All as a goal of life.
It's my way.
Survive.

Sunday, November 4, 2007

Dynamic input for Marek's GameEngine

I have been working on a GameEngine fro quite some time now, loosely following tutorials from marek-knows.com. I made a lot of changes making my GameEngine different from Marek's, but now I have made the first "really different" part. I had talked with Marek about his way he handles input, which was obviously not done too well (all inline code), so he said, why don't you go ahead and try to do it as you want - if nothing else it will be a good programming experience.
So I did. (okey, I was planning to do so from the beginning) And after a while he also asked if I could make a video about what I changed. And that I also did do. For now I have had enough of the GameEngine, but anyway - look marek's forum for my video (it's hosted on google video, but the forum has all comments and such are on the forum). Also you can download my current version of the GameEngine.

Saturday, October 27, 2007

Words reflecting what I feel

Today's post and the last post are both more of a vaguer type, that not necessarily every reader (if any) understands. When I started my blog, I was thinking of both this type and the one I have been using before. I wanted to give them different colors to separate them, but I never got about doing that. Maybe I will some time later, but until that moment you will have to do with me telling what kind it is.
(by the way I don't plan on using only this type from now on, I will be using whatever type suits the moment)

Three times in fifteen minutes,
but still there is this cloud.
This cloud that forbids,
this clouds that blocks.
This cloud, however cannot block my feelings,
which I sometimes hope it would.
It's good not to be lost,
to still have your feelings.
It's better, though, to move on
and I wish I could.

Tuesday, October 23, 2007

"Mono/Dia"logue

Just some random thought of mine:

"I told myself to stop, but I'm not listening"
"Why do I not stop, if I tell myself to do so?"
"I don't know, ask me, I should know"
"Do I know where I am?"
"I'm here"
"So... why were you not listening to yourself when you were told to stop?"
"I guess it was just really hard to stop, the chips were way too tasty"
"Please go say sorry to myself, I really need to make this up with me"
"Okey, I will. By the way, I will stop right now as well"
"That's good of me. So did I stop?"
"Yeah, I did. Did I also tell myself to say sorry to me? I spontaneously did"
"I did, good of me that I did listen this time and that I went to say sorry at once"
"True, true, but do I know why I did not listen?"
"The chips were too tasty"

(hint: it's really three conversation between three people (B - C, C - A, C- B) that are all me. If you want to decipher it, go ahead. If you don't, just don't even try.)

Saturday, October 20, 2007

Jotihunt

I am currently at the scouts. It's that one weekend in the year we have internet at scouting. Okey, it's supposed to stay for the rest of the year this time, but we have got two lines right now and we have about 20 computers running at the moment. For those who have ever been with the scouts, you have probably heard of the joti. For those who haven't, it's the jamboree on the internet (and jota, jamboree on the air, is on the same day). The joti/jota is an international day on which a lot of scouts use the internet or radios to communicate, as if all together.
Here in Bennekom the joti basically means playing the jotihunt, an amazing game that is one of the best moments of the year for many (amongst which I am as well). Running about 20 computers we are doing a game where you get hints on the internet, with which you have to five different groups as many times as possible (once each hour max). In the mean time you get random assignments to do.
Anyway, it's going better than ever before and we are having spare time (I am typing this :P). We will just have to wait for the next hint, but there is none yet. We have spotted two groups and did all the extra assignments were done. If I have more time left I might keep you readers (which probably still are none) updated.

Wednesday, October 10, 2007

Lacking removal and rotating triangles

Sorry I have not posted for a week or so... while I said I would.

I got my internet fixed, which meant I had things to do there, communities to visit again.
Last Sunday I went to the Lorwyn (Magic: The Gathering) prerelease. It's an amazingly good set. I really just do not understand how Wizards can say "We want the quality raised" and then not just produce a single good set, but keep following one good set up with another. But I am glad they are pulling it off. I had a strange pool (very little removal and a high number of bombs) and I focused on winning, not on winning before the opponent did. The results reflected that deck - I won the first two against not-so-strong opponents and utterly failed against in my other three matches, which were against some of the stronger players (number 1, 2 and three actually :P). I ended up seventh of fourteen. I hope I will do better saturday in the release tournament :D.

Besides that I have been working on my GameEngine project, using the tutorials from Marek-Knows.com. I have set up openGL now and I have it rotate a triangle on the screen. And all of this I did cross-platform (unlike Marek). I am really putting my own stamp on my version of the engine. Now I just have to make sure it can actually render something useful.

That was basically all I wanted to tell you right now. Stay tuned and I might post again soon :P.

Wednesday, October 3, 2007

Writing this from my (new) home

New is a relative word, but I am not at my parent's house and I am writing this... (for the record, I am not at school or any other place I don't live either and I am not using the supervisors' internet connection)... I have my own internet connection.
Ah well... own isn't really true, I am using someone else's, but with my own computer all the same. So, now the only thing I have to do is make sure I do not get in the way of the network's owner (if I don't get in his way, he won't notice and he has no reason to mind me being here).

I am still in a temporary setup (my pc is on my desk, while my monitor, mouse and keyboard are on the floor), but I will just have to find out how to set it up in such a manner that it's convenient AND I do have some connectivity. Anyway, see you all later as I am now going to find a place for everything. My next post will include all the trouble I went through to get it like it is now ;)

Wednesday, September 26, 2007

Still no good news (but some semi-good news now)

Still no good news is the title I came up with for this post. Combining that title with the absence of many posts in the past period makes all of this obvious enough. I still do not have an internet connection. The semi-good news is that I have been given the green light to set up an internet connection and that i might be able to use someone else's wireless network. I still do have to arrange (and pay) everything myself.
SO... with some luck I might have an internet connection soon. So what have I been up to these days? I have been getting to know the people in the house I live in now, I have been busy working on a GamEngine, a 3d engine in c++ using openGL. I am using tutorials from Marek-knows.com, but I am modeling the source to my own likes, using a lot of different variable names, adding a class, splitting a certain class into two (as it really was two classes in one in my opinion) and (which I haven't done too much about really) making it cross-platform. I have the uplink source code (yes, I actually have the official dev cd) to guide me through it, as that's a brilliant openGL using c++ application that is cross-platform. Even though the game is 2d it does really help me, and I needed that help.
The lack of internet increased my need for a good portable solution, so I have set up my USB drive to be a powerful platform. I had some applications on it already, but now I saw a friend had the Portable Apps menu (portableapps.com) and I liked it a lot. I installed it and made sure I had all the programs I wanted on it.
I salute to everyone, hoping that I will soon have internet again, so have a good time, and I will keep you (if there is any you, I am not so sure of that) updated if there are any major changes in my situation.

Thursday, September 13, 2007

I survived!

So, here I am again. I just thought I'd let you guys know that I have moved without any (too big) problems, I'm living on my own now. Okey, not completely on my own, but it comes close enough. I would wish I was writing this at my new home (not the least for the fact I would have meant I had internet), but I'm not. I am at school right now, using the time that I needed to have in reserve for the cycling to it, as I did not know how long this was going to take.
So... I'm without any internet, so currently it will be harder for me to keep posting. However, I have heard that coming Monday there will be a talk about internet in the house. I will just have to wait and see.
My time's nearly up, so I'm drawing this post to a close. I will be using the internet connection at school a lot as long as I don't have an internet connection at home, I guess. When I get home again, I will have to do quite some unpacking, and will get to know the other people that live in the house, so I'm far from out of things to do. And in the mean time live just goes on.

Tuesday, September 11, 2007

I'm sorry, I truly am

I promised to write more, but so far I didn't.
I'm sorry, I'm truly sorry. And I can not give any promises about the future with that.

If you are interested, I will tell how this came to be. Okey, I will also tell it if you are not interested, but in that case you may just decide not to read the part ;P.
Tomorrow I will be leaving my parental house, and will move to 'roomtraining'. In the beginning you live together with other people in the house (cook together, share a living room), but in the end you will be living on your own in the same house as a number of other people. which makes this all more fun, is that I only know since last Wednesday. So all of that is why I've been busy (as well as that school started and everything).
And now why I won't quite yet promise anything about the future, because I do not know yet if I'll have an internet connection over there, or how good it will be. So.. let's just hope I'll get a good connection.

Right now i am at school, one place I am relatively sure about my time and internet connection. I have got three free hours today (had one last hour and the other two are the coming hours) and currently I am in my ICT lesson, where we are making a start with OOP, while I know OOP better than our teacher (so the only useful things I am doing is learning a bit of the java syntax for OOP (just some small details) and helping some other people, so I decided to finish my post.

Friday, August 31, 2007

Home Again (this time for real)

So I am back from my holiday with my parents, I had a fun time in Freudenstad. For those who want to be picky, yes I have been home for almost two weeks now. The first of the two weeks doesn't count, for I was home in the literal sense, but practically I wasn't.

Just about every day I left home at 8.25 and went to Kinderdorp (Children's village). When it was time for dinner I made sure I was home, and about half of the days I left after dinner back to Kinderdorp. From 9 am to 4 pm I was busy doing all kinds of things in the café of Kinderdorp. When the children left at four the adults were left and a lot of talking and drinking was done.
The second week (the one we're at the end of right now) I needed to get back my strength :P. Well
I just sat behind my computer a lot and took life easy for a week. I finished my first try on the single player campaign of Dark Messiah of Might and Magic (amazing game!). The game is a "first person action rpg". Basically shooter and rpg, but then in a medieval/magical setting. Swordfights were your sword and your opponent's are against each other, the game has really good gameplay. Also the game doesn't use the standard classes-system, but instead let's you spend points as you wish. That way I had a guy that used the strong bits of magic in the early game, but later in the game I turned into a more fighter-like style. When I was finished I didn't have enough yet :P and I created a pure fighter (with a healing spell xD) at the hard difficulty, but that one I have finished as well now. Next will be a wizard at insane, but that's not right now...

So... today I am getting my school books and Monday I will get my lesson table - life is starting to spin at full speed once again. I'll see if I can post a bit more often now, as I do like posting here.

Thursday, August 2, 2007

Home Again

So I am home again (I never told you I was gone, shame on me!). I had a wonderful ten days in Berlin with the scouts. Only a very small part of the group went (partly due to the world Jamboree), but this may even have had a positive influence on the atmosphere...
Anyway, I home now, but nor for long - I am leaving again tomorrow (I arrived two days ago so I have two full days here and two more "bits of a day".
Anyway, I am exploring the possibilities of the new video card I bought just before holiday. And for the coming holiday I armed myself with Harry Potter 7 (Deathly Hallows) and Soul of the Fire (Sword of Truth series part 5 (out of... a lot :P)).
Anyway, I am refixing my iPod, after having taken it apart before leaving to camp. Of course I also intended to take it with me to there - but I thought I had lost a button. Today I found that I just had the button so I can fix okey this time (the right channel still won't work though...). I will need a set of ear buds before I can listen, however, so I will go and fix that right now.

Saturday, July 7, 2007

My two scripts

So, I did not post anything anything for quite a while.
Just to let you all know I fixed the script - it turned out that IE 7 actually uses xmlHttpRequest object, like all other browsers do and I had a variable set inside the xmlHttpRequest object-specific bit, while it should have been in the general bit. Moreover this was a function variable, which made it hard to discover the mistake.
The finished script, which is just a general script to make using the xmlHttpRequest, can be found here. Instructions are found inside the document, this does dramatically increase the size of the document, but if necessary you can cut it out - just the instructions not the notices and such, under the header NOTICE you will find directions what you can and what you can not cut out.
If the need arises to update the script, (there might still be a firefox-bug and there is no support for SEND requests yet) I will update the script at that location and post here that I made the changes. Though it might seem convenient to have your script tag point to it directly, PLEASE DO NOT DO THIS. Download the file and upload it again on your website, this leaves me without bandwidth stains and leaves you with less vulnerabilities (to attacks of mine, hehe).

I made yet another script - a batch script this time. It's a really, really simple script - so if you want to be sure it is nothing malicious, open it with wordpad. If you know something about DOS-commands you will see that it's really innocent (okey, it forces a delete, but that's the whole point of the script).
Okey, I lied, you do not need the file unless you are playing on a private server, private servers change and so your cache might be in the way (if your server crew has never said anything about emptying your cache, this file might not be for you).
Put this file in your WoW folder and run it instead of WoW.exe (or Launcher.exe). This makes sure that your cache is emptied before you start WoW, every time you start WoW. (Of course you might want to change your shortcut to this file and give it back it's icon by clicking on change icon and selecting WoW.exe there).

I hope either of these two scripts can help you, and if not, too bad :P

PS. if you want to link to one (or both) of these files, please link to this post, so I do not falsely identify you as a leecher.

Saturday, June 16, 2007

From an online game to a virtual machine

So I decided to get my gears back into a project that had been abandoned for almost a year now. An online game that I started as a school project, but I didn't really finish it at the time. I had been thinking of taking it up again a long time, but did not do so until now.
The first thing I was going to do was rewrite the protocol, I needed to make it more foolproof. For making it I had simply made a chat, just to design the way the client communicates with the server. I pulled this chat out of the closet and started working on it again.
I wanted smooth transitions back in the day, so I opted for using the xmlHttpRequest method. Big mistake. It's a nice method and gives nice results (and I love knowing quite a bit about it now), but it has been taking up quite a bit of time. Okey, maybe it was not such a big mistake, but it was probably not the right choice for a school project you are supposed to spend 10 hours on (I was intending to spend more on it anyway - when hobbies and school meet there is something to be gained :P).
Anyway, I was refining my protocols, so I was dabbling with the xmHttpRequest again. Cross-browser compatibility is the worst thing with it. But in the process I found out that IE 7 actually uses the syntax every other browser uses, unlike other versions of internet explorer. One big step forward, as my new code (this time I made better use of functions and put some 'libraries' in external files and made the code so that if any file does not reach it's destination the worst thing that can happen is text that is typed not appearing on the screen) worked with IE 7 immediately after designing it for Firefox. I had left in a bit that was different for IE, but as it turned out that was only needed for IE 6 and below. Unfortunately many people still use IE 6 and thus I want my site to be IE 6-compatible. So I went and started to adjust it. My first problem was a simple mislocation of a statement (inside the non-IE bit rather than just done no matter the browser). But I wasn't out of problems yet, there was some other problem as well, which I haven't fixed yet. I needed IE 6 to see what the problem was, but I only ran IE 7, and you can not have both at the same time.
I tried MultipleIEs an application that does let you run multiples, but I wasn't able to clear the cache there and you can not ctrl-f5 a js-file (yes in FF you can, but not in IE). The big plus was that I had already installed some IE-javascript debugger (some other m$ product that dual-functioned? The debugger I tried to install last year when working on this project?). Anyway I decided to go for the one other option, making a virtual pc and running IE 6 on that (there are special images for this).
So I looked up Microsoft Virtual PC (I knew how to use it, I had dabbled with a earlier trial version before) and you know what, it was F-R-E-E. Wow, that's the second (or even third) positive thing about Microsoft in this post.
To be honest I already knew it was free, as it was told on each of the pages that told me about this workaround for running more than one version of IE... but that's where I am now, downloaded the stuff and and installed it. Now I have to get the IE dev toolbar (a friend told me about this when trying to help me with this project) to my virtual pc as well as the mysterious debugger. Let's hope it works out.

Thursday, May 17, 2007

Made myself a blog

Hello all,
(okey, that's currently equal to none)

I finally decided to start my blog. For now it's hosted at blogger.com, I don't whether I will keep it that way or not.
Anyway, I started thinking about starting a weblog when I found what one really is. It is the evolution of the diary. Now instead of keeping our secrets, it tells them to whoever wants to read them, but the main premise, being able to tell your story, is still there.
That's also why I don't really mind not having a public. If nobody reads this... so be it.