A Off-Topic forum to discuss things that aren't related to the Amusement Park Industry.
by Aero737 on March 9th, 2006, 2:10 pm
Here, have some more
Code: Select all #include "allegro.h" //################# void wait_for_keypress() { release_screen(); readkey(); acquire_screen(); } //################# void doDots(int designWidth, int designHeight) // This is the Box on the first screen. It uses two //nested for loops. The color of the pixel depends //on the col and row. { int col, row; for(col = 1; col < designWidth; col ++) { for(row = 1; row < designHeight; row++) { putpixel(screen,SCREEN_W/2 + col,SCREEN_H/2 + row, (row*row)%255); putpixel(screen,SCREEN_W/2 - col,SCREEN_H/2 - row, (row*row + col*col)%255); putpixel(screen,SCREEN_W/2 - col,SCREEN_H/2 + row, ((row+col)*(row+col))%255); putpixel(screen,SCREEN_W/2 + col,SCREEN_H/2 - row, (row+col)%255); } } } //################# void pressEnter() //This is the press enter function. It will display //Please Press Enter at the botom of the screen and //Wait for a users keypress to pause. { textout_centre(screen, font, "Press <Enter> to continue", SCREEN_W/2, 460, 255); wait_for_keypress(); } //################# void title(char s[], int y) //Title function, this will display whatever //title the calling function want's it to. //It will center the text and display it //Y units from the top/bottom { textout_centre(screen, font, s, SCREEN_W/2, y, 255); } //################# void doBullsEye(int maxRadius, int radiusIncr, int flood) //The Bullseye function. It uses two unnested for loops. //One will plot the circles, and another will plot the //flood fill option. { for(radiusIncr = 10; radiusIncr < maxRadius; radiusIncr += 10) { circle(screen, SCREEN_W/2, SCREEN_H/2, radiusIncr, 255); } for(flood = 05; flood < maxRadius-5; flood += 10) { floodfill(screen, 320+flood, SCREEN_H/2, flood%185); } } //################# int grInit(void); void wait_for_keypress(); int main(void) { int rc; rc = grInit(); if (rc == -1) return 1; title("Pixel Filled Box - o - Color",20); int width, height; width=200; height=150; doDots(width,height); //Calls the rectangle function. The width and //height are set in the calling function. pressEnter(); //pause clear_to_color(screen, makecol(255, 255, 255)); //Screen to white title("Hit the Bulls Eye", 20); //Calls the Title and display Hit The Bulls Eye doBullsEye(SCREEN_H/2,10,5); //Call the bullseye pressEnter(); //pause clear_to_color(screen, makecol(255, 255, 255)); //screen to white title("Goodbye",SCREEN_H/2); //Will call the title function and display goodbye. //It will also put the text 1/2 way up the screen. pressEnter(); //Pause return 0; } END_OF_MAIN(); //################# int grInit() { allegro_init(); install_keyboard(); if (set_gfx_mode(GFX_SAFE, 640, 480, 0, 0) != 0) { set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); allegro_message("Unable to set any graphic mode\n%s\n", allegro_error); return -1; } set_palette(desktop_palette); clear_to_color(screen, makecol(255, 255, 255)); acquire_screen(); text_mode(-1); return 1; }
Aero737
The Mod Squad
Posts: 3787Joined: February 6th, 2003, 10:54 pmLocation: Beijing CHINA
by ymmit on March 9th, 2006, 3:47 pm
Ahh the rain drop, the perfect aerodynamic shape. It is actually formed by the air around it.
ymmit
Posts: 123Joined: February 20th, 2006, 11:41 pm
by ymmit on March 12th, 2006, 2:46 am
wow I am bored
Ahh the rain drop, the perfect aerodynamic shape. It is actually formed by the air around it.
ymmit
Posts: 123Joined: February 20th, 2006, 11:41 pm
I am so excited!!
OK so for our honeymoon we are going to Cancun from April 24th - May 1st... well last night my bestest friend Beth and he male "companion" booked to come join us from April 27th - May 1st! This is going to be so much fun. So basically we get a three day honeymoon and a four day non stop party!!
punkbunny24242
Posts: 1963Joined: January 28th, 2004, 10:52 amLocation: Lockport, IL
cool...sounds like a great time.
CoasterTycoon77
Posts: 491Joined: May 26th, 2005, 7:39 pmLocation: Racine, WI
by ymmit on March 17th, 2006, 1:12 am
^cool.
My brother is on a cruise in the Carribean right now and he is proposing to his girlfriend on the trip......shhh it's a surprise
Ahh the rain drop, the perfect aerodynamic shape. It is actually formed by the air around it.
ymmit
Posts: 123Joined: February 20th, 2006, 11:41 pm
by FRD714 on March 17th, 2006, 9:54 pm
So boring......although the ncaa games are pretty good tonight.
Frank
FRD714
Posts: 3547Joined: October 26th, 2005, 4:46 pmLocation: Chicago
by [jonrev] on March 18th, 2006, 1:22 pm
Now it looks like I'll be in Wausau longer than I thought. My uncle passed away this morning (:cry:) so I will probably be there until Tuesday night.
[jonrev]
Posts: 3728Images: 0Joined: April 21st, 2003, 11:40 amLocation: Lake Wazzapamani
I know this goes back a few days....but..... Aero, what are you planning on doing for a job?
Coasters Ridden: 131 Top 5: Maverick, El Toro, Voyage, Fahrenheit, Dominator
themanoftheland8
Posts: 335Joined: September 24th, 2004, 8:09 pmLocation: Milwaukee, WI
by Aero737 on March 23rd, 2006, 4:05 am
Ahh, because when you thought that the converation couldn't get any crappier I'll throw some C++ at ya!
Code: Select all //############################################# //CSCI 240 Assignment 5 - Spring 2006 //Programmer: Jason Z107419 //Section: 10 //GA: //Date Due: 2/24/2006 //Purpose: This program is designed to // count the characters in a .dat // file or from the screen. It's // smart enough to determine vowels, // digits, punctuation, etc. It will // also warn the users if the brackets // and perenthesis don't match ... a // useful debugging process. //############################################## #include <iostream> #include <iomanip> #include <conio.h> #include <ctype.h> using namespace std; //######################### bool isVowel (char in) { in = toupper(in); if(in == 'A' || in == 'E' || in == 'I' || in == 'O' || in == 'U' || in == 'Y') return true; else return false; } //########################## int isAlpha(char in) { if (in >= 65 && in <= 90 || in >= 97 && in <= 122) return 1; else return 0; } //########################## bool isConsonant(char in) { if(isVowel(in) == false && isAlpha(in) == 1) return true; else return false; } //########################## int isDigit(char in) { if(in >= 45 && in <= 57) return 1; else return 0; } //########################## int isPunct(char in) { if(isAlpha(in) == 0 && isDigit(in) == 0) return 1; else return 0; } //########################## int main () { char ch; int character = 0, vowel = 0, consonant = 0, letter = 0, digit = 0, punctuation = 0, left_bracket = 0, right_bracket = 0, left_perenthesis = 0, right_perenthesis = 0; cin.get(ch); cout << ch; while (cin) { character ++; if (isVowel(ch) == true) vowel ++; if (isConsonant(ch) == true) consonant ++; if (isAlpha(ch) == 1) letter ++; if (isDigit(ch) == 1) digit ++; if (isPunct(ch) == 1) punctuation ++; switch (ch) { case '{': left_bracket ++; break; case '}': right_bracket ++; break; case '(': left_perenthesis ++; break; case ')': right_perenthesis ++; break; default: break; } cin.get(ch); cout << ch; } cout << "Total Characters: " << character << endl; cout << "Total Vowels: " << vowel << endl; cout << "Total Consonant: " << consonant << endl; cout << "Alpha Numeric Characters: " << letter << endl; cout << "Digits: " << digit << endl; cout << "Punctuation marks: " << punctuation << endl; cout << "Left Brackets: " << left_bracket << endl; cout << "Right Brackets: " << right_bracket << endl; (left_bracket != right_bracket) ? cout << "Warning Your Brackets do not match!" << endl: cout << endl; cout << "Left Perenthesis: " << left_perenthesis << endl; cout << "Right Perenthesis: " << right_perenthesis << endl; (left_perenthesis != right_perenthesis) ? cout << "Warning Your Perenthesis do not match!" << endl: cout << endl; system ("pause"); return 0; }
Aero737
The Mod Squad
Posts: 3787Joined: February 6th, 2003, 10:54 pmLocation: Beijing CHINA
What programming language do you use Aero? We have to use MatLab, but we are engineers and it is the standard for us.
Universal Orlando Mechanical Engineer Marathon down, Goofy to go.
Danhockey04
Posts: 2367Joined: May 17th, 2004, 8:45 pmLocation: Celebration, FL
by Aero737 on March 23rd, 2006, 1:23 pm
Oh yeah, Matlab, the engineers here use that (I live on an engineering floor last year), That's C++.
Aero737
The Mod Squad
Posts: 3787Joined: February 6th, 2003, 10:54 pmLocation: Beijing CHINA
Someone pick what my next Avatar should be. First person to respond i'll listen to.
CoasterDude12-2
Posts: 3027Images: 10Joined: November 28th, 2004, 7:02 pmLocation: Chicago
This sucks, both as a Sox fan and a Cubs fan. At least it wasn't a Bucks or Packers avatar.
CoasterDude12-2
Posts: 3027Images: 10Joined: November 28th, 2004, 7:02 pmLocation: Chicago
God, I'm so shaken up right now. Stick shifts make driving so complicated. Whoever invented them is not my friend. I almost got into a minor accident.
DejaVuGurl1203
Posts: 4181Joined: December 28th, 2002, 8:35 pmLocation: Illinois
by [jonrev] on March 23rd, 2006, 8:24 pm
I broke my arm today.
Im not going to talk alot about it because it will take forever to type with this arm.
[jonrev]
Posts: 3728Images: 0Joined: April 21st, 2003, 11:40 amLocation: Lake Wazzapamani
by FRD714 on March 23rd, 2006, 8:25 pm
Jon Revelle wrote: I broke my arm today.
Im not going to talk alot about it because it will take forever to type with this arm.
Sorry to hear that. You've been having a bad week havnt you? Hope it gets better soon.
Frank
FRD714
Posts: 3547Joined: October 26th, 2005, 4:46 pmLocation: Chicago
by [jonrev] on March 23rd, 2006, 8:28 pm
^This week has sucked ass. First my uncle dies then I find out that I wont be able to go to SFKK on opening day and now this.
Oh well, at least I get out of gym for a few weeks.
[jonrev]
Posts: 3728Images: 0Joined: April 21st, 2003, 11:40 amLocation: Lake Wazzapamani
Damn Jon, that sucks. I've had the opposite, a new g/f, a spot on the Soph. baseball team, and a 100% on an Algebra Test (never happened before). Than there was that other week that sucked so much ass...
CoasterDude12-2
Posts: 3027Images: 10Joined: November 28th, 2004, 7:02 pmLocation: Chicago
punkbunny24242
Posts: 1963Joined: January 28th, 2004, 10:52 amLocation: Lockport, IL
by Aero737 on March 25th, 2006, 4:57 am
Code: Select all <?php $link = mysql_connect("localhost", "97_aisadmin", "******") or die('Could not connect: ' . mysql_error()); mysql_select_db("97_phpbb") or die('could not select database'); $sql = 'SELECT COUNT( * ) AS `Rows` , `post_text`FROM `phpbb_posts_text` GROUP BY `post_text` ORDER BY `post_id` LIMIT 0,30'; $result = mysql_query($sql)or die('query failed'. mysql_error()); while($row = mysql_fetch_array($result)) { echo '<table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td>' . $row['1'] . '</td> </tr> </table> <br />'; } mysql_free_result($result); mysql_close($link); ?>
Mmm, Yummy, some PHP
Aero737
The Mod Squad
Posts: 3787Joined: February 6th, 2003, 10:54 pmLocation: Beijing CHINA
by w00dland on March 26th, 2006, 5:23 pm
It's been so nice outside today.
I went to the Y
Played Tennis at the high school
Played Bball at the middle school
drove w/ the top down
watched George Mason beat UConn
Now I gotta go to work.
Top 5 wood-5-Goliath 4-Ravine Flyer II 3-Phoenix 2-Voyage 1-El Toro Top 5 Steel- 5-Velocicoaster 4- Maverick 3- Fury 325 2-Steel Vengeance 1-X2 Coaster Count: 444
w00dland
Moderator
Posts: 4630Joined: January 29th, 2004, 2:36 pmLocation: Winter Haven, FL
by Rusty888 on March 26th, 2006, 5:33 pm
Ya, it is really nice. I rode my bike to the bowling alley, went bowling, rode to my friends house and played basketball, then rode it home again.
i'm rocking the suburbs, just like quiet riot did...
Rusty888
Posts: 752Joined: July 5th, 2005, 8:56 amLocation: 1 hour north of SFGAm
Return to Off-Topic Forum
Who is online
Users browsing this forum: No registered users and 20 guests
COPYRIGHT - SFGAmWorld.com
All content and images on this site are Copyright 2001 - SFGAmWorld.com and may not be used without permission.
This is NOT the official site of Six Flags Great America, SFGAmWorld.com is not affilated or endorsed by Six Flags Great America.
SFGAmWorld.com does not make any guarantee on the accuracy of the information on this website and cannot be held responsible by the use of this information.
SIX FLAGS and all related indicia are trademarks of Six Flags Theme Parks Inc. ®, TM and © . The official Six Flags site can be found at SixFlags.com
BATMAN, SUPERMAN and all related characters and elements are trademarks of © DC Comics.
LOONEY TUNES and all related characters and elements are trademarks of and © Warner Bros. Entertainment Inc.©
The Wiggles Pty Ltd. SCOOBY-DOO and all related characters and elements are trademarks of and © Hanna-Barbera.