Jump to content

msp301

Active Members
  • Posts

    24
  • Joined

  • Last visited

About msp301

  • Birthday 01/30/1990

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Bournemouth // Portsmouth
  • Interests
    Metal/Rock Music and Everything Compu-tech !! :)

Recent Profile Visitors

1,786 profile views

msp301's Achievements

Newbie

Newbie (1/14)

  1. yeah thanks, I worked it out after posting that :)
  2. I am trying to move an object from 1 location in a 2D array to another, but I seem to be referencing the object itself and making it equal to another :S This a code snippet of what I've been doing, any pointers would be appreciated ChessPiece currentLocation = objBoard.board[curX][curY]; //current coordinates of piece ChessPiece destination = objBoard.board[desX][desY]; //intended destination if((desX == curX) && (desY == (curY + 1))) { destination = currentLocation; //copy contents of current location to destination square currentLocation = null; //remove contents of the old location to complete the piece move } Thanks :)
  3. I'm trying to make a sequence diagram where an object is created from another object, as I haven't been able to find any way to do this as of yet and it isn't covered in the Umbrello handbook :( Thanks
  4. Ahh decent, thanks ... it was not having GTK that was causing me problems in identifying my network interfaces, thanks for that, still brings back the errors of course, not sure what it is ... but at least it runs :) ... thanks again
  5. I've tried to run via sudo from the terminal and wireshark still gives the same errors, the terminal returns the following errors also: 2009-06-25 21:17:12.769 defaults[408:10b] The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist 2009-06-25 21:17:12.780 defaults[409:10b] The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist (process:398): Gdk-WARNING **: locale not supported by C library (wireshark-bin:398): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (wireshark-bin:398): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks", (wireshark-bin:398): Pango-WARNING **: Error loading GDEF table 28333 (wireshark-bin:398): Pango-WARNING **: Error loading GSUB table 28333 (wireshark-bin:398): Pango-WARNING **: Error loading GPOS table 28333 (wireshark-bin:398): Pango-WARNING **: Error loading GDEF table 28333 (wireshark-bin:398): Pango-WARNING **: Error loading GSUB table 28333 (wireshark-bin:398): Pango-WARNING **: Error loading GPOS table 28333
  6. What version of Leopard are you running? I've just installed Wireshark again on my system running 10.5.7 and I have been greeted with your error you are talking about ... I have also looked up this problem on the web and it seems that this is becoming a more common problem with the latest release of leopard (from what I can see) ... I did have Wireshark running without any problems on a previous version of 10.5 before ... if you really do want to run it, I could suggest downgrading if you have the option possibly with Time Capsule ?? ... Hope it helps to know you're not alone lol :)
  7. I've had a Toshiba for about 4 years now and I've used it everyday carrying the thing places, getting beaten about ... the general student life use of a notebook lol; whilst also using the machine as a test computer as well, so was almost reformatting the HDD with new OS almost every week trying out all the Linux OS's and stuff and it's still goin' as strong as it was when new :) ... it's even not a pistachio nut shell stuck somewhere under the keyboard and other crap, probably spilled loads of crap over it in it's time ... I'd definitely recommend looking at what Toshiba have to offer :) lol Note my laptop was only about £400 when new ... Toshiba Equium A100
  8. Are you saying that your trying to write a program that converts these characters from their standard text character to their HTML code alternative ?? ... and if so, what language will you be choosing to do so ?? ... ... otherwise I would recommend the only way to go about converting those characters is to go through your script and replace all these characters with their code alternative (using your text editors find and replace functions will make that easier) lol ... does that help ?? HTML Special Character Code Sheet
  9. OK, kinda means I don't have much choice :( ... but there we go, so far I've only messed about with simple CSS scripts, but all good fun learning something new :P Thanks for the feedback :)
  10. I'm writing a website which contains a customer login script in PHP using sessions to store the user's login information for their stay on the site. I have tested my code and I have found that my logout function does not work due to me using a HTML frameset to layout the page which causes the session to be reset if the website is refreshed ... is there any way to fix this without me having to remove the frameset and redesign the site Thanks :)
  11. Nice, thanks for that, I realized what I had done now before with my IF statement, thanks ... The only problem that I have now is trying to get my logout function working, at the moment the script will store the username and password details as session variables whilst also comparing the information entered with my sql database to check the user exists which is all good. Now I want to end the session with "session_destroy", yet I can't seem to get my logout variable to activate the IF statement. I have tried using GET to obtain it from the form as true and activate the function as well as calling a new script in a separate file and returning a session variable "logout" Been staring at this for hours, it looks as if it should work, but maybe I'm making the wrong approach Thanks again <?php session_start(); //deletes login details from session variables on logout if($_SESSION['logout'] == "true") { session_destroy(); } //parse entered user details and compare with mysql database records if (isset($_POST['username']) and ($_POST['pass'])) { //database login details $user = "root"; $password = "password"; //connects to sql database $connect = @mysql_connect("localhost",$user,$password) or die("Unable to Connect"); //load database $database = @mysql_select_db("my_database",$connect) or die("Database Connection Failed"); //create required database query $query = "select * from customers where username=\"$username\" and password=\"$pass\""; //runs created query $result = mysql_query($query,$connect) or die("Database Query Failed"); //compares user's login details with database records $matches = mysql_numrows($result); if ($matches != 0) { //Save login details to Session variables $_SESSION['username'] = $_POST['username']; $_SESSION['pass'] = $_POST['pass']; } else { //print failed login message $msg = "Login Failed"; echo("<html><body>".$msg."</body></html>"); } } //retrive user information from database using stored Session information if (isset($_SESSION['username']) and ($_SESSION['pass'])) { //database login details $user = "root"; $password = "password"; //connects to sql database $connect = @mysql_connect("localhost",$user,$password) or die("Unable to Connect"); //load database $database = @mysql_select_db("my_database",$connect) or die("Database Connection Failed"); //create required database query $query = "select * from customers where username=\"$username\" and password=\"$pass\""; //runs created query $result = mysql_query($query,$connect) or die("Database Query Failed"); //compares user's login details with database records $matches = mysql_numrows($result); //authenticate user login if ($matches != 0) { //Display Login Welcome Message $msg = "Hello, "; //retrives user's name from the database query while($row = mysql_fetch_array($result)) { //print login result echo("<html><body>".$msg.$row["forename"]."<form action=\"./scripts/logout.php\"><input type=\"submit\" value=\"Logout\"></form></body></html>"); } } } else { ?> <html> <body> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> Username:<input type="text" name="username"> Password:<input type="text" name="pass"> <input type="submit" value="Login"> </form> </body> </html> <?php } ?>
  12. I am trying to make a login form for a website that will pass the username and password to session variables so that the user's login details can be retained throughout their entire session on the site. I have written a script that should return the session variable values after a login has been made, but instead this is returning nothing at the moment; am I using sessions correctly or am I missing something about how they should be set up ? Thanks <?php session_start(); if($_POST['username'] and $_POST['pass']) { if($_SESSION['username'] == $_POST['username']) { if($_SESSION['pass'] == $_POST['pass']) { echo("Already Signed In"); } else { $_SESSION['username'] = $_POST['username']; $_SESSION['pass'] = $_POST['pass']; echo("Username = ".$_SESSION['username']."Password = ".$_SESSION['pass']); } } } ?> <html> <body> <form action="<?php PHP_SELF; ?>" method="post"> Username:<input type="text" name="username"> Password:<input type="text" name="pass"> <input type="submit" value="Login"> </form> </body> </html>
  13. Hey, I'm trying to comment out some code of a small program I've got and have come across the function "strdup"; I've tried looking up how the function should be used, but can't find a well written description, would anyone be able to explain what this function is designed to do ?? Thanks :)
  14. Thanks so much guys for all your help :) ... I've managed to correct my solution so that it works and thought I'd post my solution for anyone who would be interested to see Thanks again NSString *text; int random_num = random() % 3; switch (random_num) { case 0: text = @"dog"; break; case 1: text = @"cat"; break; case 2: text = @"rabbit"; break; default: text = @"ERROR"; break; } self.string = text; NSString *wordString = string; NSString *greeting = [[NSString alloc] initWithFormat:@"%@!", wordString]; label.text = greeting; [greeting release];
  15. Thanks for your reply, but I don't want to create an array already containing "random" numbers because I want a pointer to be randomly generated which will then refer to a position in my list, which in this case is being defined via the use of a switch statement rather than an array as I was getting confused about how to refer to an array in Objective-C
×
×
  • Create New...