User Profile

Collapse

Profile Sidebar

Collapse
kreagan
kreagan
Last Activity: Mar 12 '08, 07:17 PM
Joined: Aug 16 '07
Location: New Hampshire
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kreagan
    started a topic Question about Threads in C
    in C

    Question about Threads in C

    I have software for a BERT that networks with a external database (SMU). The program requests information from the SMU and waits for a response. Sometimes, the software hangs while waiting for the information.

    To prevent the program from hanging, I decided to create a threading system such that a timer will indicate if the read procedure is hung. If this is so, the program will have to cancel the read and perform some analysis. ...
    See more | Go to post

  • The comment wasn't ment to undermind your efforts at all. I'm just confused why you are stuck since you did the second one with no help from this forum.

    Maybe this might help you. The first problems uses the exact same principles as the second except changes what you are looking for. Instead of finding the area, you are creating a number that is the addition of the two given variables and a multiplication of the two....
    See more | Go to post

    Leave a comment:


  • Do you not understand the question? (Quite honestly, I think the second question was trickier than the first.) Why is the first question giving you problems?...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Any Mini Project In C
    in C
    Sudoku Solver: Given a text file with the format

    Code:
    5 3 - - 7 - - - -
    6 - - 1 9 5 - - -
    - 9 8 - - - - 6 - 
    8 - - - 6 - - - 3
    4 - - 8 - 3 - - 1 
    7 - - - 2 - - - 6
    - 6 - - - - 2 8 -
    - - - 4 1 9 - - 5
    - - - - 8 - - 7 9
    Create a Sudoku solver to solve this problem. Each row, column, and 3x3 block section should contain the numbers 1 through 9. However, each row, column,...
    See more | Go to post
    Last edited by RedSon; Oct 8 '07, 02:29 PM.

    Leave a comment:


  • kreagan
    replied to Any Mini Project In C
    in C
    Do you want me to post them here or somewhere else on this site?...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Nim program.
    in Java
    Difference is equal to R. R never changes nor does Difference. Therefore, the while loop will never break.

    I would suggest using 2 nested for loops. 1 loop to iterate down and the other to iterate across.

    To print out the moves each time, just put a loop that terminates when someone wins (there are no sticks).

    And what do you mean incorporate all past moves? Are you saying print out all moves taken...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Any Mini Project In C
    in C
    Oooh, a Maze project.

    If you are looking for something else, a couple of fun projects I had were:

    Sudoku Solver
    Queens Problem...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to global variables/passing
    in C
    lol. I know. I really do like the motto. The comment afterwards was just me being silly. It doesn't really reflect what truely happens in reality (as you showed above)....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Nonlinear Function
    in C
    [CODE=c]

    int createFunction( double &exponent, double &offset, double &coeff)

    exponent = random(100)+2;
    offset = random(100) + 1;
    coeff = random(100);

    )

    int useFunction( double x, double exponent, double offset, double coeff){
    return ( ( coeff * pow(x,exponent) ) + offset))
    }
    [/CODE]

    WRITING IN ALL CAPS IS RUDE. The functions...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Miniproject In C++
    in C
    Oooh, any one code me up a jet? I would like to fly one. Preferably lined with gold and bling bling....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to global variables/passing
    in C
    I like that motto. But what happens if soon your program runs with a limp? Or falls down and breaks its ankle? Would you call that history or did I over look some omens and forget to talk to my soothsayer?

    :)...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to getting image from db
    in Java
    I'm sorry, I'm really confused. Are you saying the popup window will actively retrieve the image or are you asking if this is a good idea. Though there are other design techniques, I'm a little familiar with MVC (Model View Controller). The View (popup window) shouldn't know the database exists.

    If I was designing it, the controller would retrieve the information from database when an event has been triggered, pop up a window, then...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Nonlinear Function
    in C
    That's a very general discription of an algorithm. For example, what is your termination condition? I agree with Sicarie, what is perturbations. I searched the term on the internet. I found perturbation theory (definition I found on perturbation doesn't seem to apply), but that information seems very general too. Could you explain the contex of that word?





    There is nothing random with the expression...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Optimizing C++ Case Statement
    in C
    These are just guesses:

    1.) From what I heard, switch statements run faster than if else statement (just barely).
    2.) To force you to try something new for a change.
    3.) If she told you to use a switch statement, then she's either silly, stupid, or enjoys seeing her students suffer!...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to C++ Program to Calculate X^Y
    in C
    X is equal than 1, continue while X is greater than 0, after each iteration, increase X by 1.

    I hope you see atleast 1 problem with this for loop....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to C++ Program to Calculate X^Y
    in C
    (define x x)
    (define y y)
    (pow x y)

    hehehehe....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Trouble optimizing for-loop
    in C
    I don't understand why this is recursive



    50 iterations shouldn't take very long. If you took out the "getNumber" function but stilled timed it, the time should be less than 1 second. I'm guessing it takes your getNumber function about a second to complete. I would suggest analysing that function instead of the for-loop.

    If you are having problems with pointers, try looking at these web resources....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to c book
    in C
    I second that. It's extremely popular too. :)...
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Student Question
    in C
    You do need to use the functions toupper and tolower. (Atleast that is how would do it). And iterate through the whole string changing accordingly.

    what do you mean by "all mixed up"? Does this mean I can input "MichEAL Jackson" and you need to convert it to "Micheal Jackson"?

    PS. Your homework question was better written than most. Write the question verbatum and demand we write them code....
    See more | Go to post

    Leave a comment:


  • kreagan
    replied to Size of an array
    in C
    Oooh! I can use a macro instead of a function! Thanks for the idea!...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...