User Profile

Collapse

Profile Sidebar

Collapse
mschenkelberg
mschenkelberg
Last Activity: Apr 15 '09, 12:59 AM
Joined: Jun 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mschenkelberg
    replied to Java Post method - Cookie Issue
    in Java
    usually cookie checking is done using client side javascript, the site might be checking to see if you are a valid browser by checking the user-agent property and seeing if it is a known browser. I'm not sure though, but I know it is possible to "pretend" to be a valid browser like firefox by doing something like url.setRequestP roperty("User-Agent", "user agent string"); . Maybe look into this.

    Max
    See more | Go to post

    Leave a comment:


  • take a look at httpunit.source forge.net, I don't know if that will help but I like to recommend it to as many people as I can :)

    Max
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Seat Assignment Program Problem
    in Java
    You defined "public static void setSeats (char Seats[][]);" that initialized all the Seats, I think you need to create a new function called setSeat maybe that takes in a row and column and sets only that one row/column Seat value.

    Max
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to segmentation when cout
    in C
    The two parameter constructor is defined here: http://cppreference.co m/cppvector/vector_construc tors.html

    If you left out any code post it.

    Max...
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to WIll this program cause any memory leak?
    in C
    Actually, you can declare an instance of a struct immediately after declaration. So in his case obj is an object. There are quite a few problems though.

    1. freeStruct is setting your "obj" to null, so therefore why would you pass in another struct for the size?

    2. when doing memory copies always use the size of the struct. eg sizeof(struct emp);

    3. line 24 needs the address of "eno"....
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Move cursor in cin input
    in C
    Well, you have to do two things.

    1. disable terminal echo using the termio library. This involves creating a struct and turning the ECHO flag off. Sorry I don't have sample code, just look up "disable terminal echo"

    2. Once you have disable it, you can only read a char at a time in and you have to output it yourself if you want it to echo to the terminal. This allows you to move the cursor with the arrow...
    See more | Go to post

    Leave a comment:


  • The way you would use a map is as follows:

    #include<map>
    ...

    int main()
    {
    char key[100];
    struct structA A;
    map<char *, void * > theMap;
    /* Insert all structs into the map that you have like so: */
    theMap["structA"] = (void *)&A;

    cin >> key;
    void * aStruct = theMap[key];...
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Reverse terminal output
    in C
    Thanks, but this program needs to run on linux. Are there equivalent linux functions?
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Reverse terminal output
    in C
    Nope \b only delete up to beginning of current line. Thanks for the response though....
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to namespace problem
    in C
    I don't know about namespaces, but you could create a shared library with "ar"
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Question about cout.
    in C
    Post the rest of your code?...
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    started a topic Reverse terminal output
    in C

    Reverse terminal output

    I was wondering if it is easy to direct output in a scenario where the program gets user input from stdin and instead of outputting result on next line after use hits enter, it will output on same line user entered input.

    Normally this happens because user must press enter to submit text
    ./test
    Please enter a number: 32
    You entered 32.

    I would like to do this:
    ./test
    Please enter a...
    See more | Go to post

  • mschenkelberg
    replied to print to end of line in a terminal
    I was wondering about that too, except not same line. Scenario where program gets user input from stdin and instead of outputting result on next line, output same line user entered input.

    Normally this happens because user must press enter to submit text
    ./test
    Please enter a number: 32
    You entered 32.

    I would like to do this:
    ./test
    Please enter a number: 32 You entered 32.
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to incorrect answer
    in C
    what do you pass to the program?
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Problrm in invesing a char array
    in C
    declare function after using namespace std;...
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Template member function error
    in C
    gnu compiler wants you to only have declarations in the header file and all implementation in the .cpp file when using templates.

    Max
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Help with a Matrix Multiplication program
    in C
    It means make a one-D array row*col in size and when you want to access an item in 2-D format, instead of having a 2D array and using arr[row][col] you would use your 1d array and access it by doing arr[ NUMROWS*ROWyouW ANTtoACCESS + COLyouWANTtoACC ESS].

    Max
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to shorten the string variable?
    in C
    You could create a static const char * array for each menu category, then use a for loop to populate them.

    Max
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Trimming special(?) characters with sscanf
    in C
    if you want to trim off [ ] or anything from a C string the best function to use is strtok.
    See more | Go to post

    Leave a comment:


  • mschenkelberg
    replied to Help resolving errors in C++ program
    in C
    a switch statement and call the class function based on the user choice?

    Max
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...