galexcd
Members-
Content Count
1,313 -
Joined
-
Last visited
Everything posted by galexcd
-
Use Bb Code On Your Site! Just like on forums
galexcd replied to Unholy Prayer's topic in Programming
str replace is bad for bbcode especially when it comes to urls etc. If you use preg_replace, you can get php to check to make sure it actually has an ending. That way if sombody leaves a tag open, it dosn't parse it out. They would have to close it. Here's the bb code i use on the forums i coded. $main_search=array('/\[b\](.*?)\[\/b\]/is','/\[i\](.*?)\[\/i\]/is','/\[u\](.*?)\[\/u\]/is','/\[img\](.*?)\[\/img\]/is','/\[url\=(.*?)\](.*?)\[\/url\]/is','/\[url\](.*?)\[\/url\]/is','/\[color\=(.*?)\](.*?)\[\/color\]/is','/\[code\](.*?)\[\/code\]/is');$main_replace=array('<strong>$1</strong>','<em>$1</em>','<u>$1</u>','<img src="$1" style="max-width: 100%" border="0">','<a href="$1">$2</a>','<a href="$1">$1</a>','<font color=$1>$2</font>','<div style="WIDTH: 100%; OVERFLOW: auto"><pre>$1</pre></div>');$str=preg_replace ($main_search, $main_replace, $str); Str_replace is good for smilies though! -
Help With Moving Html Form Results To Shopping Cart?
galexcd replied to PlugComputers's topic in Programming
Could you elaborate on what exactly you have now? In terms of your site that is. And do you have PHP? -
<sarcasm>Thanks everybody for all your replies!!! You have been SO HELPFUL!!!</sarcasm>I finaly got my script working, after 2 months of no replys....... Thanks alot..
-
I like that idea alot more... or even you could just loose 50% say. That way the more people store up before hosting, the more they loose in the long run...
-
Preview Your Website In Ie From Non-windows Os
galexcd replied to delivi's topic in Websites and Web Designing
Hmm thats a long wait time, especially if you are doing it for website testing. You might have to go back and change one little thing and start all over again... -
Thanks so much for the fast reply.
-
Ok, I've seen a few sites, like wikipedia, that when i go to a public IP such as an airport, internet cafe, or even school, it can tell what it is. Wikipedia says somthing along the lines of, "this is a public IP [name of place] you have to log in, to edit the pages because of vandalism" or somthing like that. I was wondering, how can I get my site to get that information on a certain IP address. And check if it's a group IP or not.Thanks
-
yea, its just that, now if i were to get hosting, i feel like my 100 credits just went to waist
-
I haven't had hosting on Xisto for a while, mainly because of my Xisto - Web Hosting hosting. I recently was thinking about starting another Xisto subdomain, but i dont think i'm going to do it because I have 130 credits stored up, and if i request for hosting they get reset I really don't understnad the point to this "feature". anybody mind elaborating on the purpose for this, and hopefully remove it?~alex
-
Um... My bad... I totaly confused tetris with pong there for a second... Wow... Sorry. Well if you want the code for a pong game, there it is... hehe
-
I made a tetris game! It was part of a spoof i made of DOS in c++ feel free to use my source if you can find the tetris sourcecode inside the OS. I looked through the file and found some lines of code that start with //START PONG and // END PONG so i think all the code is there. This should be all of it: //START PONGvoid linecall(int line,int computerlocal,int plrlocal,int ballx,int bally){ int loopvar; if(computerlocal+3>=line&&computerlocal<=line){ cout << "|"; }else{ cout << " "; }if(bally==line){loopvar=1;while(loopvar<ballx){ cout << " "; loopvar++;}cout << "O";while(loopvar<40){ cout << " "; loopvar++;}}else{ cout << " ";}if(plrlocal+3>=line&&plrlocal<=line){ cout << "|";}cout << "\n";}void playpong(int diff){system("cls");//10 rows//paddles 4//40 cols//dwnleft-1//dwnright-2//upleft-3//upright-4int computerlocal=1;int plrlocal=1;int ballx=20;int bally=5;int balldir=1;int gamerun=1;int loopvar;while(gamerun==1){//linecall loopvar=1; while(loopvar<=10) {linecall(loopvar,computerlocal,plrlocal,ballx,bally);loopvar++; } if(ballx>=41||ballx<=0) { if(ballx>=41) { gamerun=0; cout << "You Lost!\n"; }else{ gamerun=0; cout << "You Won!\n"; } }else{ //computer ai if((balldir==1)||(balldir==3)) { if(((rand()%diff)*20)>(rand()%50)) { if(computerlocal+2<bally) { computerlocal++; } if(computerlocal+2>bally) { computerlocal--; } } } if(computerlocal<1) { computerlocal=1; } if(computerlocal>7) { computerlocal=7; } //move ball if(ballx==40&&plrlocal+3>=bally&&plrlocal<=bally) { if(balldir==2) { balldir=1; } if(balldir==4) { balldir=3; } } if(ballx==1&&computerlocal+3>=bally&&computerlocal<=bally) { if(balldir==3) { balldir=4; } if(balldir==1) { balldir=2; } } if(bally==0) { if(balldir==3) { balldir=1; } if(balldir==4) { balldir=2; } } if(bally==10) { if(balldir==1) { balldir=3; } if(balldir==2) { balldir=4; } } if(balldir==1) { bally++; ballx--; } if(balldir==2) { bally++; ballx++; } if(balldir==3) { bally--; ballx--; } if(balldir==4) { bally--; ballx++; }clock_t endwait;endwait = clock () + .02 * CLK_TCK;while (clock() < endwait) {} //key listen int ch; if(kbhit()) { ch = getch(); if ( ch == 0 || ch == 224 ) { ch = 256 + getch(); } if(ch==328) { plrlocal--; } if(ch==336) { plrlocal++; } if(ch==27) {system("cls");cout << "Pong game ended.\n";gamerun=0; } if(gamerun==1) { system("cls"); } }else{ clock_t endwait; endwait = clock () + .02 * CLK_TCK; while (clock() < endwait) {} system("cls"); } if(plrlocal<1) { plrlocal=1; } if(plrlocal>7) { plrlocal=7; }}}}//END PONG But this code might need the rest of the program to work.. I don't know, its been ages since ive looked at it. Good luck OS.txt
-
HAha, yeah I saw that one. It's hillarious. Take that windows users! I doubt it. I dont think apple is too keen on sueing the company who's owner owns like 80% of apple's stock... lol kubi YES!!! Those bastards, stealing ideas from apple... No the thing was because apple didn't come up with the idea for the computer, xerox did, and gave it away for free to apple because they didn't think it was worth anything. Apple designed the brand new GUI while gates still only had text. Gates stole this, but the verdict was that it wasn't apple's product. I think they didn't know the differece between hardware and software back then >_> becasue apple got the computer from xerox but the os they coded themselves.... You guys really need to watch the movie "Pirates on silicon valley". Its a great movie about this whole thing.
-
Oh and q33 isnt the name of any of the planes that went down on 9/11... idiot
-
I got 234, but im running the mac version of word 2001. Very interesting though...
-
How Can I Be More Popular? How Can I Be More Popular??
galexcd replied to seez's topic in General Discussion
I couldn't agree more with fffanatics. Just live out highschool where you are.High school is really a joke. Seriously,, the worst years of my life... not that I didn't have any friends or anything like that, but I just cant stand working on stuff that I'm no good at. (English, science, history). I dreaded going to class, and it has made my life hell. Thank god for graduation in 1 month Anyway, for popularity, if you are still convinced that you MUST become popular, try not talking so much: The unpopular kids at my school DO NOT KNOW HOW TO SHUT UP. It's actually very annoying >_>. But usually that would only help if people are already annoyed by you.BordaForx is right, if you want to be popular become involved in your school. join ASB, and be confident. -
Is Democracy The Best Way To Govern?
galexcd replied to amit nigam's topic in Science and Technology
We need a libertarian rule. Someone needs to get rid of all this government. Now I don't want complete anarchy, just let us do what we want on our own property. -
heh i'm glad you guys like my idea!
-
Changing the address only changes the NAME of the from in the email, not the actual from email. Most email clients nowadays let you change that stuff. it is designed so you can put in your own name there so instead of showing and address, it shows your name. A lot of people recently have decided it would be funny to put email addresses in there. To make it seem like an email came from a different place than it really did. No matter what you do, the real email address always shows up when you open the message....
-
Homework Site A P2P Homework site/program?
galexcd replied to BooZker's topic in Science and Technology
Dude, i had the EXACT same idea a few weeks ago. I mean EXACT! Down to the points required to dl and we give each other grades! -
heh i used to always joke that life is just a huge MMORPG that we are really just so addicted to, we forgot about the real life, and millions of people are just spending all their time infront of the computer playing this game. And the username of the creator of this game? God of course!Its perfect! It solves all the questions!lol
-
does phpmyadmin have a specific port so that admins on my site can login to an SQL database without needing to login to cpanel? thanks.
-
photobucket used to have this thing called practice html. About 7 years ago when i knew nothing about computers I used that and the little buttons that added tags for you to make <b> <u> <i> <a> <img> tags, and went on from there. I later learned tables and finaly the important stuff: CSSI only recently learned php (just a few years ago) but it has easily grown as my favorite programming language.