Klaas
-
Posts
3.116 -
Joined
-
Last visited
Posts posted by Klaas
-
-
Enemy Territory. I've been addicted to it for almost a year, playing a few hours every day. But because I'm leaving my dorm and going back home again for the next 3 years I decided to quit it and spend my time doing more useful things. So I haven't been playing it anymore now for about 2 months and don't really feel the urge anymore.
I do play the BF2 demo often, flying those jets is just crazy Fortunatly I don't feel the urge to play it too much and I'm keeping myself from buying the full game.
-
What you're doing wrong here is variable scope. That's something you should understand before working with custom functions, classes, etc.
When a variable is declared in the script itself it is only accessible to the script itself:
$var = 'bla';
echo $var;
// will give bla
function echovar () {
echo $var;
}
echovar();
// will give nothingWhen you declare a variable inside a function it will only be accessible by the function itself:
function testvar() {
$var = 'bla';
}
echo $var;
// this gives nothingSo what's the sollution? There are three:
* passing the var declared in the script to your function:
function testvar ($var) {
echo $var;
}
$var = 'bla';
testvar ($var);
// will echo bla
// or do this:
testvar ('hi');
// will echo hi* to pass a variable from a function to your script do this:
function testvar () {
$var = 'bla';
return $var;
}
$var = testvar();
echo $var;
// will echo bla* the third method is making your variables global. Never do this, it's bad practice because it breaks the purpose of variable scope (hiding function variables from the script and other functions)
global $var;
$var = 'bla';
function testvar () {
echo $var;
}
testvar();
// will echo 'bla'Anyway, since you're writing something advanced like a CMS I suggest you study the following topics:
- variable scope
- functions
- classes and object oriented programming
- application design and engineering
- abstraction
Also make sure you understand all the basics of PHP:
- arrays
- data types (int, string, etc.)
- basic functions
- regular expressions
- globals
- control structures (if, else, elseif, switch)
- loops (while, for, foreach)
- etc.
If you don't understand these basics it's really hard to write a CMS, or atleast one that you'll be reusing often.
-
Tim, I thought there is already an existing php function for that.
-
@Thug
Yep drop-protection and the fingerprint reader are included, although it's not the reason for buying. The main reason is lightweight but still powerfull, a very good keyboard (programming) and sturdy (will need to carry it with me 5 days/week on bike, bus, train).
The specs:
Pentium M 760 2.0 Ghz
1GB RAM
60GB HD 7200 rpm
ATI FireGL V3200 128MB (comparable to an X600 I've heard)
15" UXGA (that's 1600x1200)
Gigabit ethernet, WLAN, Bluetooth
3.5h battery life (the only downside, should be a bit more imo)
3 years on-site warranty
It's not a multimedia laptop though, only two USB-ports, none of those bells and whistles you get with Acer or other mainstream brands. It's a bit overkill for me, especially the CPU, but I guess it'll only benifit me in the future so I can keep it a bit longer.
-
Really sad what happened there, seems the terrorist attacks are escalating.
It seems Rome is on the top of the list of the next targets, to which I'm going next week.
-
Well I'm trying hard, but so far only because I was riding my bike without a light on (about 7 years ago) and when I was walking in a demonstration against the Belgian court when I should have been in school.
My dad has a nice crime record though. Assaulting a police officer (during a demonstration he stuffed the police officer's uniform with eggs and pushed him against a wall a few times, because the guy was molesting a fellow demonstrator), a night in prison because of "disturbing the peace during a demonstration" (just happened to be one of the demonstrators caught by the police), and he used to be listed in the State's Safety (Belgian CIA) file as "dangerous to the state" (because of being a founding member of the Farmer's Union, demonstrating against the king and being member of a separatist group).
Well, my dad's a very peaceful and friendly person though, wouldn't harm a fly. Just happened to be demonstrating a lot as a farmer and Flemish-nationalist. In that case you're just bound to get in trouble with the police. He's good friends with them though, his best friend was even a BOB (Belgian FBI) officer
Bad side of the story, which was when he assaulted the police officer, was when a fellow farmer (who wasn't even demonstrating but returning home) was hit to death by a few (young and unexperienced) police officers. :/
-
I'm in the process of buying a laptop too. It seems most people get a Dell but they're very expensive in Belgium, except if you don't get the warranty (+/- €340).
So far I've been looking at the Amilo Pro line of Fujitsu Siemens, Sony Vaio and Acer. The Fujitsu's look fine but I can't find any review so I'm not going to take the risk. The Sony Vaios are a bit too expensive for what they offer and battery life is horrible (2h). And nobody seems to recommend Acer because the build quality is quite bad and they aren't the most relieable things to buy.
So right now I've settled for an IBM Thinkpad T43p. These things are extremely expensive but my school is offering them for €1750 (that's half of the normal price). It's a bit much for my budget but I really can't reject such an offer
I'll also post a review when I get it (in september I think), hopefully I made the right choice.
-
Because it's insecure. If that's a user inputed string a hacker can just do anything he wants with your server. It's also pretty heavy on performance. So avoid it when you can.
Read this, especially the comments:
-
It is generally not a good idea to put php code in your database, nor what I'm going to suggest, but for the sake of helping:
eval ('php code string from database');
-
@Klaas: Nah I mean the logo on the left, not the small truck one. The company logo there you know. I am not sure, it looks a bit alone. Maybe you move it a bit more down and put it into a box that blends a bit white onto the gradient like you did already on the left there. Does that make sense?
Well the plan was to put some text under the logo, a little "about" text. But I'll also try what you suggested, thx
-
FTP is a protocol for transferring only files, it is called File Transfer Protocol afterall... I'm sure someone could make an open source FTP client and server.
Filezilla is your friend
-
Thanks for the comments so far everyone
@Tim
What do you mean with the logo? It's on the red bar on the left. That little truck in the white area is something I accidently left there
Personally I'm considering either layout2 or layout4, but 2 looks a bit old-fashion imo. I guess I'll let the client decide
@Zeta
Well there isn't going to be much content, it'll be a simple company website.
-
I'm busy making a website for a slaughterhouse (nice subject isn't it ). Since I have absolutely no inspiration and just can't get it right I've made 4 prototypes. They all aren't finished at all, one a bit more than the other. Things like photos and text might be misplaced a bit because I have yet to work on it. But you get the idea of what it's going to be.
Here are the layouts:
http://www.kvw.be/duploads/layout1.jpg
http://www.kvw.be/duploads/layout2.jpg
-
Cause even good BIOSes don't like to boot off the second hard drive (or so I hear, never having tried it myself).
Cheers!
Well I have one HD (primary) for Windows and another for Linux and setting up dual boot was just as easy as normally. Tested with Mandriva, Fedora and Ubuntu.
-
@Yiuel
Actually the evolution in webdesign is the opposite of what you would want. Web design is only getting more mysterious than it used to be and is developing towards the level of software engineering. In the early public web all you had to know was html and a bit javascript, now you need to know semantic xhtml, advanced css, object oriented javascript, XML and "insert your favorite server-side language here". You no longer just start coding a website or web application, these days tons of planning is needed to make a successful quality application or website.
One positive thing about the leap towards software engineering though is that the application that are made are of a much better quality and are more modular. So if you want to start a blog you can download a nice php application, no need to program such things yourself anymore (though after inspecting the code behind for example Wordpress I see that there's still lots of stuff to be improved).
But the thing is, to get something successful and professional running you either have to have much web design experience or pay lots of $$$ to an experienced webdesigner.
-
Aside from that, what I'd really like to see is something that replaces flash as a web interface. So far, you need a lot of JavaScript knowledge and a bit of trickery, and you can't even get close to the same level of integration.
Well with the recent AJAX API's that will surely be possible, but it's indeed much harder than flash. Javascript also isn't so powerful in animation so in that area Flash will still be a harsh competitor, but it's rediculous to still use it for GUI's without much animation.
-
Check out the Mandriva website, they sell very cheap computers with Mandriva pre-installed.
And check this thing out:
-
The technology prototype has been shown to the chairman of Philips and several other big companies (Oracle and Sun and perhaps Microsoft).
The plans are currently in a safe, but that's all I know. The other plans on which he was working are all stolen the day he died according to the family and the author of the book, so nobody knows where they are.
He died in 1999 IIRC. I guess it's very unlikely we will ever see something of this technology since as the book points out, it's a threat to the mainfraim/server/storage industry. Currently companies are housing a huge amount of storage computers and tape backups, which is many $$$ for manufacturers. If a technology which enables people to store many terrabytes on a small cheap card would be commercialised it would of course mean the end of the huge mainfraim/storage industry.
So, what I think is that people from the industry are behind the theft, if everything in the book should be believed, and that the technology will never be released for commercial use.
-
I'm pretty much sure the buzwords in the near future will be AJAX, RSS/ATOM and XML-RPC
AJAX is still very young and needs to get a lot more mature. But when it reaches that stage I'm pretty sure it will revolutionise the way we use the web, from the synchronous slow thing it is to the way we use computer apps.
XML-RPC is maybe in the same leage as AJAX, and I guess the important thing here is that it'll make computer applications much more integrated with the web. A great example is the Blogger API which enables blog authors to use a computer based application to update their blog (online and offline).
RSS and ATOM are fairly known in the blog and webdesign community but have yet to conquer a big part of the internet users. Today it's still used for simple syndication (Really Simple Syndication after all ), but as podcasting is proving now there's much more to it.
-
Well it's indeed best to try fedora first. The switch to ubuntu later on won't be that hard since both use gnome as the default window manager (atleast with the one-cd version of fedora.
Give KDE a try too.
-
Btw
Ubuntu is great too actually, been using it now for about a week and it's fantastic. Everything, besides the usual stuff like GPU and Wifi driver, worked flawlessly out of the box and the software installation tool/download respository Synaptic is the best thing I've ever used. No need to search for download sources, they're already there and give me a download speed of 700KB/s. It takes care of everything like dependencies and such, in a much better way than the tools supplied with Suse, Fedora or Mandriva.
You can order a free CD (plus free shipping) from ubuntu.com, though it takes a while for they arrive. Ordered 10 three weeks ago, still waiting to get them.
-
Managed to get my wireless network working. Not that easy since I had to compile ndiswrapper from source (plus I was missing gcc, and the kernel source) and I was constantly using the wrong drivers.
So if anyone here would ever need to install a driver for his wireless card in his Medion laptop/pc, get the drivers from the Medion website, don't use those supplied on the cd or other drivers supporting the same chipset; they simply won't work.
Another piece of advice to check if your driver is correct, type this in the shell:
ifup wlan0
or
ifup eth0
(depends what the name is of the interface of your wireless card)
-
Recently a book was published called "The Source Code", about the Dutch inventor Jan Sloot and his compression technology.
Jan Sloot, a Dutch tv-repairer, worked years on a compression technology that takes a different approach (than binary) to data-storage and transmission which enables to compress data to a factor of one-million. He worked on a prototype; a box connected to a notebook in which he inserts a chip-card containing 16 full movies which could be played simultaneously from the chip-card (in 1999).
His investors got in contact with a chairman of Philips, one of the largest ICT companies in Europe and they formed a company with him to sell the technology. Several companies were interested like Oracle, Sun and even Microsoft.
The strange thing is that two days before the contracts were to be signed Jan Sloot suddenly died of a heart attack (he already had one before) and his invention was gone and his room where he worked was cleaned while it was always a mess of papers.
And that's where the story ends infortunatly
Well, sounds like a very strange story to me and I don't know what to believe. Several computer scientists have already said that such a technology is simply impossible, though it sounds pretty crazy to me that he could attract investors like Oracle, Sun and Microsoft, and that his invention was stolen on the same day he died.
More info for the Dutchies or Flemings around here:
-
About the drive:
During installation make an extra partition with the FAT32 filesystem, as Lorian said. I made one like that for sharing my firefox and thunderbird profiles (bookmarks, emails, etc) between windows and linux.
All your hardware should be supported. You'll probably have to get a linux driver from Nvidia to enable 3D-support though, not sure about that. You can do that afterwards, it won't prevent linux from working, only severly slow down openGL apps.
@Lorian
Yes, I think it's the evaluation version, which is just the unsupported version of the real thing AFAIK. This means you won't get auto-updates and such (again AFAIK). I do advice though to get Mandriva or Fedora Core instead, which are fully-supported products, much better for someone with less linux-knowledge imho. I've been using Mandriva most of the time and it has the best community support and package/update system (urpmi). Well, still need to check out apt-get though, which is the system Ubuntu is using (after I can make my wireless networking work).
I also have a 1Gb/day limit and donwloaded the whole thing. Just download the CDs or DVD, and if it's more than one Gig, download one cd a day, or the dvd in parts. Ubuntu is only one CD, but has a big repository to install other apps afterwards. Mandriva is also one CD with two optional CDs (there's a fouth one but that only comes with the commercial version IIRC). You can download the first one only and get the additional software with urpmi aftwards.
I would also recommend this book:
http://www.oreilly.com/catalog/runux4/
There might be a more recent version. Been using this at school this year, pretty good for a beginner, though not a reference.
Random PHP Questions
in Computer Desk
Posted
Could you give the code of the page itself, admin_login.php and admin_logout.php?