sander242

Members
  • Content count

    57
  • Joined

  • Last visited

Community Reputation

122 Neutral

About sander242

  • Rank
    Member
  1. Thx, now i understand it, and i'm installing MySQL seperately :D
  2. yes, it seems that webmatrix installed MySQL automatically, and didn't tell me the password, that was funny, for a moment . And i found the MySQL installer, so i'm trying to fix my problem right now, but if anyone else has some ideas on this, then i'm open for suggestions
  3. After days and days of searching, i finally decided to ask someone. I want to make a SQL database, which has a password and a "root" administrator, unfortunately WebMatrix does not support this function. I don't want anything "fancy", just a database i can connect to using simple php: $db_connection = mysql_connect('localhost','user','password'); but searching the web has come up with nothing, because everyone has their own solution, but none of them even explain for what program the tutorial is for. So i thought maybe you guys with lots of Exp. points XDXD can help me.
  4. [web] PHP

    just responding to finish off the topic, all of you guys had great ideas, but one of the ideas was the easiest to implement stripslashes($str) and that did it. thx for answering else i would have never known such an element even existed in php :D
  5. [web] PHP

    I wrote a program kind of like a guest book. The problem is whenever someone inputs a " or ' or any other weird symbol like that, it writes it into a file, and then reads the whole guest book out of the file in a weird fashion. it outputs every " and ' as \" and \' and ... well you get my point, do you have any idea why backslashes are read out of the file if no one even wrote them. I don't know if it helps, but i used a new element i never used before called htmlentities i thought it had something to do with it, but deleting it didn't fix the problem either. If someone has some ideas it would be greatly appriciated :D
  6. SDL question

    ok thats a good idea i will try to implement it, if someone has some more ideas on how to do it then go ahead
  7. SDL question

    I have completed my program and everything works as it should, but could someone give some pointers on how to make a SDL_Rect increase and decrease incrementaly. for instance SDL_Rect rect; rect.x = constant; rect.y = constant2; rect.h = constant3; rect.w = variable; now i want to do it so that when i change the value of variable let's say from 25 to 50, that it just doesn't draw a new rectangle immediately with variable 50 but increases it's length til it's 50 smoothly. So in plain text, i want a smooth slider I already have given it some thought and if i had to do it i would do it trough a series of loops and drawing the rectangle over and over again, but maybe some of you have a better way of doing it. thx in advance to everyone who takes the time to think about this post :D
  8. question

    ok trial and error now shows that it fails EXACTLY at the FOR statement because i put a COUT in front of it and behind it, and it only printed the COUT that was in front of FOR statement EDIT: i also fixed the = operator problem, thx for that, that was a major typo
  9. question

    right i figured you wanted the full code, so here's the background. I wanted to write a program that could generate a random 64 bit or 128 bit password in HEX so a 26 character password with only letters or numbers. It's a good skill test :D. #include <iostream> #include <string> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <sstream> #include <fstream> using namespace std; int a, b, num, choice; string pass, temp, temp2; void number(){ num = 0; temp = ""; num = rand() %9 + 1; stringstream stream; stream << num; stream >> temp; pass = pass + temp; } void letter(){ num = 0; temp = ""; num = rand() %6 + 1; switch (num){ case 1: temp = "a"; break; case 2: temp = "b"; break; case 3: temp = "c"; break; case 4: temp = "d"; break; case 5: temp = "e"; break; case 6: temp = "f"; break; } pass = pass + temp; } void first(){ } void second(){ srand(time(NULL)); for(b = 0; b == 26; b++){ choice = rand() %2 + 1; if (choice = 1){ number(); } if(choice = 2){ letter(); } bool ready = true; } } int main(){ bool ready = false; string pass = ""; cout << "Do you want a 1.)64 bit password\n"; cout << " 2.)128 bit password\n"; cin >> a; switch(a){ case 1: { first(); break; } case 2: { second(); break; } } if (ready == true){ ofstream myfile; myfile.open("Pass.txt", ios::trunc); myfile << pass; myfile.close(); cout << "password is ready in Pass.txt"; } return 0; } so here's the full code, i only wrote the 128 bit version for now and i tried a different approach, but still it just skips past everything. i don't know if the string manipulation i'm trying to do are possible, but it doesn't matter anyway because the program never gets there :D. All kinds of help in any aspect of this program are greatly welcome.
  10. question

    i have a problem with the simplest c++ code you can imagine. here it is: #include <iostream> using namespace std; int a void subroutine(){ } void subroutine2(){ } int main(){ cout <<"input number : "; cin >> a; if(a==1){ subroutine; } if(a==2){ subroutine 2; } return 0; } or at least it looks something like that, but the most important parts are there. the problem is that it ignores the if statements completely. trough trial and error i have found out that the integer a gets the value i give him 1 or 2 but it doesn't resolve the IF statements, it just skips them and gets to the end. i have no idea why, maybe you can help me.
  11. languages

    So far not bad, i'm really impressed , cause i'm just a self learned newbie who can do 3 languages quite well, and my c++ is only good with SDL , but you have inspired me to keep upgrading my c++ skills in more than just game programming thx :D ,and i increased your rating too. but this doesn't mean that the topics over, keep those posts coming :D
  12. languages

    This is probably one of the most often asked questions of all which programming languages to learn, but i'm gonna take it a step further, so if all of you have the time maybe you'll answer 2 questions: 1) how many programming languages do you think anyone should know (and which ones are the most important? 2) how many do YOU know? the reason i'm asking i'm quite good in 3 languages, and i'm wondering what to learn next and if to learn something at all all contributions will be most appreciated :D THX in advance
  13. newbie question

    Pretty much, i just want it to go upwards Edit: you know what you helped me a lot and i just figured out how to do it, but its so complicated that i will just go with horizontal rectangles, because the x. coordinate goes exactly the way i need it to go :D thx anyhow , i'm a little bit smarter again:D
  14. newbie question

    this should be easy for you all. Trying to draw a rectangle with SDL, the problem is when i draw the rectangle, then whatever i have put as (rect.h = ?) rectangle height, it will be drawn downwards , but i want the rectangle to be drawn upwards not downwards. i think you get what i mean. i have tried to give height negative values, but that didn't obviously work otherwise i wouldn't be bothering you xD thx in advance :D
  15. drawing rectangles

    Hi, I'm using SDL and i have a question. I need to draw a rectangle with a fixed x(width) -variable, but a changing y(height) -variable. I thought of using SDL_FillRect somehow but that would fill the entire screen or any other surface i would choose. I believe it is easy to do what i need i just haven't learned it yet, so maybe you can help. thx in advance :D