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. ...
User Profile
Collapse
-
Question about Threads in C
-
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.... -
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?...Leave a comment:
-
Sudoku Solver: Given a text file with the format
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,...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
Last edited by RedSon; Oct 8 '07, 02:29 PM.Leave a comment:
-
Do you want me to post them here or somewhere else on this site?...Leave a comment:
-
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...Leave a comment:
-
Oooh, a Maze project.
If you are looking for something else, a couple of fun projects I had were:
Sudoku Solver
Queens Problem...Leave a comment:
-
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)....Leave a comment:
-
[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...Leave a comment:
-
Oooh, any one code me up a jet? I would like to fly one. Preferably lined with gold and bling bling....Leave a comment:
-
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?
:)...Leave a comment:
-
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...Leave a comment:
-
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...Leave a comment:
-
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!...Leave a comment:
-
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....Leave a comment:
-
-
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....Leave a comment:
-
-
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....Leave a comment:
-
Oooh! I can use a macro instead of a function! Thanks for the idea!...Leave a comment:
No activity results to display
Show More
Leave a comment: